RTEMS 4.11Annotated Report
Sat Mar 19 23:24:22 2011
0004a394 <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 ) {
4a394: 7007 moveq #7,%d0
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
4a396: 4e56 0000 linkw %fp,#0
4a39a: 206e 0008 moveal %fp@(8),%a0
4a39e: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4a3a0: 2468 0010 moveal %a0@(16),%a2
switch( node->type ) {
4a3a4: 2250 moveal %a0@,%a1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4a3a6: 246a 0034 moveal %a2@(52),%a2
switch( node->type ) {
4a3aa: b0a9 0048 cmpl %a1@(72),%d0
4a3ae: 6526 bcss 4a3d6 <IMFS_Set_handlers+0x42> <== NEVER TAKEN
4a3b0: 2029 0048 movel %a1@(72),%d0
4a3b4: d080 addl %d0,%d0
4a3b6: 303b 0808 movew %pc@(4a3c0 <IMFS_Set_handlers+0x2c>,%d0:l),%d0
4a3ba: 48c0 extl %d0
4a3bc: 4efb 0802 jmp %pc@(4a3c0 <IMFS_Set_handlers+0x2c>,%d0:l)
4a3c0: 0016 .short 0x0016 <== NOT EXECUTED
4a3c2: 0010 .short 0x0010 <== NOT EXECUTED
4a3c4: 004c .short 0x004c <== NOT EXECUTED
4a3c6: 002c .short 0x002c <== NOT EXECUTED
4a3c8: 002c .short 0x002c <== NOT EXECUTED
4a3ca: 001e .short 0x001e <== NOT EXECUTED
4a3cc: 001e .short 0x001e <== NOT EXECUTED
4a3ce: 003e .short 0x003e <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
4a3d0: 216a 000c 0008 movel %a2@(12),%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a3d6: 245f moveal %sp@+,%a2
4a3d8: 4280 clrl %d0
4a3da: 4e5e unlk %fp
4a3dc: 4e75 rts
4a3de: 4280 clrl %d0
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
4a3e0: 216a 0008 0008 movel %a2@(8),%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a3e6: 245f moveal %sp@+,%a2
4a3e8: 4e5e unlk %fp
4a3ea: 4e75 rts
4a3ec: 245f moveal %sp@+,%a2
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
4a3ee: 203c 0005 d0b4 movel #381108,%d0
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a3f4: 4e5e unlk %fp
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
4a3f6: 2140 0008 movel %d0,%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a3fa: 4280 clrl %d0
4a3fc: 4e75 rts
4a3fe: 4280 clrl %d0
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
4a400: 216a 0010 0008 movel %a2@(16),%a0@(8)
break;
}
return 0;
}
4a406: 245f moveal %sp@+,%a2
4a408: 4e5e unlk %fp
4a40a: 4e75 rts
4a40c: 245f moveal %sp@+,%a2
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
4a40e: 203c 0005 d044 movel #380996,%d0
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a414: 4e5e unlk %fp
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
4a416: 2140 0008 movel %d0,%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a41a: 4280 clrl %d0 <== NOT EXECUTED
0004ad54 <IMFS_check_node_remove>:
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
4ad54: 4e56 0000 linkw %fp,#0
4ad58: 2f0a movel %a2,%sp@-
4ad5a: 246e 0008 moveal %fp@(8),%a2
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
4ad5e: 2f0a movel %a2,%sp@-
4ad60: 4eb9 0004 b452 jsr 4b452 <rtems_libio_is_file_open>
4ad66: 588f addql #4,%sp
4ad68: 4a80 tstl %d0
4ad6a: 6634 bnes 4ada0 <IMFS_check_node_remove+0x4c>
4ad6c: 4a6a 0032 tstw %a2@(50)
4ad70: 662e bnes 4ada0 <IMFS_check_node_remove+0x4c>
if ( rtems_filesystem_current.node_access == jnode )
4ad72: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
4ad78: b5e8 0004 cmpal %a0@(4),%a2
4ad7c: 6744 beqs 4adc2 <IMFS_check_node_remove+0x6e>
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
4ad7e: 202a 0048 movel %a2@(72),%d0
4ad82: 7204 moveq #4,%d1
4ad84: b280 cmpl %d0,%d1
4ad86: 6748 beqs 4add0 <IMFS_check_node_remove+0x7c>
4ad88: 123c 0005 moveb #5,%d1
4ad8c: b280 cmpl %d0,%d1
4ad8e: 6718 beqs 4ada8 <IMFS_check_node_remove+0x54>
break;
default:
break;
}
free( jnode );
4ad90: 2d4a 0008 movel %a2,%fp@(8)
}
}
4ad94: 246e fffc moveal %fp@(-4),%a2
4ad98: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4ad9a: 4ef9 0004 2fe4 jmp 42fe4 <free>
}
}
4ada0: 246e fffc moveal %fp@(-4),%a2
4ada4: 4e5e unlk %fp
4ada6: 4e75 rts
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
4ada8: 2f0a movel %a2,%sp@-
4adaa: 4eb9 0004 ca28 jsr 4ca28 <IMFS_memfile_remove>
break;
4adb0: 588f addql #4,%sp
break;
default:
break;
}
free( jnode );
4adb2: 2d4a 0008 movel %a2,%fp@(8)
}
}
4adb6: 246e fffc moveal %fp@(-4),%a2
4adba: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4adbc: 4ef9 0004 2fe4 jmp 42fe4 <free>
{
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
4adc2: 202a 0048 movel %a2@(72),%d0
4adc6: 7204 moveq #4,%d1
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
4adc8: 42a8 0004 clrl %a0@(4)
switch ( jnode->type ) {
4adcc: b280 cmpl %d0,%d1
4adce: 66b8 bnes 4ad88 <IMFS_check_node_remove+0x34> <== ALWAYS TAKEN
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
break;
case IMFS_SYM_LINK:
free( jnode->info.sym_link.name );
4add0: 2f2a 004c movel %a2@(76),%sp@-
4add4: 4eb9 0004 2fe4 jsr 42fe4 <free>
break;
4adda: 588f addql #4,%sp
default:
break;
}
free( jnode );
4addc: 2d4a 0008 movel %a2,%fp@(8)
}
}
4ade0: 246e fffc moveal %fp@(-4),%a2
4ade4: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4ade6: 4ef9 0004 2fe4 jmp 42fe4 <free>
0004a164 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
4a164: 4e56 ffec linkw %fp,#-20
4a168: 206e 0008 moveal %fp@(8),%a0
4a16c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4a170: 242e 000c movel %fp@(12),%d2
4a174: 286e 0018 moveal %fp@(24),%a4
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
4a178: 4a88 tstl %a0
4a17a: 6700 00ac beqw 4a228 <IMFS_create_node+0xc4>
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4a17e: 2268 0010 moveal %a0@(16),%a1
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a182: 7007 moveq #7,%d0
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
4a184: 2650 moveal %a0@,%a3
fs_info = parent_loc->mt_entry->fs_info;
4a186: 2469 0034 moveal %a1@(52),%a2
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a18a: b082 cmpl %d2,%d0
4a18c: 6700 008c beqw 4a21a <IMFS_create_node+0xb6>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4a190: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
4a196: 2028 002c movel %a0@(44),%d0
4a19a: 4680 notl %d0
4a19c: c0ae 0014 andl %fp@(20),%d0
4a1a0: 2f00 movel %d0,%sp@-
4a1a2: 2f2e 0010 movel %fp@(16),%sp@-
4a1a6: 2f02 movel %d2,%sp@-
4a1a8: 4eb9 0004 a0f0 jsr 4a0f0 <IMFS_allocate_node>
if ( !node )
4a1ae: 4fef 000c lea %sp@(12),%sp
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4a1b2: 2a40 moveal %d0,%a5
if ( !node )
4a1b4: 4a80 tstl %d0
4a1b6: 6756 beqs 4a20e <IMFS_create_node+0xaa>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
4a1b8: 7001 moveq #1,%d0
4a1ba: b082 cmpl %d2,%d0
4a1bc: 6778 beqs 4a236 <IMFS_create_node+0xd2>
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
4a1be: 7003 moveq #3,%d0
4a1c0: b082 cmpl %d2,%d0
4a1c2: 6700 00d6 beqw 4a29a <IMFS_create_node+0x136>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
4a1c6: 7204 moveq #4,%d1
4a1c8: b282 cmpl %d2,%d1
4a1ca: 6700 00ce beqw 4a29a <IMFS_create_node+0x136>
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
4a1ce: 7002 moveq #2,%d0
4a1d0: b082 cmpl %d2,%d0
4a1d2: 6700 0098 beqw 4a26c <IMFS_create_node+0x108>
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
4a1d6: 7206 moveq #6,%d1
4a1d8: b282 cmpl %d2,%d1
4a1da: 6700 010e beqw 4a2ea <IMFS_create_node+0x186>
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
4a1de: 7205 moveq #5,%d1
4a1e0: b282 cmpl %d2,%d1
4a1e2: 6700 013a beqw 4a31e <IMFS_create_node+0x1ba>
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
4a1e6: 7207 moveq #7,%d1
4a1e8: b282 cmpl %d2,%d1
4a1ea: 6700 00d6 beqw 4a2c2 <IMFS_create_node+0x15e>
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a1ee: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
4a1f2: 5280 addql #1,%d0 <== NOT EXECUTED
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a1f4: 2b4b 0008 movel %a3,%a5@(8) <== NOT EXECUTED
node->st_ino = ++fs_info->ino_count;
4a1f8: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED
4a1fc: 2b40 0034 movel %d0,%a5@(52) <== NOT EXECUTED
4a200: 2f0d movel %a5,%sp@- <== NOT EXECUTED
4a202: 486b 004c pea %a3@(76) <== NOT EXECUTED
4a206: 4eb9 0004 7184 jsr 47184 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a20c: 508f addql #8,%sp <== NOT EXECUTED
}
4a20e: 200d movel %a5,%d0
4a210: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4a216: 4e5e unlk %fp
4a218: 4e75 rts
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a21a: 223c 0005 cfd4 movel #380884,%d1
4a220: b2aa 0010 cmpl %a2@(16),%d1
4a224: 6600 ff6a bnew 4a190 <IMFS_create_node+0x2c>
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
4a228: 9bcd subal %a5,%a5
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
4a22a: 200d movel %a5,%d0
4a22c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4a232: 4e5e unlk %fp
4a234: 4e75 rts
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4a236: 41ed 0050 lea %a5@(80),%a0
4a23a: 2b48 004c movel %a0,%a5@(76)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4a23e: 41ed 004c lea %a5@(76),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4a242: 42ad 0050 clrl %a5@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4a246: 2b48 0054 movel %a0,%a5@(84)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a24a: 202a 0004 movel %a2@(4),%d0
4a24e: 5280 addql #1,%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a250: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a254: 2540 0004 movel %d0,%a2@(4)
4a258: 2b40 0034 movel %d0,%a5@(52)
4a25c: 2f0d movel %a5,%sp@-
4a25e: 486b 004c pea %a3@(76)
4a262: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a268: 508f addql #8,%sp
4a26a: 60a2 bras 4a20e <IMFS_create_node+0xaa>
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
4a26c: 2b54 004c movel %a4@,%a5@(76)
node->info.device.minor = info->device.minor;
4a270: 2b6c 0004 0050 movel %a4@(4),%a5@(80)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a276: 202a 0004 movel %a2@(4),%d0
4a27a: 5280 addql #1,%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a27c: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a280: 2540 0004 movel %d0,%a2@(4)
4a284: 2b40 0034 movel %d0,%a5@(52)
4a288: 2f0d movel %a5,%sp@-
4a28a: 486b 004c pea %a3@(76)
4a28e: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a294: 508f addql #8,%sp
4a296: 6000 ff76 braw 4a20e <IMFS_create_node+0xaa>
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
4a29a: 2b54 004c movel %a4@,%a5@(76)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a29e: 202a 0004 movel %a2@(4),%d0
4a2a2: 5280 addql #1,%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a2a4: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a2a8: 2540 0004 movel %d0,%a2@(4)
4a2ac: 2b40 0034 movel %d0,%a5@(52)
4a2b0: 2f0d movel %a5,%sp@-
4a2b2: 486b 004c pea %a3@(76)
4a2b6: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a2bc: 508f addql #8,%sp
4a2be: 6000 ff4e braw 4a20e <IMFS_create_node+0xaa>
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
node->info.fifo.pipe = NULL;
4a2c2: 42ad 004c clrl %a5@(76)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a2c6: 202a 0004 movel %a2@(4),%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a2ca: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a2ce: 5280 addql #1,%d0
4a2d0: 2540 0004 movel %d0,%a2@(4)
4a2d4: 2b40 0034 movel %d0,%a5@(52)
4a2d8: 2f0d movel %a5,%sp@-
4a2da: 486b 004c pea %a3@(76)
4a2de: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a2e4: 508f addql #8,%sp
4a2e6: 6000 ff26 braw 4a20e <IMFS_create_node+0xaa>
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
4a2ea: 42ad 0054 clrl %a5@(84)
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
4a2ee: 4280 clrl %d0
4a2f0: 4281 clrl %d1
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a2f2: 2b4b 0008 movel %a3,%a5@(8)
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
4a2f6: 2b40 004c movel %d0,%a5@(76)
4a2fa: 2b41 0050 movel %d1,%a5@(80)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a2fe: 202a 0004 movel %a2@(4),%d0
4a302: 5280 addql #1,%d0
4a304: 2540 0004 movel %d0,%a2@(4)
4a308: 2b40 0034 movel %d0,%a5@(52)
4a30c: 2f0d movel %a5,%sp@-
4a30e: 486b 004c pea %a3@(76)
4a312: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a318: 508f addql #8,%sp
4a31a: 6000 fef2 braw 4a20e <IMFS_create_node+0xaa>
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
node->info.file.indirect = 0;
4a31e: 42ad 0054 clrl %a5@(84)
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
4a322: 4280 clrl %d0
4a324: 4281 clrl %d1
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
4a326: 42ad 0058 clrl %a5@(88)
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
4a32a: 2b40 004c movel %d0,%a5@(76)
4a32e: 2b41 0050 movel %d1,%a5@(80)
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
4a332: 42ad 005c clrl %a5@(92)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a336: 202a 0004 movel %a2@(4),%d0
4a33a: 5280 addql #1,%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a33c: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a340: 2540 0004 movel %d0,%a2@(4)
4a344: 2b40 0034 movel %d0,%a5@(52)
4a348: 2f0d movel %a5,%sp@-
4a34a: 486b 004c pea %a3@(76)
4a34e: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a354: 508f addql #8,%sp
4a356: 6000 feb6 braw 4a20e <IMFS_create_node+0xaa>
0004a35a <IMFS_create_root_node>:
return node;
}
IMFS_jnode_t *IMFS_create_root_node(void)
{
4a35a: 4e56 0000 linkw %fp,#0
IMFS_jnode_t *node;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) );
4a35e: 4878 41ed pea 41ed <D_MAX_EXP+0x39ee>
4a362: 4879 0005 ce36 pea 5ce36 <rtems_filesystem_default_pathconf+0xb4>
4a368: 4878 0001 pea 1 <ADD>
4a36c: 4eb9 0004 a0f0 jsr 4a0f0 <IMFS_allocate_node>
if ( !node )
4a372: 4fef 000c lea %sp@(12),%sp
4a376: 4a80 tstl %d0
4a378: 6716 beqs 4a390 <IMFS_create_root_node+0x36> <== NEVER TAKEN
Chain_Node *tail = _Chain_Tail( the_chain );
4a37a: 2240 moveal %d0,%a1
head->next = tail;
head->previous = NULL;
4a37c: 2040 moveal %d0,%a0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4a37e: 43e9 0050 lea %a1@(80),%a1
4a382: 2149 004c movel %a1,%a0@(76)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4a386: 5989 subql #4,%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4a388: 42a8 0050 clrl %a0@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4a38c: 2149 0054 movel %a1,%a0@(84)
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
return node;
}
4a390: 4e5e unlk %fp <== NOT EXECUTED
00045214 <IMFS_dump_directory>:
*/
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
45214: 4e56 ffe0 linkw %fp,#-32
45218: 206e 0008 moveal %fp@(8),%a0
4521c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
45220: 2808 movel %a0,%d4
45222: 0684 0000 0050 addil #80,%d4
45228: 262e 000c movel %fp@(12),%d3
*
*/
int IMFS_memfile_maximum_size( void )
{
return IMFS_MEMFILE_MAXIMUM_SIZE;
}
4522c: 2668 004c moveal %a0@(76),%a3
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
45230: b88b cmpl %a3,%d4
45232: 6754 beqs 45288 <IMFS_dump_directory+0x74>
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
45234: 2a03 movel %d3,%d5
45236: 49f9 0004 5088 lea 45088 <IMFS_print_jnode>,%a4
4523c: 45f9 0005 3118 lea 53118 <fwrite>,%a2
45242: 5285 addql #1,%d5
45244: 4bf9 0004 5214 lea 45214 <IMFS_dump_directory>,%a5
!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++ )
4524a: 4a83 tstl %d3
4524c: 6d26 blts 45274 <IMFS_dump_directory+0x60> <== NEVER TAKEN
4524e: 4282 clrl %d2
fprintf(stdout, "...." );
45250: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
!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++ )
45256: 5282 addql #1,%d2
fprintf(stdout, "...." );
45258: 2f28 0008 movel %a0@(8),%sp@-
4525c: 4878 0004 pea 4 <CONTEXT_ARG>
45260: 4878 0001 pea 1 <ADD>
45264: 4879 0006 2937 pea 62937 <IntUartPollCallbacks.6330+0x83>
4526a: 4e92 jsr %a2@
!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++ )
4526c: 4fef 0010 lea %sp@(16),%sp
45270: b483 cmpl %d3,%d2
45272: 6fdc bles 45250 <IMFS_dump_directory+0x3c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
45274: 2f0b movel %a3,%sp@-
45276: 4e94 jsr %a4@
if ( the_jnode->type == IMFS_DIRECTORY )
45278: 588f addql #4,%sp
4527a: 7001 moveq #1,%d0
4527c: b0ab 0048 cmpl %a3@(72),%d0
45280: 6710 beqs 45292 <IMFS_dump_directory+0x7e>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
45282: 2653 moveal %a3@,%a3
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
45284: b88b cmpl %a3,%d4
45286: 66c2 bnes 4524a <IMFS_dump_directory+0x36>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
45288: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
4528e: 4e5e unlk %fp
45290: 4e75 rts
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
45292: 2f05 movel %d5,%sp@-
45294: 2f0b movel %a3,%sp@-
45296: 4e95 jsr %a5@
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
45298: 2653 moveal %a3@,%a3
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
4529a: 508f addql #8,%sp
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
4529c: b88b cmpl %a3,%d4
4529e: 66aa bnes 4524a <IMFS_dump_directory+0x36>
452a0: 60e6 bras 45288 <IMFS_dump_directory+0x74>
0004a4a4 <IMFS_eval_path>:
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 ) ) {
4a4a4: 70f8 moveq #-8,%d0
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a4a6: 4e56 ffb0 linkw %fp,#-80
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 ) ) {
4a4aa: c0ae 0010 andl %fp@(16),%d0
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a4ae: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4a4b2: 2a6e 0008 moveal %fp@(8),%a5
4a4b6: 246e 000c moveal %fp@(12),%a2
4a4ba: 286e 0014 moveal %fp@(20),%a4
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 ) ) {
4a4be: 4a80 tstl %d0
4a4c0: 6600 0238 bnew 4a6fa <IMFS_eval_path+0x256>
4a4c4: 2c0e movel %fp,%d6
4a4c6: 280e movel %fp,%d4
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
4a4c8: 4282 clrl %d2
4a4ca: 5986 subql #4,%d6
4a4cc: 0684 ffff ffdb addil #-37,%d4
4a4d2: 2a3c 0004 ac30 movel #306224,%d5
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a4d8: 2e3c 0004 abb4 movel #306100,%d7
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4a4de: 2654 moveal %a4@,%a3
* 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], pathnamelen, token, &len );
4a4e0: 2f06 movel %d6,%sp@-
4a4e2: 2045 moveal %d5,%a0
4a4e4: 2f04 movel %d4,%sp@-
4a4e6: 2f0a movel %a2,%sp@-
4a4e8: 4875 2800 pea %a5@(00000000,%d2:l)
4a4ec: 4e90 jsr %a0@
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4a4ee: 2054 moveal %a4@,%a0
* 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], pathnamelen, token, &len );
4a4f0: 2600 movel %d0,%d3
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4a4f2: 4fef 0010 lea %sp@(16),%sp
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
4a4f6: 202e fffc movel %fp@(-4),%d0
i += len;
if ( !pathloc->node_access )
4a4fa: 4a88 tstl %a0
4a4fc: 6700 00f8 beqw 4a5f6 <IMFS_eval_path+0x152>
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
4a500: 95c0 subal %d0,%a2
i += len;
4a502: d480 addl %d0,%d2
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4a504: 4a83 tstl %d3
4a506: 6662 bnes 4a56a <IMFS_eval_path+0xc6>
* 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 ) {
4a508: 7201 moveq #1,%d1
4a50a: b2a8 0048 cmpl %a0@(72),%d1
4a50e: 6600 0132 bnew 4a642 <IMFS_eval_path+0x19e>
if ( node->info.directory.mt_fs != NULL ) {
4a512: 2068 0058 moveal %a0@(88),%a0
4a516: 4a88 tstl %a0
4a518: 6700 0128 beqw 4a642 <IMFS_eval_path+0x19e>
4a51c: 28a8 001c movel %a0@(28),%a4@
4a520: 2268 0028 moveal %a0@(40),%a1
4a524: 2628 0020 movel %a0@(32),%d3
4a528: 2228 0024 movel %a0@(36),%d1
4a52c: 2028 002c movel %a0@(44),%d0
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4a530: 2f0c movel %a4,%sp@-
4a532: 2f2e 0010 movel %fp@(16),%sp@-
4a536: 206e fffc moveal %fp@(-4),%a0
4a53a: 4872 8800 pea %a2@(00000000,%a0:l)
4a53e: 9488 subl %a0,%d2
4a540: 4875 2800 pea %a5@(00000000,%d2:l)
4a544: 2051 moveal %a1@,%a0
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
4a546: 2943 0004 movel %d3,%a4@(4)
4a54a: 2941 0008 movel %d1,%a4@(8)
4a54e: 2949 000c movel %a1,%a4@(12)
4a552: 2940 0010 movel %d0,%a4@(16)
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4a556: 4e90 jsr %a0@
4a558: 4fef 0010 lea %sp@(16),%sp
4a55c: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a55e: 2003 movel %d3,%d0
4a560: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a566: 4e5e unlk %fp
4a568: 4e75 rts
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
4a56a: 7001 moveq #1,%d0
4a56c: b0ab 0048 cmpl %a3@(72),%d0
4a570: 6700 00b8 beqw 4a62a <IMFS_eval_path+0x186>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
4a574: 2648 moveal %a0,%a3
switch( type ) {
4a576: 7003 moveq #3,%d0
4a578: b083 cmpl %d3,%d0
4a57a: 671c beqs 4a598 <IMFS_eval_path+0xf4>
4a57c: 7204 moveq #4,%d1
4a57e: b283 cmpl %d3,%d1
4a580: 6700 008e beqw 4a610 <IMFS_eval_path+0x16c>
4a584: 103c 0002 moveb #2,%d0
4a588: b083 cmpl %d3,%d0
4a58a: 6748 beqs 4a5d4 <IMFS_eval_path+0x130>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
4a58c: 7004 moveq #4,%d0
4a58e: b083 cmpl %d3,%d0
4a590: 6600 ff4e bnew 4a4e0 <IMFS_eval_path+0x3c>
4a594: 6000 ff72 braw 4a508 <IMFS_eval_path+0x64> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
4a598: 2028 0048 movel %a0@(72),%d0
4a59c: 7203 moveq #3,%d1
4a59e: b280 cmpl %d0,%d1
4a5a0: 6700 00d8 beqw 4a67a <IMFS_eval_path+0x1d6>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
4a5a4: 7204 moveq #4,%d1
4a5a6: b280 cmpl %d0,%d1
4a5a8: 6700 0134 beqw 4a6de <IMFS_eval_path+0x23a>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4a5ac: 7201 moveq #1,%d1
4a5ae: b280 cmpl %d0,%d1
4a5b0: 6600 0162 bnew 4a714 <IMFS_eval_path+0x270>
/*
* 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 ) {
4a5b4: 206b 0058 moveal %a3@(88),%a0
4a5b8: 4a88 tstl %a0
4a5ba: 6600 ff60 bnew 4a51c <IMFS_eval_path+0x78>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a5be: 2f04 movel %d4,%sp@-
4a5c0: 2047 moveal %d7,%a0
4a5c2: 2f0b movel %a3,%sp@-
4a5c4: 4e90 jsr %a0@
if ( !node )
4a5c6: 508f addql #8,%sp
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a5c8: 2640 moveal %d0,%a3
if ( !node )
4a5ca: 4a80 tstl %d0
4a5cc: 6728 beqs 4a5f6 <IMFS_eval_path+0x152>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
4a5ce: 288b movel %a3,%a4@
4a5d0: 6000 ff0e braw 4a4e0 <IMFS_eval_path+0x3c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4a5d4: 2279 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a1
4a5da: b1e9 0018 cmpal %a1@(24),%a0
4a5de: 6700 ff00 beqw 4a4e0 <IMFS_eval_path+0x3c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
4a5e2: 226c 0010 moveal %a4@(16),%a1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4a5e6: b1e9 001c cmpal %a1@(28),%a0
4a5ea: 6700 00a4 beqw 4a690 <IMFS_eval_path+0x1ec>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
4a5ee: 2668 0008 moveal %a0@(8),%a3
4a5f2: 4a8b tstl %a3
4a5f4: 66d8 bnes 4a5ce <IMFS_eval_path+0x12a>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
4a5f6: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a5fc: 76ff moveq #-1,%d3
4a5fe: 7a02 moveq #2,%d5
4a600: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a602: 2003 movel %d3,%d0
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
4a604: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a606: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a60c: 4e5e unlk %fp
4a60e: 4e75 rts
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4a610: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a616: 76ff moveq #-1,%d3
4a618: 785b moveq #91,%d4
4a61a: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a61c: 2003 movel %d3,%d0
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4a61e: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a620: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a626: 4e5e unlk %fp
4a628: 4e75 rts
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
4a62a: 4878 0001 pea 1 <ADD>
4a62e: 2f0c movel %a4,%sp@-
4a630: 4eb9 0004 a41e jsr 4a41e <IMFS_evaluate_permission>
4a636: 508f addql #8,%sp
4a638: 4a80 tstl %d0
4a63a: 6724 beqs 4a660 <IMFS_eval_path+0x1bc>
4a63c: 2054 moveal %a4@,%a0
4a63e: 6000 ff34 braw 4a574 <IMFS_eval_path+0xd0>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4a642: 2f0c movel %a4,%sp@-
4a644: 4eb9 0004 a394 jsr 4a394 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
4a64a: 2eae 0010 movel %fp@(16),%sp@
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4a64e: 2600 movel %d0,%d3
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
4a650: 2f0c movel %a4,%sp@-
4a652: 4eb9 0004 a41e jsr 4a41e <IMFS_evaluate_permission>
4a658: 508f addql #8,%sp
4a65a: 4a80 tstl %d0
4a65c: 6600 ff00 bnew 4a55e <IMFS_eval_path+0xba>
rtems_set_errno_and_return_minus_one( EACCES );
4a660: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a666: 76ff moveq #-1,%d3
4a668: 740d moveq #13,%d2
4a66a: 2040 moveal %d0,%a0
return result;
}
4a66c: 2003 movel %d3,%d0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4a66e: 2082 movel %d2,%a0@
return result;
}
4a670: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a676: 4e5e unlk %fp
4a678: 4e75 rts
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
4a67a: 42a7 clrl %sp@-
4a67c: 2f0c movel %a4,%sp@-
4a67e: 4eb9 0004 a458 jsr 4a458 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
4a684: 2654 moveal %a4@,%a3
4a686: 508f addql #8,%sp
4a688: 202b 0048 movel %a3@(72),%d0
4a68c: 6000 ff1e braw 4a5ac <IMFS_eval_path+0x108>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4a690: 28a9 0008 movel %a1@(8),%a4@
4a694: 2069 0014 moveal %a1@(20),%a0
4a698: 2629 000c movel %a1@(12),%d3
4a69c: 2229 0010 movel %a1@(16),%d1
4a6a0: 2029 0018 movel %a1@(24),%d0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4a6a4: 2f0c movel %a4,%sp@-
4a6a6: 2f2e 0010 movel %fp@(16),%sp@-
4a6aa: 226e fffc moveal %fp@(-4),%a1
4a6ae: 4872 9800 pea %a2@(00000000,%a1:l)
4a6b2: 9489 subl %a1,%d2
4a6b4: 4875 2800 pea %a5@(00000000,%d2:l)
4a6b8: 2250 moveal %a0@,%a1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4a6ba: 2943 0004 movel %d3,%a4@(4)
4a6be: 2941 0008 movel %d1,%a4@(8)
4a6c2: 2948 000c movel %a0,%a4@(12)
4a6c6: 2940 0010 movel %d0,%a4@(16)
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4a6ca: 4e91 jsr %a1@
4a6cc: 4fef 0010 lea %sp@(16),%sp
4a6d0: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a6d2: 2003 movel %d3,%d0
4a6d4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a6da: 4e5e unlk %fp
4a6dc: 4e75 rts
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
4a6de: 42a7 clrl %sp@-
4a6e0: 2f0c movel %a4,%sp@-
4a6e2: 4eb9 0004 a73c jsr 4a73c <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
4a6e8: 2654 moveal %a4@,%a3
if ( result == -1 )
4a6ea: 508f addql #8,%sp
4a6ec: 72ff moveq #-1,%d1
4a6ee: b280 cmpl %d0,%d1
4a6f0: 673c beqs 4a72e <IMFS_eval_path+0x28a> <== NEVER TAKEN
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
4a6f2: 202b 0048 movel %a3@(72),%d0
4a6f6: 6000 feb4 braw 4a5ac <IMFS_eval_path+0x108>
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
4a6fa: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
4a700: 76ff moveq #-1,%d3 <== NOT EXECUTED
4a702: 7e05 moveq #5,%d7 <== NOT EXECUTED
4a704: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a706: 2003 movel %d3,%d0 <== NOT EXECUTED
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
4a708: 2087 movel %d7,%a0@ <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a70a: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4a710: 4e5e unlk %fp <== NOT EXECUTED
4a712: 4e75 rts <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4a714: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a71a: 76ff moveq #-1,%d3
4a71c: 7c14 moveq #20,%d6
4a71e: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a720: 2003 movel %d3,%d0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4a722: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a724: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a72a: 4e5e unlk %fp
4a72c: 4e75 rts
4a72e: 2600 movel %d0,%d3 <== NOT EXECUTED
4a730: 2003 movel %d3,%d0 <== NOT EXECUTED
4a732: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4a738: 4e5e unlk %fp <== NOT EXECUTED
0004a87e <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 */
)
{
4a87e: 4e56 ffb0 linkw %fp,#-80
4a882: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4a886: 286e 0008 moveal %fp@(8),%a4
4a88a: 2e0e movel %fp,%d7
4a88c: 2c0e movel %fp,%d6
int i = 0;
4a88e: 4284 clrl %d4
4a890: 5987 subql #4,%d7
4a892: 0686 ffff ffdb addil #-37,%d6
4a898: 4bf9 0004 ac30 lea 4ac30 <IMFS_get_token>,%a5
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4a89e: 2f0c movel %a4,%sp@-
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
4a8a0: 266e 000c moveal %fp@(12),%a3
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4a8a4: 4eb9 0004 ef30 jsr 4ef30 <strlen>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4a8aa: 2453 moveal %a3@,%a2
/*
* Get the path length.
*/
pathlen = strlen( path );
4a8ac: 588f addql #4,%sp
4a8ae: 2400 movel %d0,%d2
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
4a8b0: 2f07 movel %d7,%sp@-
4a8b2: 2f06 movel %d6,%sp@-
4a8b4: 2f02 movel %d2,%sp@-
4a8b6: 4874 4800 pea %a4@(00000000,%d4:l)
4a8ba: 4e95 jsr %a5@
pathlen -= len;
4a8bc: 2a2e fffc movel %fp@(-4),%d5
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
4a8c0: 2600 movel %d0,%d3
pathlen -= len;
i += len;
if ( !pathloc->node_access )
4a8c2: 4fef 0010 lea %sp@(16),%sp
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
4a8c6: 9485 subl %d5,%d2
i += len;
if ( !pathloc->node_access )
4a8c8: 2053 moveal %a3@,%a0
4a8ca: 4a88 tstl %a0
4a8cc: 6700 00ca beqw 4a998 <IMFS_evaluate_for_make+0x11a>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4a8d0: 4a80 tstl %d0
4a8d2: 6742 beqs 4a916 <IMFS_evaluate_for_make+0x98>
if ( node->type == IMFS_DIRECTORY )
4a8d4: 7001 moveq #1,%d0
4a8d6: b0aa 0048 cmpl %a2@(72),%d0
4a8da: 6700 00d6 beqw 4a9b2 <IMFS_evaluate_for_make+0x134>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
4a8de: d885 addl %d5,%d4
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
4a8e0: 2448 moveal %a0,%a2
switch( type ) {
4a8e2: 7002 moveq #2,%d0
4a8e4: b083 cmpl %d3,%d0
4a8e6: 6700 008e beqw 4a976 <IMFS_evaluate_for_make+0xf8>
4a8ea: 6426 bccs 4a912 <IMFS_evaluate_for_make+0x94>
4a8ec: 7203 moveq #3,%d1
4a8ee: b283 cmpl %d3,%d1
4a8f0: 673e beqs 4a930 <IMFS_evaluate_for_make+0xb2>
4a8f2: 7004 moveq #4,%d0
4a8f4: b083 cmpl %d3,%d0
4a8f6: 66b8 bnes 4a8b0 <IMFS_evaluate_for_make+0x32> <== NEVER TAKEN
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4a8f8: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a8fe: 7c5b moveq #91,%d6
4a900: 76ff moveq #-1,%d3
4a902: 2040 moveal %d0,%a0
4a904: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a906: 2003 movel %d3,%d0
4a908: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a90e: 4e5e unlk %fp
4a910: 4e75 rts
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
4a912: 4a83 tstl %d3
4a914: 669a bnes 4a8b0 <IMFS_evaluate_for_make+0x32> <== ALWAYS TAKEN
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
4a916: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a91c: 76ff moveq #-1,%d3
4a91e: 7e11 moveq #17,%d7
4a920: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a922: 2003 movel %d3,%d0
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
4a924: 2087 movel %d7,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a926: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a92c: 4e5e unlk %fp
4a92e: 4e75 rts
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
4a930: 2028 0048 movel %a0@(72),%d0
4a934: 7203 moveq #3,%d1
4a936: b280 cmpl %d0,%d1
4a938: 6700 014e beqw 4aa88 <IMFS_evaluate_for_make+0x20a>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
4a93c: 7204 moveq #4,%d1
4a93e: b280 cmpl %d0,%d1
4a940: 6700 0146 beqw 4aa88 <IMFS_evaluate_for_make+0x20a>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
4a944: 4a8a tstl %a2
4a946: 6700 015c beqw 4aaa4 <IMFS_evaluate_for_make+0x226>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4a94a: 7001 moveq #1,%d0
4a94c: b0aa 0048 cmpl %a2@(72),%d0
4a950: 6600 0152 bnew 4aaa4 <IMFS_evaluate_for_make+0x226>
/*
* 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 ) {
4a954: 206a 0058 moveal %a2@(88),%a0
4a958: 4a88 tstl %a0
4a95a: 6600 0162 bnew 4aabe <IMFS_evaluate_for_make+0x240>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a95e: 2f06 movel %d6,%sp@-
4a960: 2f0a movel %a2,%sp@-
4a962: 4eb9 0004 abb4 jsr 4abb4 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4a968: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a96a: 2440 moveal %d0,%a2
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4a96c: 4a80 tstl %d0
4a96e: 675a beqs 4a9ca <IMFS_evaluate_for_make+0x14c>
done = true;
else
pathloc->node_access = node;
4a970: 268a movel %a2,%a3@
4a972: 6000 ff3c braw 4a8b0 <IMFS_evaluate_for_make+0x32>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4a976: 2279 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a1
4a97c: b1e9 0018 cmpal %a1@(24),%a0
4a980: 6700 ff2e beqw 4a8b0 <IMFS_evaluate_for_make+0x32>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4a984: 226b 0010 moveal %a3@(16),%a1
4a988: b1e9 001c cmpal %a1@(28),%a0
4a98c: 6700 00b0 beqw 4aa3e <IMFS_evaluate_for_make+0x1c0>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
4a990: 2468 0008 moveal %a0@(8),%a2
4a994: 4a8a tstl %a2
4a996: 66d8 bnes 4a970 <IMFS_evaluate_for_make+0xf2>
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
4a998: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a99e: 76ff moveq #-1,%d3
4a9a0: 7a02 moveq #2,%d5
4a9a2: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a9a4: 2003 movel %d3,%d0
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
4a9a6: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a9a8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a9ae: 4e5e unlk %fp
4a9b0: 4e75 rts
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
4a9b2: 4878 0001 pea 1 <ADD>
4a9b6: 2f0b movel %a3,%sp@-
4a9b8: 4eb9 0004 a41e jsr 4a41e <IMFS_evaluate_permission>
4a9be: 508f addql #8,%sp
4a9c0: 4a80 tstl %d0
4a9c2: 6760 beqs 4aa24 <IMFS_evaluate_for_make+0x1a6>
4a9c4: 2053 moveal %a3@,%a0
4a9c6: 6000 ff16 braw 4a8de <IMFS_evaluate_for_make+0x60>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
4a9ca: 2004 movel %d4,%d0
4a9cc: 90ae fffc subl %fp@(-4),%d0
4a9d0: d08c addl %a4,%d0
4a9d2: 206e 0010 moveal %fp@(16),%a0
4a9d6: 2080 movel %d0,%a0@
/*
* 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++) {
4a9d8: 1034 4800 moveb %a4@(00000000,%d4:l),%d0
4a9dc: 671a beqs 4a9f8 <IMFS_evaluate_for_make+0x17a>
4a9de: 4bf9 0004 3f3c lea 43f3c <rtems_filesystem_is_separator>,%a5
* pathloc is returned with a pointer to the parent of the new node.
* name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
int IMFS_evaluate_for_make(
4a9e4: 45f4 4801 lea %a4@(00000001,%d4:l),%a2
* 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 ] ) )
4a9e8: 49c0 extbl %d0
4a9ea: 2f00 movel %d0,%sp@-
4a9ec: 4e95 jsr %a5@
4a9ee: 588f addql #4,%sp
4a9f0: 4a80 tstl %d0
4a9f2: 67a4 beqs 4a998 <IMFS_evaluate_for_make+0x11a>
/*
* 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++) {
4a9f4: 101a moveb %a2@+,%d0
4a9f6: 66f0 bnes 4a9e8 <IMFS_evaluate_for_make+0x16a>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4a9f8: 2f0b movel %a3,%sp@-
4a9fa: 4eb9 0004 a394 jsr 4a394 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
4aa00: 2053 moveal %a3@,%a0
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4aa02: 2600 movel %d0,%d3
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
4aa04: 588f addql #4,%sp
4aa06: 7001 moveq #1,%d0
4aa08: b0a8 0048 cmpl %a0@(72),%d0
4aa0c: 6600 0096 bnew 4aaa4 <IMFS_evaluate_for_make+0x226>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
4aa10: 4878 0003 pea 3 <DIVIDE>
4aa14: 2f0b movel %a3,%sp@-
4aa16: 4eb9 0004 a41e jsr 4a41e <IMFS_evaluate_permission>
4aa1c: 508f addql #8,%sp
4aa1e: 4a80 tstl %d0
4aa20: 6600 fee4 bnew 4a906 <IMFS_evaluate_for_make+0x88>
rtems_set_errno_and_return_minus_one( EACCES );
4aa24: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4aa2a: 76ff moveq #-1,%d3
4aa2c: 740d moveq #13,%d2
4aa2e: 2040 moveal %d0,%a0
return result;
}
4aa30: 2003 movel %d3,%d0
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
4aa32: 2082 movel %d2,%a0@
return result;
}
4aa34: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4aa3a: 4e5e unlk %fp
4aa3c: 4e75 rts
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4aa3e: 2429 000c movel %a1@(12),%d2
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aa42: 98ae fffc subl %fp@(-4),%d4
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4aa46: 26a9 0008 movel %a1@(8),%a3@
4aa4a: 2069 0014 moveal %a1@(20),%a0
4aa4e: 2229 0010 movel %a1@(16),%d1
4aa52: 2029 0018 movel %a1@(24),%d0
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aa56: 2f2e 0010 movel %fp@(16),%sp@-
4aa5a: 2f0b movel %a3,%sp@-
4aa5c: 4874 4800 pea %a4@(00000000,%d4:l)
4aa60: 2268 0004 moveal %a0@(4),%a1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4aa64: 2742 0004 movel %d2,%a3@(4)
4aa68: 2741 0008 movel %d1,%a3@(8)
4aa6c: 2748 000c movel %a0,%a3@(12)
4aa70: 2740 0010 movel %d0,%a3@(16)
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aa74: 4e91 jsr %a1@
4aa76: 4fef 000c lea %sp@(12),%sp
4aa7a: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aa7c: 2003 movel %d3,%d0
4aa7e: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4aa84: 4e5e unlk %fp
4aa86: 4e75 rts
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4aa88: 42a7 clrl %sp@-
4aa8a: 2f0b movel %a3,%sp@-
4aa8c: 4eb9 0004 a7c4 jsr 4a7c4 <IMFS_evaluate_link>
if ( result == -1 )
4aa92: 508f addql #8,%sp
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4aa94: 2600 movel %d0,%d3
if ( result == -1 )
4aa96: 70ff moveq #-1,%d0
4aa98: b083 cmpl %d3,%d0
4aa9a: 6700 fe6a beqw 4a906 <IMFS_evaluate_for_make+0x88>
4aa9e: 2453 moveal %a3@,%a2
4aaa0: 6000 fea2 braw 4a944 <IMFS_evaluate_for_make+0xc6>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4aaa4: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4aaaa: 76ff moveq #-1,%d3
4aaac: 7814 moveq #20,%d4
4aaae: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aab0: 2003 movel %d3,%d0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4aab2: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aab4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4aaba: 4e5e unlk %fp
4aabc: 4e75 rts
/*
* 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 ) {
4aabe: 2428 0020 movel %a0@(32),%d2
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aac2: 98ae fffc subl %fp@(-4),%d4
/*
* 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 ) {
4aac6: 26a8 001c movel %a0@(28),%a3@
4aaca: 2268 0028 moveal %a0@(40),%a1
4aace: 2228 0024 movel %a0@(36),%d1
4aad2: 2028 002c movel %a0@(44),%d0
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aad6: 2f2e 0010 movel %fp@(16),%sp@-
4aada: 2f0b movel %a3,%sp@-
4aadc: 4874 4800 pea %a4@(00000000,%d4:l)
4aae0: 2069 0004 moveal %a1@(4),%a0
/*
* 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 ) {
4aae4: 2742 0004 movel %d2,%a3@(4)
4aae8: 2741 0008 movel %d1,%a3@(8)
4aaec: 2749 000c movel %a1,%a3@(12)
4aaf0: 2740 0010 movel %d0,%a3@(16)
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aaf4: 4e90 jsr %a0@
4aaf6: 4fef 000c lea %sp@(12),%sp
4aafa: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aafc: 2003 movel %d3,%d0
4aafe: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4ab04: 4e5e unlk %fp <== NOT EXECUTED
0004a7c4 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a7c4: 4e56 ffec linkw %fp,#-20
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
4a7c8: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a7ce: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4a7d2: 266e 0008 moveal %fp@(8),%a3
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
4a7d6: 4bf9 0004 a73c lea 4a73c <IMFS_evaluate_sym_link>,%a5
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4a7dc: 49f9 0004 a458 lea 4a458 <IMFS_evaluate_hard_link>,%a4
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a7e2: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
4a7e6: 2453 moveal %a3@,%a2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4a7e8: 4281 clrl %d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4a7ea: 3028 0030 movew %a0@(48),%d0
4a7ee: 5280 addql #1,%d0
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4a7f0: 3200 movew %d0,%d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4a7f2: 3140 0030 movew %d0,%a0@(48)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4a7f6: 7005 moveq #5,%d0
4a7f8: b081 cmpl %d1,%d0
4a7fa: 6564 bcss 4a860 <IMFS_evaluate_link+0x9c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
4a7fc: 202a 0048 movel %a2@(72),%d0
4a800: 7203 moveq #3,%d1
4a802: b280 cmpl %d0,%d1
4a804: 6740 beqs 4a846 <IMFS_evaluate_link+0x82>
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
4a806: 7204 moveq #4,%d1
4a808: b280 cmpl %d0,%d1
4a80a: 671a beqs 4a826 <IMFS_evaluate_link+0x62>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
4a80c: 5780 subql #3,%d0
4a80e: 7201 moveq #1,%d1
4a810: b280 cmpl %d0,%d1
4a812: 64d2 bccs 4a7e6 <IMFS_evaluate_link+0x22> <== NEVER TAKEN
4a814: 4280 clrl %d0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4a816: 4241 clrw %d1
4a818: 3141 0030 movew %d1,%a0@(48)
return result;
}
4a81c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4a822: 4e5e unlk %fp
4a824: 4e75 rts
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
4a826: 2f02 movel %d2,%sp@-
4a828: 2f0b movel %a3,%sp@-
4a82a: 4e95 jsr %a5@
4a82c: 508f addql #8,%sp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
4a82e: 4a80 tstl %d0
4a830: 6620 bnes 4a852 <IMFS_evaluate_link+0x8e>
4a832: 202a 0048 movel %a2@(72),%d0
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
4a836: 7201 moveq #1,%d1
4a838: 5780 subql #3,%d0
( jnode->type == IMFS_HARD_LINK ) ) );
4a83a: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
4a840: b280 cmpl %d0,%d1
4a842: 64a2 bccs 4a7e6 <IMFS_evaluate_link+0x22> <== ALWAYS TAKEN
4a844: 60ce bras 4a814 <IMFS_evaluate_link+0x50> <== NOT EXECUTED
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4a846: 2f02 movel %d2,%sp@-
4a848: 2f0b movel %a3,%sp@-
4a84a: 4e94 jsr %a4@
4a84c: 508f addql #8,%sp
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
4a84e: 4a80 tstl %d0
4a850: 67e0 beqs 4a832 <IMFS_evaluate_link+0x6e>
4a852: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4a858: 4241 clrw %d1
4a85a: 3141 0030 movew %d1,%a0@(48)
4a85e: 60bc bras 4a81c <IMFS_evaluate_link+0x58>
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
4a860: 4241 clrw %d1
4a862: 3141 0030 movew %d1,%a0@(48)
rtems_set_errno_and_return_minus_one( ELOOP );
4a866: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4a86c: 725c moveq #92,%d1
4a86e: 2040 moveal %d0,%a0
4a870: 70ff moveq #-1,%d0
*/
rtems_filesystem_link_counts = 0;
return result;
}
4a872: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
4a878: 2081 movel %d1,%a0@
*/
rtems_filesystem_link_counts = 0;
return result;
}
4a87a: 4e5e unlk %fp <== NOT EXECUTED
0004a41e <IMFS_evaluate_permission>:
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
4a41e: 72f8 moveq #-8,%d1
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
4a420: 4e56 0000 linkw %fp,#0
4a424: 202e 000c movel %fp@(12),%d0
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
4a428: c280 andl %d0,%d1
4a42a: 661a bnes 4a446 <IMFS_evaluate_permission+0x28> <== NEVER TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4a42c: 206e 0008 moveal %fp@(8),%a0
return 1;
return 0;
}
4a430: 4e5e unlk %fp
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
4a432: ed88 lsll #6,%d0
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4a434: 2050 moveal %a0@,%a0
4a436: 2200 movel %d0,%d1
4a438: c2a8 002e andl %a0@(46),%d1
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4a43c: b280 cmpl %d0,%d1
4a43e: 57c0 seq %d0
4a440: 49c0 extbl %d0
4a442: 4480 negl %d0
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
4a444: 4e75 rts
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4a446: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
4a44c: 7201 moveq #1,%d1 <== NOT EXECUTED
4a44e: 2040 moveal %d0,%a0 <== NOT EXECUTED
4a450: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
4a452: 4e5e unlk %fp <== NOT EXECUTED
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4a454: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
000437c0 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
437c0: 4e56 0000 linkw %fp,#0
437c4: 206e 0008 moveal %fp@(8),%a0
437c8: 2f03 movel %d3,%sp@-
437ca: 2f02 movel %d2,%sp@-
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
437cc: 2f08 movel %a0,%sp@-
437ce: 2f2e 0014 movel %fp@(20),%sp@-
437d2: 2068 0018 moveal %a0@(24),%a0
437d6: 2f2e 0010 movel %fp@(16),%sp@-
437da: 2f2e 000c movel %fp@(12),%sp@-
437de: 2f28 004c movel %a0@(76),%sp@-
437e2: 4eb9 0004 d95e jsr 4d95e <pipe_lseek>
IMFS_FIFO_RETURN(err);
437e8: 4fef 0014 lea %sp@(20),%sp
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
437ec: 2600 movel %d0,%d3
437ee: 2400 movel %d0,%d2
437f0: 5bc1 smi %d1
437f2: 49c1 extbl %d1
IMFS_FIFO_RETURN(err);
437f4: 4a81 tstl %d1
437f6: 6b10 bmis 43808 <IMFS_fifo_lseek+0x48>
}
437f8: 2001 movel %d1,%d0 <== NOT EXECUTED
437fa: 2202 movel %d2,%d1 <== NOT EXECUTED
437fc: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
43800: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
43804: 4e5e unlk %fp <== NOT EXECUTED
43806: 4e75 rts <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
43808: 4eb9 0004 fa84 jsr 4fa84 <__errno>
4380e: 4483 negl %d3
43810: 2040 moveal %d0,%a0
43812: 72ff moveq #-1,%d1
43814: 74ff moveq #-1,%d2
43816: 2083 movel %d3,%a0@
}
43818: 262e fffc movel %fp@(-4),%d3
4381c: 2001 movel %d1,%d0
4381e: 2202 movel %d2,%d1
43820: 242e fff8 movel %fp@(-8),%d2
43824: 4e5e unlk %fp <== NOT EXECUTED
00043936 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
43936: 4e56 fff8 linkw %fp,#-8
4393a: 206e 0008 moveal %fp@(8),%a0
4393e: 2f0a movel %a2,%sp@-
43940: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
43942: 2f08 movel %a0,%sp@-
43944: 2f2e 0010 movel %fp@(16),%sp@-
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
43948: 2468 0018 moveal %a0@(24),%a2
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
4394c: 2f2e 000c movel %fp@(12),%sp@-
43950: 2f2a 004c movel %a2@(76),%sp@-
43954: 4eb9 0004 d51c jsr 4d51c <pipe_read>
if (err > 0)
4395a: 4fef 0010 lea %sp@(16),%sp
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
4395e: 2400 movel %d0,%d2
if (err > 0)
43960: 6f22 bles 43984 <IMFS_fifo_read+0x4e> <== NEVER TAKEN
IMFS_update_atime(jnode);
43962: 42a7 clrl %sp@-
43964: 486e fff8 pea %fp@(-8)
43968: 4eb9 0004 4cd8 jsr 44cd8 <gettimeofday>
4396e: 256e fff8 003c movel %fp@(-8),%a2@(60)
43974: 2002 movel %d2,%d0
43976: 508f addql #8,%sp
IMFS_FIFO_RETURN(err);
}
43978: 242e fff0 movel %fp@(-16),%d2
4397c: 246e fff4 moveal %fp@(-12),%a2
43980: 4e5e unlk %fp
43982: 4e75 rts
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
43984: 4a80 tstl %d0
43986: 660e bnes 43996 <IMFS_fifo_read+0x60>
}
43988: 242e fff0 movel %fp@(-16),%d2
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
4398c: 4280 clrl %d0
}
4398e: 246e fff4 moveal %fp@(-12),%a2
43992: 4e5e unlk %fp
43994: 4e75 rts
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
43996: 4eb9 0004 fa84 jsr 4fa84 <__errno>
4399c: 4482 negl %d2
4399e: 2040 moveal %d0,%a0
439a0: 70ff moveq #-1,%d0
439a2: 2082 movel %d2,%a0@
}
439a4: 242e fff0 movel %fp@(-16),%d2
439a8: 246e fff4 moveal %fp@(-12),%a2
439ac: 4e5e unlk %fp <== NOT EXECUTED
000438b6 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
438b6: 4e56 fff8 linkw %fp,#-8
438ba: 206e 0008 moveal %fp@(8),%a0
438be: 2f0a movel %a2,%sp@-
438c0: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
438c2: 2f08 movel %a0,%sp@-
438c4: 2f2e 0010 movel %fp@(16),%sp@-
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
438c8: 2468 0018 moveal %a0@(24),%a2
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
438cc: 2f2e 000c movel %fp@(12),%sp@-
438d0: 2f2a 004c movel %a2@(76),%sp@-
438d4: 4eb9 0004 d70e jsr 4d70e <pipe_write>
if (err > 0) {
438da: 4fef 0010 lea %sp@(16),%sp
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
438de: 2400 movel %d0,%d2
if (err > 0) {
438e0: 6f28 bles 4390a <IMFS_fifo_write+0x54>
IMFS_mtime_ctime_update(jnode);
438e2: 42a7 clrl %sp@-
438e4: 486e fff8 pea %fp@(-8)
438e8: 4eb9 0004 4cd8 jsr 44cd8 <gettimeofday>
438ee: 222e fff8 movel %fp@(-8),%d1
438f2: 2002 movel %d2,%d0
438f4: 508f addql #8,%sp
438f6: 2541 0040 movel %d1,%a2@(64)
}
IMFS_FIFO_RETURN(err);
}
438fa: 242e fff0 movel %fp@(-16),%d2
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
438fe: 2541 0044 movel %d1,%a2@(68)
}
IMFS_FIFO_RETURN(err);
}
43902: 246e fff4 moveal %fp@(-12),%a2
43906: 4e5e unlk %fp
43908: 4e75 rts
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
4390a: 4a80 tstl %d0
4390c: 660e bnes 4391c <IMFS_fifo_write+0x66> <== ALWAYS TAKEN
}
4390e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
43912: 4280 clrl %d0 <== NOT EXECUTED
}
43914: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED
43918: 4e5e unlk %fp <== NOT EXECUTED
4391a: 4e75 rts <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
4391c: 4eb9 0004 fa84 jsr 4fa84 <__errno>
43922: 4482 negl %d2
43924: 2040 moveal %d0,%a0
43926: 70ff moveq #-1,%d0
43928: 2082 movel %d2,%a0@
}
4392a: 242e fff0 movel %fp@(-16),%d2
4392e: 246e fff4 moveal %fp@(-12),%a2
43932: 4e5e unlk %fp <== NOT EXECUTED
0004abb4 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4abb4: 4e56 fff0 linkw %fp,#-16
4abb8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4abbc: 4879 0005 d03c pea 5d03c <dotname>
4abc2: 47f9 0004 e9d8 lea 4e9d8 <strcmp>,%a3
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4abc8: 242e 000c movel %fp@(12),%d2
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4abcc: 2f02 movel %d2,%sp@-
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4abce: 246e 0008 moveal %fp@(8),%a2
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4abd2: 4e93 jsr %a3@
4abd4: 508f addql #8,%sp
4abd6: 4a80 tstl %d0
4abd8: 6714 beqs 4abee <IMFS_find_match_in_dir+0x3a> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
4abda: 4879 0005 d03e pea 5d03e <dotdotname>
4abe0: 2f02 movel %d2,%sp@-
4abe2: 4e93 jsr %a3@
4abe4: 508f addql #8,%sp
4abe6: 4a80 tstl %d0
4abe8: 6610 bnes 4abfa <IMFS_find_match_in_dir+0x46> <== ALWAYS TAKEN
return directory->Parent;
4abea: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
4abee: 200a movel %a2,%d0
4abf0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4abf6: 4e5e unlk %fp
4abf8: 4e75 rts
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
4abfa: 260a movel %a2,%d3
4abfc: 0683 0000 0050 addil #80,%d3
4ac02: 202a 004c movel %a2@(76),%d0
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
4ac06: b680 cmpl %d0,%d3
4ac08: 6716 beqs 4ac20 <IMFS_find_match_in_dir+0x6c>
4ac0a: 2440 moveal %d0,%a2
!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 ) )
4ac0c: 486a 000c pea %a2@(12)
4ac10: 2f02 movel %d2,%sp@-
4ac12: 4e93 jsr %a3@
4ac14: 508f addql #8,%sp
4ac16: 4a80 tstl %d0
4ac18: 67d4 beqs 4abee <IMFS_find_match_in_dir+0x3a>
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
4ac1a: 2452 moveal %a2@,%a2
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
4ac1c: b68a cmpl %a2,%d3
4ac1e: 66ec bnes 4ac0c <IMFS_find_match_in_dir+0x58>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
4ac20: 95ca subal %a2,%a2
}
4ac22: 200a movel %a2,%d0
4ac24: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4ac2a: 4e5e unlk %fp
...
0004ab08 <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
)
{
4ab08: 4e56 ffd8 linkw %fp,#-40
4ab0c: 206e 0008 moveal %fp@(8),%a0
4ab10: 48d7 3c04 moveml %d2/%a2-%a5,%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;
4ab14: 47ee ffec lea %fp@(-20),%a3
4ab18: 49f9 0004 a394 lea 4a394 <IMFS_Set_handlers>,%a4
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
4ab1e: 4bf9 0004 28a8 lea 428a8 <IMFS_unlink>,%a5
* 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;
4ab24: 26a8 001c movel %a0@(28),%a3@
/*
* 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;
4ab28: 2468 001c moveal %a0@(28),%a2
loc = temp_mt_entry->mt_fs_root;
4ab2c: 2d68 0020 fff0 movel %a0@(32),%fp@(-16)
4ab32: 2d68 0024 fff4 movel %a0@(36),%fp@(-12)
4ab38: 2d68 0028 fff8 movel %a0@(40),%fp@(-8)
4ab3e: 2d68 002c fffc movel %a0@(44),%fp@(-4)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
4ab44: 42a8 001c clrl %a0@(28)
do {
next = jnode->Parent;
4ab48: 242a 0008 movel %a2@(8),%d2
loc.node_access = (void *)jnode;
4ab4c: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
4ab50: 2f0b movel %a3,%sp@-
4ab52: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
4ab54: 588f addql #4,%sp
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4ab56: 200a movel %a2,%d0
4ab58: 0680 0000 0050 addil #80,%d0
4ab5e: 7201 moveq #1,%d1
4ab60: b2aa 0048 cmpl %a2@(72),%d1
4ab64: 6634 bnes 4ab9a <IMFS_fsunmount+0x92>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
4ab66: b0aa 004c cmpl %a2@(76),%d0
4ab6a: 672e beqs 4ab9a <IMFS_fsunmount+0x92>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
4ab6c: 4a8a tstl %a2
4ab6e: 671e beqs 4ab8e <IMFS_fsunmount+0x86>
if ( jnode->type == IMFS_DIRECTORY ) {
4ab70: 7001 moveq #1,%d0
4ab72: b0aa 0048 cmpl %a2@(72),%d0
4ab76: 66d0 bnes 4ab48 <IMFS_fsunmount+0x40> <== NEVER TAKEN
4ab78: 220a movel %a2,%d1
4ab7a: 0681 0000 0050 addil #80,%d1
}
}
} while (jnode != NULL);
return 0;
}
4ab80: 202a 004c movel %a2@(76),%d0
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
4ab84: b280 cmpl %d0,%d1
4ab86: 67c0 beqs 4ab48 <IMFS_fsunmount+0x40>
jnode = jnode_get_first_child( jnode );
4ab88: 2440 moveal %d0,%a2
}
}
} while (jnode != NULL);
4ab8a: 4a80 tstl %d0
4ab8c: 66ba bnes 4ab48 <IMFS_fsunmount+0x40> <== ALWAYS TAKEN
return 0;
4ab8e: 4280 clrl %d0
}
4ab90: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5
4ab96: 4e5e unlk %fp
4ab98: 4e75 rts
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
4ab9a: 2f0b movel %a3,%sp@-
if (result != 0)
return -1;
jnode = next;
4ab9c: 2442 moveal %d2,%a2
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
4ab9e: 42a7 clrl %sp@-
4aba0: 4e95 jsr %a5@
if (result != 0)
4aba2: 508f addql #8,%sp
4aba4: 4a80 tstl %d0
4aba6: 67c4 beqs 4ab6c <IMFS_fsunmount+0x64> <== ALWAYS TAKEN
return -1;
4aba8: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
} while (jnode != NULL);
return 0;
}
4abaa: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED
4abb0: 4e5e unlk %fp <== NOT EXECUTED
0004ac30 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4ac30: 4e56 ffe4 linkw %fp,#-28
4ac34: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4ac38: 246e 0008 moveal %fp@(8),%a2
4ac3c: 49f9 0004 3f3c lea 43f3c <rtems_filesystem_is_separator>,%a4
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
4ac42: 4282 clrl %d2
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4ac44: 161a moveb %a2@+,%d3
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4ac46: 2a6e 0010 moveal %fp@(16),%a5
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4ac4a: 264d moveal %a5,%a3
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4ac4c: 1003 moveb %d3,%d0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4ac4e: 282e 000c movel %fp@(12),%d4
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4ac52: 49c0 extbl %d0
4ac54: 2f00 movel %d0,%sp@-
4ac56: 4e94 jsr %a4@
4ac58: 588f addql #4,%sp
4ac5a: 4a80 tstl %d0
4ac5c: 6620 bnes 4ac7e <IMFS_get_token+0x4e>
4ac5e: b882 cmpl %d2,%d4
4ac60: 6f1c bles 4ac7e <IMFS_get_token+0x4e>
token[i] = c;
if ( i == IMFS_NAME_MAX )
4ac62: 7020 moveq #32,%d0
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
4ac64: 16c3 moveb %d3,%a3@+
if ( i == IMFS_NAME_MAX )
4ac66: b082 cmpl %d2,%d0
4ac68: 6700 0082 beqw 4acec <IMFS_get_token+0xbc>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
4ac6c: 5282 addql #1,%d2
4ac6e: 161a moveb %a2@+,%d3
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4ac70: 1003 moveb %d3,%d0
4ac72: 49c0 extbl %d0
4ac74: 2f00 movel %d0,%sp@-
4ac76: 4e94 jsr %a4@
4ac78: 588f addql #4,%sp
4ac7a: 4a80 tstl %d0
4ac7c: 67e0 beqs 4ac5e <IMFS_get_token+0x2e>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
4ac7e: 4a82 tstl %d2
4ac80: 6626 bnes 4aca8 <IMFS_get_token+0x78>
token[i] = c;
4ac82: 1a83 moveb %d3,%a5@
if ( (token[i] != '\0') && pathlen ) {
4ac84: 6718 beqs 4ac9e <IMFS_get_token+0x6e>
4ac86: 4a84 tstl %d4
4ac88: 6714 beqs 4ac9e <IMFS_get_token+0x6e>
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4ac8a: 206e 0014 moveal %fp@(20),%a0
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
4ac8e: 7401 moveq #1,%d2
type = IMFS_CURRENT_DIR;
4ac90: 7001 moveq #1,%d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4ac92: 2082 movel %d2,%a0@
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4ac94: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4ac9a: 4e5e unlk %fp
4ac9c: 4e75 rts
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4ac9e: 206e 0014 moveal %fp@(20),%a0
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
4aca2: 4280 clrl %d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4aca4: 2082 movel %d2,%a0@
4aca6: 60ec bras 4ac94 <IMFS_get_token+0x64>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
4aca8: 4a35 28ff tstb %a5@(ffffffff,%d2:l)
4acac: 6706 beqs 4acb4 <IMFS_get_token+0x84> <== NEVER TAKEN
token[i] = '\0';
4acae: 4200 clrb %d0
4acb0: 1b80 2800 moveb %d0,%a5@(00000000,%d2:l)
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
4acb4: 4879 0005 d041 pea 5d041 <dotdotname+0x3>
4acba: 45f9 0004 e9d8 lea 4e9d8 <strcmp>,%a2
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4acc0: 206e 0014 moveal %fp@(20),%a0
4acc4: 2082 movel %d2,%a0@
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
4acc6: 2f0d movel %a5,%sp@-
4acc8: 4e92 jsr %a2@
4acca: 508f addql #8,%sp
4accc: 4a80 tstl %d0
4acce: 6728 beqs 4acf8 <IMFS_get_token+0xc8>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
4acd0: 4879 0005 d042 pea 5d042 <dotdotname+0x4>
4acd6: 2f0d movel %a5,%sp@-
4acd8: 4e92 jsr %a2@
4acda: 508f addql #8,%sp
4acdc: 4a80 tstl %d0
4acde: 6724 beqs 4ad04 <IMFS_get_token+0xd4>
4ace0: 7003 moveq #3,%d0
type = IMFS_CURRENT_DIR;
}
return type;
}
4ace2: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4ace8: 4e5e unlk %fp
4acea: 4e75 rts
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
return IMFS_INVALID_TOKEN;
4acec: 7004 moveq #4,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4acee: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4acf4: 4e5e unlk %fp
4acf6: 4e75 rts
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
4acf8: 7002 moveq #2,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4acfa: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4ad00: 4e5e unlk %fp
4ad02: 4e75 rts
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
4ad04: 7001 moveq #1,%d0
}
return type;
}
4ad06: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4ad0c: 4e5e unlk %fp <== NOT EXECUTED
00042420 <IMFS_initialize_support>:
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
42420: 7010 moveq #16,%d0
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
42422: 4e56 fff4 linkw %fp,#-12
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
42426: 2239 0005 db08 movel 5db08 <imfs_rq_memfile_bytes_per_block>,%d1
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
4242c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
42430: 246e 0008 moveal %fp@(8),%a2
42434: 242e 0014 movel %fp@(20),%d2
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
42438: b081 cmpl %d1,%d0
4243a: 6724 beqs 42460 <IMFS_initialize_support+0x40>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
4243c: 103c 000f moveb #15,%d0
42440: b081 cmpl %d1,%d0
42442: 6c16 bges 4245a <IMFS_initialize_support+0x3a>
42444: 307c 0005 moveaw #5,%a0
42448: 103c 0020 moveb #32,%d0
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
4244c: 5388 subql #1,%a0
if (bit_mask == requested_bytes_per_block) {
4244e: b081 cmpl %d1,%d0
42450: 670e beqs 42460 <IMFS_initialize_support+0x40>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
42452: 6e06 bgts 4245a <IMFS_initialize_support+0x3a> <== NEVER TAKEN
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
42454: d080 addl %d0,%d0
42456: 4a88 tstl %a0
42458: 66f2 bnes 4244c <IMFS_initialize_support+0x2c> <== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
4245a: 223c 0000 0080 movel #128,%d1
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
42460: 23c1 0005 eaf8 movel %d1,5eaf8 <imfs_memfile_bytes_per_block>
/*
* 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_root_node();
42466: 4eb9 0004 a35a jsr 4a35a <IMFS_create_root_node>
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
4246c: 4878 0014 pea 14 <OPER2>
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
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;
42470: 41f9 0005 d00c lea 5d00c <IMFS_LIMITS_AND_OPTIONS>,%a0
42476: 43f9 0005 d010 lea 5d010 <IMFS_LIMITS_AND_OPTIONS+0x4>,%a1
/*
* 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_root_node();
4247c: 2640 moveal %d0,%a3
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;
4247e: 2550 0038 movel %a0@,%a2@(56)
42482: 41f9 0005 d014 lea 5d014 <IMFS_LIMITS_AND_OPTIONS+0x8>,%a0
42488: 2551 003c movel %a1@,%a2@(60)
4248c: 43f9 0005 d018 lea 5d018 <IMFS_LIMITS_AND_OPTIONS+0xc>,%a1
42492: 2550 0040 movel %a0@,%a2@(64)
42496: 41f9 0005 d01c lea 5d01c <IMFS_LIMITS_AND_OPTIONS+0x10>,%a0
4249c: 2551 0044 movel %a1@,%a2@(68)
424a0: 43f9 0005 d020 lea 5d020 <IMFS_LIMITS_AND_OPTIONS+0x14>,%a1
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
424a6: 4878 0001 pea 1 <ADD>
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
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;
424aa: 2550 0048 movel %a0@,%a2@(72)
424ae: 41f9 0005 d024 lea 5d024 <IMFS_LIMITS_AND_OPTIONS+0x18>,%a0
424b4: 2551 004c movel %a1@,%a2@(76)
424b8: 43f9 0005 d028 lea 5d028 <IMFS_LIMITS_AND_OPTIONS+0x1c>,%a1
424be: 2550 0050 movel %a0@,%a2@(80)
424c2: 41f9 0005 d02c lea 5d02c <IMFS_LIMITS_AND_OPTIONS+0x20>,%a0
424c8: 2551 0054 movel %a1@,%a2@(84)
424cc: 43f9 0005 d030 lea 5d030 <IMFS_LIMITS_AND_OPTIONS+0x24>,%a1
424d2: 2550 0058 movel %a0@,%a2@(88)
424d6: 41f9 0005 d034 lea 5d034 <IMFS_LIMITS_AND_OPTIONS+0x28>,%a0
424dc: 2551 005c movel %a1@,%a2@(92)
424e0: 43f9 0005 d038 lea 5d038 <IMFS_LIMITS_AND_OPTIONS+0x2c>,%a1
424e6: 2550 0060 movel %a0@,%a2@(96)
424ea: 2551 0064 movel %a1@,%a2@(100)
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
424ee: 256e 000c 0028 movel %fp@(12),%a2@(40)
/*
* 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_root_node();
424f4: 2540 001c movel %d0,%a2@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
424f8: 2542 0024 movel %d2,%a2@(36)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
424fc: 4eb9 0004 2bd8 jsr 42bd8 <calloc>
if ( !fs_info ) {
42502: 508f addql #8,%sp
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
42504: 2040 moveal %d0,%a0
if ( !fs_info ) {
42506: 4a80 tstl %d0
42508: 673c beqs 42546 <IMFS_initialize_support+0x126>
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
4250a: 2548 0034 movel %a0,%a2@(52)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
4250e: 2239 0005 eafc movel 5eafc <imfs_instance.5931>,%d1
42514: 2241 moveal %d1,%a1
42516: 5289 addql #1,%a1
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
42518: 4280 clrl %d0
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
4251a: 2081 movel %d1,%a0@
fs_info->ino_count = 1;
4251c: 7201 moveq #1,%d1
fs_info->memfile_handlers = memfile_handlers;
4251e: 216e 0010 0008 movel %fp@(16),%a0@(8)
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
42524: 216e 0018 0010 movel %fp@(24),%a0@(16)
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
4252a: 2142 000c movel %d2,%a0@(12)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
4252e: 2141 0004 movel %d1,%a0@(4)
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
42532: 2741 0034 movel %d1,%a3@(52)
return 0;
}
42536: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
4253c: 23c9 0005 eafc movel %a1,5eafc <imfs_instance.5931>
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
42542: 4e5e unlk %fp
42544: 4e75 rts
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
42546: 2f0b movel %a3,%sp@-
42548: 4eb9 0004 2fe4 jsr 42fe4 <free>
rtems_set_errno_and_return_minus_one(ENOMEM);
4254e: 4eb9 0004 dad8 jsr 4dad8 <__errno>
42554: 588f addql #4,%sp
42556: 720c moveq #12,%d1
42558: 2040 moveal %d0,%a0
4255a: 70ff moveq #-1,%d0
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
4255c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
42562: 2081 movel %d1,%a0@
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
42564: 4e5e unlk %fp <== NOT EXECUTED
0004cb6a <IMFS_memfile_extend>:
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4cb6a: 4280 clrl %d0
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4cb6c: 4e56 ffdc linkw %fp,#-36
4cb70: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4cb74: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
4cb7a: 2406 movel %d6,%d2
4cb7c: e48a lsrl #2,%d2
4cb7e: 2802 movel %d2,%d4
4cb80: 5284 addql #1,%d4
4cb82: 4c02 4800 mulsl %d2,%d4
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4cb86: 246e 0008 moveal %fp@(8),%a2
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4cb8a: 5284 addql #1,%d4
4cb8c: 4c02 4800 mulsl %d2,%d4
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4cb90: 242e 000c movel %fp@(12),%d2
4cb94: 262e 0010 movel %fp@(16),%d3
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4cb98: 5384 subql #1,%d4
4cb9a: 4c06 4800 mulsl %d6,%d4
4cb9e: 2204 movel %d4,%d1
4cba0: 2800 movel %d0,%d4
4cba2: 2a01 movel %d1,%d5
4cba4: 9a83 subl %d3,%d5
4cba6: 9982 subxl %d2,%d4
4cba8: 6f00 00ae blew 4cc58 <IMFS_memfile_extend+0xee>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
4cbac: 282a 004c movel %a2@(76),%d4
4cbb0: 2a2a 0050 movel %a2@(80),%d5
4cbb4: 2002 movel %d2,%d0
4cbb6: 2203 movel %d3,%d1
4cbb8: 9285 subl %d5,%d1
4cbba: 9184 subxl %d4,%d0
4cbbc: 6f5e bles 4cc1c <IMFS_memfile_extend+0xb2>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
4cbbe: 49f9 0005 a358 lea 5a358 <__divdi3>,%a4
4cbc4: 2e06 movel %d6,%d7
4cbc6: 5bc6 smi %d6
4cbc8: 49c6 extbl %d6
4cbca: 2f07 movel %d7,%sp@-
4cbcc: 2f06 movel %d6,%sp@-
4cbce: 2f03 movel %d3,%sp@-
4cbd0: 2f02 movel %d2,%sp@-
4cbd2: 4e94 jsr %a4@
4cbd4: 4fef 0010 lea %sp@(16),%sp
4cbd8: 2641 moveal %d1,%a3
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4cbda: 2f07 movel %d7,%sp@-
4cbdc: 2f06 movel %d6,%sp@-
4cbde: 2f05 movel %d5,%sp@-
4cbe0: 2f04 movel %d4,%sp@-
4cbe2: 4e94 jsr %a4@
4cbe4: 4fef 0010 lea %sp@(16),%sp
4cbe8: 2c01 movel %d1,%d6
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4cbea: b28b cmpl %a3,%d1
4cbec: 621a bhis 4cc08 <IMFS_memfile_extend+0x9e> <== NEVER TAKEN
4cbee: 2801 movel %d1,%d4
4cbf0: 49f9 0004 c97c lea 4c97c <IMFS_memfile_addblock>,%a4
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
4cbf6: 2f04 movel %d4,%sp@-
4cbf8: 2f0a movel %a2,%sp@-
4cbfa: 4e94 jsr %a4@
4cbfc: 508f addql #8,%sp
4cbfe: 4a80 tstl %d0
4cc00: 6626 bnes 4cc28 <IMFS_memfile_extend+0xbe>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4cc02: 5284 addql #1,%d4
4cc04: b88b cmpl %a3,%d4
4cc06: 63ee blss 4cbf6 <IMFS_memfile_extend+0x8c>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
4cc08: 4280 clrl %d0
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
4cc0a: 2542 004c movel %d2,%a2@(76)
4cc0e: 2543 0050 movel %d3,%a2@(80)
return 0;
}
4cc12: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
4cc18: 4e5e unlk %fp
4cc1a: 4e75 rts
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
4cc1c: 4280 clrl %d0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4cc1e: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
4cc24: 4e5e unlk %fp
4cc26: 4e75 rts
/*
* 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-- ) {
4cc28: b886 cmpl %d6,%d4
4cc2a: 6514 bcss 4cc40 <IMFS_memfile_extend+0xd6> <== NEVER TAKEN
4cc2c: 47f9 0004 cb42 lea 4cb42 <IMFS_memfile_remove_block>,%a3
IMFS_memfile_remove_block( the_jnode, block );
4cc32: 2f04 movel %d4,%sp@-
/*
* 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-- ) {
4cc34: 5384 subql #1,%d4
IMFS_memfile_remove_block( the_jnode, block );
4cc36: 2f0a movel %a2,%sp@-
4cc38: 4e93 jsr %a3@
/*
* 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-- ) {
4cc3a: 508f addql #8,%sp
4cc3c: b886 cmpl %d6,%d4
4cc3e: 64f2 bccs 4cc32 <IMFS_memfile_extend+0xc8>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4cc40: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4cc46: 721c moveq #28,%d1
4cc48: 2040 moveal %d0,%a0
4cc4a: 70ff moveq #-1,%d0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4cc4c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4cc52: 2081 movel %d1,%a0@
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4cc54: 4e5e unlk %fp
4cc56: 4e75 rts
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
4cc58: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4cc5e: 7416 moveq #22,%d2
4cc60: 2040 moveal %d0,%a0
4cc62: 70ff moveq #-1,%d0
4cc64: 2082 movel %d2,%a0@
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4cc66: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
4cc6c: 4e5e unlk %fp <== NOT EXECUTED
0004c550 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4c550: 4e56 fff0 linkw %fp,#-16
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4c554: 2239 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d1
4c55a: e489 lsrl #2,%d1
4c55c: 2001 movel %d1,%d0
4c55e: 5380 subql #1,%d0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4c560: 48d7 041c moveml %d2-%d4/%a2,%sp@
4c564: 246e 0008 moveal %fp@(8),%a2
4c568: 242e 000c movel %fp@(12),%d2
4c56c: 206e 0010 moveal %fp@(16),%a0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4c570: b082 cmpl %d2,%d0
4c572: 651e bcss 4c592 <IMFS_memfile_get_block_pointer+0x42>
p = info->indirect;
4c574: 226a 0054 moveal %a2@(84),%a1
if ( malloc_it ) {
4c578: 4a88 tstl %a0
4c57a: 675a beqs 4c5d6 <IMFS_memfile_get_block_pointer+0x86>
if ( !p ) {
4c57c: 4a89 tstl %a1
4c57e: 6700 00c0 beqw 4c640 <IMFS_memfile_get_block_pointer+0xf0>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4c582: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1
4c586: 2009 movel %a1,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4c588: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4c58e: 4e5e unlk %fp
4c590: 4e75 rts
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
4c592: 2001 movel %d1,%d0
4c594: 5280 addql #1,%d0
4c596: 4c01 0800 mulsl %d1,%d0
4c59a: 2240 moveal %d0,%a1
4c59c: 5389 subql #1,%a1
4c59e: b3c2 cmpal %d2,%a1
4c5a0: 6544 bcss 4c5e6 <IMFS_memfile_get_block_pointer+0x96>
my_block -= FIRST_DOUBLY_INDIRECT;
4c5a2: 9481 subl %d1,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
4c5a4: 226a 0058 moveal %a2@(88),%a1
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4c5a8: 4c41 2003 remul %d1,%d3,%d2
4c5ac: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
4c5b0: 4a88 tstl %a0
4c5b2: 6700 0104 beqw 4c6b8 <IMFS_memfile_get_block_pointer+0x168>
if ( !p ) {
4c5b6: 4a89 tstl %a1
4c5b8: 6700 00a0 beqw 4c65a <IMFS_memfile_get_block_pointer+0x10a>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
4c5bc: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2
4c5c0: 2052 moveal %a2@,%a0
if ( !p1 ) {
4c5c2: 4a88 tstl %a0
4c5c4: 6764 beqs 4c62a <IMFS_memfile_get_block_pointer+0xda>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
4c5c6: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
4c5ca: 2008 movel %a0,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4c5cc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4c5d2: 4e5e unlk %fp
4c5d4: 4e75 rts
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
4c5d6: 4a89 tstl %a1
4c5d8: 66a8 bnes 4c582 <IMFS_memfile_get_block_pointer+0x32><== ALWAYS TAKEN
if ( !p1 )
return 0;
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
4c5da: 4280 clrl %d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
4c5dc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
4c5e2: 4e5e unlk %fp <== NOT EXECUTED
4c5e4: 4e75 rts <== NOT EXECUTED
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
4c5e6: 2600 movel %d0,%d3
4c5e8: 5283 addql #1,%d3
4c5ea: 4c01 3800 mulsl %d1,%d3
4c5ee: 5383 subql #1,%d3
4c5f0: b682 cmpl %d2,%d3
4c5f2: 65e6 bcss 4c5da <IMFS_memfile_get_block_pointer+0x8a><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
4c5f4: 9480 subl %d0,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4c5f6: 4c41 2003 remul %d1,%d3,%d2
4c5fa: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
4c5fe: 226a 005c moveal %a2@(92),%a1
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;
4c602: 4c41 2004 remul %d1,%d4,%d2
4c606: 4c41 2002 remul %d1,%d2,%d2
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
4c60a: 4a88 tstl %a0
4c60c: 6700 00c4 beqw 4c6d2 <IMFS_memfile_get_block_pointer+0x182>
if ( !p ) {
4c610: 4a89 tstl %a1
4c612: 6700 0084 beqw 4c698 <IMFS_memfile_get_block_pointer+0x148>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
4c616: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2
4c61a: 2052 moveal %a2@,%a0
if ( !p1 ) {
4c61c: 4a88 tstl %a0
4c61e: 675a beqs 4c67a <IMFS_memfile_get_block_pointer+0x12a>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
4c620: 45f0 4c00 lea %a0@(00000000,%d4:l:4),%a2
4c624: 2052 moveal %a2@,%a0
if ( !p2 ) {
4c626: 4a88 tstl %a0
4c628: 669c bnes 4c5c6 <IMFS_memfile_get_block_pointer+0x76>
p2 = memfile_alloc_block();
4c62a: 4eb9 0004 c52c jsr 4c52c <memfile_alloc_block>
4c630: 2040 moveal %d0,%a0
if ( !p2 )
4c632: 4a80 tstl %d0
4c634: 67a4 beqs 4c5da <IMFS_memfile_get_block_pointer+0x8a><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
4c636: 2480 movel %d0,%a2@
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
4c638: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
4c63c: 2008 movel %a0,%d0
4c63e: 608c bras 4c5cc <IMFS_memfile_get_block_pointer+0x7c>
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4c640: 4eb9 0004 c52c jsr 4c52c <memfile_alloc_block>
if ( !p )
4c646: 4a80 tstl %d0
4c648: 6790 beqs 4c5da <IMFS_memfile_get_block_pointer+0x8a><== NEVER TAKEN
return 0;
info->indirect = p;
4c64a: 2240 moveal %d0,%a1
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4c64c: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
return 0;
info->indirect = p;
4c650: 2540 0054 movel %d0,%a2@(84)
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4c654: 2009 movel %a1,%d0
4c656: 6000 ff30 braw 4c588 <IMFS_memfile_get_block_pointer+0x38>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4c65a: 4eb9 0004 c52c jsr 4c52c <memfile_alloc_block>
4c660: 2240 moveal %d0,%a1
if ( !p )
4c662: 4a80 tstl %d0
4c664: 6700 ff74 beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
return 0;
info->doubly_indirect = p;
4c668: 2540 0058 movel %d0,%a2@(88)
}
p1 = (block_p *)p[ doubly ];
4c66c: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2
4c670: 2052 moveal %a2@,%a0
if ( !p1 ) {
4c672: 4a88 tstl %a0
4c674: 6600 ff50 bnew 4c5c6 <IMFS_memfile_get_block_pointer+0x76>
4c678: 60b0 bras 4c62a <IMFS_memfile_get_block_pointer+0xda>
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
4c67a: 4eb9 0004 c52c jsr 4c52c <memfile_alloc_block>
4c680: 2040 moveal %d0,%a0
if ( !p1 )
4c682: 4a80 tstl %d0
4c684: 6700 ff54 beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
return 0;
p[ triply ] = (block_p) p1;
4c688: 2480 movel %d0,%a2@
}
p2 = (block_p *)p1[ doubly ];
4c68a: 45f0 4c00 lea %a0@(00000000,%d4:l:4),%a2
4c68e: 2052 moveal %a2@,%a0
if ( !p2 ) {
4c690: 4a88 tstl %a0
4c692: 6600 ff32 bnew 4c5c6 <IMFS_memfile_get_block_pointer+0x76>
4c696: 6092 bras 4c62a <IMFS_memfile_get_block_pointer+0xda>
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4c698: 4eb9 0004 c52c jsr 4c52c <memfile_alloc_block>
4c69e: 2240 moveal %d0,%a1
if ( !p )
4c6a0: 4a80 tstl %d0
4c6a2: 6700 ff36 beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
return 0;
info->triply_indirect = p;
4c6a6: 2540 005c movel %d0,%a2@(92)
}
p1 = (block_p *) p[ triply ];
4c6aa: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2
4c6ae: 2052 moveal %a2@,%a0
if ( !p1 ) {
4c6b0: 4a88 tstl %a0
4c6b2: 6600 ff6c bnew 4c620 <IMFS_memfile_get_block_pointer+0xd0>
4c6b6: 60c2 bras 4c67a <IMFS_memfile_get_block_pointer+0x12a>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
4c6b8: 4a89 tstl %a1
4c6ba: 6700 ff1e beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
return 0;
p = (block_p *)p[ doubly ];
4c6be: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p )
4c6c2: 4a88 tstl %a0
4c6c4: 6700 ff14 beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
4c6c8: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
4c6cc: 2008 movel %a0,%d0
4c6ce: 6000 fefc braw 4c5cc <IMFS_memfile_get_block_pointer+0x7c>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
4c6d2: 4a89 tstl %a1
4c6d4: 6700 ff04 beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
return 0;
p1 = (block_p *) p[ triply ];
4c6d8: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p1 )
4c6dc: 4a88 tstl %a0
4c6de: 6700 fefa beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
return 0;
p2 = (block_p *)p1[ doubly ];
4c6e2: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0
if ( !p2 )
4c6e6: 4a88 tstl %a0
4c6e8: 6700 fef0 beqw 4c5da <IMFS_memfile_get_block_pointer+0x8a>
return 0;
return (block_p *)&p2[ singly ];
4c6ec: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
4c6f0: 2008 movel %a0,%d0
4c6f2: 6000 fed8 braw 4c5cc <IMFS_memfile_get_block_pointer+0x7c>
0004c6f6 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4c6f6: 4e56 ffc8 linkw %fp,#-56
4c6fa: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c6fe: 246e 0008 moveal %fp@(8),%a2
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4c702: 7806 moveq #6,%d4
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4c704: 266e 0014 moveal %fp@(20),%a3
4c708: 2a6e 0018 moveal %fp@(24),%a5
4c70c: 242e 000c movel %fp@(12),%d2
4c710: 262e 0010 movel %fp@(16),%d3
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4c714: b8aa 0048 cmpl %a2@(72),%d4
4c718: 6700 017c beqw 4c896 <IMFS_memfile_read+0x1a0>
/*
* 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;
4c71c: 43f5 3800 lea %a5@(00000000,%d3:l),%a1
if ( last_byte > the_jnode->info.file.size )
4c720: 4280 clrl %d0
4c722: 2209 movel %a1,%d1
4c724: 282a 004c movel %a2@(76),%d4
4c728: 2a2a 0050 movel %a2@(80),%d5
4c72c: 2c00 movel %d0,%d6
4c72e: 2e01 movel %d1,%d7
4c730: 9e85 subl %d5,%d7
4c732: 9d84 subxl %d4,%d6
4c734: 6f00 0110 blew 4c846 <IMFS_memfile_read+0x150>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4c738: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
* 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 )
my_length = the_jnode->info.file.size - start;
4c73e: 2e05 movel %d5,%d7
4c740: 9e83 subl %d3,%d7
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4c742: 2a06 movel %d6,%d5
4c744: 5bc4 smi %d4
4c746: 49c4 extbl %d4
4c748: 2f05 movel %d5,%sp@-
4c74a: 2f04 movel %d4,%sp@-
4c74c: 2f03 movel %d3,%sp@-
4c74e: 2f02 movel %d2,%sp@-
4c750: 4eb9 0005 a70c jsr 5a70c <__moddi3>
4c756: 4fef 0010 lea %sp@(16),%sp
4c75a: 2841 moveal %d1,%a4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4c75c: 2f05 movel %d5,%sp@-
4c75e: 2f04 movel %d4,%sp@-
4c760: 2f03 movel %d3,%sp@-
4c762: 2f02 movel %d2,%sp@-
4c764: 4eb9 0005 a358 jsr 5a358 <__divdi3>
4c76a: 4fef 0010 lea %sp@(16),%sp
4c76e: 2401 movel %d1,%d2
if ( start_offset ) {
4c770: 4a8c tstl %a4
4c772: 6700 010e beqw 4c882 <IMFS_memfile_read+0x18c>
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 );
4c776: 42a7 clrl %sp@-
4c778: 2f01 movel %d1,%sp@-
4c77a: 2f0a movel %a2,%sp@-
4c77c: 4eb9 0004 c550 jsr 4c550 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4c782: 4fef 000c lea %sp@(12),%sp
4c786: 4a80 tstl %d0
4c788: 6700 01c0 beqw 4c94a <IMFS_memfile_read+0x254>
* Phase 1: possibly the last part of one block
*/
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;
4c78c: 9c8c subl %a4,%d6
4c78e: 2207 movel %d7,%d1
4c790: bc87 cmpl %d7,%d6
4c792: 6500 0162 bcsw 4c8f6 <IMFS_memfile_read+0x200>
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4c796: 2f01 movel %d1,%sp@-
4c798: 2040 moveal %d0,%a0
4c79a: d9d0 addal %a0@,%a4
dest += to_copy;
4c79c: 280b movel %a3,%d4
4c79e: d881 addl %d1,%d4
block++;
my_length -= to_copy;
4c7a0: 9e81 subl %d1,%d7
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
block++;
4c7a2: 5282 addql #1,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4c7a4: 2f0c movel %a4,%sp@-
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4c7a6: 2841 moveal %d1,%a4
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4c7a8: 2f0b movel %a3,%sp@-
4c7aa: 4eb9 0004 e384 jsr 4e384 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4c7b0: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
4c7b6: 4fef 000c lea %sp@(12),%sp
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4c7ba: bc87 cmpl %d7,%d6
4c7bc: 623c bhis 4c7fa <IMFS_memfile_read+0x104>
4c7be: 47f9 0004 c550 lea 4c550 <IMFS_memfile_get_block_pointer>,%a3
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4c7c4: 4bf9 0004 e384 lea 4e384 <memcpy>,%a5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4c7ca: 42a7 clrl %sp@-
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
4c7cc: 9e86 subl %d6,%d7
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4c7ce: 2f02 movel %d2,%sp@-
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
4c7d0: 5282 addql #1,%d2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4c7d2: 2f0a movel %a2,%sp@-
4c7d4: 4e93 jsr %a3@
if ( !block_ptr )
4c7d6: 4fef 000c lea %sp@(12),%sp
4c7da: 4a80 tstl %d0
4c7dc: 6700 00ac beqw 4c88a <IMFS_memfile_read+0x194>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4c7e0: 2040 moveal %d0,%a0
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4c7e2: d9c6 addal %d6,%a4
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4c7e4: 2f06 movel %d6,%sp@-
4c7e6: 2f10 movel %a0@,%sp@-
4c7e8: 2f04 movel %d4,%sp@-
dest += to_copy;
4c7ea: d886 addl %d6,%d4
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4c7ec: 4e95 jsr %a5@
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4c7ee: 4fef 000c lea %sp@(12),%sp
4c7f2: beb9 0005 eaf8 cmpl 5eaf8 <imfs_memfile_bytes_per_block>,%d7
4c7f8: 64d0 bccs 4c7ca <IMFS_memfile_read+0xd4>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
4c7fa: 4a87 tstl %d7
4c7fc: 6728 beqs 4c826 <IMFS_memfile_read+0x130>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4c7fe: 42a7 clrl %sp@-
4c800: 2f02 movel %d2,%sp@-
4c802: 2f0a movel %a2,%sp@-
4c804: 4eb9 0004 c550 jsr 4c550 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4c80a: 4fef 000c lea %sp@(12),%sp
4c80e: 4a80 tstl %d0
4c810: 6778 beqs 4c88a <IMFS_memfile_read+0x194> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4c812: 2040 moveal %d0,%a0
copied += my_length;
4c814: d9c7 addal %d7,%a4
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4c816: 2f07 movel %d7,%sp@-
4c818: 2f10 movel %a0@,%sp@-
4c81a: 2f04 movel %d4,%sp@-
4c81c: 4eb9 0004 e384 jsr 4e384 <memcpy>
copied += my_length;
4c822: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
4c826: 42a7 clrl %sp@-
4c828: 486e fff8 pea %fp@(-8)
4c82c: 4eb9 0004 3074 jsr 43074 <gettimeofday>
4c832: 256e fff8 003c movel %fp@(-8),%a2@(60)
return copied;
4c838: 200c movel %a4,%d0
4c83a: 508f addql #8,%sp
}
4c83c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4c842: 4e5e unlk %fp
4c844: 4e75 rts
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4c846: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4c84c: 2e0d movel %a5,%d7
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4c84e: 2a06 movel %d6,%d5
4c850: 5bc4 smi %d4
4c852: 49c4 extbl %d4
4c854: 2f05 movel %d5,%sp@-
4c856: 2f04 movel %d4,%sp@-
4c858: 2f03 movel %d3,%sp@-
4c85a: 2f02 movel %d2,%sp@-
4c85c: 4eb9 0005 a70c jsr 5a70c <__moddi3>
4c862: 4fef 0010 lea %sp@(16),%sp
4c866: 2841 moveal %d1,%a4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4c868: 2f05 movel %d5,%sp@-
4c86a: 2f04 movel %d4,%sp@-
4c86c: 2f03 movel %d3,%sp@-
4c86e: 2f02 movel %d2,%sp@-
4c870: 4eb9 0005 a358 jsr 5a358 <__divdi3>
4c876: 4fef 0010 lea %sp@(16),%sp
4c87a: 2401 movel %d1,%d2
if ( start_offset ) {
4c87c: 4a8c tstl %a4
4c87e: 6600 fef6 bnew 4c776 <IMFS_memfile_read+0x80>
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
4c882: 280b movel %a3,%d4
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
4c884: 99cc subal %a4,%a4
4c886: 6000 ff32 braw 4c7ba <IMFS_memfile_read+0xc4>
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
4c88a: 200c movel %a4,%d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4c88c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4c892: 4e5e unlk %fp <== NOT EXECUTED
4c894: 4e75 rts <== NOT EXECUTED
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
4c896: 91c8 subal %a0,%a0
4c898: 202a 004c movel %a2@(76),%d0
4c89c: 222a 0050 movel %a2@(80),%d1
4c8a0: 2d4d fff4 movel %a5,%fp@(-12)
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
4c8a4: 286a 0054 moveal %a2@(84),%a4
if (my_length > (the_jnode->info.linearfile.size - start))
4c8a8: 2800 movel %d0,%d4
4c8aa: 2a01 movel %d1,%d5
4c8ac: 2d48 fff0 movel %a0,%fp@(-16)
4c8b0: 9a83 subl %d3,%d5
4c8b2: 9982 subxl %d2,%d4
4c8b4: 2c2e fff0 movel %fp@(-16),%d6
4c8b8: 2e2e fff4 movel %fp@(-12),%d7
4c8bc: 9e85 subl %d5,%d7
4c8be: 9d84 subxl %d4,%d6
4c8c0: 6f5e bles 4c920 <IMFS_memfile_read+0x22a> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
4c8c2: 2e01 movel %d1,%d7
4c8c4: 9e83 subl %d3,%d7
memcpy(dest, &file_ptr[start], my_length);
4c8c6: 2f07 movel %d7,%sp@-
4c8c8: 4874 3800 pea %a4@(00000000,%d3:l)
4c8cc: 2f0b movel %a3,%sp@-
4c8ce: 4eb9 0004 e384 jsr 4e384 <memcpy>
IMFS_update_atime( the_jnode );
4c8d4: 42a7 clrl %sp@-
4c8d6: 486e fff8 pea %fp@(-8)
4c8da: 4eb9 0004 3074 jsr 43074 <gettimeofday>
4c8e0: 256e fff8 003c movel %fp@(-8),%a2@(60)
return my_length;
4c8e6: 2007 movel %d7,%d0
4c8e8: 4fef 0014 lea %sp@(20),%sp
}
IMFS_update_atime( the_jnode );
return copied;
}
4c8ec: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4c8f2: 4e5e unlk %fp
4c8f4: 4e75 rts
* Phase 1: possibly the last part of one block
*/
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;
4c8f6: 2206 movel %d6,%d1
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4c8f8: 2040 moveal %d0,%a0
dest += to_copy;
4c8fa: 280b movel %a3,%d4
4c8fc: d881 addl %d1,%d4
block++;
my_length -= to_copy;
4c8fe: 9e81 subl %d1,%d7
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
block++;
4c900: 5282 addql #1,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4c902: 2f01 movel %d1,%sp@-
4c904: d9d0 addal %a0@,%a4
4c906: 2f0c movel %a4,%sp@-
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4c908: 2841 moveal %d1,%a4
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4c90a: 2f0b movel %a3,%sp@-
4c90c: 4eb9 0004 e384 jsr 4e384 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4c912: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
4c918: 4fef 000c lea %sp@(12),%sp
4c91c: 6000 fe9c braw 4c7ba <IMFS_memfile_read+0xc4>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4c920: 2e0d movel %a5,%d7 <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
4c922: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4c924: 4874 3800 pea %a4@(00000000,%d3:l) <== NOT EXECUTED
4c928: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4c92a: 4eb9 0004 e384 jsr 4e384 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
4c930: 42a7 clrl %sp@- <== NOT EXECUTED
4c932: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
4c936: 4eb9 0004 3074 jsr 43074 <gettimeofday> <== NOT EXECUTED
4c93c: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED
return my_length;
4c942: 2007 movel %d7,%d0 <== NOT EXECUTED
4c944: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4c948: 60a2 bras 4c8ec <IMFS_memfile_read+0x1f6> <== NOT EXECUTED
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 );
if ( !block_ptr )
return copied;
4c94a: 4280 clrl %d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4c94c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4c952: 4e5e unlk %fp <== NOT EXECUTED
0004ca28 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4ca28: 4e56 ffe0 linkw %fp,#-32
4ca2c: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
/*
* 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;
4ca30: 2839 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d4
4ca36: e48c lsrl #2,%d4
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4ca38: 286e 0008 moveal %fp@(8),%a4
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
4ca3c: 4aac 0054 tstl %a4@(84)
4ca40: 670e beqs 4ca50 <IMFS_memfile_remove+0x28>
memfile_free_blocks_in_table( &info->indirect, to_free );
4ca42: 2f04 movel %d4,%sp@-
4ca44: 486c 0054 pea %a4@(84)
4ca48: 4eb9 0004 c9e2 jsr 4c9e2 <memfile_free_blocks_in_table>
4ca4e: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
4ca50: 206c 0058 moveal %a4@(88),%a0
4ca54: 4a88 tstl %a0
4ca56: 6750 beqs 4caa8 <IMFS_memfile_remove+0x80>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4ca58: 2239 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d1
4ca5e: 2001 movel %d1,%d0
4ca60: e488 lsrl #2,%d0
4ca62: 47f9 0004 c9e2 lea 4c9e2 <memfile_free_blocks_in_table>,%a3
4ca68: 6734 beqs 4ca9e <IMFS_memfile_remove+0x76> <== NEVER TAKEN
4ca6a: 4280 clrl %d0
4ca6c: 4282 clrl %d2
4ca6e: 47f9 0004 c9e2 lea 4c9e2 <memfile_free_blocks_in_table>,%a3
4ca74: 5282 addql #1,%d2
if ( info->doubly_indirect[i] ) {
4ca76: e588 lsll #2,%d0
4ca78: 4ab0 0800 tstl %a0@(00000000,%d0:l)
4ca7c: 6710 beqs 4ca8e <IMFS_memfile_remove+0x66> <== NEVER TAKEN
memfile_free_blocks_in_table(
4ca7e: 2f04 movel %d4,%sp@-
4ca80: 4870 0800 pea %a0@(00000000,%d0:l)
4ca84: 4e93 jsr %a3@
4ca86: 2239 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d1
4ca8c: 508f addql #8,%sp
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4ca8e: 2601 movel %d1,%d3
4ca90: 2002 movel %d2,%d0
4ca92: e48b lsrl #2,%d3
4ca94: b483 cmpl %d3,%d2
4ca96: 6406 bccs 4ca9e <IMFS_memfile_remove+0x76>
4ca98: 206c 0058 moveal %a4@(88),%a0
4ca9c: 60d6 bras 4ca74 <IMFS_memfile_remove+0x4c>
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 );
4ca9e: 2f04 movel %d4,%sp@-
4caa0: 486c 0058 pea %a4@(88)
4caa4: 4e93 jsr %a3@
4caa6: 508f addql #8,%sp
}
if ( info->triply_indirect ) {
4caa8: 206c 005c moveal %a4@(92),%a0
4caac: 4a88 tstl %a0
4caae: 6700 0086 beqw 4cb36 <IMFS_memfile_remove+0x10e>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4cab2: 2239 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d1
4cab8: 2001 movel %d1,%d0
4caba: e488 lsrl #2,%d0
4cabc: 47f9 0004 c9e2 lea 4c9e2 <memfile_free_blocks_in_table>,%a3
4cac2: 6768 beqs 4cb2c <IMFS_memfile_remove+0x104> <== NEVER TAKEN
p = (block_p *) info->triply_indirect[i];
4cac4: 2450 moveal %a0@,%a2
4cac6: 47f9 0004 c9e2 lea 4c9e2 <memfile_free_blocks_in_table>,%a3
if ( !p ) /* ensure we have a valid pointer */
4cacc: 4a8a tstl %a2
4cace: 675c beqs 4cb2c <IMFS_memfile_remove+0x104> <== NEVER TAKEN
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4cad0: 4286 clrl %d6
if ( !p ) /* ensure we have a valid pointer */
4cad2: 4285 clrl %d5
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
4cad4: 4a80 tstl %d0
4cad6: 6728 beqs 4cb00 <IMFS_memfile_remove+0xd8> <== NEVER TAKEN
4cad8: 4280 clrl %d0
4cada: 4282 clrl %d2
4cadc: 5282 addql #1,%d2
if ( p[j] ) {
4cade: e588 lsll #2,%d0
4cae0: 4ab2 0800 tstl %a2@(00000000,%d0:l)
4cae4: 6710 beqs 4caf6 <IMFS_memfile_remove+0xce> <== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4cae6: 2f04 movel %d4,%sp@-
4cae8: 4872 0800 pea %a2@(00000000,%d0:l)
4caec: 4e93 jsr %a3@
4caee: 2239 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d1
4caf4: 508f addql #8,%sp
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++ ) {
4caf6: 2601 movel %d1,%d3
4caf8: 2002 movel %d2,%d0
4cafa: e48b lsrl #2,%d3
4cafc: b682 cmpl %d2,%d3
4cafe: 62dc bhis 4cadc <IMFS_memfile_remove+0xb4>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4cb00: 2f04 movel %d4,%sp@-
4cb02: dcac 005c addl %a4@(92),%d6
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4cb06: 5285 addql #1,%d5
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(
4cb08: 2f06 movel %d6,%sp@-
4cb0a: 4e93 jsr %a3@
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4cb0c: 2239 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d1
4cb12: 2001 movel %d1,%d0
4cb14: 508f addql #8,%sp
4cb16: e488 lsrl #2,%d0
4cb18: ba80 cmpl %d0,%d5
4cb1a: 6410 bccs 4cb2c <IMFS_memfile_remove+0x104>
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
4cb1c: 2c05 movel %d5,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4cb1e: 206c 005c moveal %a4@(92),%a0
if ( !p ) /* ensure we have a valid pointer */
4cb22: e58e lsll #2,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4cb24: 2470 6800 moveal %a0@(00000000,%d6:l),%a2
if ( !p ) /* ensure we have a valid pointer */
4cb28: 4a8a tstl %a2
4cb2a: 66a8 bnes 4cad4 <IMFS_memfile_remove+0xac> <== ALWAYS TAKEN
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
4cb2c: 2f04 movel %d4,%sp@-
4cb2e: 486c 005c pea %a4@(92)
4cb32: 4e93 jsr %a3@
4cb34: 508f addql #8,%sp
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
4cb36: 4280 clrl %d0
4cb38: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
4cb3e: 4e5e unlk %fp <== NOT EXECUTED
0004cc70 <IMFS_memfile_write>:
* 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 + my_length;
if ( last_byte > the_jnode->info.file.size ) {
4cc70: 4280 clrl %d0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4cc72: 4e56 ffd4 linkw %fp,#-44
4cc76: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4cc7a: 2e2e 0018 movel %fp@(24),%d7
/*
* 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 + my_length;
4cc7e: 2047 moveal %d7,%a0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4cc80: 242e 000c movel %fp@(12),%d2
4cc84: 262e 0010 movel %fp@(16),%d3
4cc88: 246e 0008 moveal %fp@(8),%a2
/*
* 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 + my_length;
4cc8c: d1c3 addal %d3,%a0
if ( last_byte > the_jnode->info.file.size ) {
4cc8e: 2208 movel %a0,%d1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4cc90: 286e 0014 moveal %fp@(20),%a4
* 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 + my_length;
if ( last_byte > the_jnode->info.file.size ) {
4cc94: 282a 004c movel %a2@(76),%d4
4cc98: 2a2a 0050 movel %a2@(80),%d5
4cc9c: 9a81 subl %d1,%d5
4cc9e: 9980 subxl %d0,%d4
4cca0: 6d00 0118 bltw 4cdba <IMFS_memfile_write+0x14a>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4cca4: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
4ccaa: 2a06 movel %d6,%d5
4ccac: 5bc4 smi %d4
4ccae: 49c4 extbl %d4
4ccb0: 2f05 movel %d5,%sp@-
4ccb2: 2f04 movel %d4,%sp@-
4ccb4: 2f03 movel %d3,%sp@-
4ccb6: 2f02 movel %d2,%sp@-
4ccb8: 4eb9 0005 a70c jsr 5a70c <__moddi3>
4ccbe: 4fef 0010 lea %sp@(16),%sp
4ccc2: 2641 moveal %d1,%a3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4ccc4: 2f05 movel %d5,%sp@-
4ccc6: 2f04 movel %d4,%sp@-
4ccc8: 2f03 movel %d3,%sp@-
4ccca: 2f02 movel %d2,%sp@-
4cccc: 4eb9 0005 a358 jsr 5a358 <__divdi3>
4ccd2: 4fef 0010 lea %sp@(16),%sp
4ccd6: 2401 movel %d1,%d2
if ( start_offset ) {
4ccd8: 4a8b tstl %a3
4ccda: 6700 00d6 beqw 4cdb2 <IMFS_memfile_write+0x142>
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 );
4ccde: 42a7 clrl %sp@-
4cce0: 2f01 movel %d1,%sp@-
4cce2: 2f0a movel %a2,%sp@-
4cce4: 4eb9 0004 c550 jsr 4c550 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4ccea: 4fef 000c lea %sp@(12),%sp
4ccee: 4a80 tstl %d0
4ccf0: 6700 012c beqw 4ce1e <IMFS_memfile_write+0x1ae>
* Phase 1: possibly the last part of one block
*/
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;
4ccf4: 9c8b subl %a3,%d6
4ccf6: be86 cmpl %d6,%d7
4ccf8: 6500 00fa bcsw 4cdf4 <IMFS_memfile_write+0x184>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4ccfc: 2f06 movel %d6,%sp@-
4ccfe: 2040 moveal %d0,%a0
src += to_copy;
4cd00: 280c movel %a4,%d4
4cd02: d886 addl %d6,%d4
block++;
my_length -= to_copy;
4cd04: 9e86 subl %d6,%d7
copied += to_copy;
4cd06: 2606 movel %d6,%d3
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4cd08: 5282 addql #1,%d2
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4cd0a: 2f0c movel %a4,%sp@-
4cd0c: d7d0 addal %a0@,%a3
4cd0e: 2f0b movel %a3,%sp@-
4cd10: 4eb9 0004 e384 jsr 4e384 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4cd16: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
4cd1c: 4fef 000c lea %sp@(12),%sp
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4cd20: bc87 cmpl %d7,%d6
4cd22: 623c bhis 4cd60 <IMFS_memfile_write+0xf0>
4cd24: 47f9 0004 c550 lea 4c550 <IMFS_memfile_get_block_pointer>,%a3
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 );
4cd2a: 49f9 0004 e384 lea 4e384 <memcpy>,%a4
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4cd30: 42a7 clrl %sp@-
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
4cd32: 9e86 subl %d6,%d7
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4cd34: 2f02 movel %d2,%sp@-
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
4cd36: 5282 addql #1,%d2
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4cd38: 2f0a movel %a2,%sp@-
4cd3a: 4e93 jsr %a3@
if ( !block_ptr )
4cd3c: 4fef 000c lea %sp@(12),%sp
4cd40: 4a80 tstl %d0
4cd42: 6700 00a4 beqw 4cde8 <IMFS_memfile_write+0x178>
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 );
4cd46: 2f06 movel %d6,%sp@-
4cd48: 2040 moveal %d0,%a0
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
4cd4a: d686 addl %d6,%d3
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 );
4cd4c: 2f04 movel %d4,%sp@-
4cd4e: 2f10 movel %a0@,%sp@-
src += to_copy;
4cd50: d886 addl %d6,%d4
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 );
4cd52: 4e94 jsr %a4@
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4cd54: 4fef 000c lea %sp@(12),%sp
4cd58: beb9 0005 eaf8 cmpl 5eaf8 <imfs_memfile_bytes_per_block>,%d7
4cd5e: 64d0 bccs 4cd30 <IMFS_memfile_write+0xc0>
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
4cd60: 4a87 tstl %d7
4cd62: 6728 beqs 4cd8c <IMFS_memfile_write+0x11c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4cd64: 42a7 clrl %sp@-
4cd66: 2f02 movel %d2,%sp@-
4cd68: 2f0a movel %a2,%sp@-
4cd6a: 4eb9 0004 c550 jsr 4c550 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4cd70: 4fef 000c lea %sp@(12),%sp
4cd74: 4a80 tstl %d0
4cd76: 6770 beqs 4cde8 <IMFS_memfile_write+0x178> <== NEVER TAKEN
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 );
4cd78: 2f07 movel %d7,%sp@-
4cd7a: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
4cd7c: d687 addl %d7,%d3
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 );
4cd7e: 2f04 movel %d4,%sp@-
4cd80: 2f10 movel %a0@,%sp@-
4cd82: 4eb9 0004 e384 jsr 4e384 <memcpy>
my_length = 0;
copied += to_copy;
4cd88: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
4cd8c: 42a7 clrl %sp@-
4cd8e: 486e fff8 pea %fp@(-8)
4cd92: 4eb9 0004 3074 jsr 43074 <gettimeofday>
4cd98: 222e fff8 movel %fp@(-8),%d1
return copied;
4cd9c: 2003 movel %d3,%d0
4cd9e: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
4cda0: 2541 0040 movel %d1,%a2@(64)
4cda4: 2541 0044 movel %d1,%a2@(68)
return copied;
}
4cda8: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4
4cdae: 4e5e unlk %fp
4cdb0: 4e75 rts
unsigned int last_byte;
unsigned int start_offset;
int copied;
const unsigned char *src;
src = source;
4cdb2: 280c movel %a4,%d4
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
4cdb4: 4283 clrl %d3
4cdb6: 6000 ff68 braw 4cd20 <IMFS_memfile_write+0xb0>
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
4cdba: 2f08 movel %a0,%sp@-
4cdbc: 2f00 movel %d0,%sp@-
4cdbe: 2f0a movel %a2,%sp@-
4cdc0: 4eb9 0004 cb6a jsr 4cb6a <IMFS_memfile_extend>
if ( status )
4cdc6: 4fef 000c lea %sp@(12),%sp
4cdca: 4a80 tstl %d0
4cdcc: 6700 fed6 beqw 4cca4 <IMFS_memfile_write+0x34>
rtems_set_errno_and_return_minus_one( ENOSPC );
4cdd0: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4cdd6: 761c moveq #28,%d3
4cdd8: 2040 moveal %d0,%a0
4cdda: 70ff moveq #-1,%d0
4cddc: 2083 movel %d3,%a0@
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4cdde: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4
4cde4: 4e5e unlk %fp
4cde6: 4e75 rts
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
4cde8: 2003 movel %d3,%d0 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4cdea: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED
4cdf0: 4e5e unlk %fp <== NOT EXECUTED
4cdf2: 4e75 rts <== NOT EXECUTED
* Phase 1: possibly the last part of one block
*/
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;
4cdf4: 2c07 movel %d7,%d6
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4cdf6: 2040 moveal %d0,%a0
src += to_copy;
4cdf8: 280c movel %a4,%d4
4cdfa: d886 addl %d6,%d4
block++;
my_length -= to_copy;
4cdfc: 9e86 subl %d6,%d7
copied += to_copy;
4cdfe: 2606 movel %d6,%d3
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4ce00: 5282 addql #1,%d2
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4ce02: 2f06 movel %d6,%sp@-
4ce04: 2f0c movel %a4,%sp@-
4ce06: d7d0 addal %a0@,%a3
4ce08: 2f0b movel %a3,%sp@-
4ce0a: 4eb9 0004 e384 jsr 4e384 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4ce10: 2c39 0005 eaf8 movel 5eaf8 <imfs_memfile_bytes_per_block>,%d6
4ce16: 4fef 000c lea %sp@(12),%sp
4ce1a: 6000 ff04 braw 4cd20 <IMFS_memfile_write+0xb0>
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 );
if ( !block_ptr )
return copied;
4ce1e: 4280 clrl %d0 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4ce20: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED
4ce26: 4e5e unlk %fp <== NOT EXECUTED
00042638 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
42638: 4e56 ffb0 linkw %fp,#-80
4263c: 48d7 007c moveml %d2-%d6,%sp@
42640: 282e 0008 movel %fp@(8),%d4
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
42644: 240e movel %fp,%d2
42646: 0682 ffff ffc7 addil #-57,%d2
4264c: 2f04 movel %d4,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4264e: 262e 000c movel %fp@(12),%d3
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
42652: 4eb9 0004 ef30 jsr 4ef30 <strlen>
42658: 588f addql #4,%sp
4265a: 486e fffc pea %fp@(-4)
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4265e: 2c2e 0010 movel %fp@(16),%d6
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
42662: 2f02 movel %d2,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
42664: 2a2e 0014 movel %fp@(20),%d5
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
42668: 2f00 movel %d0,%sp@-
4266a: 2f04 movel %d4,%sp@-
4266c: 4eb9 0004 ac30 jsr 4ac30 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
42672: 4fef 0010 lea %sp@(16),%sp
42676: 2003 movel %d3,%d0
42678: 0280 0000 f000 andil #61440,%d0
4267e: 0c80 0000 4000 cmpil #16384,%d0
42684: 6756 beqs 426dc <IMFS_mknod+0xa4>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
42686: 0c80 0000 8000 cmpil #32768,%d0
4268c: 6752 beqs 426e0 <IMFS_mknod+0xa8>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
4268e: 0c80 0000 6000 cmpil #24576,%d0
42694: 673a beqs 426d0 <IMFS_mknod+0x98>
42696: 0c80 0000 2000 cmpil #8192,%d0
4269c: 6732 beqs 426d0 <IMFS_mknod+0x98>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
4269e: 0c80 0000 1000 cmpil #4096,%d0
426a4: 673e beqs 426e4 <IMFS_mknod+0xac> <== ALWAYS TAKEN
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
IMFS_token_types type = 0;
426a6: 4280 clrl %d0 <== NOT EXECUTED
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
426a8: 486e ffe8 pea %fp@(-24)
426ac: 2f03 movel %d3,%sp@-
426ae: 2f02 movel %d2,%sp@-
426b0: 2f00 movel %d0,%sp@-
426b2: 2f2e 0018 movel %fp@(24),%sp@-
426b6: 4eb9 0004 a164 jsr 4a164 <IMFS_create_node>
if ( !new_node )
426bc: 4fef 0014 lea %sp@(20),%sp
426c0: 4a80 tstl %d0
426c2: 6724 beqs 426e8 <IMFS_mknod+0xb0>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
426c4: 4280 clrl %d0
}
426c6: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6
426cc: 4e5e unlk %fp
426ce: 4e75 rts
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
426d0: 2d46 ffe8 movel %d6,%fp@(-24)
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
426d4: 7002 moveq #2,%d0
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
426d6: 2d45 ffec movel %d5,%fp@(-20)
426da: 60cc bras 426a8 <IMFS_mknod+0x70>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
426dc: 7001 moveq #1,%d0
426de: 60c8 bras 426a8 <IMFS_mknod+0x70>
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
426e0: 7005 moveq #5,%d0
426e2: 60c4 bras 426a8 <IMFS_mknod+0x70>
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
type = IMFS_FIFO;
426e4: 7007 moveq #7,%d0
426e6: 60c0 bras 426a8 <IMFS_mknod+0x70>
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
426e8: 4eb9 0004 dad8 jsr 4dad8 <__errno>
426ee: 720c moveq #12,%d1
426f0: 2040 moveal %d0,%a0
426f2: 70ff moveq #-1,%d0
return 0;
}
426f4: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
426fa: 2081 movel %d1,%a0@
return 0;
}
426fc: 4e5e unlk %fp <== NOT EXECUTED
00042700 <IMFS_mount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
42700: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
42702: 4e56 0000 linkw %fp,#0
42706: 226e 0008 moveal %fp@(8),%a1
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
4270a: 2069 0008 moveal %a1@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4270e: b0a8 0048 cmpl %a0@(72),%d0
42712: 660a bnes 4271e <IMFS_mount+0x1e> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
42714: 2149 0058 movel %a1,%a0@(88)
return 0;
42718: 4280 clrl %d0
}
4271a: 4e5e unlk %fp
4271c: 4e75 rts
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4271e: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
42724: 7214 moveq #20,%d1 <== NOT EXECUTED
42726: 2040 moveal %d0,%a0 <== NOT EXECUTED
42728: 70ff moveq #-1,%d0 <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
4272a: 4e5e unlk %fp <== NOT EXECUTED
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4272c: 2081 movel %d1,%a0@ <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
00045088 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
45088: 4e56 0000 linkw %fp,#0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
4508c: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
45092: 2f0a movel %a2,%sp@-
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
45094: 2f28 0008 movel %a0@(8),%sp@-
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
45098: 246e 0008 moveal %fp@(8),%a2
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
4509c: 486a 000c pea %a2@(12)
450a0: 4eb9 0005 25b0 jsr 525b0 <fputs>
switch( the_jnode->type ) {
450a6: 202a 0048 movel %a2@(72),%d0
450aa: 508f addql #8,%sp
450ac: 7207 moveq #7,%d1
450ae: b280 cmpl %d0,%d1
450b0: 6424 bccs 450d6 <IMFS_print_jnode+0x4e> <== ALWAYS TAKEN
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
450b2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
450b4: 4879 0006 2929 pea 62929 <IntUartPollCallbacks.6330+0x75> <== NOT EXECUTED
450ba: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0 <== NOT EXECUTED
450c0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
450c4: 4eb9 0005 2462 jsr 52462 <fprintf> <== NOT EXECUTED
return;
}
puts("");
}
450ca: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
450ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
puts("");
}
450d2: 4e5e unlk %fp <== NOT EXECUTED
450d4: 4e75 rts <== NOT EXECUTED
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
450d6: 323b 0a08 movew %pc@(450e0 <IMFS_print_jnode+0x58>,%d0:l:2),%d1
450da: 48c1 extl %d1
450dc: 4efb 1802 jmp %pc@(450e0 <IMFS_print_jnode+0x58>,%d1:l)
450e0: ffd2 .short 0xffd2 <== NOT EXECUTED
450e2: 003a .short 0x003a <== NOT EXECUTED
450e4: 0066 .short 0x0066 <== NOT EXECUTED
450e6: 0010 .short 0x0010 <== NOT EXECUTED
450e8: 0010 .short 0x0010 <== NOT EXECUTED
450ea: 009e 00d2 010a oril #13762826,%d6 <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
450f0: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
450f6: 2f28 0008 movel %a0@(8),%sp@-
450fa: 4878 0013 pea 13 <INVALID_OPERATION+0x3>
450fe: 4878 0001 pea 1 <ADD>
45102: 4879 0006 2902 pea 62902 <IntUartPollCallbacks.6330+0x4e>
45108: 4eb9 0005 3118 jsr 53118 <fwrite>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
4510e: 246e fffc moveal %fp@(-4),%a2
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
45112: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45116: 4e5e unlk %fp
45118: 4e75 rts
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
4511a: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
45120: 2f28 0008 movel %a0@(8),%sp@-
45124: 4878 002f pea 2f <OPER2+0x1b>
45128: 4eb9 0005 24e0 jsr 524e0 <fputc>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
4512e: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45132: 203c 0006 2fdc movel #405468,%d0
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
45138: 508f addql #8,%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
4513a: 2d40 0008 movel %d0,%fp@(8)
}
4513e: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45140: 4ef9 0005 3e3a jmp 53e3a <puts>
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
45146: 2f2a 0050 movel %a2@(80),%sp@-
4514a: 2f2a 004c movel %a2@(76),%sp@-
4514e: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
45154: 4879 0006 28d4 pea 628d4 <IntUartPollCallbacks.6330+0x20>
4515a: 2f28 0008 movel %a0@(8),%sp@-
4515e: 4eb9 0005 2462 jsr 52462 <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45164: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45168: 203c 0006 2fdc movel #405468,%d0
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
4516e: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45172: 2d40 0008 movel %d0,%fp@(8)
}
45176: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45178: 4ef9 0005 3e3a jmp 53e3a <puts>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
4517e: 2f2a 0050 movel %a2@(80),%sp@-
45182: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
45188: 4879 0006 28f6 pea 628f6 <IntUartPollCallbacks.6330+0x42>
4518e: 2f28 0008 movel %a0@(8),%sp@-
45192: 4eb9 0005 2462 jsr 52462 <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45198: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
4519c: 203c 0006 2fdc movel #405468,%d0
);
#else
fprintf(stdout, " (file %" PRId32 ")",
(uint32_t)the_jnode->info.file.size );
#endif
break;
451a2: 4fef 000c lea %sp@(12),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
451a6: 2d40 0008 movel %d0,%fp@(8)
}
451aa: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
451ac: 4ef9 0005 3e3a jmp 53e3a <puts>
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
451b2: 2f2a 0054 movel %a2@(84),%sp@-
451b6: 2f2a 0050 movel %a2@(80),%sp@-
451ba: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
451c0: 4879 0006 28e7 pea 628e7 <IntUartPollCallbacks.6330+0x33>
451c6: 2f28 0008 movel %a0@(8),%sp@-
451ca: 4eb9 0005 2462 jsr 52462 <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
451d0: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
451d4: 203c 0006 2fdc movel #405468,%d0
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
451da: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
451de: 2d40 0008 movel %d0,%fp@(8)
}
451e2: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
451e4: 4ef9 0005 3e3a jmp 53e3a <puts>
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
451ea: 2079 0006 4068 moveal 64068 <_impure_ptr>,%a0
451f0: 2f28 0008 movel %a0@(8),%sp@-
451f4: 4878 0012 pea 12 <INVALID_OPERATION+0x2>
451f8: 4878 0001 pea 1 <ADD>
451fc: 4879 0006 2916 pea 62916 <IntUartPollCallbacks.6330+0x62>
45202: 4eb9 0005 3118 jsr 53118 <fwrite>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45208: 246e fffc moveal %fp@(-4),%a2
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
4520c: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45210: 4e5e unlk %fp <== NOT EXECUTED
00042744 <IMFS_readlink>:
ssize_t IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
42744: 4e56 fff4 linkw %fp,#-12
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
42748: 206e 0008 moveal %fp@(8),%a0
ssize_t IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
4274c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
42750: 266e 000c moveal %fp@(12),%a3
42754: 242e 0010 movel %fp@(16),%d2
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
42758: 2450 moveal %a0@,%a2
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
4275a: 672a beqs 42786 <IMFS_readlink+0x42> <== NEVER TAKEN
4275c: 206a 004c moveal %a2@(76),%a0
42760: 1210 moveb %a0@,%d1
42762: 6722 beqs 42786 <IMFS_readlink+0x42> <== NEVER TAKEN
42764: 91c8 subal %a0,%a0
42766: 4280 clrl %d0
42768: 5280 addql #1,%d0
buf[i] = node->info.sym_link.name[i];
4276a: 1781 8800 moveb %d1,%a3@(00000000,%a0:l)
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
4276e: 2040 moveal %d0,%a0
42770: b480 cmpl %d0,%d2
42772: 630a blss 4277e <IMFS_readlink+0x3a>
42774: 226a 004c moveal %a2@(76),%a1
42778: 1231 0800 moveb %a1@(00000000,%d0:l),%d1
4277c: 66ea bnes 42768 <IMFS_readlink+0x24>
buf[i] = node->info.sym_link.name[i];
return i;
}
4277e: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
42782: 4e5e unlk %fp
42784: 4e75 rts
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
42786: 4280 clrl %d0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
42788: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 <== NOT EXECUTED
4278c: 4e5e unlk %fp <== NOT EXECUTED
00042790 <IMFS_rename>:
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
42790: 4e56 fff8 linkw %fp,#-8
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
42794: 206e 000c moveal %fp@(12),%a0
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
42798: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
4279a: 4878 0020 pea 20 <OPER2+0xc>
4279e: 2f2e 0014 movel %fp@(20),%sp@-
)
{
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
427a2: 2450 moveal %a0@,%a2
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
427a4: 486a 000c pea %a2@(12)
427a8: 4eb9 0004 ef48 jsr 4ef48 <strncpy>
if ( the_jnode->Parent != NULL )
427ae: 4fef 000c lea %sp@(12),%sp
427b2: 4aaa 0008 tstl %a2@(8)
427b6: 670a beqs 427c2 <IMFS_rename+0x32> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
427b8: 2f0a movel %a2,%sp@-
427ba: 4eb9 0004 71bc jsr 471bc <_Chain_Extract>
427c0: 588f addql #4,%sp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
427c2: 206e 0010 moveal %fp@(16),%a0
427c6: 2050 moveal %a0@,%a0
the_jnode->Parent = new_parent;
427c8: 2548 0008 movel %a0,%a2@(8)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
427cc: 2f0a movel %a2,%sp@-
427ce: 4868 004c pea %a0@(76)
427d2: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
427d8: 42a7 clrl %sp@-
427da: 486e fff8 pea %fp@(-8)
427de: 4eb9 0004 3074 jsr 43074 <gettimeofday>
427e4: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
}
427ea: 4280 clrl %d0
427ec: 246e fff4 moveal %fp@(-12),%a2
427f0: 4e5e unlk %fp <== NOT EXECUTED
0004ae14 <IMFS_stat>:
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4ae14: 7007 moveq #7,%d0
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
4ae16: 4e56 0000 linkw %fp,#0
4ae1a: 206e 000c moveal %fp@(12),%a0
4ae1e: 2f0a movel %a2,%sp@-
4ae20: 246e 0008 moveal %fp@(8),%a2
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
4ae24: 2252 moveal %a2@,%a1
switch ( the_jnode->type ) {
4ae26: b0a9 0048 cmpl %a1@(72),%d0
4ae2a: 6418 bccs 4ae44 <IMFS_stat+0x30> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4ae2c: 4eb9 0004 dad8 jsr 4dad8 <__errno>
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4ae32: 246e fffc moveal %fp@(-4),%a2
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4ae36: 2040 moveal %d0,%a0
4ae38: 70ff moveq #-1,%d0
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4ae3a: 4e5e unlk %fp
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4ae3c: 20bc 0000 0086 movel #134,%a0@
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4ae42: 4e75 rts
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4ae44: 2029 0048 movel %a1@(72),%d0
4ae48: d080 addl %d0,%d0
4ae4a: 303b 0808 movew %pc@(4ae54 <IMFS_stat+0x40>,%d0:l),%d0
4ae4e: 48c0 extl %d0
4ae50: 4efb 0802 jmp %pc@(4ae54 <IMFS_stat+0x40>,%d0:l)
4ae54: ffd8 .short 0xffd8 <== NOT EXECUTED
4ae56: ffd8 .short 0xffd8 <== NOT EXECUTED
4ae58: 00c2 bitrev %d2 <== NOT EXECUTED
4ae5a: ffd8 .short 0xffd8 <== NOT EXECUTED
4ae5c: 0010 .short 0x0010 <== NOT EXECUTED
4ae5e: 006a .short 0x006a <== NOT EXECUTED
4ae60: 006a .short 0x006a <== NOT EXECUTED
4ae62: 0010 .short 0x0010 <== NOT EXECUTED
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
4ae64: 246a 0010 moveal %a2@(16),%a2
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4ae68: 4280 clrl %d0
4ae6a: 4281 clrl %d1
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4ae6c: 246a 0034 moveal %a2@(52),%a2
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4ae70: 2140 001e movel %d0,%a0@(30)
4ae74: 2141 0022 movel %d1,%a0@(34)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4ae78: 2212 movel %a2@,%d1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
4ae7a: 4280 clrl %d0
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
4ae7c: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4ae82: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4ae88: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4ae8e: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4ae94: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4ae9a: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4aea0: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4aea6: 2169 0044 0036 movel %a1@(68),%a0@(54)
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
4aeac: 20bc 0000 fffe movel #65534,%a0@
4aeb2: 2141 0004 movel %d1,%a0@(4)
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4aeb6: 246e fffc moveal %fp@(-4),%a2
4aeba: 4e5e unlk %fp
4aebc: 4e75 rts
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
4aebe: 246a 0010 moveal %a2@(16),%a2
buf->st_rdev = 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;
4aec2: 2029 004c movel %a1@(76),%d0
4aec6: 2229 0050 movel %a1@(80),%d1
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4aeca: 246a 0034 moveal %a2@(52),%a2
buf->st_rdev = 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;
4aece: 2140 001e movel %d0,%a0@(30)
4aed2: 2141 0022 movel %d1,%a0@(34)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4aed6: 2212 movel %a2@,%d1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
4aed8: 4280 clrl %d0
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
4aeda: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4aee0: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4aee6: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4aeec: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4aef2: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4aef8: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4aefe: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4af04: 2169 0044 0036 movel %a1@(68),%a0@(54)
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
4af0a: 20bc 0000 fffe movel #65534,%a0@
4af10: 2141 0004 movel %d1,%a0@(4)
4af14: 60a0 bras 4aeb6 <IMFS_stat+0xa2>
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
4af16: 246a 0010 moveal %a2@(16),%a2
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4af1a: 2029 0050 movel %a1@(80),%d0
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4af1e: 246a 0034 moveal %a2@(52),%a2
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4af22: 2169 004c 0016 movel %a1@(76),%a0@(22)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4af28: 2212 movel %a2@,%d1
buf->st_mode = the_jnode->st_mode;
4af2a: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4af30: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4af36: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4af3c: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4af42: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4af48: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4af4e: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4af54: 2169 0044 0036 movel %a1@(68),%a0@(54)
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4af5a: 2140 001a movel %d0,%a0@(26)
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
4af5e: 4280 clrl %d0
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
4af60: 20bc 0000 fffe movel #65534,%a0@
4af66: 2141 0004 movel %d1,%a0@(4)
4af6a: 6000 ff4a braw 4aeb6 <IMFS_stat+0xa2>
...
000428a8 <IMFS_unlink>:
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
428a8: 7003 moveq #3,%d0
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
428aa: 4e56 ffd0 linkw %fp,#-48
428ae: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
428b2: 246e 000c moveal %fp@(12),%a2
428b6: 242e 0008 movel %fp@(8),%d2
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
428ba: 2652 moveal %a2@,%a3
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
428bc: b0ab 0048 cmpl %a3@(72),%d0
428c0: 671a beqs 428dc <IMFS_unlink+0x34>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
428c2: 2f0a movel %a2,%sp@-
428c4: 206a 0008 moveal %a2@(8),%a0
428c8: 2f02 movel %d2,%sp@-
428ca: 2068 0034 moveal %a0@(52),%a0
428ce: 4e90 jsr %a0@
return result;
428d0: 508f addql #8,%sp
}
428d2: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3
428d8: 4e5e unlk %fp
428da: 4e75 rts
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
428dc: 202b 004c movel %a3@(76),%d0
428e0: 6700 0090 beqw 42972 <IMFS_unlink+0xca>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
428e4: 41ea 0004 lea %a2@(4),%a0
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
428e8: 260e movel %fp,%d3
428ea: 0683 ffff ffe4 addil #-28,%d3
/*
* 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)
428f0: 7801 moveq #1,%d4
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
428f2: 2d58 ffe8 movel %a0@+,%fp@(-24)
428f6: 2d58 ffec movel %a0@+,%fp@(-20)
428fa: 2d58 fff0 movel %a0@+,%fp@(-16)
428fe: 2d50 fff4 movel %a0@,%fp@(-12)
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
42902: 2f03 movel %d3,%sp@-
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
the_link.node_access = node->info.hard_link.link_node;
42904: 2d40 ffe4 movel %d0,%fp@(-28)
IMFS_Set_handlers( &the_link );
42908: 4eb9 0004 a394 jsr 4a394 <IMFS_Set_handlers>
/*
* 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)
4290e: 206b 004c moveal %a3@(76),%a0
42912: 4281 clrl %d1
42914: 588f addql #4,%sp
42916: 3028 0032 movew %a0@(50),%d0
4291a: 3200 movew %d0,%d1
4291c: b881 cmpl %d1,%d4
4291e: 6730 beqs 42950 <IMFS_unlink+0xa8>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
42920: 5380 subql #1,%d0
42922: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( node->info.hard_link.link_node );
42926: 42a7 clrl %sp@-
42928: 486e fff8 pea %fp@(-8)
4292c: 4eb9 0004 3074 jsr 43074 <gettimeofday>
42932: 206b 004c moveal %a3@(76),%a0
42936: 508f addql #8,%sp
42938: 216e fff8 0044 movel %fp@(-8),%a0@(68)
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
4293e: 2f0a movel %a2,%sp@-
42940: 206a 0008 moveal %a2@(8),%a0
42944: 2f02 movel %d2,%sp@-
42946: 2068 0034 moveal %a0@(52),%a0
4294a: 4e90 jsr %a0@
return result;
4294c: 508f addql #8,%sp
4294e: 6082 bras 428d2 <IMFS_unlink+0x2a>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
42950: 2f03 movel %d3,%sp@-
42952: 206e ffec moveal %fp@(-20),%a0
42956: 2f02 movel %d2,%sp@-
42958: 2068 0034 moveal %a0@(52),%a0
4295c: 4e90 jsr %a0@
if ( result != 0 )
4295e: 508f addql #8,%sp
42960: 4a80 tstl %d0
42962: 6700 ff5e beqw 428c2 <IMFS_unlink+0x1a>
return -1;
42966: 70ff moveq #-1,%d0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42968: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3
4296e: 4e5e unlk %fp
42970: 4e75 rts
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
42972: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
42978: 7216 moveq #22,%d1 <== NOT EXECUTED
4297a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4297c: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
4297e: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 <== NOT EXECUTED
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
42984: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42986: 4e5e unlk %fp <== NOT EXECUTED
...
0004298c <IMFS_unmount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4298c: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
4298e: 4e56 0000 linkw %fp,#0
42992: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
42996: 2068 0008 moveal %a0@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4299a: b0a8 0048 cmpl %a0@(72),%d0
4299e: 6610 bnes 429b0 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
429a0: 4aa8 0058 tstl %a0@(88)
429a4: 671c beqs 429c2 <IMFS_unmount+0x36> <== NEVER TAKEN
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
429a6: 42a8 0058 clrl %a0@(88)
return 0;
429aa: 4280 clrl %d0
}
429ac: 4e5e unlk %fp
429ae: 4e75 rts
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
429b0: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
429b6: 7214 moveq #20,%d1 <== NOT EXECUTED
429b8: 2040 moveal %d0,%a0 <== NOT EXECUTED
429ba: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
429bc: 4e5e unlk %fp <== NOT EXECUTED
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
429be: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
429c0: 4e75 rts <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
429c2: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
429c8: 7216 moveq #22,%d1 <== NOT EXECUTED
429ca: 2040 moveal %d0,%a0 <== NOT EXECUTED
429cc: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
429ce: 4e5e unlk %fp <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
429d0: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
00043244 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
43244: 4e56 fff4 linkw %fp,#-12
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
43248: 2079 0005 e2c6 moveal 5e2c6 <rtems_malloc_statistics_helpers>,%a0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
4324e: 48d7 001c moveml %d2-%d4,%sp@
43252: 242e 0008 movel %fp@(8),%d2
43256: 262e 000c movel %fp@(12),%d3
4325a: 282e 0010 movel %fp@(16),%d4
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
4325e: 4a88 tstl %a0
43260: 6704 beqs 43266 <RTEMS_Malloc_Initialize+0x22>
(*rtems_malloc_statistics_helpers->initialize)();
43262: 2050 moveal %a0@,%a0
43264: 4e90 jsr %a0@
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
43266: 4eb9 0004 31c8 jsr 431c8 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
4326c: 2079 0005 e2ca moveal 5e2ca <rtems_malloc_sbrk_helpers>,%a0
43272: 4a88 tstl %a0
43274: 670e beqs 43284 <RTEMS_Malloc_Initialize+0x40>
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
43276: 2f04 movel %d4,%sp@-
heap_begin,
sbrk_amount
);
heap_size = (uintptr_t) sbrk_amount;
43278: 2604 movel %d4,%d3
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
4327a: 2f02 movel %d2,%sp@-
4327c: 2050 moveal %a0@,%a0
4327e: 4e90 jsr %a0@
43280: 508f addql #8,%sp
43282: 2400 movel %d0,%d2
* 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 (
43284: 4a39 0005 e2c4 tstb 5e2c4 <rtems_unified_work_area>
4328a: 6624 bnes 432b0 <RTEMS_Malloc_Initialize+0x6c>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
4328c: 4a39 0005 dc0c tstb 5dc0c <Configuration+0x28>
43292: 6642 bnes 432d6 <RTEMS_Malloc_Initialize+0x92>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
43294: 4878 0004 pea 4 <CONTEXT_ARG>
43298: 2f03 movel %d3,%sp@-
4329a: 2f02 movel %d2,%sp@-
4329c: 2f39 0005 db40 movel 5db40 <RTEMS_Malloc_Heap>,%sp@-
432a2: 4eb9 0004 7862 jsr 47862 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
432a8: 4fef 0010 lea %sp@(16),%sp
432ac: 4a80 tstl %d0
432ae: 675a beqs 4330a <RTEMS_Malloc_Initialize+0xc6> <== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
432b0: 2f39 0005 db40 movel 5db40 <RTEMS_Malloc_Heap>,%sp@-
432b6: 2439 0005 f310 movel 5f310 <rtems_malloc_statistics>,%d2
432bc: 4eb9 0004 8350 jsr 48350 <_Protected_heap_Get_size>
432c2: 588f addql #4,%sp
432c4: d082 addl %d2,%d0
}
432c6: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
432cc: 23c0 0005 f310 movel %d0,5f310 <rtems_malloc_statistics>
}
432d2: 4e5e unlk %fp
432d4: 4e75 rts
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
432d6: 2f03 movel %d3,%sp@-
432d8: 42a7 clrl %sp@-
432da: 2f02 movel %d2,%sp@-
432dc: 4eb9 0004 e3f4 jsr 4e3f4 <memset>
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
432e2: 4fef 000c lea %sp@(12),%sp
432e6: 4a39 0005 e2c4 tstb 5e2c4 <rtems_unified_work_area>
432ec: 66c2 bnes 432b0 <RTEMS_Malloc_Initialize+0x6c> <== NEVER TAKEN
432ee: 4878 0004 pea 4 <CONTEXT_ARG>
432f2: 2f03 movel %d3,%sp@-
432f4: 2f02 movel %d2,%sp@-
432f6: 2f39 0005 db40 movel 5db40 <RTEMS_Malloc_Heap>,%sp@-
432fc: 4eb9 0004 7862 jsr 47862 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
43302: 4fef 0010 lea %sp@(16),%sp
43306: 4a80 tstl %d0
43308: 66a6 bnes 432b0 <RTEMS_Malloc_Initialize+0x6c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
4330a: 4878 001a pea 1a <OPER2+0x6>
4330e: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred>
000423d0 <Stack_check_Dump_threads_usage>:
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
423d0: 70ff moveq #-1,%d0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
423d2: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED
423d6: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
423da: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
423de: b08a cmpl %a2,%d0 <== NOT EXECUTED
423e0: 6700 015e beqw 42540 <Stack_check_Dump_threads_usage+0x170><== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
423e4: 282a 00f0 movel %a2@(240),%d4 <== NOT EXECUTED
the_thread = 0;
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
423e8: 47ea 00b0 lea %a2@(176),%a3 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
423ec: 206a 00b4 moveal %a2@(180),%a0 <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
423f0: 2413 movel %a3@,%d2 <== 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++)
423f2: 70fc moveq #-4,%d0 <== NOT EXECUTED
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
423f4: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
423fa: 2608 movel %a0,%d3 <== NOT EXECUTED
423fc: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
42402: 2243 moveal %d3,%a1 <== NOT EXECUTED
42404: 43e9 0010 lea %a1@(16),%a1 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
42408: c082 andl %d2,%d0 <== NOT EXECUTED
4240a: d089 addl %a1,%d0 <== NOT EXECUTED
4240c: b089 cmpl %a1,%d0 <== NOT EXECUTED
4240e: 6300 00ba blsw 424ca <Stack_check_Dump_threads_usage+0xfa><== NOT EXECUTED
if (*base != U32_PATTERN)
42412: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED
42418: b291 cmpl %a1@,%d1 <== NOT EXECUTED
4241a: 6600 013e bnew 4255a <Stack_check_Dump_threads_usage+0x18a><== NOT EXECUTED
* Try to print out how much stack was actually used by the task.
*/
static void *print_context;
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
4241e: 41e8 0024 lea %a0@(36),%a0 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
42422: 2208 movel %a0,%d1 <== 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++)
42424: b1c0 cmpal %d0,%a0 <== NOT EXECUTED
42426: 6400 00a2 bccw 424ca <Stack_check_Dump_threads_usage+0xfa><== NOT EXECUTED
if (*base != U32_PATTERN)
4242a: 227c a5a5 a5a5 moveal #-1515870811,%a1 <== NOT EXECUTED
42430: b3d8 cmpal %a0@+,%a1 <== NOT EXECUTED
42432: 67ee beqs 42422 <Stack_check_Dump_threads_usage+0x52><== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
42434: 4a81 tstl %d1 <== NOT EXECUTED
42436: 6700 0092 beqw 424ca <Stack_check_Dump_threads_usage+0xfa><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
4243a: d682 addl %d2,%d3 <== NOT EXECUTED
4243c: 9681 subl %d1,%d3 <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
4243e: 4a8a tstl %a2 <== NOT EXECUTED
42440: 6700 0090 beqw 424d2 <Stack_check_Dump_threads_usage+0x102><== NOT EXECUTED
#endif
{
(*print_handler)(
42444: 486e fffb pea %fp@(-5) <== NOT EXECUTED
42448: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4244c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
42450: 2879 0005 f15c moveal 5f15c <print_handler>,%a4 <== NOT EXECUTED
42456: 4eb9 0004 6960 jsr 46960 <rtems_object_get_name> <== NOT EXECUTED
4245c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4245e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
42462: 4879 0005 cd5a pea 5cd5a <IntUartPollCallbacks.6330+0x20> <== NOT EXECUTED
42468: 2f39 0005 f158 movel 5f158 <print_context>,%sp@- <== NOT EXECUTED
4246e: 4e94 jsr %a4@ <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
42470: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
42474: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
42478: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4247a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
4247c: 2013 movel %a3@,%d0 <== NOT EXECUTED
4247e: 5380 subql #1,%d0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
42480: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
42484: 2f08 movel %a0,%sp@- <== NOT EXECUTED
42486: 4879 0005 cd75 pea 5cd75 <IntUartPollCallbacks.6330+0x3b> <== NOT EXECUTED
4248c: 2f39 0005 f158 movel 5f158 <print_context>,%sp@- <== NOT EXECUTED
42492: 2079 0005 f15c moveal 5f15c <print_handler>,%a0 <== NOT EXECUTED
42498: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
4249a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4249e: 4ab9 0005 f160 tstl 5f160 <Stack_check_Initialized> <== NOT EXECUTED
424a4: 677a beqs 42520 <Stack_check_Dump_threads_usage+0x150><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
424a6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
424a8: 4879 0005 cda0 pea 5cda0 <IntUartPollCallbacks.6330+0x66> <== NOT EXECUTED
424ae: 2f39 0005 f158 movel 5f158 <print_context>,%sp@- <== NOT EXECUTED
424b4: 2079 0005 f15c moveal 5f15c <print_handler>,%a0 <== NOT EXECUTED
424ba: 4e90 jsr %a0@ <== NOT EXECUTED
424bc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
424c0: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED
424c6: 4e5e unlk %fp <== NOT EXECUTED
424c8: 4e75 rts <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
424ca: 4283 clrl %d3 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
424cc: 4a8a tstl %a2 <== NOT EXECUTED
424ce: 6600 ff74 bnew 42444 <Stack_check_Dump_threads_usage+0x74><== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
424d2: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
424d6: 4879 0005 cd67 pea 5cd67 <IntUartPollCallbacks.6330+0x2d> <== NOT EXECUTED
424dc: 2f39 0005 f158 movel 5f158 <print_context>,%sp@- <== NOT EXECUTED
424e2: 2079 0005 f15c moveal 5f15c <print_handler>,%a0 <== NOT EXECUTED
424e8: 4e90 jsr %a0@ <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
424ea: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
424ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
#endif
(*print_handler)(
424f2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
424f4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
424f6: 2013 movel %a3@,%d0 <== NOT EXECUTED
424f8: 5380 subql #1,%d0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
424fa: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
424fe: 2f08 movel %a0,%sp@- <== NOT EXECUTED
42500: 4879 0005 cd75 pea 5cd75 <IntUartPollCallbacks.6330+0x3b> <== NOT EXECUTED
42506: 2f39 0005 f158 movel 5f158 <print_context>,%sp@- <== NOT EXECUTED
4250c: 2079 0005 f15c moveal 5f15c <print_handler>,%a0 <== NOT EXECUTED
42512: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
42514: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
42518: 4ab9 0005 f160 tstl 5f160 <Stack_check_Initialized> <== NOT EXECUTED
4251e: 6686 bnes 424a6 <Stack_check_Dump_threads_usage+0xd6><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
42520: 4879 0005 cd93 pea 5cd93 <IntUartPollCallbacks.6330+0x59> <== NOT EXECUTED
42526: 2f39 0005 f158 movel 5f158 <print_context>,%sp@- <== NOT EXECUTED
4252c: 2079 0005 f15c moveal 5f15c <print_handler>,%a0 <== NOT EXECUTED
42532: 4e90 jsr %a0@ <== NOT EXECUTED
42534: 508f addql #8,%sp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
42536: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED
4253c: 4e5e unlk %fp <== NOT EXECUTED
4253e: 4e75 rts <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
42540: 2079 0005 f974 moveal 5f974 <Stack_check_Interrupt_stack+0x4>,%a0<== NOT EXECUTED
42546: 4a88 tstl %a0 <== NOT EXECUTED
42548: 6700 ff76 beqw 424c0 <Stack_check_Dump_threads_usage+0xf0><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
4254c: 47f9 0005 f970 lea 5f970 <Stack_check_Interrupt_stack>,%a3 <== NOT EXECUTED
the_thread = 0;
current = 0;
42552: 4284 clrl %d4 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
42554: 95ca subal %a2,%a2 <== NOT EXECUTED
42556: 6000 fe98 braw 423f0 <Stack_check_Dump_threads_usage+0x20><== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
4255a: 2209 movel %a1,%d1 <== NOT EXECUTED
4255c: 6000 fed6 braw 42434 <Stack_check_Dump_threads_usage+0x64><== NOT EXECUTED
00042560 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
42560: 4e56 0000 linkw %fp,#0
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
42564: 4ab9 0005 f160 tstl 5f160 <Stack_check_Initialized>
4256a: 666a bnes 425d6 <Stack_check_Initialize+0x76>
/*
* 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) {
4256c: 2039 0005 fc5c movel 5fc5c <_Per_CPU_Information>,%d0
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
42572: 223c feed f00d movel #-17960947,%d1
42578: 23c1 0005 f960 movel %d1,5f960 <Stack_check_Pattern>
4257e: 223c 0bad 0d06 movel #195890438,%d1
42584: 23c1 0005 f964 movel %d1,5f964 <Stack_check_Pattern+0x4>
4258a: 223c dead f00d movel #-559026163,%d1
42590: 23c1 0005 f968 movel %d1,5f968 <Stack_check_Pattern+0x8>
42596: 223c 600d 0d06 movel #1611468038,%d1
4259c: 23c1 0005 f96c movel %d1,5f96c <Stack_check_Pattern+0xc>
/*
* 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) {
425a2: 4a80 tstl %d0
425a4: 6728 beqs 425ce <Stack_check_Initialize+0x6e> <== NEVER TAKEN
425a6: 2239 0005 fc60 movel 5fc60 <_Per_CPU_Information+0x4>,%d1
425ac: 6720 beqs 425ce <Stack_check_Initialize+0x6e> <== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
425ae: 9280 subl %d0,%d1
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
425b0: 2f01 movel %d1,%sp@-
425b2: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
* 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;
425b6: 23c0 0005 f974 movel %d0,5f974 <Stack_check_Interrupt_stack+0x4>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
425bc: 2f00 movel %d0,%sp@-
* 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;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
425be: 23c1 0005 f970 movel %d1,5f970 <Stack_check_Interrupt_stack>
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
425c4: 4eb9 0004 e990 jsr 4e990 <memset>
425ca: 4fef 000c lea %sp@(12),%sp
}
#endif
Stack_check_Initialized = 1;
425ce: 7001 moveq #1,%d0
425d0: 23c0 0005 f160 movel %d0,5f160 <Stack_check_Initialized>
}
425d6: 4e5e unlk %fp <== NOT EXECUTED
0004264c <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
4264c: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED
42650: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
42654: 4879 0005 cda6 pea 5cda6 <IntUartPollCallbacks.6330+0x6c> <== NOT EXECUTED
4265a: 47f9 0004 432c lea 4432c <printk>,%a3 <== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
42660: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
42664: 286a 00b4 moveal %a2@(180),%a4 <== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
42668: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
4266c: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
4266e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
42670: 4879 0005 cdb6 pea 5cdb6 <IntUartPollCallbacks.6330+0x7c> <== NOT EXECUTED
42676: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
42678: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4267c: 4879 0005 cdd3 pea 5cdd3 <IntUartPollCallbacks.6330+0x99> <== NOT EXECUTED
42682: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
42684: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
42688: 4879 0005 cde5 pea 5cde5 <IntUartPollCallbacks.6330+0xab> <== NOT EXECUTED
4268e: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
42690: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED
42694: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
42698: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4269c: 4eb9 0004 6960 jsr 46960 <rtems_object_get_name> <== NOT EXECUTED
426a2: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
426a6: 2e80 movel %d0,%sp@ <== NOT EXECUTED
426a8: 4879 0005 cdf9 pea 5cdf9 <IntUartPollCallbacks.6330+0xbf> <== NOT EXECUTED
426ae: 4e93 jsr %a3@ <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
426b0: 206a 00b4 moveal %a2@(180),%a0 <== NOT EXECUTED
426b4: 202a 00b0 movel %a2@(176),%d0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
426b8: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
426bc: 2f08 movel %a0,%sp@- <== NOT EXECUTED
426be: 2f00 movel %d0,%sp@- <== NOT EXECUTED
426c0: 4879 0005 ce0f pea 5ce0f <IntUartPollCallbacks.6330+0xd5> <== NOT EXECUTED
426c6: 4e93 jsr %a3@ <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
426c8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
426cc: 4a02 tstb %d2 <== NOT EXECUTED
426ce: 670a beqs 426da <Stack_check_report_blown_task+0x8e><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
426d0: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED
426d4: 4eb9 0004 7304 jsr 47304 <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
426da: 486c 0018 pea %a4@(24) <== NOT EXECUTED
426de: 486c 0008 pea %a4@(8) <== NOT EXECUTED
426e2: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
426e6: 4879 0005 ce40 pea 5ce40 <IntUartPollCallbacks.6330+0x106> <== NOT EXECUTED
426ec: 4e93 jsr %a3@ <== NOT EXECUTED
426ee: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
426f2: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED
426f6: 4eb9 0004 7304 jsr 47304 <rtems_fatal_error_occurred> <== NOT EXECUTED
00047150 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
47150: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47154: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
4715a: 5280 addql #1,%d0
4715c: 206e 0008 moveal %fp@(8),%a0
47160: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
47166: 42a7 clrl %sp@-
47168: 2f28 0008 movel %a0@(8),%sp@-
4716c: 4868 0010 pea %a0@(16)
47170: 4eb9 0004 7458 jsr 47458 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47176: 4fef 000c lea %sp@(12),%sp
}
4717a: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
4717c: 4ef9 0004 8cd6 jmp 48cd6 <_Thread_Enable_dispatch>
...
0004702a <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
4702a: 4e56 0000 linkw %fp,#0
4702e: 2f0a movel %a2,%sp@-
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
47030: 2479 0005 f5a0 moveal 5f5a0 <_API_extensions_List>,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47036: b5fc 0005 f5a4 cmpal #390564,%a2
4703c: 6710 beqs 4704e <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
4703e: 206a 0008 moveal %a2@(8),%a0
47042: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47044: 2452 moveal %a2@,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47046: b5fc 0005 f5a4 cmpal #390564,%a2
4704c: 66f0 bnes 4703e <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
4704e: 246e fffc moveal %fp@(-4),%a2
47052: 4e5e unlk %fp <== NOT EXECUTED
00047056 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
47056: 4e56 0000 linkw %fp,#0
4705a: 2f0a movel %a2,%sp@-
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
4705c: 2479 0005 f5a0 moveal 5f5a0 <_API_extensions_List>,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47062: b5fc 0005 f5a4 cmpal #390564,%a2
47068: 6718 beqs 47082 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
4706a: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
47070: 206a 000c moveal %a2@(12),%a0
47074: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47076: 2452 moveal %a2@,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47078: 588f addql #4,%sp
4707a: b5fc 0005 f5a4 cmpal #390564,%a2
47080: 66e8 bnes 4706a <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
47082: 246e fffc moveal %fp@(-4),%a2
47086: 4e5e unlk %fp
...
0004edd8 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4edd8: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4edde: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
4ede2: 2279 0006 1e98 moveal 61e98 <_Per_CPU_Information+0xc>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4ede8: 48d7 001c moveml %d2-%d4,%sp@
4edec: 206e 0008 moveal %fp@(8),%a0
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4edf0: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4edf4: 242e 000c movel %fp@(12),%d2
4edf8: 262e 0014 movel %fp@(20),%d3
4edfc: 282e 0018 movel %fp@(24),%d4
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4ee00: 40c1 movew %sr,%d1
4ee02: 8081 orl %d1,%d0
4ee04: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4ee06: 2028 0048 movel %a0@(72),%d0
4ee0a: 5280 addql #1,%d0
4ee0c: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4ee10: 4aa8 0040 tstl %a0@(64)
4ee14: 6606 bnes 4ee1c <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
4ee16: b0a8 0044 cmpl %a0@(68),%d0
4ee1a: 672e beqs 4ee4a <_CORE_barrier_Wait+0x72>
4ee1c: 7001 moveq #1,%d0
4ee1e: 2140 0030 movel %d0,%a0@(48)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
4ee22: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
4ee26: 2342 0020 movel %d2,%a1@(32)
_ISR_Enable( level );
4ee2a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4ee2c: 2d43 000c movel %d3,%fp@(12)
4ee30: 203c 0004 b700 movel #308992,%d0
4ee36: 2d48 0008 movel %a0,%fp@(8)
}
4ee3a: 4cd7 001c moveml %sp@,%d2-%d4
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4ee3e: 2d40 0010 movel %d0,%fp@(16)
}
4ee42: 4e5e unlk %fp
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4ee44: 4ef9 0004 b33c jmp 4b33c <_Thread_queue_Enqueue_with_handler>
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
4ee4a: 7001 moveq #1,%d0
4ee4c: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4ee50: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4ee52: 2d44 0010 movel %d4,%fp@(16)
4ee56: 2d42 000c movel %d2,%fp@(12)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4ee5a: 4cd7 001c moveml %sp@,%d2-%d4
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4ee5e: 2d48 0008 movel %a0,%fp@(8)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4ee62: 4e5e unlk %fp
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4ee64: 4ef9 0004 ed9c jmp 4ed9c <_CORE_barrier_Release>
...
0004cfbc <_CORE_message_queue_Close>:
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4cfbc: 4e56 0000 linkw %fp,#0
4cfc0: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4cfc2: 2f2e 0010 movel %fp@(16),%sp@-
4cfc6: 2f2e 000c movel %fp@(12),%sp@-
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4cfca: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4cfce: 2f0a movel %a2,%sp@-
4cfd0: 4eb9 0004 a06c jsr 4a06c <_Thread_queue_Flush>
* This removes all messages from the pending message queue. Since
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
4cfd6: 4fef 000c lea %sp@(12),%sp
4cfda: 4aaa 0048 tstl %a2@(72)
4cfde: 6612 bnes 4cff2 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4cfe0: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
4cfe6: 246e fffc moveal %fp@(-4),%a2
4cfea: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4cfec: 4ef9 0004 aa66 jmp 4aa66 <_Workspace_Free>
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4cff2: 2f0a movel %a2,%sp@-
4cff4: 4eb9 0004 d010 jsr 4d010 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
4cffa: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4d000: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
4d002: 246e fffc moveal %fp@(-4),%a2
4d006: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4d008: 4ef9 0004 aa66 jmp 4aa66 <_Workspace_Free>
...
00050408 <_CORE_message_queue_Initialize>:
/*
* 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)) {
50408: 7203 moveq #3,%d1
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
)
{
5040a: 4e56 fff4 linkw %fp,#-12
5040e: 202e 0014 movel %fp@(20),%d0
50412: 48d7 040c moveml %d2-%d3/%a2,%sp@
50416: 246e 0008 moveal %fp@(8),%a2
5041a: 242e 0010 movel %fp@(16),%d2
/*
* 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)) {
5041e: c280 andl %d0,%d1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
50420: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
50424: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
50428: 2540 004c movel %d0,%a2@(76)
/*
* 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)) {
5042c: 4a81 tstl %d1
5042e: 6718 beqs 50448 <_CORE_message_queue_Initialize+0x40>
allocated_message_size += sizeof(uint32_t);
50430: 2200 movel %d0,%d1
50432: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
50434: 76fc moveq #-4,%d3
50436: c283 andl %d3,%d1
}
if (allocated_message_size < maximum_message_size)
50438: b280 cmpl %d0,%d1
5043a: 640e bccs 5044a <_CORE_message_queue_Initialize+0x42><== ALWAYS TAKEN
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
5043c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
50442: 4200 clrb %d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
50444: 4e5e unlk %fp
50446: 4e75 rts
/*
* 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)) {
50448: 2200 movel %d0,%d1
/*
* 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 *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
5044a: 2601 movel %d1,%d3
5044c: 0683 0000 0010 addil #16,%d3
/*
* 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 *
50452: 2003 movel %d3,%d0
50454: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
50458: b280 cmpl %d0,%d1
5045a: 62e0 bhis 5043c <_CORE_message_queue_Initialize+0x34><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
5045c: 2f00 movel %d0,%sp@-
5045e: 4eb9 0005 32d6 jsr 532d6 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
50464: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
50466: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
5046a: 67d0 beqs 5043c <_CORE_message_queue_Initialize+0x34>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
5046c: 2f03 movel %d3,%sp@-
5046e: 2f02 movel %d2,%sp@-
50470: 2f00 movel %d0,%sp@-
50472: 486a 0060 pea %a2@(96)
50476: 4eb9 0005 5148 jsr 55148 <_Chain_Initialize>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
5047c: 41ea 0054 lea %a2@(84),%a0
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
50480: 7001 moveq #1,%d0
50482: 2548 0050 movel %a0,%a2@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50486: 41ea 0050 lea %a2@(80),%a0
5048a: 2548 0058 movel %a0,%a2@(88)
5048e: 4878 0006 pea 6 <EXTENDSFDF>
50492: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
50496: 206e 000c moveal %fp@(12),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5049a: 42aa 0054 clrl %a2@(84)
5049e: b090 cmpl %a0@,%d0
504a0: 57c0 seq %d0
504a2: 49c0 extbl %d0
504a4: 4480 negl %d0
504a6: 2f00 movel %d0,%sp@-
504a8: 2f0a movel %a2,%sp@-
504aa: 4eb9 0005 2934 jsr 52934 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
504b0: 4fef 0020 lea %sp@(32),%sp
}
504b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
504ba: 7001 moveq #1,%d0
}
504bc: 4e5e unlk %fp <== NOT EXECUTED
000504c0 <_CORE_message_queue_Seize>:
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
504c0: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
504c6: 4e56 ffe4 linkw %fp,#-28
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
504ca: 2079 0006 941c moveal 6941c <_Per_CPU_Information+0xc>,%a0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
504d0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
504d4: 246e 0008 moveal %fp@(8),%a2
504d8: 2a2e 000c movel %fp@(12),%d5
504dc: 242e 0010 movel %fp@(16),%d2
504e0: 226e 0014 moveal %fp@(20),%a1
504e4: 282e 001c movel %fp@(28),%d4
504e8: 162e 001b moveb %fp@(27),%d3
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
504ec: 42a8 0034 clrl %a0@(52)
_ISR_Disable( level );
504f0: 40c1 movew %sr,%d1
504f2: 8081 orl %d1,%d0
504f4: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
504f6: 200a movel %a2,%d0
504f8: 0680 0000 0054 addil #84,%d0
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 );
}
504fe: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
50502: b08b cmpl %a3,%d0
50504: 674e beqs 50554 <_CORE_message_queue_Seize+0x94>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
50506: 2053 moveal %a3@,%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50508: 49ea 0050 lea %a2@(80),%a4
5050c: 214c 0004 movel %a4,%a0@(4)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
50510: 53aa 0048 subql #1,%a2@(72)
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
50514: 2548 0050 movel %a0,%a2@(80)
_ISR_Enable( level );
50518: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
5051a: 22ab 0008 movel %a3@(8),%a1@
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 );
5051e: 45ea 0060 lea %a2@(96),%a2
_Thread_Executing->Wait.count =
50522: 2079 0006 941c moveal 6941c <_Per_CPU_Information+0xc>,%a0
50528: 42a8 0024 clrl %a0@(36)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5052c: 2f11 movel %a1@,%sp@-
5052e: 486b 000c pea %a3@(12)
50532: 2f02 movel %d2,%sp@-
50534: 4eb9 0005 7868 jsr 57868 <memcpy>
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 );
5053a: 4fef 000c lea %sp@(12),%sp
5053e: 2d4a 0008 movel %a2,%fp@(8)
50542: 2d4b 000c movel %a3,%fp@(12)
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 );
}
50546: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5054c: 4e5e unlk %fp
5054e: 4ef9 0005 033c jmp 5033c <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
50554: 4a03 tstb %d3
50556: 6612 bnes 5056a <_CORE_message_queue_Seize+0xaa>
_ISR_Enable( level );
50558: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
5055a: 7004 moveq #4,%d0
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 );
}
5055c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
#endif
}
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
50562: 2140 0034 movel %d0,%a0@(52)
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 );
}
50566: 4e5e unlk %fp
50568: 4e75 rts
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;
5056a: 7001 moveq #1,%d0
5056c: 2540 0030 movel %d0,%a2@(48)
}
_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;
50570: 2142 002c movel %d2,%a0@(44)
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;
50574: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id;
50578: 2145 0020 movel %d5,%a0@(32)
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
5057c: 2149 0028 movel %a1,%a0@(40)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
50580: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
50582: 49f9 0005 2a40 lea 52a40 <_Thread_queue_Timeout>,%a4
50588: 2d44 000c movel %d4,%fp@(12)
5058c: 2d4c 0010 movel %a4,%fp@(16)
50590: 2d4a 0008 movel %a2,%fp@(8)
}
50594: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5059a: 4e5e unlk %fp
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 );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
5059c: 4ef9 0005 267c jmp 5267c <_Thread_queue_Enqueue_with_handler>
...
000505a4 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
505a4: 4e56 fff4 linkw %fp,#-12
505a8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
505ac: 246e 0008 moveal %fp@(8),%a2
505b0: 242e 0010 movel %fp@(16),%d2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
505b4: b4aa 004c cmpl %a2@(76),%d2
505b8: 6256 bhis 50610 <_CORE_message_queue_Submit+0x6c>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
505ba: 202a 0048 movel %a2@(72),%d0
505be: 675c beqs 5061c <_CORE_message_queue_Submit+0x78>
/*
* 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 <
505c0: b0aa 0044 cmpl %a2@(68),%d0
505c4: 650c bcss 505d2 <_CORE_message_queue_Submit+0x2e>
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
#if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND)
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
505c6: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
505c8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
505ce: 4e5e unlk %fp
505d0: 4e75 rts
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
505d2: 486a 0060 pea %a2@(96)
505d6: 4eb9 0005 039c jsr 5039c <_Chain_Get>
505dc: 2640 moveal %d0,%a3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
505de: 2f02 movel %d2,%sp@-
505e0: 2f2e 000c movel %fp@(12),%sp@-
505e4: 486b 000c pea %a3@(12)
505e8: 4eb9 0005 7868 jsr 57868 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
505ee: 2742 0008 movel %d2,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
505f2: 2f2e 001c movel %fp@(28),%sp@-
505f6: 2f0b movel %a3,%sp@-
505f8: 2f0a movel %a2,%sp@-
505fa: 4eb9 0005 51bc jsr 551bc <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50600: 4fef 001c lea %sp@(28),%sp
50604: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50606: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
5060c: 4e5e unlk %fp
5060e: 4e75 rts
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
50610: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50612: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
50618: 4e5e unlk %fp
5061a: 4e75 rts
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
5061c: 2f0a movel %a2,%sp@-
5061e: 4eb9 0005 2504 jsr 52504 <_Thread_queue_Dequeue>
if ( the_thread ) {
50624: 588f addql #4,%sp
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
50626: 2640 moveal %d0,%a3
if ( the_thread ) {
50628: 4a80 tstl %d0
5062a: 672e beqs 5065a <_CORE_message_queue_Submit+0xb6>
5062c: 2f02 movel %d2,%sp@-
5062e: 2f2e 000c movel %fp@(12),%sp@-
50632: 2f2b 002c movel %a3@(44),%sp@-
50636: 4eb9 0005 7868 jsr 57868 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5063c: 206b 0028 moveal %a3@(40),%a0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50640: 4fef 000c lea %sp@(12),%sp
50644: 4280 clrl %d0
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
50646: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
50648: 222e 001c movel %fp@(28),%d1
5064c: 2741 0024 movel %d1,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50650: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
50656: 4e5e unlk %fp
50658: 4e75 rts
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) {
5065a: 202a 0048 movel %a2@(72),%d0
/*
* 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 <
5065e: b0aa 0044 cmpl %a2@(68),%d0
50662: 6400 ff62 bccw 505c6 <_CORE_message_queue_Submit+0x22>
50666: 6000 ff6a braw 505d2 <_CORE_message_queue_Submit+0x2e>
...
000473a8 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
473a8: 4e56 0000 linkw %fp,#0
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473ac: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
473b2: 2f0a movel %a2,%sp@-
473b4: 246e 0008 moveal %fp@(8),%a2
473b8: 2f02 movel %d2,%sp@-
473ba: 142e 0013 moveb %fp@(19),%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473be: 4a80 tstl %d0
473c0: 6704 beqs 473c6 <_CORE_mutex_Seize+0x1e>
473c2: 4a02 tstb %d2
473c4: 6634 bnes 473fa <_CORE_mutex_Seize+0x52> <== ALWAYS TAKEN
473c6: 486e 0018 pea %fp@(24)
473ca: 2f0a movel %a2,%sp@-
473cc: 4eb9 0004 bcd4 jsr 4bcd4 <_CORE_mutex_Seize_interrupt_trylock>
473d2: 508f addql #8,%sp
473d4: 4a80 tstl %d0
473d6: 6716 beqs 473ee <_CORE_mutex_Seize+0x46>
473d8: 4a02 tstb %d2
473da: 6636 bnes 47412 <_CORE_mutex_Seize+0x6a>
473dc: 202e 0018 movel %fp@(24),%d0
473e0: 46c0 movew %d0,%sr
473e2: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
473e8: 7001 moveq #1,%d0
473ea: 2140 0034 movel %d0,%a0@(52)
}
473ee: 242e fff8 movel %fp@(-8),%d2
473f2: 246e fffc moveal %fp@(-4),%a2
473f6: 4e5e unlk %fp
473f8: 4e75 rts
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473fa: 7001 moveq #1,%d0
473fc: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
47402: 64c2 bccs 473c6 <_CORE_mutex_Seize+0x1e>
47404: 4878 0012 pea 12 <INVALID_OPERATION+0x2>
47408: 42a7 clrl %sp@-
4740a: 42a7 clrl %sp@-
4740c: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
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;
47412: 7001 moveq #1,%d0
47414: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
4741a: 2540 0030 movel %d0,%a2@(48)
4741e: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
47424: 5280 addql #1,%d0
47426: 216e 000c 0020 movel %fp@(12),%a0@(32)
4742c: 214a 0044 movel %a2,%a0@(68)
47430: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
47436: 202e 0018 movel %fp@(24),%d0
4743a: 46c0 movew %d0,%sr
4743c: 2f2e 0014 movel %fp@(20),%sp@-
47440: 2f0a movel %a2,%sp@-
47442: 4eb9 0004 731c jsr 4731c <_CORE_mutex_Seize_interrupt_blocking>
}
47448: 242e fff8 movel %fp@(-8),%d2
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
4744c: 508f addql #8,%sp
}
4744e: 246e fffc moveal %fp@(-4),%a2
47452: 4e5e unlk %fp
...
000475ac <_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
)
{
475ac: 4e56 0000 linkw %fp,#0
475b0: 2f0a movel %a2,%sp@-
475b2: 246e 0008 moveal %fp@(8),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
475b6: 2f0a movel %a2,%sp@-
475b8: 4eb9 0004 9030 jsr 49030 <_Thread_queue_Dequeue>
475be: 588f addql #4,%sp
475c0: 4a80 tstl %d0
475c2: 670a beqs 475ce <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475c4: 246e fffc moveal %fp@(-4),%a2
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
475c8: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475ca: 4e5e unlk %fp
475cc: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
475ce: 303c 0700 movew #1792,%d0
475d2: 40c1 movew %sr,%d1
475d4: 8081 orl %d1,%d0
475d6: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
475d8: 202a 0048 movel %a2@(72),%d0
475dc: b0aa 0040 cmpl %a2@(64),%d0
475e0: 6412 bccs 475f4 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN
the_semaphore->count += 1;
475e2: 5280 addql #1,%d0
475e4: 2540 0048 movel %d0,%a2@(72)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
475e8: 4280 clrl %d0
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
475ea: 46c1 movew %d1,%sr
}
return status;
}
475ec: 246e fffc moveal %fp@(-4),%a2
475f0: 4e5e unlk %fp
475f2: 4e75 rts
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
475f4: 7004 moveq #4,%d0 <== NOT EXECUTED
_ISR_Enable( level );
475f6: 46c1 movew %d1,%sr <== NOT EXECUTED
475f8: 60f2 bras 475ec <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED
...
0004bc60 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4bc60: 4e56 ffec linkw %fp,#-20
4bc64: 202e 0010 movel %fp@(16),%d0
4bc68: 48d7 043c moveml %d2-%d5/%a2,%sp@
4bc6c: 246e 0008 moveal %fp@(8),%a2
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4bc70: 280a movel %a2,%d4
4bc72: 5884 addql #4,%d4
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4bc74: 262e 000c movel %fp@(12),%d3
4bc78: 242e 0014 movel %fp@(20),%d2
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
4bc7c: 42aa 0004 clrl %a2@(4)
while ( count-- ) {
4bc80: 4a80 tstl %d0
4bc82: 6740 beqs 4bcc4 <_Chain_Initialize+0x64> <== NEVER TAKEN
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
4bc84: 2043 moveal %d3,%a0
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
4bc86: 224a moveal %a2,%a1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bc88: 5380 subql #1,%d0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bc8a: 2208 movel %a0,%d1
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bc8c: 2a00 movel %d0,%d5
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bc8e: d282 addl %d2,%d1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
4bc90: 2288 movel %a0,%a1@
next->previous = current;
4bc92: 2149 0004 movel %a1,%a0@(4)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bc96: 4a80 tstl %d0
4bc98: 6714 beqs 4bcae <_Chain_Initialize+0x4e>
4bc9a: 2248 moveal %a0,%a1
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
4bc9c: 2041 moveal %d1,%a0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bc9e: 2208 movel %a0,%d1
4bca0: 5380 subql #1,%d0
4bca2: d282 addl %d2,%d1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
4bca4: 2288 movel %a0,%a1@
next->previous = current;
4bca6: 2149 0004 movel %a1,%a0@(4)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bcaa: 4a80 tstl %d0
4bcac: 66ec bnes 4bc9a <_Chain_Initialize+0x3a>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bcae: 4c05 2800 mulsl %d5,%d2
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bcb2: 2043 moveal %d3,%a0
4bcb4: d1c2 addal %d2,%a0
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
tail->previous = current;
4bcb6: 2548 0008 movel %a0,%a2@(8)
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
4bcba: 2084 movel %d4,%a0@
tail->previous = current;
}
4bcbc: 4cd7 043c moveml %sp@,%d2-%d5/%a2
4bcc0: 4e5e unlk %fp
4bcc2: 4e75 rts
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
4bcc4: 204a moveal %a2,%a0 <== NOT EXECUTED
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
tail->previous = current;
4bcc6: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
4bcca: 2084 movel %d4,%a0@ <== NOT EXECUTED
tail->previous = current;
}
4bccc: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED
4bcd0: 4e5e unlk %fp <== NOT EXECUTED
000462b4 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
462b4: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
462ba: 4e56 ffec linkw %fp,#-20
462be: 48d7 043c moveml %d2-%d5/%a2,%sp@
462c2: 246e 0008 moveal %fp@(8),%a2
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 ];
462c6: 206a 00fc moveal %a2@(252),%a0
option_set = (rtems_option) the_thread->Wait.option;
462ca: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
462ce: 40c3 movew %sr,%d3
462d0: 8083 orl %d3,%d0
462d2: 46c0 movew %d0,%sr
pending_events = api->pending_events;
event_condition = (rtems_event_set) the_thread->Wait.count;
462d4: 222a 0024 movel %a2@(36),%d1
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
462d8: 2001 movel %d1,%d0
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
pending_events = api->pending_events;
462da: 2410 movel %a0@,%d2
462dc: c082 andl %d2,%d0
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
462de: 6776 beqs 46356 <_Event_Surrender+0xa2>
/*
* 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() &&
462e0: 4ab9 0005 f5e0 tstl 5f5e0 <_Per_CPU_Information+0x8>
462e6: 670a beqs 462f2 <_Event_Surrender+0x3e>
462e8: b5f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a2
462ee: 6700 00a0 beqw 46390 <_Event_Surrender+0xdc>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
462f2: 2a2a 0010 movel %a2@(16),%d5
462f6: 0285 0000 0100 andil #256,%d5
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
462fc: 674c beqs 4634a <_Event_Surrender+0x96>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
462fe: b081 cmpl %d1,%d0
46300: 6706 beqs 46308 <_Event_Surrender+0x54>
46302: 0804 0001 btst #1,%d4
46306: 6742 beqs 4634a <_Event_Surrender+0x96> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
46308: 2200 movel %d0,%d1
4630a: 4681 notl %d1
4630c: c282 andl %d2,%d1
4630e: 2081 movel %d1,%a0@
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46310: 206a 0028 moveal %a2@(40),%a0
* 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;
46314: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46318: 2080 movel %d0,%a0@
_ISR_Flash( level );
4631a: 203c 0000 0700 movel #1792,%d0
46320: 46c3 movew %d3,%sr
46322: 8083 orl %d3,%d0
46324: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
46326: 7a02 moveq #2,%d5
46328: baaa 0050 cmpl %a2@(80),%d5
4632c: 6734 beqs 46362 <_Event_Surrender+0xae>
_ISR_Enable( level );
4632e: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
46330: 2f3c 1003 fff8 movel #268697592,%sp@-
46336: 2f0a movel %a2,%sp@-
46338: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
4633e: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
46340: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
46346: 4e5e unlk %fp
46348: 4e75 rts
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4634a: 46c3 movew %d3,%sr
}
4634c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
46352: 4e5e unlk %fp
46354: 4e75 rts
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
46356: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
46358: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
4635e: 4e5e unlk %fp
46360: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
46362: 7003 moveq #3,%d0
46364: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
46368: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4636a: 486a 0048 pea %a2@(72)
4636e: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
46374: 2f3c 1003 fff8 movel #268697592,%sp@-
4637a: 2f0a movel %a2,%sp@-
4637c: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
46382: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
46386: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
4638c: 4e5e unlk %fp
4638e: 4e75 rts
* 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() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
46390: 2279 0005 f618 moveal 5f618 <_Event_Sync_state>,%a1
/*
* 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() &&
_Thread_Is_executing( the_thread ) &&
46396: 7a02 moveq #2,%d5
46398: ba89 cmpl %a1,%d5
4639a: 6710 beqs 463ac <_Event_Surrender+0xf8> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
4639c: 2279 0005 f618 moveal 5f618 <_Event_Sync_state>,%a1
* 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() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
463a2: 1a3c 0001 moveb #1,%d5
463a6: ba89 cmpl %a1,%d5
463a8: 6600 ff48 bnew 462f2 <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
463ac: b081 cmpl %d1,%d0
463ae: 6706 beqs 463b6 <_Event_Surrender+0x102>
463b0: 0804 0001 btst #1,%d4
463b4: 671a beqs 463d0 <_Event_Surrender+0x11c> <== NEVER TAKEN
463b6: 2200 movel %d0,%d1
463b8: 4681 notl %d1
463ba: c282 andl %d2,%d1
463bc: 2081 movel %d1,%a0@
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
463be: 206a 0028 moveal %a2@(40),%a0
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
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;
463c2: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
463c6: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
463c8: 7003 moveq #3,%d0
463ca: 23c0 0005 f618 movel %d0,5f618 <_Event_Sync_state>
}
_ISR_Enable( level );
463d0: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
463d2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
463d8: 4e5e unlk %fp <== NOT EXECUTED
000463dc <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
463dc: 4e56 fffc linkw %fp,#-4
463e0: 2f03 movel %d3,%sp@-
463e2: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
463e4: 486e fffc pea %fp@(-4)
463e8: 2f2e 0008 movel %fp@(8),%sp@-
463ec: 4eb9 0004 8cfc jsr 48cfc <_Thread_Get>
switch ( location ) {
463f2: 508f addql #8,%sp
463f4: 4aae fffc tstl %fp@(-4)
463f8: 6642 bnes 4643c <_Event_Timeout+0x60> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
463fa: 223c 0000 0700 movel #1792,%d1
46400: 40c2 movew %sr,%d2
46402: 8282 orl %d2,%d1
46404: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
46406: 2040 moveal %d0,%a0
46408: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
4640c: b0b9 0005 f5e4 cmpl 5f5e4 <_Per_CPU_Information+0xc>,%d0
46412: 6734 beqs 46448 <_Event_Timeout+0x6c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
46414: 7606 moveq #6,%d3
46416: 2040 moveal %d0,%a0
46418: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
4641c: 46c2 movew %d2,%sr
4641e: 2f3c 1003 fff8 movel #268697592,%sp@-
46424: 2f00 movel %d0,%sp@-
46426: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
4642c: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4642e: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
46434: 5380 subql #1,%d0
46436: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
4643c: 242e fff4 movel %fp@(-12),%d2
46440: 262e fff8 movel %fp@(-8),%d3
46444: 4e5e unlk %fp
46446: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
46448: 2239 0005 f618 movel 5f618 <_Event_Sync_state>,%d1
4644e: 7601 moveq #1,%d3
46450: b681 cmpl %d1,%d3
46452: 66c0 bnes 46414 <_Event_Timeout+0x38>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
46454: 7606 moveq #6,%d3
46456: 2040 moveal %d0,%a0
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
46458: 7202 moveq #2,%d1
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
4645a: 2143 0034 movel %d3,%a0@(52)
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4645e: 23c1 0005 f618 movel %d1,5f618 <_Event_Sync_state>
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
46464: 46c2 movew %d2,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
46466: 2f3c 1003 fff8 movel #268697592,%sp@-
4646c: 2f00 movel %d0,%sp@-
4646e: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
46474: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
46476: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
4647c: 5380 subql #1,%d0
4647e: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
46484: 60b6 bras 4643c <_Event_Timeout+0x60>
...
0004be5c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4be5c: 4e56 ffcc linkw %fp,#-52
4be60: 226e 000c moveal %fp@(12),%a1
4be64: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4be68: 246e 0008 moveal %fp@(8),%a2
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
4be6c: 2e09 movel %a1,%d7
4be6e: 5887 addql #4,%d7
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
4be70: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4be74: 222e 0010 movel %fp@(16),%d1
4be78: 282e 0014 movel %fp@(20),%d4
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
4be7c: 2d40 fffc movel %d0,%fp@(-4)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
4be80: be89 cmpl %a1,%d7
4be82: 6500 014e bcsw 4bfd2 <_Heap_Allocate_aligned_with_boundary+0x176>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4be86: 4a84 tstl %d4
4be88: 6600 0144 bnew 4bfce <_Heap_Allocate_aligned_with_boundary+0x172>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4be8c: 206a 0008 moveal %a2@(8),%a0
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4be90: b1ca cmpal %a2,%a0
4be92: 6700 013e beqw 4bfd2 <_Heap_Allocate_aligned_with_boundary+0x176>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4be96: 242e fffc movel %fp@(-4),%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4be9a: 7c04 moveq #4,%d6
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4be9c: 5e82 addql #7,%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4be9e: 9c89 subl %a1,%d6
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4bea0: 7601 moveq #1,%d3
4bea2: 2647 moveal %d7,%a3
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4bea4: 2d42 fff8 movel %d2,%fp@(-8)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4bea8: 2d46 fff4 movel %d6,%fp@(-12)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4beac: 2028 0004 movel %a0@(4),%d0
4beb0: b08b cmpl %a3,%d0
4beb2: 630e blss 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4beb4: 4a81 tstl %d1
4beb6: 661c bnes 4bed4 <_Heap_Allocate_aligned_with_boundary+0x78>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4beb8: 2408 movel %a0,%d2
4beba: 5082 addql #8,%d2
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
4bebc: 4a82 tstl %d2
4bebe: 6600 00de bnew 4bf9e <_Heap_Allocate_aligned_with_boundary+0x142>
break;
}
block = block->next;
4bec2: 2003 movel %d3,%d0
4bec4: 5280 addql #1,%d0
4bec6: 2068 0008 moveal %a0@(8),%a0
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4beca: b1ca cmpal %a2,%a0
4becc: 6700 0110 beqw 4bfde <_Heap_Allocate_aligned_with_boundary+0x182>
4bed0: 2600 movel %d0,%d3
4bed2: 60d8 bras 4beac <_Heap_Allocate_aligned_with_boundary+0x50>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4bed4: 7efe moveq #-2,%d7
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4bed6: 4be8 0008 lea %a0@(8),%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4beda: c087 andl %d7,%d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4bedc: 286a 0014 moveal %a2@(20),%a4
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4bee0: d088 addl %a0,%d0
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4bee2: 2a2e fff8 movel %fp@(-8),%d5
4bee6: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
4bee8: 242e fff4 movel %fp@(-12),%d2
4beec: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4beee: 2c02 movel %d2,%d6
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4bef0: d085 addl %d5,%d0
4bef2: 4c41 6005 remul %d1,%d5,%d6
4bef6: 9485 subl %d5,%d2
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
4bef8: b480 cmpl %d0,%d2
4befa: 630a blss 4bf06 <_Heap_Allocate_aligned_with_boundary+0xaa>
4befc: 2a00 movel %d0,%d5
4befe: 4c41 5002 remul %d1,%d2,%d5
4bf02: 9082 subl %d2,%d0
4bf04: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4bf06: 4a84 tstl %d4
4bf08: 676a beqs 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
4bf0a: 2002 movel %d2,%d0
4bf0c: d089 addl %a1,%d0
4bf0e: 2c00 movel %d0,%d6
4bf10: 4c44 6005 remul %d4,%d5,%d6
4bf14: 2c00 movel %d0,%d6
4bf16: 9c85 subl %d5,%d6
4bf18: 2a06 movel %d6,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4bf1a: bc82 cmpl %d2,%d6
4bf1c: 6356 blss 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
4bf1e: bc80 cmpl %d0,%d6
4bf20: 6452 bccs 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4bf22: 2c0d movel %a5,%d6
4bf24: dc89 addl %a1,%d6
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4bf26: ba86 cmpl %d6,%d5
4bf28: 6598 bcss 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4bf2a: 2405 movel %d5,%d2
4bf2c: 9489 subl %a1,%d2
4bf2e: 2a02 movel %d2,%d5
4bf30: 4c41 5000 remul %d1,%d0,%d5
4bf34: 9480 subl %d0,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4bf36: 2002 movel %d2,%d0
4bf38: d089 addl %a1,%d0
4bf3a: 2e00 movel %d0,%d7
4bf3c: 4c44 7005 remul %d4,%d5,%d7
4bf40: 2e00 movel %d0,%d7
4bf42: 9e85 subl %d5,%d7
4bf44: 2a07 movel %d7,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4bf46: be82 cmpl %d2,%d7
4bf48: 632a blss 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
4bf4a: be80 cmpl %d0,%d7
4bf4c: 6426 bccs 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
if ( boundary_line < boundary_floor ) {
4bf4e: ba86 cmpl %d6,%d5
4bf50: 6500 ff70 bcsw 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4bf54: 2405 movel %d5,%d2
4bf56: 9489 subl %a1,%d2
4bf58: 2a02 movel %d2,%d5
4bf5a: 4c41 5000 remul %d1,%d0,%d5
4bf5e: 9480 subl %d0,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4bf60: 2002 movel %d2,%d0
4bf62: d089 addl %a1,%d0
4bf64: 2e00 movel %d0,%d7
4bf66: 4c44 7005 remul %d4,%d5,%d7
4bf6a: 2e00 movel %d0,%d7
4bf6c: 9e85 subl %d5,%d7
4bf6e: 2a07 movel %d7,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4bf70: be82 cmpl %d2,%d7
4bf72: 62d6 bhis 4bf4a <_Heap_Allocate_aligned_with_boundary+0xee><== ALWAYS TAKEN
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
4bf74: b48d cmpl %a5,%d2
4bf76: 6500 ff4a bcsw 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
4bf7a: 2e2e fffc movel %fp@(-4),%d7
4bf7e: 2c02 movel %d2,%d6
4bf80: 70f8 moveq #-8,%d0
4bf82: 9088 subl %a0,%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4bf84: d082 addl %d2,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4bf86: 4c47 6005 remul %d7,%d5,%d6
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
4bf8a: 9085 subl %d5,%d0
if ( free_size >= min_block_size || free_size == 0 ) {
4bf8c: b08c cmpl %a4,%d0
4bf8e: 6400 ff2c bccw 4bebc <_Heap_Allocate_aligned_with_boundary+0x60>
4bf92: 4a80 tstl %d0
4bf94: 6600 ff2c bnew 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
4bf98: 4a82 tstl %d2
4bf9a: 6700 ff26 beqw 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4bf9e: 2f09 movel %a1,%sp@-
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
4bfa0: 52aa 0048 addql #1,%a2@(72)
stats->searches += search_count;
4bfa4: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4bfa8: 2f02 movel %d2,%sp@-
4bfaa: 2f08 movel %a0,%sp@-
4bfac: 2f0a movel %a2,%sp@-
4bfae: 4eb9 0004 79ae jsr 479ae <_Heap_Block_allocate>
4bfb4: 4fef 0010 lea %sp@(16),%sp
4bfb8: 2002 movel %d2,%d0
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
4bfba: b6aa 0044 cmpl %a2@(68),%d3
4bfbe: 6304 blss 4bfc4 <_Heap_Allocate_aligned_with_boundary+0x168>
stats->max_search = search_count;
4bfc0: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
}
4bfc4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4bfca: 4e5e unlk %fp
4bfcc: 4e75 rts
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4bfce: b889 cmpl %a1,%d4
4bfd0: 6410 bccs 4bfe2 <_Heap_Allocate_aligned_with_boundary+0x186>
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4bfd2: 4280 clrl %d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4bfd4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4bfda: 4e5e unlk %fp
4bfdc: 4e75 rts
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4bfde: 4280 clrl %d0
4bfe0: 60d8 bras 4bfba <_Heap_Allocate_aligned_with_boundary+0x15e>
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4bfe2: 4a81 tstl %d1
4bfe4: 6600 fea6 bnew 4be8c <_Heap_Allocate_aligned_with_boundary+0x30>
alignment = page_size;
4bfe8: 2200 movel %d0,%d1
4bfea: 6000 fea0 braw 4be8c <_Heap_Allocate_aligned_with_boundary+0x30>
...
000479ae <_Heap_Block_allocate>:
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
479ae: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
479b0: 4e56 ffe0 linkw %fp,#-32
479b4: 206e 000c moveal %fp@(12),%a0
479b8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
479bc: 2428 0004 movel %a0@(4),%d2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
479c0: 7801 moveq #1,%d4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
479c2: c082 andl %d2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
479c4: 222e 0010 movel %fp@(16),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
479c8: 49f0 0800 lea %a0@(00000000,%d0:l),%a4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
479cc: 2641 moveal %d1,%a3
479ce: 518b subql #8,%a3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
479d0: 2a0b movel %a3,%d5
479d2: 9a88 subl %a0,%d5
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
479d4: c8ac 0004 andl %a4@(4),%d4
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
479d8: 246e 0008 moveal %fp@(8),%a2
479dc: 262e 0014 movel %fp@(20),%d3
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
479e0: 4a84 tstl %d4
479e2: 6600 0090 bnew 47a74 <_Heap_Block_allocate+0xc6>
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
479e6: 2828 0008 movel %a0@(8),%d4
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
479ea: 2a44 moveal %d4,%a5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
479ec: 2268 000c moveal %a0@(12),%a1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
479f0: 2344 0008 movel %d4,%a1@(8)
next->prev = prev;
479f4: 2b49 000c movel %a1,%a5@(12)
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479f8: 91aa 0030 subl %d0,%a2@(48)
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
479fc: 53aa 0038 subql #1,%a2@(56)
++stats->used_blocks;
47a00: 52aa 0040 addql #1,%a2@(64)
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
47a04: 202a 0010 movel %a2@(16),%d0
47a08: b085 cmpl %d5,%d0
47a0a: 6272 bhis 47a7e <_Heap_Block_allocate+0xd0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
47a0c: 4c40 1004 remul %d0,%d4,%d1
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
47a10: 97c4 subal %d4,%a3
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
47a12: 200b movel %a3,%d0
47a14: 9088 subl %a0,%d0
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
47a16: d1aa 0030 addl %d0,%a2@(48)
uintptr_t block_end = block_begin + block_size;
Heap_Block *const new_block =
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
47a1a: 99cb subal %a3,%a4
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
if ( _Heap_Is_prev_used( block ) ) {
47a1c: 0802 0000 btst #0,%d2
47a20: 6774 beqs 47a96 <_Heap_Block_allocate+0xe8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
47a22: 2a69 0008 moveal %a1@(8),%a5
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a26: 7401 moveq #1,%d2
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47a28: 2208 movel %a0,%d1
new_block->next = next;
47a2a: 214d 0008 movel %a5,%a0@(8)
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a2e: 8480 orl %d0,%d2
new_block->prev = block_before;
47a30: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
47a34: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
47a38: 2b48 000c movel %a0,%a5@(12)
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47a3c: 52aa 0038 addql #1,%a2@(56)
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a40: 2142 0004 movel %d2,%a0@(4)
new_block->prev_size = block_size;
47a44: 2680 movel %d0,%a3@
new_block->size_and_flag = new_block_size;
47a46: 274c 0004 movel %a4,%a3@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a4a: 2f03 movel %d3,%sp@-
47a4c: 2f01 movel %d1,%sp@-
47a4e: 2f0b movel %a3,%sp@-
47a50: 2f0a movel %a2,%sp@-
47a52: 4eba fcb0 jsr %pc@(47704 <_Heap_Block_split>)
47a56: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
47a5a: 202a 0030 movel %a2@(48),%d0
47a5e: b0aa 0034 cmpl %a2@(52),%d0
47a62: 6404 bccs 47a68 <_Heap_Block_allocate+0xba>
stats->min_free_size = stats->free_size;
47a64: 2540 0034 movel %d0,%a2@(52)
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
47a68: 200b movel %a3,%d0
47a6a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
47a70: 4e5e unlk %fp
47a72: 4e75 rts
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
47a74: 202a 0010 movel %a2@(16),%d0
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
47a78: 224a moveal %a2,%a1
}
if ( alloc_area_offset < heap->page_size ) {
47a7a: b085 cmpl %d5,%d0
47a7c: 638e blss 47a0c <_Heap_Block_allocate+0x5e>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
47a7e: 2645 moveal %d5,%a3
47a80: 4873 3800 pea %a3@(00000000,%d3:l)
47a84: 2648 moveal %a0,%a3
47a86: 2f09 movel %a1,%sp@-
47a88: 2f08 movel %a0,%sp@-
47a8a: 2f0a movel %a2,%sp@-
47a8c: 4eba fc76 jsr %pc@(47704 <_Heap_Block_split>)
47a90: 4fef 0010 lea %sp@(16),%sp
47a94: 60c4 bras 47a5a <_Heap_Block_allocate+0xac>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
47a96: 91d0 subal %a0@,%a0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47a98: 74fe moveq #-2,%d2
} else {
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_size += prev_block_size;
47a9a: 2209 movel %a1,%d1
47a9c: c4a8 0004 andl %a0@(4),%d2
47aa0: d082 addl %d2,%d0
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47aa2: 7401 moveq #1,%d2
47aa4: 8480 orl %d0,%d2
new_block->prev_size = block_size;
47aa6: 2680 movel %d0,%a3@
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47aa8: 2142 0004 movel %d2,%a0@(4)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47aac: 274c 0004 movel %a4,%a3@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47ab0: 2f03 movel %d3,%sp@-
47ab2: 2f01 movel %d1,%sp@-
47ab4: 2f0b movel %a3,%sp@-
47ab6: 2f0a movel %a2,%sp@-
47ab8: 4eba fc4a jsr %pc@(47704 <_Heap_Block_split>)
47abc: 4fef 0010 lea %sp@(16),%sp
47ac0: 6098 bras 47a5a <_Heap_Block_allocate+0xac>
...
00047704 <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
47704: 4e56 ffe4 linkw %fp,#-28
47708: 226e 0008 moveal %fp@(8),%a1
4770c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
47710: 246e 000c moveal %fp@(12),%a2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47714: 76fe moveq #-2,%d3
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
47716: 282a 0004 movel %a2@(4),%d4
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4771a: 2669 0014 moveal %a1@(20),%a3
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
4771e: 220b movel %a3,%d1
47720: 5181 subql #8,%d1
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
47722: 286e 0010 moveal %fp@(16),%a4
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
47726: 2429 0010 movel %a1@(16),%d2
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
4772a: 202e 0014 movel %fp@(20),%d0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4772e: c684 andl %d4,%d3
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
47730: b280 cmpl %d0,%d1
47732: 6302 blss 47736 <_Heap_Block_split+0x32>
47734: 2001 movel %d1,%d0
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
47736: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47738: 2a00 movel %d0,%d5
4773a: 4c42 5001 remul %d2,%d1,%d5
if ( remainder != 0 ) {
4773e: 4a81 tstl %d1
47740: 6766 beqs 477a8 <_Heap_Block_split+0xa4>
return value - remainder + alignment;
47742: d480 addl %d0,%d2
47744: 9481 subl %d1,%d2
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
47746: 2203 movel %d3,%d1
47748: 5881 addql #4,%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4774a: 41f2 3800 lea %a2@(00000000,%d3:l),%a0
4774e: 9280 subl %d0,%d1
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
47750: 588b addql #4,%a3
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
47752: b7c1 cmpal %d1,%a3
47754: 6264 bhis 477ba <_Heap_Block_split+0xb6>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
47756: 7001 moveq #1,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47758: 47f2 2800 lea %a2@(00000000,%d2:l),%a3
Heap_Block *const free_block = _Heap_Block_at( block, used_block_size );
uintptr_t free_block_size = block_size - used_block_size;
4775c: 9682 subl %d2,%d3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4775e: 7201 moveq #1,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
47760: c880 andl %d0,%d4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47762: 70fe moveq #-2,%d0
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
47764: 8484 orl %d4,%d2
47766: 2542 0004 movel %d2,%a2@(4)
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
4776a: d7a9 0030 addl %d3,%a1@(48)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4776e: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
47772: c2b0 0804 andl %a0@(00000004,%d0:l),%d1
if ( _Heap_Is_used( next_block ) ) {
47776: 6750 beqs 477c8 <_Heap_Block_split+0xc4> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
47778: 246c 0008 moveal %a4@(8),%a2
free_block_size += next_block_size;
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
4777c: 7001 moveq #1,%d0
new_block->next = next;
new_block->prev = block_before;
4777e: 274c 000c movel %a4,%a3@(12)
47782: 8083 orl %d3,%d0
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
47784: 274a 0008 movel %a2,%a3@(8)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
47788: 254b 000c movel %a3,%a2@(12)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4778c: 294b 0008 movel %a3,%a4@(8)
if ( _Heap_Is_used( next_block ) ) {
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
47790: 52a9 0038 addql #1,%a1@(56)
free_block_size += next_block_size;
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
47794: 2740 0004 movel %d0,%a3@(4)
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
47798: 70fe moveq #-2,%d0
4779a: c1a8 0004 andl %d0,%a0@(4)
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
4779e: 2083 movel %d3,%a0@
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
}
}
477a0: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4
477a4: 4e5e unlk %fp
477a6: 4e75 rts
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
477a8: 2203 movel %d3,%d1
477aa: 5881 addql #4,%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
477ac: 41f2 3800 lea %a2@(00000000,%d3:l),%a0
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
} else {
return value;
477b0: 2400 movel %d0,%d2
477b2: 9280 subl %d0,%d1
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
477b4: 588b addql #4,%a3
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
477b6: b7c1 cmpal %d1,%a3
477b8: 639c blss 47756 <_Heap_Block_split+0x52>
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
477ba: 7001 moveq #1,%d0
}
}
477bc: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
477c0: 81a8 0004 orl %d0,%a0@(4)
}
}
477c4: 4e5e unlk %fp
477c6: 4e75 rts
} else {
uintptr_t const next_block_size = _Heap_Block_size( next_block );
_Heap_Free_list_replace( next_block, free_block );
free_block_size += next_block_size;
477c8: d680 addl %d0,%d3
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
477ca: 7001 moveq #1,%d0
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
477cc: 2268 0008 moveal %a0@(8),%a1
477d0: 2468 000c moveal %a0@(12),%a2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
477d4: 41f3 3800 lea %a3@(00000000,%d3:l),%a0
free_block_size += next_block_size;
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
477d8: 8083 orl %d3,%d0
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
477da: 2749 0008 movel %a1,%a3@(8)
new_block->prev = prev;
477de: 274a 000c movel %a2,%a3@(12)
477e2: 2740 0004 movel %d0,%a3@(4)
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
477e6: 70fe moveq #-2,%d0
next->prev = new_block;
prev->next = new_block;
477e8: 254b 0008 movel %a3,%a2@(8)
477ec: c1a8 0004 andl %d0,%a0@(4)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
477f0: 234b 000c movel %a3,%a1@(12)
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
477f4: 2083 movel %d3,%a0@
477f6: 60a8 bras 477a0 <_Heap_Block_split+0x9c>
0004c318 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
4c318: 4e56 ffcc linkw %fp,#-52
4c31c: 202e 0010 movel %fp@(16),%d0
4c320: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c324: 246e 0008 moveal %fp@(8),%a2
4c328: 242e 000c movel %fp@(12),%d2
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
4c32c: 2602 movel %d2,%d3
4c32e: d680 addl %d0,%d3
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
4c330: 2a2a 0020 movel %a2@(32),%d5
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
4c334: 282a 0010 movel %a2@(16),%d4
uintptr_t const min_block_size = heap->min_block_size;
4c338: 222a 0014 movel %a2@(20),%d1
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
4c33c: 2c2a 0030 movel %a2@(48),%d6
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
4c340: 42ae fffc clrl %fp@(-4)
Heap_Block *extend_last_block = NULL;
4c344: 42ae fff8 clrl %fp@(-8)
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
4c348: b682 cmpl %d2,%d3
4c34a: 640c bccs 4c358 <_Heap_Extend+0x40>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c34c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
4c352: 4200 clrb %d0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c354: 4e5e unlk %fp
4c356: 4e75 rts
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
4c358: 486e fff8 pea %fp@(-8)
4c35c: 486e fffc pea %fp@(-4)
4c360: 2f01 movel %d1,%sp@-
4c362: 2f04 movel %d4,%sp@-
4c364: 2f00 movel %d0,%sp@-
4c366: 2f02 movel %d2,%sp@-
4c368: 4eb9 0004 7b44 jsr 47b44 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
4c36e: 4fef 0018 lea %sp@(24),%sp
4c372: 4a00 tstb %d0
4c374: 67d6 beqs 4c34c <_Heap_Extend+0x34>
4c376: 2045 moveal %d5,%a0
4c378: 9bcd subal %a5,%a5
4c37a: 97cb subal %a3,%a3
4c37c: 99cc subal %a4,%a4
4c37e: 42ae fff4 clrl %fp@(-12)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4c382: ba88 cmpl %a0,%d5
4c384: 6700 014a beqw 4c4d0 <_Heap_Extend+0x1b8>
4c388: 2208 movel %a0,%d1
uintptr_t const sub_area_end = start_block->prev_size;
4c38a: 2010 movel %a0@,%d0
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
4c38c: b082 cmpl %d2,%d0
4c38e: 6304 blss 4c394 <_Heap_Extend+0x7c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
4c390: b681 cmpl %d1,%d3
4c392: 62b8 bhis 4c34c <_Heap_Extend+0x34>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4c394: b681 cmpl %d1,%d3
4c396: 6700 0132 beqw 4c4ca <_Heap_Extend+0x1b2>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
4c39a: b083 cmpl %d3,%d0
4c39c: 6304 blss 4c3a2 <_Heap_Extend+0x8a>
4c39e: 2d48 fff4 movel %a0,%fp@(-12)
4c3a2: 2e00 movel %d0,%d7
4c3a4: 2240 moveal %d0,%a1
4c3a6: 5189 subql #8,%a1
4c3a8: 4c44 7001 remul %d4,%d1,%d7
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4c3ac: 93c1 subal %d1,%a1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
4c3ae: b480 cmpl %d0,%d2
4c3b0: 6700 0100 beqw 4c4b2 <_Heap_Extend+0x19a>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
4c3b4: b082 cmpl %d2,%d0
4c3b6: 6402 bccs 4c3ba <_Heap_Extend+0xa2>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4c3b8: 2a49 moveal %a1,%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c3ba: 70fe moveq #-2,%d0
4c3bc: c0a9 0004 andl %a1@(4),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c3c0: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
4c3c4: b1c5 cmpal %d5,%a0
4c3c6: 66ba bnes 4c382 <_Heap_Extend+0x6a> <== NEVER TAKEN
if ( extend_area_begin < heap->area_begin ) {
4c3c8: b4aa 0018 cmpl %a2@(24),%d2
4c3cc: 6500 010a bcsw 4c4d8 <_Heap_Extend+0x1c0>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
4c3d0: b6aa 001c cmpl %a2@(28),%d3
4c3d4: 6304 blss 4c3da <_Heap_Extend+0xc2>
heap->area_end = extend_area_end;
4c3d6: 2543 001c movel %d3,%a2@(28)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c3da: 226e fff8 moveal %fp@(-8),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c3de: 2009 movel %a1,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c3e0: 7201 moveq #1,%d1
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c3e2: 206e fffc moveal %fp@(-4),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c3e6: 9088 subl %a0,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c3e8: 8280 orl %d0,%d1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
4c3ea: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c3ec: 2141 0004 movel %d1,%a0@(4)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
4c3f0: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4c3f2: 42a9 0004 clrl %a1@(4)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4c3f6: b1ea 0020 cmpal %a2@(32),%a0
4c3fa: 6400 0104 bccw 4c500 <_Heap_Extend+0x1e8>
heap->first_block = extend_first_block;
4c3fe: 2548 0020 movel %a0,%a2@(32)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
4c402: 4a8c tstl %a4
4c404: 6700 0148 beqw 4c54e <_Heap_Extend+0x236>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
4c408: 202a 0010 movel %a2@(16),%d0
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
4c40c: 5082 addql #8,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4c40e: 2802 movel %d2,%d4
4c410: 4c40 4001 remul %d0,%d1,%d4
if ( remainder != 0 ) {
4c414: 4a81 tstl %d1
4c416: 6704 beqs 4c41c <_Heap_Extend+0x104>
return value - remainder + alignment;
4c418: d480 addl %d0,%d2
4c41a: 9481 subl %d1,%d2
uintptr_t const new_first_block_begin =
4c41c: 2042 moveal %d2,%a0
4c41e: 5188 subql #8,%a0
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
4c420: 200c movel %a4,%d0
4c422: 9088 subl %a0,%d0
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4c424: 7201 moveq #1,%d1
4c426: 8280 orl %d0,%d1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
4c428: 2094 movel %a4@,%a0@
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4c42a: 2141 0004 movel %d1,%a0@(4)
_Heap_Free_block( heap, new_first_block );
4c42e: 2f08 movel %a0,%sp@-
4c430: 2f0a movel %a2,%sp@-
4c432: 4eba fec8 jsr %pc@(4c2fc <_Heap_Free_block>)
4c436: 508f addql #8,%sp
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
4c438: 4a8b tstl %a3
4c43a: 6700 00d4 beqw 4c510 <_Heap_Extend+0x1f8>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
4c43e: 5183 subql #8,%d3
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
4c440: 968b subl %a3,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4c442: 2203 movel %d3,%d1
4c444: 4c6a 1000 0010 remul %a2@(16),%d0,%d1
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
4c44a: 7201 moveq #1,%d1
4c44c: 9680 subl %d0,%d3
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
4c44e: 202b 0004 movel %a3@(4),%d0
4c452: 9083 subl %d3,%d0
| HEAP_PREV_BLOCK_USED;
4c454: 8280 orl %d0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c456: 7001 moveq #1,%d0
4c458: 2781 3804 movel %d1,%a3@(00000004,%d3:l)
4c45c: c0ab 0004 andl %a3@(4),%d0
block->size_and_flag = size | flag;
4c460: 8680 orl %d0,%d3
4c462: 2743 0004 movel %d3,%a3@(4)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
4c466: 2f0b movel %a3,%sp@-
4c468: 2f0a movel %a2,%sp@-
4c46a: 4eba fe90 jsr %pc@(4c2fc <_Heap_Free_block>)
4c46e: 508f addql #8,%sp
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4c470: 4a8c tstl %a4
4c472: 6700 00c4 beqw 4c538 <_Heap_Extend+0x220>
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
4c476: 202a 0030 movel %a2@(48),%d0
4c47a: 9086 subl %d6,%d0
4c47c: 2c00 movel %d0,%d6
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c47e: 7001 moveq #1,%d0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c480: 206a 0024 moveal %a2@(36),%a0
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
4c484: 222a 0020 movel %a2@(32),%d1
4c488: 9288 subl %a0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c48a: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
4c48e: 8280 orl %d0,%d1
4c490: 2141 0004 movel %d1,%a0@(4)
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
4c494: ddaa 002c addl %d6,%a2@(44)
if ( extended_size_ptr != NULL )
4c498: 4aae 0014 tstl %fp@(20)
4c49c: 6700 00ca beqw 4c568 <_Heap_Extend+0x250>
*extended_size_ptr = extended_size;
4c4a0: 206e 0014 moveal %fp@(20),%a0
4c4a4: 2086 movel %d6,%a0@
return true;
}
4c4a6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
4c4ac: 7001 moveq #1,%d0
}
4c4ae: 4e5e unlk %fp
4c4b0: 4e75 rts
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c4b2: 70fe moveq #-2,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4c4b4: 2649 moveal %a1,%a3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c4b6: c0a9 0004 andl %a1@(4),%d0
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
start_block->prev_size = extend_area_end;
4c4ba: 2083 movel %d3,%a0@
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c4bc: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
4c4c0: b1c5 cmpal %d5,%a0
4c4c2: 6600 febe bnew 4c382 <_Heap_Extend+0x6a>
4c4c6: 6000 ff00 braw 4c3c8 <_Heap_Extend+0xb0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4c4ca: 2848 moveal %a0,%a4
4c4cc: 6000 fed4 braw 4c3a2 <_Heap_Extend+0x8a>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4c4d0: 222a 0018 movel %a2@(24),%d1
4c4d4: 6000 feb4 braw 4c38a <_Heap_Extend+0x72>
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c4d8: 226e fff8 moveal %fp@(-8),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c4dc: 2009 movel %a1,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c4de: 7201 moveq #1,%d1
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c4e0: 206e fffc moveal %fp@(-4),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c4e4: 9088 subl %a0,%d0
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
4c4e6: 2542 0018 movel %d2,%a2@(24)
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c4ea: 8280 orl %d0,%d1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
4c4ec: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c4ee: 2141 0004 movel %d1,%a0@(4)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
4c4f2: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4c4f4: 42a9 0004 clrl %a1@(4)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4c4f8: b1ea 0020 cmpal %a2@(32),%a0
4c4fc: 6500 ff00 bcsw 4c3fe <_Heap_Extend+0xe6>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
4c500: b3ea 0024 cmpal %a2@(36),%a1
4c504: 6300 fefc blsw 4c402 <_Heap_Extend+0xea>
heap->last_block = extend_last_block;
4c508: 2549 0024 movel %a1,%a2@(36)
4c50c: 6000 fef4 braw 4c402 <_Heap_Extend+0xea>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
4c510: 4a8d tstl %a5
4c512: 6700 ff5c beqw 4c470 <_Heap_Extend+0x158>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c516: 7001 moveq #1,%d0
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
4c518: 222e fffc movel %fp@(-4),%d1
4c51c: 928d subl %a5,%d1
4c51e: c0ad 0004 andl %a5@(4),%d0
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
4c522: 206e fff8 moveal %fp@(-8),%a0
block->size_and_flag = size | flag;
4c526: 8280 orl %d0,%d1
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
4c528: 7001 moveq #1,%d0
4c52a: 2b41 0004 movel %d1,%a5@(4)
4c52e: 81a8 0004 orl %d0,%a0@(4)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4c532: 4a8c tstl %a4
4c534: 6600 ff40 bnew 4c476 <_Heap_Extend+0x15e>
4c538: 4a8b tstl %a3
4c53a: 6600 ff3a bnew 4c476 <_Heap_Extend+0x15e>
_Heap_Free_block( heap, extend_first_block );
4c53e: 2f2e fffc movel %fp@(-4),%sp@-
4c542: 2f0a movel %a2,%sp@-
4c544: 4eba fdb6 jsr %pc@(4c2fc <_Heap_Free_block>)
4c548: 508f addql #8,%sp
4c54a: 6000 ff2a braw 4c476 <_Heap_Extend+0x15e>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
4c54e: 4aae fff4 tstl %fp@(-12)
4c552: 6700 fee4 beqw 4c438 <_Heap_Extend+0x120>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
4c556: 202e fff4 movel %fp@(-12),%d0
4c55a: 7201 moveq #1,%d1
4c55c: 9089 subl %a1,%d0
4c55e: 8280 orl %d0,%d1
4c560: 2341 0004 movel %d1,%a1@(4)
4c564: 6000 fed2 braw 4c438 <_Heap_Extend+0x120>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c568: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
4c56e: 7001 moveq #1,%d0 <== NOT EXECUTED
}
4c570: 4e5e unlk %fp <== NOT EXECUTED
0004bff0 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4bff0: 4e56 ffe8 linkw %fp,#-24
4bff4: 206e 0008 moveal %fp@(8),%a0
4bff8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4bffc: 202e 000c movel %fp@(12),%d0
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
4c000: 6700 00f2 beqw 4c0f4 <_Heap_Free+0x104>
4c004: 2240 moveal %d0,%a1
4c006: 5189 subql #8,%a1
4c008: 4c68 0001 0010 remul %a0@(16),%d1,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4c00e: 2028 0020 movel %a0@(32),%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4c012: 93c1 subal %d1,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4c014: b089 cmpl %a1,%d0
4c016: 6200 0098 bhiw 4c0b0 <_Heap_Free+0xc0>
4c01a: 2228 0024 movel %a0@(36),%d1
4c01e: b289 cmpl %a1,%d1
4c020: 6500 008e bcsw 4c0b0 <_Heap_Free+0xc0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c024: 2629 0004 movel %a1@(4),%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c028: 74fe moveq #-2,%d2
4c02a: c483 andl %d3,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c02c: 45f1 2800 lea %a1@(00000000,%d2:l),%a2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4c030: b5c0 cmpal %d0,%a2
4c032: 657c bcss 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
4c034: b5c1 cmpal %d1,%a2
4c036: 6278 bhis 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
4c038: 282a 0004 movel %a2@(4),%d4
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
4c03c: 0804 0000 btst #0,%d4
4c040: 676e beqs 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c042: 7afe moveq #-2,%d5
4c044: c885 andl %d5,%d4
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4c046: b5c1 cmpal %d1,%a2
4c048: 6700 00fa beqw 4c144 <_Heap_Free+0x154>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c04c: 7a01 moveq #1,%d5
4c04e: cab2 4804 andl %a2@(00000004,%d4:l),%d5
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4c052: 57c5 seq %d5
4c054: 4485 negl %d5
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4c056: 0803 0000 btst #0,%d3
4c05a: 665e bnes 4c0ba <_Heap_Free+0xca>
uintptr_t const prev_size = block->prev_size;
4c05c: 2611 movel %a1@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c05e: 93c3 subal %d3,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4c060: b3c0 cmpal %d0,%a1
4c062: 654c bcss 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
4c064: b3c1 cmpal %d1,%a1
4c066: 6248 bhis 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c068: 7001 moveq #1,%d0
4c06a: c0a9 0004 andl %a1@(4),%d0
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) ) {
4c06e: 6740 beqs 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4c070: 4a05 tstb %d5
4c072: 6700 00d6 beqw 4c14a <_Heap_Free+0x15a>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c076: 266a 0008 moveal %a2@(8),%a3
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4c07a: d882 addl %d2,%d4
4c07c: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c07e: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c080: 246a 000c moveal %a2@(12),%a2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4c084: 254b 0008 movel %a3,%a2@(8)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c088: 8083 orl %d3,%d0
next->prev = prev;
4c08a: 274a 000c movel %a2,%a3@(12)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4c08e: 53a8 0038 subql #1,%a0@(56)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4c092: 2383 3800 movel %d3,%a1@(00000000,%d3:l)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c096: 2340 0004 movel %d0,%a1@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c09a: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c09e: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c0a2: d5a8 0030 addl %d2,%a0@(48)
return( true );
4c0a6: 7001 moveq #1,%d0
}
4c0a8: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
4c0ac: 4e5e unlk %fp
4c0ae: 4e75 rts
4c0b0: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
4c0b4: 4200 clrb %d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c0b6: 4e5e unlk %fp
4c0b8: 4e75 rts
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4c0ba: 4a05 tstb %d5
4c0bc: 673a beqs 4c0f8 <_Heap_Free+0x108>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c0be: 266a 0008 moveal %a2@(8),%a3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
4c0c2: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c0c4: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c0c6: 246a 000c moveal %a2@(12),%a2
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4c0ca: 234b 0008 movel %a3,%a1@(8)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c0ce: 8084 orl %d4,%d0
new_block->prev = prev;
4c0d0: 234a 000c movel %a2,%a1@(12)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4c0d4: 2384 4800 movel %d4,%a1@(00000000,%d4:l)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c0d8: 2340 0004 movel %d0,%a1@(4)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4c0dc: 7001 moveq #1,%d0
next->prev = new_block;
prev->next = new_block;
4c0de: 2549 0008 movel %a1,%a2@(8)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
4c0e2: 2749 000c movel %a1,%a3@(12)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c0e6: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c0ea: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c0ee: d5a8 0030 addl %d2,%a0@(48)
4c0f2: 60b4 bras 4c0a8 <_Heap_Free+0xb8>
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
4c0f4: 7001 moveq #1,%d0
4c0f6: 60b0 bras 4c0a8 <_Heap_Free+0xb8>
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4c0f8: 2028 0038 movel %a0@(56),%d0
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4c0fc: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c0fe: 7afe moveq #-2,%d5
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4c100: 5280 addql #1,%d0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4c102: 2668 0008 moveal %a0@(8),%a3
new_block->next = next;
new_block->prev = block_before;
4c106: 2348 000c movel %a0,%a1@(12)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4c10a: 8282 orl %d2,%d1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4c10c: 234b 0008 movel %a3,%a1@(8)
4c110: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c114: cbaa 0004 andl %d5,%a2@(4)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
4c118: 2749 000c movel %a1,%a3@(12)
next_block->prev_size = block_size;
4c11c: 2482 movel %d2,%a2@
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4c11e: 2149 0008 movel %a1,%a0@(8)
/* Statistics */
++stats->free_blocks;
4c122: 2140 0038 movel %d0,%a0@(56)
if ( stats->max_free_blocks < stats->free_blocks ) {
4c126: b0a8 003c cmpl %a0@(60),%d0
4c12a: 6300 ff6e blsw 4c09a <_Heap_Free+0xaa>
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c12e: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c132: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c136: d5a8 0030 addl %d2,%a0@(48)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
4c13a: 2140 003c movel %d0,%a0@(60)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4c13e: 7001 moveq #1,%d0
4c140: 6000 ff66 braw 4c0a8 <_Heap_Free+0xb8>
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4c144: 4205 clrb %d5
4c146: 6000 ff0e braw 4c056 <_Heap_Free+0x66>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
4c14a: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c14c: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c14e: 7afe moveq #-2,%d5
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c150: 8283 orl %d3,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4c152: 2483 movel %d3,%a2@
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4c154: 7001 moveq #1,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c156: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c15a: cbaa 0004 andl %d5,%a2@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c15e: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c162: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c166: d5a8 0030 addl %d2,%a0@(48)
4c16a: 6000 ff3c braw 4c0a8 <_Heap_Free+0xb8>
...
0004cc68 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
4cc68: 4e56 fff0 linkw %fp,#-16
4cc6c: 48d7 041c moveml %d2-%d4/%a2,%sp@
4cc70: 246e 0008 moveal %fp@(8),%a2
4cc74: 282e 000c movel %fp@(12),%d4
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
4cc78: 2044 moveal %d4,%a0
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
4cc7a: 226a 0020 moveal %a2@(32),%a1
Heap_Block *const end = the_heap->last_block;
4cc7e: 242a 0024 movel %a2@(36),%d2
memset(the_info, 0, sizeof(*the_info));
4cc82: 4298 clrl %a0@+
4cc84: 4298 clrl %a0@+
4cc86: 4298 clrl %a0@+
4cc88: 4298 clrl %a0@+
4cc8a: 4298 clrl %a0@+
4cc8c: 4290 clrl %a0@
while ( the_block != end ) {
4cc8e: b489 cmpl %a1,%d2
4cc90: 6734 beqs 4ccc6 <_Heap_Get_information+0x5e> <== NEVER TAKEN
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
4cc92: 2604 movel %d4,%d3
4cc94: 0683 0000 000c addil #12,%d3
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
4cc9a: 2229 0004 movel %a1@(4),%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4cc9e: 70fe moveq #-2,%d0
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
4cca0: 2043 moveal %d3,%a0
4cca2: c081 andl %d1,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4cca4: d3c0 addal %d0,%a1
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
4cca6: 2229 0004 movel %a1@(4),%d1
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
4ccaa: 0801 0000 btst #0,%d1
4ccae: 6602 bnes 4ccb2 <_Heap_Get_information+0x4a>
info = &the_info->Used;
else
info = &the_info->Free;
4ccb0: 2044 moveal %d4,%a0
info->number++;
4ccb2: 5290 addql #1,%a0@
info->total += the_size;
4ccb4: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
4ccb8: b0a8 0004 cmpl %a0@(4),%d0
4ccbc: 6304 blss 4ccc2 <_Heap_Get_information+0x5a>
info->largest = the_size;
4ccbe: 2140 0004 movel %d0,%a0@(4)
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
4ccc2: b3c2 cmpal %d2,%a1
4ccc4: 66d8 bnes 4cc9e <_Heap_Get_information+0x36>
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
4ccc6: 4cd7 041c moveml %sp@,%d2-%d4/%a2
4ccca: 4e5e unlk %fp
...
0005bd7c <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
5bd7c: 4e56 ffe4 linkw %fp,#-28
5bd80: 226e 0014 moveal %fp@(20),%a1
5bd84: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
5bd88: 242e 000c movel %fp@(12),%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5bd8c: 2202 movel %d2,%d1
5bd8e: 2042 moveal %d2,%a0
5bd90: 5188 subql #8,%a0
5bd92: 246e 0008 moveal %fp@(8),%a2
5bd96: 4c6a 1000 0010 remul %a2@(16),%d0,%d1
5bd9c: 266e 0018 moveal %fp@(24),%a3
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
5bda0: 91c0 subal %d0,%a0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
5bda2: 4291 clrl %a1@
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
5bda4: 202e 0010 movel %fp@(16),%d0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
*new_size = 0;
5bda8: 4293 clrl %a3@
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5bdaa: b1ea 0020 cmpal %a2@(32),%a0
5bdae: 6500 0098 bcsw 5be48 <_Heap_Resize_block+0xcc>
5bdb2: b1ea 0024 cmpal %a2@(36),%a0
5bdb6: 6200 0090 bhiw 5be48 <_Heap_Resize_block+0xcc>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5bdba: 76fe moveq #-2,%d3
5bdbc: 78fe moveq #-2,%d4
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bdbe: 7a01 moveq #1,%d5
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
5bdc0: 7204 moveq #4,%d1
5bdc2: 9282 subl %d2,%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5bdc4: c6a8 0004 andl %a0@(4),%d3
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
5bdc8: 49f0 3800 lea %a0@(00000000,%d3:l),%a4
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
5bdcc: d28c addl %a4,%d1
5bdce: c8ac 0004 andl %a4@(4),%d4
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bdd2: cab4 4804 andl %a4@(00000004,%d4:l),%d5
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
5bdd6: 2281 movel %d1,%a1@
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
5bdd8: 4a85 tstl %d5
5bdda: 57c5 seq %d5
5bddc: 4485 negl %d5
if ( next_block_is_free ) {
5bdde: 4a05 tstb %d5
5bde0: 6672 bnes 5be54 <_Heap_Resize_block+0xd8> <== NEVER TAKEN
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
5bde2: b280 cmpl %d0,%d1
5bde4: 6576 bcss 5be5c <_Heap_Resize_block+0xe0>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
5bde6: 4a05 tstb %d5
5bde8: 672a beqs 5be14 <_Heap_Resize_block+0x98>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bdea: 7201 moveq #1,%d1
5bdec: c2a8 0004 andl %a0@(4),%d1
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
5bdf0: 226c 0008 moveal %a4@(8),%a1
block->size_and_flag = size | flag;
5bdf4: 8283 orl %d3,%d1
5bdf6: 286c 000c moveal %a4@(12),%a4
5bdfa: 2141 0004 movel %d1,%a0@(4)
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
5bdfe: 7201 moveq #1,%d1
5be00: 83b0 3804 orl %d1,%a0@(00000004,%d3:l)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
5be04: 2949 0008 movel %a1,%a4@(8)
next->prev = prev;
5be08: 234c 000c movel %a4,%a1@(12)
/* Statistics */
--stats->free_blocks;
5be0c: 53aa 0038 subql #1,%a2@(56)
stats->free_size -= next_block_size;
5be10: 99aa 0030 subl %d4,%a2@(48)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
5be14: 2f00 movel %d0,%sp@-
5be16: 2f02 movel %d2,%sp@-
5be18: 2f08 movel %a0,%sp@-
5be1a: 2f0a movel %a2,%sp@-
5be1c: 4eb9 0004 79ae jsr 479ae <_Heap_Block_allocate>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
/* Statistics */
++stats->resizes;
5be22: 4fef 0010 lea %sp@(16),%sp
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5be26: 72fe moveq #-2,%d1
/* Statistics */
--stats->free_blocks;
stats->free_size -= next_block_size;
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
5be28: 2040 moveal %d0,%a0
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
5be2a: 2240 moveal %d0,%a1
5be2c: 93c2 subal %d2,%a1
/* Statistics */
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
5be2e: 4280 clrl %d0
5be30: c2a8 0004 andl %a0@(4),%d1
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
5be34: 43f1 1804 lea %a1@(00000004,%d1:l),%a1
5be38: 2689 movel %a1,%a3@
/* Statistics */
++stats->resizes;
5be3a: 52aa 0054 addql #1,%a2@(84)
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
5be3e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5be44: 4e5e unlk %fp
5be46: 4e75 rts
new_alloc_size,
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
5be48: 7002 moveq #2,%d0
}
5be4a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5be50: 4e5e unlk %fp
5be52: 4e75 rts
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
5be54: d684 addl %d4,%d3
alloc_size += next_block_size;
5be56: d284 addl %d4,%d1
}
if ( new_alloc_size > alloc_size ) {
5be58: b280 cmpl %d0,%d1
5be5a: 648a bccs 5bde6 <_Heap_Resize_block+0x6a> <== NEVER TAKEN
return HEAP_RESIZE_UNSATISFIED;
5be5c: 7001 moveq #1,%d0
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
5be5e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5be64: 4e5e unlk %fp <== NOT EXECUTED
0005be68 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5be68: 4e56 0000 linkw %fp,#0
5be6c: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5be70: 2040 moveal %d0,%a0
5be72: 5188 subql #8,%a0
5be74: 226e 0008 moveal %fp@(8),%a1
5be78: 2f02 movel %d2,%sp@-
5be7a: 2400 movel %d0,%d2
5be7c: 4c69 2001 0010 remul %a1@(16),%d1,%d2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
5be82: 91c1 subal %d1,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
5be84: 2229 0020 movel %a1@(32),%d1
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5be88: b288 cmpl %a0,%d1
5be8a: 6236 bhis 5bec2 <_Heap_Size_of_alloc_area+0x5a>
5be8c: 2269 0024 moveal %a1@(36),%a1
5be90: b3c8 cmpal %a0,%a1
5be92: 652e bcss 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5be94: 74fe moveq #-2,%d2
5be96: c4a8 0004 andl %a0@(4),%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5be9a: d1c2 addal %d2,%a0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5be9c: b1c1 cmpal %d1,%a0
5be9e: 6522 bcss 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
5bea0: b1c9 cmpal %a1,%a0
5bea2: 621e bhis 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bea4: 7201 moveq #1,%d1
5bea6: c2a8 0004 andl %a0@(4),%d1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
5beaa: 6716 beqs 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5beac: 7204 moveq #4,%d1
5beae: 9280 subl %d0,%d1
5beb0: 2001 movel %d1,%d0
5beb2: d088 addl %a0,%d0
5beb4: 226e 0010 moveal %fp@(16),%a1
return true;
}
5beb8: 241f movel %sp@+,%d2
5beba: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5bebc: 2280 movel %d0,%a1@
return true;
5bebe: 7001 moveq #1,%d0
}
5bec0: 4e75 rts
5bec2: 241f movel %sp@+,%d2
5bec4: 4e5e unlk %fp
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
5bec6: 4200 clrb %d0
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
...
00048516 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48516: 4e56 ffc4 linkw %fp,#-60
4851a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4851e: 246e 0008 moveal %fp@(8),%a2
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
48522: 4bfa ff94 lea %pc@(484b8 <_Heap_Walk_print_nothing>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48526: 2a2e 000c movel %fp@(12),%d5
uintptr_t const page_size = heap->page_size;
4852a: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
4852e: 2c2a 0014 movel %a2@(20),%d6
Heap_Block *const first_block = heap->first_block;
48532: 282a 0020 movel %a2@(32),%d4
Heap_Block *const last_block = heap->last_block;
48536: 2e2a 0024 movel %a2@(36),%d7
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
4853a: 4a2e 0013 tstb %fp@(19)
4853e: 6704 beqs 48544 <_Heap_Walk+0x2e>
48540: 4bfa ff7e lea %pc@(484c0 <_Heap_Walk_print>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
48544: 7003 moveq #3,%d0
48546: b0b9 0006 1ab8 cmpl 61ab8 <_System_state_Current>,%d0
4854c: 670c beqs 4855a <_Heap_Walk+0x44>
block = next_block;
} while ( block != first_block );
return true;
}
4854e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
}
block = next_block;
} while ( block != first_block );
return true;
48554: 7001 moveq #1,%d0
}
48556: 4e5e unlk %fp
48558: 4e75 rts
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
4855a: 2f2a 000c movel %a2@(12),%sp@-
4855e: 2f2a 0008 movel %a2@(8),%sp@-
48562: 2f07 movel %d7,%sp@-
48564: 2f04 movel %d4,%sp@-
48566: 2f2a 001c movel %a2@(28),%sp@-
4856a: 2f2a 0018 movel %a2@(24),%sp@-
4856e: 2f06 movel %d6,%sp@-
48570: 2f03 movel %d3,%sp@-
48572: 4879 0005 df85 pea 5df85 <_Status_Object_name_errors_to_status+0x5d>
48578: 42a7 clrl %sp@-
4857a: 2f05 movel %d5,%sp@-
4857c: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
4857e: 4fef 002c lea %sp@(44),%sp
48582: 4a83 tstl %d3
48584: 6700 0082 beqw 48608 <_Heap_Walk+0xf2>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
48588: 7003 moveq #3,%d0
4858a: c083 andl %d3,%d0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
4858c: 6600 0090 bnew 4861e <_Heap_Walk+0x108>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
48590: 2206 movel %d6,%d1
48592: 4c43 1000 remul %d3,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
48596: 4a80 tstl %d0
48598: 6600 00a4 bnew 4863e <_Heap_Walk+0x128>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4859c: 2004 movel %d4,%d0
4859e: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
485a0: 4c43 0001 remul %d3,%d1,%d0
);
return false;
}
if (
485a4: 4a81 tstl %d1
485a6: 6600 00ae bnew 48656 <_Heap_Walk+0x140>
block = next_block;
} while ( block != first_block );
return true;
}
485aa: 2044 moveal %d4,%a0
485ac: 2228 0004 movel %a0@(4),%d1
485b0: 2d41 ffec movel %d1,%fp@(-20)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
485b4: 0801 0000 btst #0,%d1
485b8: 6700 0188 beqw 48742 <_Heap_Walk+0x22c>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
485bc: 2047 moveal %d7,%a0
485be: 72fe moveq #-2,%d1
485c0: c2a8 0004 andl %a0@(4),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
485c4: d1c1 addal %d1,%a0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
485c6: 7201 moveq #1,%d1
485c8: c2a8 0004 andl %a0@(4),%d1
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
485cc: 6724 beqs 485f2 <_Heap_Walk+0xdc>
);
return false;
}
if (
485ce: b1c4 cmpal %d4,%a0
485d0: 6700 009c beqw 4866e <_Heap_Walk+0x158>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
485d4: 4879 0005 e0df pea 5e0df <_Status_Object_name_errors_to_status+0x1b7>
485da: 4878 0001 pea 1 <ADD>
485de: 2f05 movel %d5,%sp@-
485e0: 4e95 jsr %a5@
485e2: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
485e6: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
485e8: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
485ee: 4e5e unlk %fp
485f0: 4e75 rts
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
485f2: 4879 0005 e0ca pea 5e0ca <_Status_Object_name_errors_to_status+0x1a2>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
485f8: 4878 0001 pea 1 <ADD>
485fc: 2f05 movel %d5,%sp@-
485fe: 4e95 jsr %a5@
48600: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48604: 4200 clrb %d0
48606: 60e0 bras 485e8 <_Heap_Walk+0xd2>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
48608: 4879 0005 e016 pea 5e016 <_Status_Object_name_errors_to_status+0xee>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
4860e: 4878 0001 pea 1 <ADD>
48612: 2f05 movel %d5,%sp@-
48614: 4e95 jsr %a5@
48616: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
4861a: 4200 clrb %d0
4861c: 60ca bras 485e8 <_Heap_Walk+0xd2>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
4861e: 2f03 movel %d3,%sp@-
48620: 4879 0005 e029 pea 5e029 <_Status_Object_name_errors_to_status+0x101>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48626: 4878 0001 pea 1 <ADD>
4862a: 2f05 movel %d5,%sp@-
4862c: 4e95 jsr %a5@
4862e: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48632: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48634: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
4863a: 4e5e unlk %fp
4863c: 4e75 rts
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
4863e: 2f06 movel %d6,%sp@-
48640: 4879 0005 e047 pea 5e047 <_Status_Object_name_errors_to_status+0x11f>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48646: 4878 0001 pea 1 <ADD>
4864a: 2f05 movel %d5,%sp@-
4864c: 4e95 jsr %a5@
4864e: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48652: 4200 clrb %d0
48654: 60de bras 48634 <_Heap_Walk+0x11e>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
48656: 2f04 movel %d4,%sp@-
48658: 4879 0005 e06b pea 5e06b <_Status_Object_name_errors_to_status+0x143>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4865e: 4878 0001 pea 1 <ADD>
48662: 2f05 movel %d5,%sp@-
48664: 4e95 jsr %a5@
48666: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4866a: 4200 clrb %d0
4866c: 60c6 bras 48634 <_Heap_Walk+0x11e>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
4866e: 202a 0010 movel %a2@(16),%d0
block = next_block;
} while ( block != first_block );
return true;
}
48672: 226a 0008 moveal %a2@(8),%a1
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
48676: 2d40 fffc movel %d0,%fp@(-4)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
4867a: b3ca cmpal %a2,%a1
4867c: 6700 034e beqw 489cc <_Heap_Walk+0x4b6>
block = next_block;
} while ( block != first_block );
return true;
}
48680: 242a 0020 movel %a2@(32),%d2
48684: 2d42 fff4 movel %d2,%fp@(-12)
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
48688: b3c2 cmpal %d2,%a1
4868a: 6500 009a bcsw 48726 <_Heap_Walk+0x210>
4868e: 286a 0024 moveal %a2@(36),%a4
48692: b3cc cmpal %a4,%a1
48694: 6200 0090 bhiw 48726 <_Heap_Walk+0x210>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
48698: 47e9 0008 lea %a1@(8),%a3
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
4869c: 200b movel %a3,%d0
4869e: 222e fffc movel %fp@(-4),%d1
486a2: 4c41 0002 remul %d1,%d2,%d0
);
return false;
}
if (
486a6: 4a82 tstl %d2
486a8: 6600 00b0 bnew 4875a <_Heap_Walk+0x244>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
486ac: 74fe moveq #-2,%d2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
486ae: 7001 moveq #1,%d0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
486b0: c4a9 0004 andl %a1@(4),%d2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
486b4: c0b1 2804 andl %a1@(00000004,%d2:l),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
486b8: 6600 0304 bnew 489be <_Heap_Walk+0x4a8>
486bc: 222e fff4 movel %fp@(-12),%d1
486c0: 240a movel %a2,%d2
486c2: 266e ffec moveal %fp@(-20),%a3
486c6: 2d43 fff8 movel %d3,%fp@(-8)
486ca: 2d44 fff0 movel %d4,%fp@(-16)
);
return false;
}
if ( free_block->prev != prev_block ) {
486ce: 2069 000c moveal %a1@(12),%a0
486d2: b488 cmpl %a0,%d2
486d4: 6600 02cc bnew 489a2 <_Heap_Walk+0x48c>
return false;
}
prev_block = free_block;
free_block = free_block->next;
486d8: 2069 0008 moveal %a1@(8),%a0
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
486dc: b1ca cmpal %a2,%a0
486de: 6700 0096 beqw 48776 <_Heap_Walk+0x260>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
486e2: b1c1 cmpal %d1,%a0
486e4: 6542 bcss 48728 <_Heap_Walk+0x212>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
486e6: 2608 movel %a0,%d3
486e8: 5083 addql #8,%d3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
486ea: b9c8 cmpal %a0,%a4
486ec: 653a bcss 48728 <_Heap_Walk+0x212> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
486ee: 282e fffc movel %fp@(-4),%d4
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
486f2: 2409 movel %a1,%d2
486f4: 2248 moveal %a0,%a1
486f6: 4c44 3000 remul %d4,%d0,%d3
);
return false;
}
if (
486fa: 4a80 tstl %d0
486fc: 665e bnes 4875c <_Heap_Walk+0x246>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
486fe: 70fe moveq #-2,%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
48700: 7601 moveq #1,%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48702: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
48706: c6b0 0804 andl %a0@(00000004,%d0:l),%d3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4870a: 67c2 beqs 486ce <_Heap_Walk+0x1b8>
(*printer)(
4870c: 2f08 movel %a0,%sp@-
4870e: 4879 0005 e15e pea 5e15e <_Status_Object_name_errors_to_status+0x236>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48714: 4878 0001 pea 1 <ADD>
48718: 2f05 movel %d5,%sp@-
4871a: 4e95 jsr %a5@
4871c: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48720: 4200 clrb %d0
48722: 6000 ff10 braw 48634 <_Heap_Walk+0x11e>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
48726: 2049 moveal %a1,%a0 <== NOT EXECUTED
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
48728: 2f08 movel %a0,%sp@-
4872a: 4879 0005 e10e pea 5e10e <_Status_Object_name_errors_to_status+0x1e6>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48730: 4878 0001 pea 1 <ADD>
48734: 2f05 movel %d5,%sp@-
48736: 4e95 jsr %a5@
48738: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4873c: 4200 clrb %d0
4873e: 6000 fef4 braw 48634 <_Heap_Walk+0x11e>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48742: 4879 0005 e09c pea 5e09c <_Status_Object_name_errors_to_status+0x174>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
48748: 4878 0001 pea 1 <ADD>
4874c: 2f05 movel %d5,%sp@-
4874e: 4e95 jsr %a5@
48750: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48754: 4200 clrb %d0
48756: 6000 fe90 braw 485e8 <_Heap_Walk+0xd2>
);
return false;
}
if (
4875a: 2049 moveal %a1,%a0 <== NOT EXECUTED
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
4875c: 2f08 movel %a0,%sp@-
4875e: 4879 0005 e12e pea 5e12e <_Status_Object_name_errors_to_status+0x206>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48764: 4878 0001 pea 1 <ADD>
48768: 2f05 movel %d5,%sp@-
4876a: 4e95 jsr %a5@
4876c: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48770: 4200 clrb %d0
48772: 6000 fec0 braw 48634 <_Heap_Walk+0x11e>
48776: 262e fff8 movel %fp@(-8),%d3
4877a: 282e fff0 movel %fp@(-16),%d4
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4877e: 2844 moveal %d4,%a4
48780: 2d41 fff4 movel %d1,%fp@(-12)
48784: 222e fff4 movel %fp@(-12),%d1
48788: 2d4b ffec movel %a3,%fp@(-20)
4878c: 2d43 fffc movel %d3,%fp@(-4)
48790: 262e ffec movel %fp@(-20),%d3
48794: 2d47 fff0 movel %d7,%fp@(-16)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48798: 74fe moveq #-2,%d2
4879a: c483 andl %d3,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4879c: 47f4 2800 lea %a4@(00000000,%d2:l),%a3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
487a0: b7c1 cmpal %d1,%a3
487a2: 657e bcss 48822 <_Heap_Walk+0x30c> <== NEVER TAKEN
487a4: b7ea 0024 cmpal %a2@(36),%a3
487a8: 6278 bhis 48822 <_Heap_Walk+0x30c> <== NEVER TAKEN
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
487aa: b9ee fff0 cmpal %fp@(-16),%a4
487ae: 56c7 sne %d7
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
487b0: 222e fffc movel %fp@(-4),%d1
487b4: 2002 movel %d2,%d0
487b6: 3247 moveaw %d7,%a1
487b8: 4c41 0007 remul %d1,%d7,%d0
487bc: 2009 movel %a1,%d0
487be: 4480 negl %d0
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
487c0: 4a87 tstl %d7
487c2: 6704 beqs 487c8 <_Heap_Walk+0x2b2>
487c4: 4a00 tstb %d0
487c6: 667c bnes 48844 <_Heap_Walk+0x32e> <== NEVER TAKEN
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
487c8: b486 cmpl %d6,%d2
487ca: 6406 bccs 487d2 <_Heap_Walk+0x2bc>
487cc: 4a00 tstb %d0
487ce: 6600 008e bnew 4885e <_Heap_Walk+0x348>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
487d2: b7cc cmpal %a4,%a3
487d4: 6206 bhis 487dc <_Heap_Walk+0x2c6>
487d6: 4a00 tstb %d0
487d8: 6600 00a8 bnew 48882 <_Heap_Walk+0x36c>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
487dc: 7001 moveq #1,%d0
487de: 7201 moveq #1,%d1
487e0: c0ab 0004 andl %a3@(4),%d0
487e4: c681 andl %d1,%d3
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
487e6: 4a80 tstl %d0
487e8: 6700 00cc beqw 488b6 <_Heap_Walk+0x3a0>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
487ec: 4a83 tstl %d3
487ee: 6700 00ac beqw 4889c <_Heap_Walk+0x386>
(*printer)(
487f2: 2f02 movel %d2,%sp@-
487f4: 2f0c movel %a4,%sp@-
487f6: 4879 0005 e303 pea 5e303 <_Status_Object_name_errors_to_status+0x3db>
487fc: 42a7 clrl %sp@-
487fe: 2f05 movel %d5,%sp@-
48800: 4e95 jsr %a5@
48802: 4fef 0014 lea %sp@(20),%sp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
48806: b7c4 cmpal %d4,%a3
48808: 6700 fd44 beqw 4854e <_Heap_Walk+0x38>
4880c: 262b 0004 movel %a3@(4),%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48810: 74fe moveq #-2,%d2
48812: 284b moveal %a3,%a4
48814: c483 andl %d3,%d2
48816: 222a 0020 movel %a2@(32),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4881a: 47f4 2800 lea %a4@(00000000,%d2:l),%a3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4881e: b7c1 cmpal %d1,%a3
48820: 6482 bccs 487a4 <_Heap_Walk+0x28e> <== ALWAYS TAKEN
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
48822: 2f0b movel %a3,%sp@-
48824: 2f0c movel %a4,%sp@-
48826: 4879 0005 e1ac pea 5e1ac <_Status_Object_name_errors_to_status+0x284>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
4882c: 4878 0001 pea 1 <ADD>
48830: 2f05 movel %d5,%sp@-
48832: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48834: 4fef 0014 lea %sp@(20),%sp
48838: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4883a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
48840: 4e5e unlk %fp
48842: 4e75 rts
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
48844: 2f02 movel %d2,%sp@-
48846: 2f0c movel %a4,%sp@-
48848: 4879 0005 e1d9 pea 5e1d9 <_Status_Object_name_errors_to_status+0x2b1>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
4884e: 4878 0001 pea 1 <ADD>
48852: 2f05 movel %d5,%sp@-
48854: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48856: 4fef 0014 lea %sp@(20),%sp
4885a: 4200 clrb %d0
4885c: 60dc bras 4883a <_Heap_Walk+0x324>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
4885e: 2f06 movel %d6,%sp@-
48860: 2f02 movel %d2,%sp@-
48862: 2f0c movel %a4,%sp@-
48864: 4879 0005 e207 pea 5e207 <_Status_Object_name_errors_to_status+0x2df>
4886a: 4878 0001 pea 1 <ADD>
4886e: 2f05 movel %d5,%sp@-
48870: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
48872: 4fef 0018 lea %sp@(24),%sp
block = next_block;
} while ( block != first_block );
return true;
}
48876: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
block,
block_size,
min_block_size
);
return false;
4887c: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4887e: 4e5e unlk %fp
48880: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
48882: 2f0b movel %a3,%sp@-
48884: 2f0c movel %a4,%sp@-
48886: 4879 0005 e232 pea 5e232 <_Status_Object_name_errors_to_status+0x30a>
4888c: 4878 0001 pea 1 <ADD>
48890: 2f05 movel %d5,%sp@-
48892: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48894: 4fef 0014 lea %sp@(20),%sp
48898: 4200 clrb %d0
4889a: 609e bras 4883a <_Heap_Walk+0x324>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
4889c: 2f14 movel %a4@,%sp@-
4889e: 2f02 movel %d2,%sp@-
488a0: 2f0c movel %a4,%sp@-
488a2: 4879 0005 e31a pea 5e31a <_Status_Object_name_errors_to_status+0x3f2>
488a8: 42a7 clrl %sp@-
488aa: 2f05 movel %d5,%sp@-
488ac: 4e95 jsr %a5@
488ae: 4fef 0018 lea %sp@(24),%sp
488b2: 6000 ff52 braw 48806 <_Heap_Walk+0x2f0>
block = next_block;
} while ( block != first_block );
return true;
}
488b6: 2e2a 0008 movel %a2@(8),%d7
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488ba: 43f9 0005 df52 lea 5df52 <_Status_Object_name_errors_to_status+0x2a>,%a1
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
488c0: 222c 0008 movel %a4@(8),%d1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488c4: b2aa 000c cmpl %a2@(12),%d1
488c8: 670a beqs 488d4 <_Heap_Walk+0x3be>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
488ca: 43f9 0005 de9e lea 5de9e <rtems_filesystem_default_pathconf+0xb4>,%a1
488d0: b28a cmpl %a2,%d1
488d2: 6764 beqs 48938 <_Heap_Walk+0x422>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
488d4: 202c 000c movel %a4@(12),%d0
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488d8: 41f9 0005 df6b lea 5df6b <_Status_Object_name_errors_to_status+0x43>,%a0
488de: b087 cmpl %d7,%d0
488e0: 670a beqs 488ec <_Heap_Walk+0x3d6>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
488e2: 41f9 0005 de9e lea 5de9e <rtems_filesystem_default_pathconf+0xb4>,%a0
488e8: b08a cmpl %a2,%d0
488ea: 6754 beqs 48940 <_Heap_Walk+0x42a>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488ec: 2f09 movel %a1,%sp@-
488ee: 2f01 movel %d1,%sp@-
488f0: 2f08 movel %a0,%sp@-
488f2: 2f00 movel %d0,%sp@-
488f4: 2f02 movel %d2,%sp@-
488f6: 2f0c movel %a4,%sp@-
488f8: 4879 0005 e266 pea 5e266 <_Status_Object_name_errors_to_status+0x33e>
488fe: 42a7 clrl %sp@-
48900: 2f05 movel %d5,%sp@-
48902: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
48904: 2213 movel %a3@,%d1
48906: 4fef 0024 lea %sp@(36),%sp
4890a: b282 cmpl %d2,%d1
4890c: 663a bnes 48948 <_Heap_Walk+0x432>
);
return false;
}
if ( !prev_used ) {
4890e: 4a83 tstl %d3
48910: 6776 beqs 48988 <_Heap_Walk+0x472>
block = next_block;
} while ( block != first_block );
return true;
}
48912: 206a 0008 moveal %a2@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
48916: b1ca cmpal %a2,%a0
48918: 6754 beqs 4896e <_Heap_Walk+0x458> <== NEVER TAKEN
if ( free_block == block ) {
4891a: b1cc cmpal %a4,%a0
4891c: 6700 fee8 beqw 48806 <_Heap_Walk+0x2f0>
48920: 2e2e fff0 movel %fp@(-16),%d7
return true;
}
free_block = free_block->next;
48924: 2068 0008 moveal %a0@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
48928: b1ca cmpal %a2,%a0
4892a: 6742 beqs 4896e <_Heap_Walk+0x458>
if ( free_block == block ) {
4892c: b1cc cmpal %a4,%a0
4892e: 66f4 bnes 48924 <_Heap_Walk+0x40e>
48930: 2d47 fff0 movel %d7,%fp@(-16)
48934: 6000 fed0 braw 48806 <_Heap_Walk+0x2f0>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
48938: 43f9 0005 df61 lea 5df61 <_Status_Object_name_errors_to_status+0x39>,%a1
4893e: 6094 bras 488d4 <_Heap_Walk+0x3be>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
48940: 41f9 0005 df7b lea 5df7b <_Status_Object_name_errors_to_status+0x53>,%a0
48946: 60a4 bras 488ec <_Heap_Walk+0x3d6>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
48948: 2f0b movel %a3,%sp@-
4894a: 2f01 movel %d1,%sp@-
4894c: 2f02 movel %d2,%sp@-
4894e: 2f0c movel %a4,%sp@-
48950: 4879 0005 e29b pea 5e29b <_Status_Object_name_errors_to_status+0x373>
48956: 4878 0001 pea 1 <ADD>
4895a: 2f05 movel %d5,%sp@-
4895c: 4e95 jsr %a5@
4895e: 4fef 001c lea %sp@(28),%sp
block = next_block;
} while ( block != first_block );
return true;
}
48962: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48968: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4896a: 4e5e unlk %fp
4896c: 4e75 rts
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4896e: 2f0c movel %a4,%sp@-
48970: 4879 0005 e33f pea 5e33f <_Status_Object_name_errors_to_status+0x417>
48976: 4878 0001 pea 1 <ADD>
4897a: 2f05 movel %d5,%sp@-
4897c: 4e95 jsr %a5@
4897e: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48982: 4200 clrb %d0
48984: 6000 fcae braw 48634 <_Heap_Walk+0x11e>
return false;
}
if ( !prev_used ) {
(*printer)(
48988: 2f0c movel %a4,%sp@-
4898a: 4879 0005 e2d4 pea 5e2d4 <_Status_Object_name_errors_to_status+0x3ac>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48990: 4878 0001 pea 1 <ADD>
48994: 2f05 movel %d5,%sp@-
48996: 4e95 jsr %a5@
48998: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4899c: 4200 clrb %d0
4899e: 6000 fc94 braw 48634 <_Heap_Walk+0x11e>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
489a2: 2f08 movel %a0,%sp@-
489a4: 2f09 movel %a1,%sp@-
489a6: 4879 0005 e17a pea 5e17a <_Status_Object_name_errors_to_status+0x252>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
489ac: 4878 0001 pea 1 <ADD>
489b0: 2f05 movel %d5,%sp@-
489b2: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
489b4: 4fef 0014 lea %sp@(20),%sp
489b8: 4200 clrb %d0
489ba: 6000 fe7e braw 4883a <_Heap_Walk+0x324>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
489be: 2049 moveal %a1,%a0 <== NOT EXECUTED
(*printer)(
489c0: 2f08 movel %a0,%sp@- <== NOT EXECUTED
489c2: 4879 0005 e15e pea 5e15e <_Status_Object_name_errors_to_status+0x236><== NOT EXECUTED
489c8: 6000 fd4a braw 48714 <_Heap_Walk+0x1fe> <== NOT EXECUTED
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
489cc: 222a 0020 movel %a2@(32),%d1
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
489d0: 2844 moveal %d4,%a4
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
489d2: 2d41 fff4 movel %d1,%fp@(-12)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
489d6: 222e fff4 movel %fp@(-12),%d1
489da: 2d43 fffc movel %d3,%fp@(-4)
489de: 262e ffec movel %fp@(-20),%d3
489e2: 2d47 fff0 movel %d7,%fp@(-16)
489e6: 6000 fdb0 braw 48798 <_Heap_Walk+0x282>
...
00046f62 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
46f62: 4e56 0000 linkw %fp,#0
46f66: 2f0a movel %a2,%sp@-
46f68: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46f6a: 4ab9 0005 f654 tstl 5f654 <_IO_Number_of_drivers>
46f70: 671e beqs 46f90 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
46f72: 4282 clrl %d2
46f74: 45f9 0004 bc18 lea 4bc18 <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
46f7a: 42a7 clrl %sp@-
46f7c: 42a7 clrl %sp@-
46f7e: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46f80: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
46f82: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46f84: 4fef 000c lea %sp@(12),%sp
46f88: b4b9 0005 f654 cmpl 5f654 <_IO_Number_of_drivers>,%d2
46f8e: 65ea bcss 46f7a <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
46f90: 242e fff8 movel %fp@(-8),%d2
46f94: 246e fffc moveal %fp@(-4),%a2
46f98: 4e5e unlk %fp <== NOT EXECUTED
00046ec8 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
46ec8: 4e56 fff0 linkw %fp,#-16
46ecc: 48d7 003c moveml %d2-%d5,%sp@
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
46ed0: 2639 0005 dc16 movel 5dc16 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
46ed6: 2439 0005 dc12 movel 5dc12 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
46edc: 2839 0005 dc0e movel 5dc0e <Configuration+0x2a>,%d4
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
46ee2: b882 cmpl %d2,%d4
46ee4: 6366 blss 46f4c <_IO_Manager_initialization+0x84>
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
46ee6: 2004 movel %d4,%d0
46ee8: 2a04 movel %d4,%d5
46eea: e788 lsll #3,%d0
46eec: eb8d lsll #5,%d5
46eee: 9a80 subl %d0,%d5
46ef0: 2f05 movel %d5,%sp@-
46ef2: 4eb9 0004 9e38 jsr 49e38 <_Workspace_Allocate_or_fatal_error>
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46ef8: 2f05 movel %d5,%sp@-
46efa: 42a7 clrl %sp@-
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
46efc: 23c0 0005 f658 movel %d0,5f658 <_IO_Driver_address_table>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46f02: 2f00 movel %d0,%sp@-
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
46f04: 23c4 0005 f654 movel %d4,5f654 <_IO_Number_of_drivers>
memset(
46f0a: 4eb9 0004 e3f4 jsr 4e3f4 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f10: 4fef 0010 lea %sp@(16),%sp
46f14: 4a82 tstl %d2
46f16: 672a beqs 46f42 <_IO_Manager_initialization+0x7a><== NEVER TAKEN
46f18: 2839 0005 f658 movel 5f658 <_IO_Driver_address_table>,%d4
46f1e: 4280 clrl %d0
46f20: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
46f22: 2243 moveal %d3,%a1
46f24: 2044 moveal %d4,%a0
46f26: d3c0 addal %d0,%a1
46f28: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f2a: 5281 addql #1,%d1
46f2c: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46f32: 20d9 movel %a1@+,%a0@+
46f34: 20d9 movel %a1@+,%a0@+
46f36: 20d9 movel %a1@+,%a0@+
46f38: 20d9 movel %a1@+,%a0@+
46f3a: 20d9 movel %a1@+,%a0@+
46f3c: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f3e: b282 cmpl %d2,%d1
46f40: 65e0 bcss 46f22 <_IO_Manager_initialization+0x5a>
_IO_Driver_address_table[index] = driver_table[index];
}
46f42: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
46f48: 4e5e unlk %fp
46f4a: 4e75 rts
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
46f4c: 23c3 0005 f658 movel %d3,5f658 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
46f52: 23c2 0005 f654 movel %d2,5f654 <_IO_Number_of_drivers>
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
46f58: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
46f5e: 4e5e unlk %fp <== NOT EXECUTED
00047ac4 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ac4: 4e56 fffc linkw %fp,#-4
47ac8: 206e 0010 moveal %fp@(16),%a0
47acc: 2f02 movel %d2,%sp@-
47ace: 222e 000c movel %fp@(12),%d1
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ad2: 4282 clrl %d2
47ad4: 1401 moveb %d1,%d2
47ad6: 2242 moveal %d2,%a1
47ad8: 2f08 movel %a0,%sp@-
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ada: 202e 0008 movel %fp@(8),%d0
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ade: 2f09 movel %a1,%sp@-
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
47ae0: 13c1 0005 f4e2 moveb %d1,5f4e2 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ae6: 2d48 fffc movel %a0,%fp@(-4)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
47aea: 23c0 0005 f4de movel %d0,5f4de <_Internal_errors_What_happened>
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
47af0: 23c8 0005 f4e4 movel %a0,5f4e4 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
47af6: 2f00 movel %d0,%sp@-
47af8: 4eb9 0004 99b6 jsr 499b6 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47afe: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
47b02: 327c 0700 moveaw #1792,%a1 <== NOT EXECUTED
47b06: 2409 movel %a1,%d2 <== NOT EXECUTED
47b08: 40c0 movew %sr,%d0 <== NOT EXECUTED
47b0a: 8082 orl %d2,%d0 <== NOT EXECUTED
47b0c: 46c0 movew %d0,%sr <== NOT EXECUTED
47b0e: 2008 movel %a0,%d0 <== NOT EXECUTED
47b10: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED
47b16: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47b18: 7005 moveq #5,%d0 <== NOT EXECUTED
47b1a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
47b1e: 23c0 0005 f590 movel %d0,5f590 <_System_state_Current> <== NOT EXECUTED
47b24: 60fe bras 47b24 <_Internal_error_Occurred+0x60> <== NOT EXECUTED
...
00047b88 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47b88: 4e56 fff0 linkw %fp,#-16
47b8c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
47b90: 246e 0008 moveal %fp@(8),%a2
* 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 )
47b94: 4aaa 0014 tstl %a2@(20)
47b98: 660c bnes 47ba6 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN
return NULL;
47b9a: 4280 clrl %d0 <== NOT EXECUTED
);
}
#endif
return the_object;
}
47b9c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47ba2: 4e5e unlk %fp
47ba4: 4e75 rts
/*
* 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 );
47ba6: 240a movel %a2,%d2
47ba8: 0682 0000 001c addil #28,%d2
47bae: 47f9 0004 71e4 lea 471e4 <_Chain_Get>,%a3
47bb4: 2f02 movel %d2,%sp@-
47bb6: 4e93 jsr %a3@
if ( information->auto_extend ) {
47bb8: 588f addql #4,%sp
47bba: 4a2a 0010 tstb %a2@(16)
47bbe: 67dc beqs 47b9c <_Objects_Allocate+0x14>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47bc0: 4a80 tstl %d0
47bc2: 6738 beqs 47bfc <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bc4: 2040 moveal %d0,%a0
47bc6: 4281 clrl %d1
47bc8: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47bca: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bcc: 362a 0008 movew %a2@(8),%d3
47bd0: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47bd4: 342a 0012 movew %a2@(18),%d2
information->inactive_per_block[ block ]--;
47bd8: 206a 002a moveal %a2@(42),%a0
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bdc: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47bde: 4c42 1001 remul %d2,%d1,%d1
information->inactive_per_block[ block ]--;
information->inactive--;
47be2: 326a 0028 moveaw %a2@(40),%a1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47be6: e589 lsll #2,%d1
information->inactive--;
47be8: 5389 subql #1,%a1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bea: d1c1 addal %d1,%a0
47bec: 5390 subql #1,%a0@
information->inactive--;
47bee: 3549 0028 movew %a1,%a2@(40)
);
}
#endif
return the_object;
}
47bf2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47bf8: 4e5e unlk %fp
47bfa: 4e75 rts
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
47bfc: 2f0a movel %a2,%sp@-
47bfe: 4eb9 0004 7c44 jsr 47c44 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47c04: 2f02 movel %d2,%sp@-
47c06: 4e93 jsr %a3@
}
if ( the_object ) {
47c08: 508f addql #8,%sp
47c0a: 4a80 tstl %d0
47c0c: 66b6 bnes 47bc4 <_Objects_Allocate+0x3c>
);
}
#endif
return the_object;
}
47c0e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47c14: 4e5e unlk %fp <== NOT EXECUTED
00047c18 <_Objects_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
47c18: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
47c1a: 4e56 0000 linkw %fp,#0
47c1e: 226e 000c moveal %fp@(12),%a1
47c22: 206e 0008 moveal %fp@(8),%a0
47c26: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47c28: 2468 0018 moveal %a0@(24),%a2
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
47c2c: 3029 000a movew %a1@(10),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47c30: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
}
47c34: 245f moveal %sp@+,%a2
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c36: 2d49 000c movel %a1,%fp@(12)
}
47c3a: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c3c: 4ef9 0004 818c jmp 4818c <_Objects_Namespace_remove>
...
00047c44 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
47c44: 4e56 ffcc linkw %fp,#-52
47c48: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
47c4c: 246e 0008 moveal %fp@(8),%a2
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47c50: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c52: 206a 002e moveal %a2@(46),%a0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47c56: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c5a: 4a88 tstl %a0
47c5c: 6700 022c beqw 47e8a <_Objects_Extend_information+0x246>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
47c60: 322a 000e movew %a2@(14),%d1
47c64: 302a 0012 movew %a2@(18),%d0
47c68: 3801 movew %d1,%d4
47c6a: 0284 0000 ffff andil #65535,%d4
47c70: 88c0 divuw %d0,%d4
47c72: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47c78: 6700 0226 beqw 47ea0 <_Objects_Extend_information+0x25c>
if ( information->object_blocks[ block ] == NULL ) {
47c7c: 4a90 tstl %a0@
47c7e: 6700 0230 beqw 47eb0 <_Objects_Extend_information+0x26c>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
47c82: 5888 addql #4,%a0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47c84: 2605 movel %d5,%d3
index_base = minimum_index;
block = 0;
47c86: 4282 clrl %d2
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
47c88: 0280 0000 ffff andil #65535,%d0
do_extend = false;
break;
} else
index_base += information->allocation_size;
47c8e: d680 addl %d0,%d3
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
47c90: 5282 addql #1,%d2
47c92: b484 cmpl %d4,%d2
47c94: 6400 01a0 bccw 47e36 <_Objects_Extend_information+0x1f2>
if ( information->object_blocks[ block ] == NULL ) {
47c98: 4a98 tstl %a0@+
47c9a: 66f2 bnes 47c8e <_Objects_Extend_information+0x4a>
do_extend = false;
47c9c: 4207 clrb %d7
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
47c9e: 0281 0000 ffff andil #65535,%d1
47ca4: 2641 moveal %d1,%a3
47ca6: d7c0 addal %d0,%a3
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
47ca8: b7fc 0000 ffff cmpal #65535,%a3
47cae: 6200 017c bhiw 47e2c <_Objects_Extend_information+0x1e8>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
47cb2: 41ea 0014 lea %a2@(20),%a0
47cb6: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47cba: 4a2a 0010 tstb %a2@(16)
47cbe: 6700 017c beqw 47e3c <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
47cc2: 2f00 movel %d0,%sp@-
47cc4: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !new_object_block )
47cca: 588f addql #4,%sp
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
47ccc: 2c00 movel %d0,%d6
if ( !new_object_block )
47cce: 6700 015c beqw 47e2c <_Objects_Extend_information+0x1e8>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
47cd2: 4a07 tstb %d7
47cd4: 6700 00be beqw 47d94 <_Objects_Extend_information+0x150>
*/
/*
* Up the block count and maximum
*/
block_count++;
47cd8: 2a44 moveal %d4,%a5
47cda: 528d addql #1,%a5
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
47cdc: 200b movel %a3,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
47cde: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0
((maximum + minimum_index) * sizeof(Objects_Control *));
47ce2: d088 addl %a0,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
47ce4: d085 addl %d5,%d0
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
47ce6: e588 lsll #2,%d0
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47ce8: 2f00 movel %d0,%sp@-
47cea: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !object_blocks ) {
47cf0: 588f addql #4,%sp
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47cf2: 2840 moveal %d0,%a4
if ( !object_blocks ) {
47cf4: 4a80 tstl %d0
47cf6: 6700 01c8 beqw 47ec0 <_Objects_Extend_information+0x27c>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47cfa: 2e0d movel %a5,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47cfc: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47cfe: e58f lsll #2,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47d00: 302a 000e movew %a2@(14),%d0
47d04: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5
47d08: de8d addl %a5,%d7
47d0a: b085 cmpl %d5,%d0
47d0c: 6200 013e bhiw 47e4c <_Objects_Extend_information+0x208>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47d10: 4a85 tstl %d5
47d12: 670c beqs 47d20 <_Objects_Extend_information+0xdc><== NEVER TAKEN
47d14: 2047 moveal %d7,%a0
47d16: 4280 clrl %d0
local_table[ index ] = NULL;
47d18: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47d1a: 5280 addql #1,%d0
47d1c: b085 cmpl %d5,%d0
47d1e: 65f8 bcss 47d18 <_Objects_Extend_information+0xd4><== NEVER TAKEN
47d20: e58c lsll #2,%d4
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d22: 4281 clrl %d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
47d24: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d28: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
47d2c: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d30: d283 addl %d3,%d1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d32: b283 cmpl %d3,%d1
47d34: 6310 blss 47d46 <_Objects_Extend_information+0x102><== NEVER TAKEN
47d36: 2247 moveal %d7,%a1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
47d38: 2003 movel %d3,%d0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d3a: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
47d3e: 4298 clrl %a0@+
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
47d40: 5280 addql #1,%d0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d42: b280 cmpl %d0,%d1
47d44: 62f8 bhis 47d3e <_Objects_Extend_information+0xfa>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
47d46: 203c 0000 0700 movel #1792,%d0
47d4c: 40c4 movew %sr,%d4
47d4e: 8084 orl %d4,%d0
47d50: 46c0 movew %d0,%sr
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d52: 2012 movel %a2@,%d0
47d54: 7a18 moveq #24,%d5
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d56: 4281 clrl %d1
47d58: eba8 lsll %d5,%d0
47d5a: 322a 0004 movew %a2@(4),%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47d5e: 1a3c 001b moveb #27,%d5
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d62: 08c0 0010 bset #16,%d0
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47d66: eba9 lsll %d5,%d1
47d68: 4285 clrl %d5
47d6a: 8081 orl %d1,%d0
47d6c: 3a0b movew %a3,%d5
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
47d6e: 206a 002e moveal %a2@(46),%a0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d72: 8085 orl %d5,%d0
information->object_blocks = object_blocks;
47d74: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
47d78: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
47d7c: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table;
47d80: 2547 0018 movel %d7,%a2@(24)
47d84: 2540 000a movel %d0,%a2@(10)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
47d88: 46c4 movew %d4,%sr
_Workspace_Free( old_tables );
47d8a: 2f08 movel %a0,%sp@-
47d8c: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
47d92: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d94: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d98: 4280 clrl %d0
47d9a: 280e movel %fp,%d4
47d9c: 0684 ffff fff4 addil #-12,%d4
47da2: 47f9 0004 71e4 lea 471e4 <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47da8: 2a0a movel %a2,%d5
47daa: 0685 0000 001c addil #28,%d5
47db0: 49f9 0004 7184 lea 47184 <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47db6: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47db8: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47dbc: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47dc0: 2f2a 0014 movel %a2@(20),%sp@-
47dc4: 2f00 movel %d0,%sp@-
47dc6: 2f06 movel %d6,%sp@-
47dc8: 2f04 movel %d4,%sp@-
47dca: 4eb9 0004 bc60 jsr 4bc60 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47dd0: 4fef 0010 lea %sp@(16),%sp
47dd4: 2f04 movel %d4,%sp@-
47dd6: 4e93 jsr %a3@
47dd8: 588f addql #4,%sp
47dda: 4a80 tstl %d0
47ddc: 6734 beqs 47e12 <_Objects_Extend_information+0x1ce><== NEVER TAKEN
47dde: 2212 movel %a2@,%d1
47de0: 7e18 moveq #24,%d7
the_object->id = _Objects_Build_id(
47de2: 4286 clrl %d6
47de4: 2040 moveal %d0,%a0
47de6: 3c2a 0004 movew %a2@(4),%d6
47dea: efa9 lsll %d7,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47dec: 1e3c 001b moveb #27,%d7
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47df0: 08c1 0010 bset #16,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47df4: efae lsll %d7,%d6
47df6: 8286 orl %d6,%d1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47df8: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
47dfa: 5283 addql #1,%d3
47dfc: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47e00: 2f00 movel %d0,%sp@-
47e02: 2f05 movel %d5,%sp@-
47e04: 4e94 jsr %a4@
index++;
47e06: 508f addql #8,%sp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47e08: 2f04 movel %d4,%sp@-
47e0a: 4e93 jsr %a3@
47e0c: 588f addql #4,%sp
47e0e: 4a80 tstl %d0
47e10: 66cc bnes 47dde <_Objects_Extend_information+0x19a>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e12: 4281 clrl %d1
47e14: 302a 0012 movew %a2@(18),%d0
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
47e18: 326a 0028 moveaw %a2@(40),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e1c: 206a 002a moveal %a2@(42),%a0
47e20: 3200 movew %d0,%d1
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
47e22: d089 addl %a1,%d0
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e24: 2181 2800 movel %d1,%a0@(00000000,%d2:l)
information->inactive =
47e28: 3540 0028 movew %d0,%a2@(40)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e2c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47e32: 4e5e unlk %fp
47e34: 4e75 rts
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47e36: 7e01 moveq #1,%d7
47e38: 6000 fe64 braw 47c9e <_Objects_Extend_information+0x5a>
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
47e3c: 2f00 movel %d0,%sp@-
47e3e: 4eb9 0004 9e38 jsr 49e38 <_Workspace_Allocate_or_fatal_error>
47e44: 588f addql #4,%sp
47e46: 2c00 movel %d0,%d6
47e48: 6000 fe88 braw 47cd2 <_Objects_Extend_information+0x8e>
/*
* 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,
47e4c: e58c lsll #2,%d4
47e4e: 2f04 movel %d4,%sp@-
47e50: 2f2a 002e movel %a2@(46),%sp@-
47e54: 2f0c movel %a4,%sp@-
47e56: 4eb9 0004 e384 jsr 4e384 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
47e5c: 2f04 movel %d4,%sp@-
47e5e: 2f2a 002a movel %a2@(42),%sp@-
47e62: 2f0d movel %a5,%sp@-
47e64: 4eb9 0004 e384 jsr 4e384 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
47e6a: 4280 clrl %d0
47e6c: 302a 000e movew %a2@(14),%d0
47e70: da80 addl %d0,%d5
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47e72: e58d lsll #2,%d5
47e74: 2f05 movel %d5,%sp@-
47e76: 2f2a 0018 movel %a2@(24),%sp@-
47e7a: 2f07 movel %d7,%sp@-
47e7c: 4eb9 0004 e384 jsr 4e384 <memcpy>
47e82: 4fef 0024 lea %sp@(36),%sp
47e86: 6000 fe9a braw 47d22 <_Objects_Extend_information+0xde>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47e8a: 4280 clrl %d0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47e8c: 2605 movel %d5,%d3
index_base = minimum_index;
block = 0;
47e8e: 4282 clrl %d2
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
47e90: 4284 clrl %d4
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47e92: 322a 000e movew %a2@(14),%d1
47e96: 302a 0012 movew %a2@(18),%d0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47e9a: 7e01 moveq #1,%d7
47e9c: 6000 fe00 braw 47c9e <_Objects_Extend_information+0x5a>
minimum_index = _Objects_Get_index( information->minimum_id );
47ea0: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index;
block = 0;
47ea2: 4282 clrl %d2 <== NOT EXECUTED
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
47ea4: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47eaa: 7e01 moveq #1,%d7 <== NOT EXECUTED
47eac: 6000 fdf0 braw 47c9e <_Objects_Extend_information+0x5a><== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
47eb0: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index;
block = 0;
47eb2: 4282 clrl %d2 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
47eb4: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
do_extend = false;
47eba: 4207 clrb %d7 <== NOT EXECUTED
47ebc: 6000 fde0 braw 47c9e <_Objects_Extend_information+0x5a><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
47ec0: 2f06 movel %d6,%sp@-
47ec2: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
return;
47ec8: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47eca: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47ed0: 4e5e unlk %fp <== NOT EXECUTED
00047f84 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
47f84: 4e56 0000 linkw %fp,#0
47f88: 2f02 movel %d2,%sp@-
47f8a: 342e 000e movew %fp@(14),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47f8e: 660a bnes 47f9a <_Objects_Get_information+0x16>
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
return NULL;
47f90: 4280 clrl %d0
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
47f92: 242e fffc movel %fp@(-4),%d2
47f96: 4e5e unlk %fp
47f98: 4e75 rts
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
47f9a: 2f2e 0008 movel %fp@(8),%sp@-
47f9e: 4eb9 0004 c170 jsr 4c170 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
47fa4: 588f addql #4,%sp
47fa6: 4a80 tstl %d0
47fa8: 67e6 beqs 47f90 <_Objects_Get_information+0xc>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47faa: 0282 0000 ffff andil #65535,%d2
47fb0: b480 cmpl %d0,%d2
47fb2: 62dc bhis 47f90 <_Objects_Get_information+0xc>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47fb4: 202e 0008 movel %fp@(8),%d0
47fb8: 41f9 0005 f404 lea 5f404 <_Objects_Information_table>,%a0
47fbe: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
47fc2: 4a88 tstl %a0
47fc4: 67ca beqs 47f90 <_Objects_Get_information+0xc> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47fc6: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
47fca: 67c6 beqs 47f92 <_Objects_Get_information+0xe> <== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47fcc: 2040 moveal %d0,%a0
47fce: 4a68 000e tstw %a0@(14)
47fd2: 56c1 sne %d1
#endif
return info;
}
47fd4: 242e fffc movel %fp@(-4),%d2
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47fd8: 49c1 extbl %d1
#endif
return info;
}
47fda: 4e5e unlk %fp
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47fdc: c081 andl %d1,%d0 <== NOT EXECUTED
#endif
return info;
}
00049a7c <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
49a7c: 4e56 ffe0 linkw %fp,#-32
49a80: 48d7 043c moveml %d2-%d5/%a2,%sp@
49a84: 262e 000c movel %fp@(12),%d3
49a88: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
49a8c: 4a83 tstl %d3
49a8e: 660e bnes 49a9e <_Objects_Get_name_as_string+0x22>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
49a90: 4282 clrl %d2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
49a92: 2002 movel %d2,%d0
49a94: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
49a9a: 4e5e unlk %fp
49a9c: 4e75 rts
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
49a9e: 4a82 tstl %d2
49aa0: 67f0 beqs 49a92 <_Objects_Get_name_as_string+0x16>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49aa2: 4aae 0008 tstl %fp@(8)
49aa6: 6600 00b0 bnew 49b58 <_Objects_Get_name_as_string+0xdc>
49aaa: 2079 0006 214c moveal 6214c <_Per_CPU_Information+0xc>,%a0
49ab0: 2828 0008 movel %a0@(8),%d4
information = _Objects_Get_information_id( tmpId );
49ab4: 2f04 movel %d4,%sp@-
49ab6: 4eb9 0004 9994 jsr 49994 <_Objects_Get_information_id>
if ( !information )
49abc: 588f addql #4,%sp
49abe: 4a80 tstl %d0
49ac0: 67ce beqs 49a90 <_Objects_Get_name_as_string+0x14>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
49ac2: 486e fffc pea %fp@(-4)
49ac6: 2f04 movel %d4,%sp@-
49ac8: 2f00 movel %d0,%sp@-
49aca: 4eb9 0004 9b6c jsr 49b6c <_Objects_Get>
switch ( location ) {
49ad0: 4fef 000c lea %sp@(12),%sp
49ad4: 4aae fffc tstl %fp@(-4)
49ad8: 66b6 bnes 49a90 <_Objects_Get_name_as_string+0x14>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49ada: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49adc: 7818 moveq #24,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49ade: 2a03 movel %d3,%d5
49ae0: 5385 subql #1,%d5
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49ae2: 2228 000c movel %a0@(12),%d1
lname[ 0 ] = (u32_name >> 24) & 0xff;
49ae6: 2001 movel %d1,%d0
49ae8: e8a8 lsrl %d4,%d0
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
49aea: 2801 movel %d1,%d4
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49aec: 2601 movel %d1,%d3
lname[ 2 ] = (u32_name >> 8) & 0xff;
49aee: e08c lsrl #8,%d4
lname[ 3 ] = (u32_name >> 0) & 0xff;
49af0: 1d41 fffa moveb %d1,%fp@(-6)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49af4: 4243 clrw %d3
49af6: 4843 swap %d3
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49af8: 4201 clrb %d1
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
49afa: 1d40 fff7 moveb %d0,%fp@(-9)
lname[ 1 ] = (u32_name >> 16) & 0xff;
49afe: 1d43 fff8 moveb %d3,%fp@(-8)
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b02: 1d44 fff9 moveb %d4,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b06: 1d41 fffb moveb %d1,%fp@(-5)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b0a: 4a85 tstl %d5
49b0c: 6752 beqs 49b60 <_Objects_Get_name_as_string+0xe4><== NEVER TAKEN
49b0e: 4a00 tstb %d0
49b10: 674e beqs 49b60 <_Objects_Get_name_as_string+0xe4>
49b12: 45ee fff8 lea %fp@(-8),%a2
49b16: 2042 moveal %d2,%a0
49b18: 4281 clrl %d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49b1a: 4283 clrl %d3
49b1c: 1600 moveb %d0,%d3
49b1e: 2279 0006 0534 moveal 60534 <__ctype_ptr__>,%a1
49b24: 1800 moveb %d0,%d4
49b26: 1031 3801 moveb %a1@(00000001,%d3:l),%d0
49b2a: 49c0 extbl %d0
49b2c: 0280 0000 0097 andil #151,%d0
49b32: 6602 bnes 49b36 <_Objects_Get_name_as_string+0xba>
49b34: 782a moveq #42,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b36: 5281 addql #1,%d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49b38: 10c4 moveb %d4,%a0@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b3a: 2248 moveal %a0,%a1
49b3c: ba81 cmpl %d1,%d5
49b3e: 6304 blss 49b44 <_Objects_Get_name_as_string+0xc8>
49b40: 101a moveb %a2@+,%d0
49b42: 66d6 bnes 49b1a <_Objects_Get_name_as_string+0x9e>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49b44: 4211 clrb %a1@
_Thread_Enable_dispatch();
49b46: 4eb9 0004 a782 jsr 4a782 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
49b4c: 2002 movel %d2,%d0
49b4e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
49b54: 4e5e unlk %fp
49b56: 4e75 rts
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49b58: 282e 0008 movel %fp@(8),%d4
49b5c: 6000 ff56 braw 49ab4 <_Objects_Get_name_as_string+0x38>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b60: 2242 moveal %d2,%a1
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49b62: 4211 clrb %a1@
_Thread_Enable_dispatch();
49b64: 4eb9 0004 a782 jsr 4a782 <_Thread_Enable_dispatch>
49b6a: 60e0 bras 49b4c <_Objects_Get_name_as_string+0xd0>
0005bb74 <_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;
5bb74: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5bb76: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5bb78: 4e56 0000 linkw %fp,#0
5bb7c: 206e 0008 moveal %fp@(8),%a0
/*
* 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;
5bb80: 90a8 0006 subl %a0@(6),%d0
5bb84: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5bb88: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5bb8c: 226e 0010 moveal %fp@(16),%a1
* 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;
if ( information->maximum >= index ) {
5bb90: b280 cmpl %d0,%d1
5bb92: 6510 bcss 5bba4 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5bb94: 2068 0018 moveal %a0@(24),%a0
5bb98: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
5bb9c: 6706 beqs 5bba4 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
5bb9e: 4291 clrl %a1@
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
return NULL;
}
5bba0: 4e5e unlk %fp
5bba2: 4e75 rts
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5bba4: 7001 moveq #1,%d0
return NULL;
}
5bba6: 4e5e unlk %fp
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5bba8: 2280 movel %d0,%a1@
return NULL;
5bbaa: 4280 clrl %d0
}
...
0004979c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
4979c: 4e56 fffc linkw %fp,#-4
497a0: 222e 0008 movel %fp@(8),%d1
497a4: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
497a6: 4a81 tstl %d1
497a8: 660a bnes 497b4 <_Objects_Id_to_name+0x18>
497aa: 2079 0006 12bc moveal 612bc <_Per_CPU_Information+0xc>,%a0
497b0: 2228 0008 movel %a0@(8),%d1
497b4: 7418 moveq #24,%d2
497b6: 2001 movel %d1,%d0
497b8: e4a8 lsrl %d2,%d0
497ba: 143c 0007 moveb #7,%d2
497be: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
497c0: 143c 0002 moveb #2,%d2
497c4: 2040 moveal %d0,%a0
497c6: 5388 subql #1,%a0
497c8: b488 cmpl %a0,%d2
497ca: 654a bcss 49816 <_Objects_Id_to_name+0x7a>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
497cc: 41f9 0006 10dc lea 610dc <_Objects_Information_table>,%a0
497d2: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
497d6: 4a88 tstl %a0
497d8: 673c beqs 49816 <_Objects_Id_to_name+0x7a>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
497da: 2001 movel %d1,%d0
497dc: 741b moveq #27,%d2
497de: e4a8 lsrl %d2,%d0
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
497e0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
if ( !information )
497e4: 6730 beqs 49816 <_Objects_Id_to_name+0x7a> <== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
497e6: 486e fffc pea %fp@(-4)
497ea: 2f01 movel %d1,%sp@-
497ec: 2f00 movel %d0,%sp@-
497ee: 4eb9 0004 9730 jsr 49730 <_Objects_Get>
if ( !the_object )
497f4: 4fef 000c lea %sp@(12),%sp
497f8: 4a80 tstl %d0
497fa: 671a beqs 49816 <_Objects_Id_to_name+0x7a>
return OBJECTS_INVALID_ID;
*name = the_object->name;
497fc: 206e 000c moveal %fp@(12),%a0
49800: 2240 moveal %d0,%a1
49802: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
49806: 4eb9 0004 a44a jsr 4a44a <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
4980c: 242e fff8 movel %fp@(-8),%d2
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
49810: 4280 clrl %d0
}
49812: 4e5e unlk %fp
49814: 4e75 rts
49816: 242e fff8 movel %fp@(-8),%d2
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
4981a: 7003 moveq #3,%d0
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
4981c: 4e5e unlk %fp <== NOT EXECUTED
0004821c <_Objects_Shrink_information>:
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
4821c: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
4821e: 4e56 ffec linkw %fp,#-20
48222: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
48226: 246e 0008 moveal %fp@(8),%a2
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
4822a: 4282 clrl %d2
block_count = (information->maximum - index_base) /
4822c: 4283 clrl %d3
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
4822e: 342a 0008 movew %a2@(8),%d2
block_count = (information->maximum - index_base) /
48232: 362a 000e movew %a2@(14),%d3
48236: 322a 0012 movew %a2@(18),%d1
4823a: 9682 subl %d2,%d3
4823c: 4c41 3003 remul %d1,%d3,%d3
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48240: 6774 beqs 482b6 <_Objects_Shrink_information+0x9a><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
48242: 206a 002a moveal %a2@(42),%a0
48246: b290 cmpl %a0@,%d1
48248: 677e beqs 482c8 <_Objects_Shrink_information+0xac><== NEVER TAKEN
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
4824a: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
4824c: 4280 clrl %d0
4824e: 5280 addql #1,%d0
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
48250: d481 addl %d1,%d2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48252: b083 cmpl %d3,%d0
48254: 6460 bccs 482b6 <_Objects_Shrink_information+0x9a>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
48256: 2800 movel %d0,%d4
48258: e58c lsll #2,%d4
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
4825a: b298 cmpl %a0@+,%d1
4825c: 66f0 bnes 4824e <_Objects_Shrink_information+0x32>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
4825e: 206a 001c moveal %a2@(28),%a0
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
48262: 47f9 0004 71bc lea 471bc <_Chain_Extract>,%a3
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
48268: 4280 clrl %d0
4826a: 3028 000a movew %a0@(10),%d0
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
4826e: 2610 movel %a0@,%d3
if ((index >= index_base) &&
48270: b480 cmpl %d0,%d2
48272: 620c bhis 48280 <_Objects_Shrink_information+0x64>
(index < (index_base + information->allocation_size))) {
48274: 4281 clrl %d1
48276: 322a 0012 movew %a2@(18),%d1
4827a: d282 addl %d2,%d1
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
4827c: b280 cmpl %d0,%d1
4827e: 6240 bhis 482c0 <_Objects_Shrink_information+0xa4>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
48280: 4a83 tstl %d3
48282: 6704 beqs 48288 <_Objects_Shrink_information+0x6c>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
48284: 2043 moveal %d3,%a0
48286: 60e0 bras 48268 <_Objects_Shrink_information+0x4c>
while ( the_object );
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
48288: 206a 002e moveal %a2@(46),%a0
4828c: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@-
48290: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
information->object_blocks[ block ] = NULL;
48296: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
4829a: 588f addql #4,%sp
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
4829c: 42b0 4800 clrl %a0@(00000000,%d4:l)
information->inactive_per_block[ block ] = 0;
482a0: 206a 002a moveal %a2@(42),%a0
information->inactive -= information->allocation_size;
482a4: 302a 0028 movew %a2@(40),%d0
482a8: 322a 0012 movew %a2@(18),%d1
* 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;
482ac: 42b0 4800 clrl %a0@(00000000,%d4:l)
information->inactive -= information->allocation_size;
482b0: 9081 subl %d1,%d0
482b2: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
482b6: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
482bc: 4e5e unlk %fp
482be: 4e75 rts
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
482c0: 2f08 movel %a0,%sp@-
482c2: 4e93 jsr %a3@
482c4: 588f addql #4,%sp
482c6: 60b8 bras 48280 <_Objects_Shrink_information+0x64>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
482c8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
482cc: 4284 clrl %d4 <== NOT EXECUTED
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
482ce: 47f9 0004 71bc lea 471bc <_Chain_Extract>,%a3 <== NOT EXECUTED
482d4: 6092 bras 48268 <_Objects_Shrink_information+0x4c><== NOT EXECUTED
...
0004bab6 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4bab6: 4e56 0000 linkw %fp,#0
4baba: 2f0a movel %a2,%sp@-
4babc: 246e 000c moveal %fp@(12),%a2
/*
* 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() )
4bac0: 4a39 0005 dbb4 tstb 5dbb4 <Configuration_RTEMS_API+0x4>
4bac6: 6758 beqs 4bb20 <_RTEMS_tasks_Create_extension+0x6a>
/*
* 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 );
4bac8: 705e moveq #94,%d0
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4baca: 2f00 movel %d0,%sp@-
4bacc: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !api )
4bad2: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4bad4: 2040 moveal %d0,%a0
if ( !api )
4bad6: 4a80 tstl %d0
4bad8: 6758 beqs 4bb32 <_RTEMS_tasks_Create_extension+0x7c>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4bada: 2540 00fc movel %d0,%a2@(252)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4bade: 4200 clrb %d0
api->pending_events = EVENT_SETS_NONE_PENDING;
4bae0: 4290 clrl %a0@
4bae2: 1140 0008 moveb %d0,%a0@(8)
api->event_condition = 0;
4bae6: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4baea: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4baee: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4baf2: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4baf6: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4bafa: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
4bafe: 42aa 0108 clrl %a2@(264)
if ( rtems_configuration_get_notepads_enabled() ) {
4bb02: 4a39 0005 dbb4 tstb 5dbb4 <Configuration_RTEMS_API+0x4>
4bb08: 670c beqs 4bb16 <_RTEMS_tasks_Create_extension+0x60>
* task is created via another API, then this routine is invoked
* and this API given the opportunity to initialize its extension
* area.
*/
bool _RTEMS_tasks_Create_extension(
4bb0a: 41e8 001e lea %a0@(30),%a0
4bb0e: 7010 moveq #16,%d0
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
4bb10: 4298 clrl %a0@+
4bb12: 5380 subql #1,%d0
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4bb14: 66fa bnes 4bb10 <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4bb16: 246e fffc moveal %fp@(-4),%a2
4bb1a: 4e5e unlk %fp
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
4bb1c: 7001 moveq #1,%d0
}
4bb1e: 4e75 rts
* 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() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
4bb20: 701e moveq #30,%d0
api = _Workspace_Allocate( to_allocate );
4bb22: 2f00 movel %d0,%sp@-
4bb24: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !api )
4bb2a: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4bb2c: 2040 moveal %d0,%a0
if ( !api )
4bb2e: 4a80 tstl %d0
4bb30: 66a8 bnes 4bada <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4bb32: 246e fffc moveal %fp@(-4),%a2
4bb36: 4e5e unlk %fp
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
4bb38: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
0004ba60 <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
4ba60: 4e56 fff4 linkw %fp,#-12
4ba64: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4ba68: 246e 000c moveal %fp@(12),%a2
4ba6c: 47f9 0004 bb88 lea 4bb88 <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
4ba72: 206a 0108 moveal %a2@(264),%a0
deleted->task_variables = NULL;
4ba76: 42aa 0108 clrl %a2@(264)
while (tvp) {
4ba7a: 4a88 tstl %a0
4ba7c: 671e beqs 4ba9c <_RTEMS_tasks_Delete_extension+0x3c>
next = (rtems_task_variable_t *)tvp->next;
4ba7e: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4ba80: 2f08 movel %a0,%sp@-
4ba82: 2f0a movel %a2,%sp@-
4ba84: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4ba86: 508f addql #8,%sp
4ba88: 4a82 tstl %d2
4ba8a: 6710 beqs 4ba9c <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
4ba8c: 2042 moveal %d2,%a0
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
4ba8e: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4ba90: 2f08 movel %a0,%sp@-
4ba92: 2f0a movel %a2,%sp@-
4ba94: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4ba96: 508f addql #8,%sp
4ba98: 4a82 tstl %d2
4ba9a: 66f0 bnes 4ba8c <_RTEMS_tasks_Delete_extension+0x2c>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
4ba9c: 2f2a 00fc movel %a2@(252),%sp@-
4baa0: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
4baa6: 588f addql #4,%sp
4baa8: 42aa 00fc clrl %a2@(252)
}
4baac: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4bab2: 4e5e unlk %fp <== NOT EXECUTED
00046b8c <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46b8c: 4e56 ffe4 linkw %fp,#-28
46b90: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
46b94: 2479 0005 dbda moveal 5dbda <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
46b9a: 2639 0005 dbd6 movel 5dbd6 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46ba0: 4a8a tstl %a2
46ba2: 6754 beqs 46bf8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46ba4: 4a83 tstl %d3
46ba6: 6750 beqs 46bf8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
46ba8: 280e movel %fp,%d4
46baa: 4282 clrl %d2
46bac: 5984 subql #4,%d4
46bae: 47f9 0004 6964 lea 46964 <rtems_task_create>,%a3
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46bb4: 49f9 0004 6c14 lea 46c14 <rtems_task_start>,%a4
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
46bba: 2f04 movel %d4,%sp@-
46bbc: 2f2a 000c movel %a2@(12),%sp@-
46bc0: 2f2a 0014 movel %a2@(20),%sp@-
46bc4: 2f2a 0004 movel %a2@(4),%sp@-
46bc8: 2f2a 0008 movel %a2@(8),%sp@-
46bcc: 2f12 movel %a2@,%sp@-
46bce: 4e93 jsr %a3@
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
46bd0: 4fef 0018 lea %sp@(24),%sp
46bd4: 4a80 tstl %d0
46bd6: 662a bnes 46c02 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46bd8: 2f2a 0018 movel %a2@(24),%sp@-
46bdc: 2f2a 0010 movel %a2@(16),%sp@-
46be0: 2f2e fffc movel %fp@(-4),%sp@-
46be4: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
46be6: 4fef 000c lea %sp@(12),%sp
46bea: 4a80 tstl %d0
46bec: 6614 bnes 46c02 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46bee: 5282 addql #1,%d2
46bf0: 45ea 001c lea %a2@(28),%a2
46bf4: b483 cmpl %d3,%d2
46bf6: 65c2 bcss 46bba <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
46bf8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
46bfe: 4e5e unlk %fp
46c00: 4e75 rts
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
46c02: 2f00 movel %d0,%sp@-
46c04: 4878 0001 pea 1 <ADD>
46c08: 4878 0001 pea 1 <ADD>
46c0c: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
...
0004b9e4 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4b9e4: 4e56 ffec linkw %fp,#-20
4b9e8: 206e 0008 moveal %fp@(8),%a0
4b9ec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4b9f0: 2468 00fc moveal %a0@(252),%a2
if ( !api )
4b9f4: 4a8a tstl %a2
4b9f6: 671a beqs 4ba12 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4b9f8: 203c 0000 0700 movel #1792,%d0
4b9fe: 40c1 movew %sr,%d1
4ba00: 8081 orl %d1,%d0
4ba02: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4ba04: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4ba08: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4ba0c: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4ba0e: 4a82 tstl %d2
4ba10: 660a bnes 4ba1c <_RTEMS_tasks_Post_switch_extension+0x38>
(*asr->handler)( signal_set );
asr->nest_level -= 1;
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
}
4ba12: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4ba18: 4e5e unlk %fp
4ba1a: 4e75 rts
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4ba1c: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ba20: 260e movel %fp,%d3
4ba22: 5983 subql #4,%d3
4ba24: 47f9 0004 d628 lea 4d628 <rtems_task_mode>,%a3
4ba2a: 2f03 movel %d3,%sp@-
4ba2c: 2f3c 0000 ffff movel #65535,%sp@-
4ba32: 2f2a 000e movel %a2@(14),%sp@-
4ba36: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4ba38: 2f02 movel %d2,%sp@-
4ba3a: 206a 000a moveal %a2@(10),%a0
4ba3e: 4e90 jsr %a0@
asr->nest_level -= 1;
4ba40: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ba44: 2f03 movel %d3,%sp@-
4ba46: 2f3c 0000 ffff movel #65535,%sp@-
4ba4c: 2f2e fffc movel %fp@(-4),%sp@-
4ba50: 4e93 jsr %a3@
4ba52: 4fef 001c lea %sp@(28),%sp
}
4ba56: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4ba5c: 4e5e unlk %fp <== NOT EXECUTED
0004b98a <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4b98a: 4e56 0000 linkw %fp,#0
4b98e: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4b992: 2068 0108 moveal %a0@(264),%a0
while (tvp) {
4b996: 4a88 tstl %a0
4b998: 6712 beqs 4b9ac <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4b99a: 2268 0004 moveal %a0@(4),%a1
4b99e: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4b9a2: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4b9a6: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4b9a8: 4a88 tstl %a0
4b9aa: 66ee bnes 4b99a <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
4b9ac: 206e 000c moveal %fp@(12),%a0
4b9b0: 2068 0108 moveal %a0@(264),%a0
while (tvp) {
4b9b4: 4a88 tstl %a0
4b9b6: 6712 beqs 4b9ca <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4b9b8: 2268 0004 moveal %a0@(4),%a1
4b9bc: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4b9c0: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4b9c4: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4b9c6: 4a88 tstl %a0
4b9c8: 66ee bnes 4b9b8 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4b9ca: 4e5e unlk %fp <== NOT EXECUTED
00047c84 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47c84: 4e56 fffc linkw %fp,#-4
47c88: 2f0a movel %a2,%sp@-
47c8a: 486e fffc pea %fp@(-4)
47c8e: 2f2e 0008 movel %fp@(8),%sp@-
47c92: 4879 0006 1440 pea 61440 <_Rate_monotonic_Information>
47c98: 4eb9 0004 9b68 jsr 49b68 <_Objects_Get>
/*
* 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 ) {
47c9e: 4fef 000c lea %sp@(12),%sp
47ca2: 2440 moveal %d0,%a2
47ca4: 4aae fffc tstl %fp@(-4)
47ca8: 6636 bnes 47ce0 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
47caa: 206a 0040 moveal %a2@(64),%a0
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
47cae: 2028 0010 movel %a0@(16),%d0
47cb2: 0280 0000 4000 andil #16384,%d0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47cb8: 670a beqs 47cc4 <_Rate_monotonic_Timeout+0x40>
47cba: 202a 0008 movel %a2@(8),%d0
47cbe: b0a8 0020 cmpl %a0@(32),%d0
47cc2: 675e beqs 47d22 <_Rate_monotonic_Timeout+0x9e>
_Thread_Unblock( the_thread );
_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 ) {
47cc4: 7001 moveq #1,%d0
47cc6: b0aa 0038 cmpl %a2@(56),%d0
47cca: 671c beqs 47ce8 <_Rate_monotonic_Timeout+0x64>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
47ccc: 7004 moveq #4,%d0
47cce: 2540 0038 movel %d0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47cd2: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47cd8: 5380 subql #1,%d0
47cda: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47ce0: 246e fff8 moveal %fp@(-8),%a2
47ce4: 4e5e unlk %fp
47ce6: 4e75 rts
_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;
47ce8: 103c 0003 moveb #3,%d0
47cec: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47cf0: 2f0a movel %a2,%sp@-
47cf2: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47cf8: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47cfe: 486a 0010 pea %a2@(16)
47d02: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
47d08: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
47d0e: 4fef 000c lea %sp@(12),%sp
47d12: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47d18: 5380 subql #1,%d0
47d1a: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
47d20: 60be bras 47ce0 <_Rate_monotonic_Timeout+0x5c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47d22: 2f3c 1003 fff8 movel #268697592,%sp@-
47d28: 2f08 movel %a0,%sp@-
47d2a: 4eb9 0004 a430 jsr 4a430 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
47d30: 2f0a movel %a2,%sp@-
47d32: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47d38: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47d3e: 486a 0010 pea %a2@(16)
47d42: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
47d48: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
47d4e: 4fef 0014 lea %sp@(20),%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47d52: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47d58: 5380 subql #1,%d0
47d5a: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
47d60: 6000 ff7e braw 47ce0 <_Rate_monotonic_Timeout+0x5c>
00048360 <_Scheduler_Handler_initialization>:
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
48360: 4e56 0000 linkw %fp,#0
(*_Scheduler.Operations.initialize)();
}
48364: 4e5e unlk %fp
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
(*_Scheduler.Operations.initialize)();
48366: 2279 0005 db14 moveal 5db14 <_Scheduler+0x4>,%a1
4836c: 4ed1 jmp %a1@
...
0004838c <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
4838c: 4e56 0000 linkw %fp,#0
48390: 206e 0008 moveal %fp@(8),%a0
48394: 2f0b movel %a3,%sp@-
48396: 2f0a movel %a2,%sp@-
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
48398: 2468 008a moveal %a0@(138),%a2
ready = sched_info->ready_chain;
4839c: 2252 moveal %a2@,%a1
if ( _Chain_Has_only_one_node( ready ) ) {
4839e: 2029 0008 movel %a1@(8),%d0
483a2: b091 cmpl %a1@,%d0
483a4: 6700 0084 beqw 4842a <_Scheduler_priority_Block+0x9e>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
483a8: 2450 moveal %a0@,%a2
previous = the_node->previous;
483aa: 2268 0004 moveal %a0@(4),%a1
next->previous = previous;
483ae: 2549 0004 movel %a1,%a2@(4)
previous->next = next;
483b2: 228a movel %a2,%a1@
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
483b4: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
483ba: 6720 beqs 483dc <_Scheduler_priority_Block+0x50>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
483bc: b1f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a0
483c2: 6708 beqs 483cc <_Scheduler_priority_Block+0x40>
_Thread_Dispatch_necessary = true;
}
483c4: 245f moveal %sp@+,%a2
483c6: 265f moveal %sp@+,%a3
483c8: 4e5e unlk %fp
483ca: 4e75 rts
483cc: 245f moveal %sp@+,%a2
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
483ce: 7001 moveq #1,%d0
}
483d0: 265f moveal %sp@+,%a3
483d2: 4e5e unlk %fp
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
483d4: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
}
483da: 4e75 rts
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
483dc: 3039 0005 f5f4 movew 5f5f4 <_Priority_Major_bit_map>,%d0
483e2: 4840 swap %d0
483e4: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
483e6: 43f9 0005 f5f8 lea 5f5f8 <_Priority_Bit_map>,%a1
483ec: 0280 0000 ffff andil #65535,%d0
483f2: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1
483f6: 4841 swap %d1
483f8: 04c1 ff1 %d1
483fa: 2279 0005 db10 moveal 5db10 <_Scheduler>,%a1
return (_Priority_Bits_index( major ) << 4) +
48400: 0281 0000 ffff andil #65535,%d1
48406: e988 lsll #4,%d0
48408: d081 addl %d1,%d0
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
4840a: 2200 movel %d0,%d1
4840c: e988 lsll #4,%d0
4840e: e589 lsll #2,%d1
48410: 9081 subl %d1,%d0
48412: d3c0 addal %d0,%a1
48414: 2019 movel %a1@+,%d0
48416: b3c0 cmpal %d0,%a1
48418: 6750 beqs 4846a <_Scheduler_priority_Block+0xde> <== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
4841a: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10>
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
48420: b1f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a0
48426: 669c bnes 483c4 <_Scheduler_priority_Block+0x38>
48428: 60a2 bras 483cc <_Scheduler_priority_Block+0x40>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4842a: 2009 movel %a1,%d0
4842c: 5880 addql #4,%d0
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
4842e: 266a 0004 moveal %a2@(4),%a3
48432: 2280 movel %d0,%a1@
48434: 302a 000e movew %a2@(14),%d0
head->next = tail;
head->previous = NULL;
48438: 42a9 0004 clrl %a1@(4)
tail->previous = head;
4843c: 2349 0008 movel %a1,%a1@(8)
48440: 3213 movew %a3@,%d1
48442: c081 andl %d1,%d0
48444: 3680 movew %d0,%a3@
if ( *the_priority_map->minor == 0 )
48446: 6600 ff6c bnew 483b4 <_Scheduler_priority_Block+0x28>
_Priority_Major_bit_map &= the_priority_map->block_major;
4844a: 3239 0005 f5f4 movew 5f5f4 <_Priority_Major_bit_map>,%d1
48450: 302a 000c movew %a2@(12),%d0
48454: c081 andl %d1,%d0
48456: 33c0 0005 f5f4 movew %d0,5f5f4 <_Priority_Major_bit_map>
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
4845c: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
48462: 6600 ff58 bnew 483bc <_Scheduler_priority_Block+0x30>
48466: 6000 ff74 braw 483dc <_Scheduler_priority_Block+0x50>
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
4846a: 4280 clrl %d0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
4846c: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10> <== NOT EXECUTED
48472: 60ac bras 48420 <_Scheduler_priority_Block+0x94> <== NOT EXECUTED
00048568 <_Scheduler_priority_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
48568: 4e56 0000 linkw %fp,#0
4856c: 206e 0008 moveal %fp@(8),%a0
_Workspace_Free( the_thread->scheduler_info );
48570: 2d68 008a 0008 movel %a0@(138),%fp@(8)
}
48576: 4e5e unlk %fp
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
48578: 4ef9 0004 9e1e jmp 49e1e <_Workspace_Free>
...
000485e8 <_Scheduler_priority_Schedule>:
#include <rtems/system.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
485e8: 4e56 0000 linkw %fp,#0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
485ec: 3039 0005 f5f4 movew 5f5f4 <_Priority_Major_bit_map>,%d0
485f2: 4840 swap %d0
485f4: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
485f6: 41f9 0005 f5f8 lea 5f5f8 <_Priority_Bit_map>,%a0
485fc: 0280 0000 ffff andil #65535,%d0
48602: 3230 0a00 movew %a0@(00000000,%d0:l:2),%d1
48606: 4841 swap %d1
48608: 04c1 ff1 %d1
_Scheduler_priority_Schedule_body();
}
4860a: 2079 0005 db10 moveal 5db10 <_Scheduler>,%a0
return (_Priority_Bits_index( major ) << 4) +
48610: 0281 0000 ffff andil #65535,%d1
48616: e988 lsll #4,%d0
48618: d081 addl %d1,%d0
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
4861a: 2200 movel %d0,%d1
4861c: e988 lsll #4,%d0
4861e: e589 lsll #2,%d1
48620: 9081 subl %d1,%d0
48622: d1c0 addal %d0,%a0
48624: 2018 movel %a0@+,%d0
48626: b1c0 cmpal %d0,%a0
48628: 670a beqs 48634 <_Scheduler_priority_Schedule+0x4c><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
4862a: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10>
48630: 4e5e unlk %fp
48632: 4e75 rts
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
48634: 4280 clrl %d0 <== NOT EXECUTED
48636: 4e5e unlk %fp <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
48638: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10> <== NOT EXECUTED
00048730 <_Scheduler_priority_Yield>:
* ready chain
* select heir
*/
void _Scheduler_priority_Yield(void)
{
48730: 4e56 fff0 linkw %fp,#-16
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
48734: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
* ready chain
* select heir
*/
void _Scheduler_priority_Yield(void)
{
4873a: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
4873e: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
48742: 243c 0000 0700 movel #1792,%d2
48748: 2002 movel %d2,%d0
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
4874a: 2251 moveal %a1@,%a1
_ISR_Disable( level );
4874c: 40c1 movew %sr,%d1
4874e: 8081 orl %d1,%d0
48750: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
48752: 2029 0008 movel %a1@(8),%d0
48756: b091 cmpl %a1@,%d0
48758: 6750 beqs 487aa <_Scheduler_priority_Yield+0x7a>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4875a: 2850 moveal %a0@,%a4
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
4875c: 2009 movel %a1,%d0
4875e: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
48760: 2668 0004 moveal %a0@(4),%a3
next->previous = previous;
48764: 294b 0004 movel %a3,%a4@(4)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
48768: 2469 0008 moveal %a1@(8),%a2
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
4876c: 268c movel %a4,%a3@
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
4876e: 2348 0008 movel %a0,%a1@(8)
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
48772: 2080 movel %d0,%a0@
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
48774: 214a 0004 movel %a2,%a0@(4)
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
48778: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
4877a: 46c1 movew %d1,%sr
4877c: 8481 orl %d1,%d2
4877e: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
48780: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
48786: 6712 beqs 4879a <_Scheduler_priority_Yield+0x6a> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
48788: 7001 moveq #1,%d0 <== NOT EXECUTED
4878a: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18> <== NOT EXECUTED
_ISR_Enable( level );
48790: 46c1 movew %d1,%sr
}
48792: 4cd7 1c04 moveml %sp@,%d2/%a2-%a4
48796: 4e5e unlk %fp
48798: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
4879a: 23d1 0005 f5e8 movel %a1@,5f5e8 <_Per_CPU_Information+0x10>
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
487a0: 7001 moveq #1,%d0
487a2: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
487a8: 60e6 bras 48790 <_Scheduler_priority_Yield+0x60>
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
487aa: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
487b0: 67de beqs 48790 <_Scheduler_priority_Yield+0x60> <== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
487b2: 7001 moveq #1,%d0 <== NOT EXECUTED
487b4: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18> <== NOT EXECUTED
487ba: 60d4 bras 48790 <_Scheduler_priority_Yield+0x60> <== NOT EXECUTED
00048974 <_Scheduler_simple_Block>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Block(
Thread_Control *the_thread
)
{
48974: 4e56 0000 linkw %fp,#0
48978: 2f02 movel %d2,%sp@-
4897a: 242e 0008 movel %fp@(8),%d2
_Scheduler_simple_Extract(the_thread);
4897e: 2f02 movel %d2,%sp@-
48980: 4eb9 0004 89d8 jsr 489d8 <_Scheduler_simple_Extract>
if ( _Thread_Is_heir( the_thread ) )
48986: 588f addql #4,%sp
48988: b4b9 0006 0140 cmpl 60140 <_Per_CPU_Information+0x10>,%d2
4898e: 6720 beqs 489b0 <_Scheduler_simple_Block+0x3c>
_Scheduler_simple_Schedule();
if ( _Thread_Is_executing( the_thread ) )
48990: b4b9 0006 013c cmpl 6013c <_Per_CPU_Information+0xc>,%d2
48996: 6708 beqs 489a0 <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
}
48998: 242e fffc movel %fp@(-4),%d2
4899c: 4e5e unlk %fp
4899e: 4e75 rts
489a0: 242e fffc movel %fp@(-4),%d2
489a4: 4e5e unlk %fp
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_simple_Schedule();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
489a6: 7001 moveq #1,%d0
489a8: 13c0 0006 0148 moveb %d0,60148 <_Per_CPU_Information+0x18>
}
489ae: 4e75 rts
)
{
_Scheduler_simple_Extract(the_thread);
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_simple_Schedule();
489b0: 4eb9 0004 8ac0 jsr 48ac0 <_Scheduler_simple_Schedule>
if ( _Thread_Is_executing( the_thread ) )
489b6: b4b9 0006 013c cmpl 6013c <_Per_CPU_Information+0xc>,%d2
489bc: 66da bnes 48998 <_Scheduler_simple_Block+0x24> <== NEVER TAKEN
489be: 60e0 bras 489a0 <_Scheduler_simple_Block+0x2c>
00048a34 <_Scheduler_simple_Ready_queue_Enqueue_first>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Ready_queue_Enqueue_first(
Thread_Control *the_thread
)
{
48a34: 4e56 0000 linkw %fp,#0
48a38: 226e 0008 moveal %fp@(8),%a1
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
48a3c: 2079 0005 e5f0 moveal 5e5f0 <_Scheduler>,%a0
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Ready_queue_Enqueue_first(
Thread_Control *the_thread
)
{
48a42: 2f0a movel %a2,%sp@-
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
48a44: 2029 0014 movel %a1@(20),%d0
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
48a48: 2050 moveal %a0@,%a0
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
48a4a: b0a8 0014 cmpl %a0@(20),%d0
48a4e: 6308 blss 48a58 <_Scheduler_simple_Ready_queue_Enqueue_first+0x24>
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
48a50: 2050 moveal %a0@,%a0
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
48a52: b0a8 0014 cmpl %a0@(20),%d0
48a56: 62f8 bhis 48a50 <_Scheduler_simple_Ready_queue_Enqueue_first+0x1c><== NEVER TAKEN
current = (Thread_Control *)current->Object.Node.previous;
48a58: 2068 0004 moveal %a0@(4),%a0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
48a5c: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
48a5e: 2348 0004 movel %a0,%a1@(4)
before_node = after_node->next;
after_node->next = the_node;
48a62: 2089 movel %a1,%a0@
the_node->next = before_node;
before_node->previous = the_node;
48a64: 2549 0004 movel %a1,%a2@(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;
48a68: 228a movel %a2,%a1@
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
48a6a: 245f moveal %sp@+,%a2
48a6c: 4e5e unlk %fp <== NOT EXECUTED
00048fd8 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
48fd8: 4e56 0000 linkw %fp,#0
48fdc: 2039 0006 1f78 movel 61f78 <_Thread_Dispatch_disable_level>,%d0
48fe2: 5280 addql #1,%d0
48fe4: 2f0a movel %a2,%sp@-
48fe6: 246e 0008 moveal %fp@(8),%a2
48fea: 23c0 0006 1f78 movel %d0,61f78 <_Thread_Dispatch_disable_level>
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
48ff0: 2039 0006 2002 movel 62002 <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
48ff6: 2212 movel %a2@,%d1
48ff8: b280 cmpl %d0,%d1
48ffa: 6d38 blts 49034 <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
48ffc: 9280 subl %d0,%d1
48ffe: 2f01 movel %d1,%sp@-
49000: 42a7 clrl %sp@-
49002: 4879 0006 202c pea 6202c <_Watchdog_Seconds_chain>
49008: 4eb9 0004 b700 jsr 4b700 <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
4900e: 23d2 0006 2002 movel %a2@,62002 <_TOD_Now>
49014: 588a addql #4,%a2
49016: 4fef 000c lea %sp@(12),%sp
4901a: 23d2 0006 2006 movel %a2@,62006 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
49020: 246e fffc moveal %fp@(-4),%a2
49024: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
49026: 7001 moveq #1,%d0
49028: 13c0 0006 1f88 moveb %d0,61f88 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
4902e: 4ef9 0004 a782 jmp 4a782 <_Thread_Enable_dispatch>
49034: 9081 subl %d1,%d0
49036: 2f00 movel %d0,%sp@-
49038: 4878 0001 pea 1 <ADD>
4903c: 4879 0006 202c pea 6202c <_Watchdog_Seconds_chain>
49042: 4eb9 0004 b700 jsr 4b700 <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
49048: 23d2 0006 2002 movel %a2@,62002 <_TOD_Now>
4904e: 588a addql #4,%a2
49050: 4fef 000c lea %sp@(12),%sp
49054: 23d2 0006 2006 movel %a2@,62006 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
4905a: 246e fffc moveal %fp@(-4),%a2
4905e: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
49060: 7001 moveq #1,%d0
49062: 13c0 0006 1f88 moveb %d0,61f88 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
49068: 4ef9 0004 a782 jmp 4a782 <_Thread_Enable_dispatch>
...
00047690 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
47690: 4e56 ffec linkw %fp,#-20
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
47694: 2239 0005 dbf0 movel 5dbf0 <Configuration+0xc>,%d1
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
4769a: 48d7 040c moveml %d2-%d3/%a2,%sp@
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
4769e: 240e movel %fp,%d2
476a0: 5182 subql #8,%d2
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
476a2: 263c 0000 03e8 movel #1000,%d3
476a8: 4c03 1800 mulsl %d3,%d1
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
476ac: 45f9 0004 97dc lea 497dc <_Timespec_Add_to>,%a2
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
476b2: 2039 0005 f550 movel 5f550 <_Watchdog_Ticks_since_boot>,%d0
476b8: 5280 addql #1,%d0
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
476ba: 2f02 movel %d2,%sp@-
476bc: 4879 0005 f4c2 pea 5f4c2 <_TOD_Uptime>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
476c2: 2d41 fffc movel %d1,%fp@(-4)
476c6: 42ae fff8 clrl %fp@(-8)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
476ca: 23c0 0005 f550 movel %d0,5f550 <_Watchdog_Ticks_since_boot>
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
476d0: 4e92 jsr %a2@
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
476d2: 2f02 movel %d2,%sp@-
476d4: 4879 0005 f4d2 pea 5f4d2 <_TOD_Now>
476da: 4e92 jsr %a2@
while ( seconds ) {
476dc: 4fef 0010 lea %sp@(16),%sp
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
476e0: 2400 movel %d0,%d2
while ( seconds ) {
476e2: 6716 beqs 476fa <_TOD_Tickle_ticks+0x6a>
476e4: 45f9 0004 9d20 lea 49d20 <_Watchdog_Tickle>,%a2
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
476ea: 4879 0005 f4fc pea 5f4fc <_Watchdog_Seconds_chain>
_Watchdog_Tickle_seconds();
seconds--;
476f0: 5382 subql #1,%d2
476f2: 4e92 jsr %a2@
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
476f4: 588f addql #4,%sp
476f6: 4a82 tstl %d2
476f8: 66f0 bnes 476ea <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
476fa: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
47700: 4e5e unlk %fp <== NOT EXECUTED
000476b8 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
476b8: 4e56 0000 linkw %fp,#0
476bc: 206e 0008 moveal %fp@(8),%a0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
476c0: 2039 0006 0330 movel 60330 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
476c6: 2f02 movel %d2,%sp@-
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
476c8: 4a88 tstl %a0
476ca: 6762 beqs 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
476cc: 243c 000f 4240 movel #1000000,%d2
476d2: 4c40 2002 remul %d0,%d2,%d2
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
476d6: b4a8 0018 cmpl %a0@(24),%d2
476da: 6352 blss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
476dc: 703b moveq #59,%d0
476de: b0a8 0014 cmpl %a0@(20),%d0
476e2: 654a bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
476e4: b0a8 0010 cmpl %a0@(16),%d0
476e8: 6544 bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
476ea: 7217 moveq #23,%d1
476ec: b2a8 000c cmpl %a0@(12),%d1
476f0: 653c bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
476f2: 2028 0004 movel %a0@(4),%d0
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
476f6: 6736 beqs 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month == 0) ||
476f8: 740c moveq #12,%d2
476fa: b480 cmpl %d0,%d2
476fc: 6530 bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
476fe: 2210 movel %a0@,%d1
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
47700: 0c81 0000 07c3 cmpil #1987,%d1
47706: 6326 blss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
47708: 2068 0008 moveal %a0@(8),%a0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
4770c: 4a88 tstl %a0
4770e: 671e beqs 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
47710: 143c 0003 moveb #3,%d2
47714: c282 andl %d2,%d1
47716: 661e bnes 47736 <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
47718: 43f9 0005 f4b6 lea 5f4b6 <_TOD_Days_per_month>,%a1
4771e: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
47722: b1c0 cmpal %d0,%a0
47724: 53c0 sls %d0
47726: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
47728: 241f movel %sp@+,%d2
4772a: 4e5e unlk %fp
4772c: 4e75 rts
4772e: 241f movel %sp@+,%d2
47730: 4e5e unlk %fp
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
47732: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
47734: 4e75 rts
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
47736: 43f9 0005 f4b6 lea 5f4b6 <_TOD_Days_per_month>,%a1
4773c: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
47740: b1c0 cmpal %d0,%a0
47742: 53c0 sls %d0
47744: 4480 negl %d0
47746: 60e0 bras 47728 <_TOD_Validate+0x70>
00048824 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48824: 4e56 fff0 linkw %fp,#-16
48828: 48d7 041c moveml %d2-%d4/%a2,%sp@
4882c: 246e 0008 moveal %fp@(8),%a2
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
48830: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48834: 242e 000c movel %fp@(12),%d2
/*
* 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 );
48838: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4883a: 182e 0013 moveb %fp@(19),%d4
/*
* 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 );
4883e: 4eb9 0004 9608 jsr 49608 <_Thread_Set_transient>
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
48844: 588f addql #4,%sp
48846: b4aa 0014 cmpl %a2@(20),%d2
4884a: 670c beqs 48858 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
4884c: 2f02 movel %d2,%sp@-
4884e: 2f0a movel %a2,%sp@-
48850: 4eb9 0004 95a4 jsr 495a4 <_Thread_Set_priority>
48856: 508f addql #8,%sp
_ISR_Disable( level );
48858: 203c 0000 0700 movel #1792,%d0
4885e: 40c2 movew %sr,%d2
48860: 8082 orl %d2,%d0
48862: 46c0 movew %d0,%sr
/*
* 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;
48864: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
48868: 7204 moveq #4,%d1
4886a: b280 cmpl %d0,%d1
4886c: 6738 beqs 488a6 <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
4886e: 44c3 movew %d3,%ccr
48870: 6708 beqs 4887a <_Thread_Change_priority+0x56> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
48872: 72fb moveq #-5,%d1
48874: c280 andl %d0,%d1
48876: 2541 0010 movel %d1,%a2@(16)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
4887a: 46c2 movew %d2,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
4887c: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
48882: 660a bnes 4888e <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
48884: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4888a: 4e5e unlk %fp
4888c: 4e75 rts
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
4888e: 2d4a 000c movel %a2,%fp@(12)
48892: 2d6a 0044 0008 movel %a2@(68),%fp@(8)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
48898: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4889e: 4e5e unlk %fp
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
488a0: 4ef9 0004 94f8 jmp 494f8 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
488a6: 44c3 movew %d3,%ccr
488a8: 6714 beqs 488be <_Thread_Change_priority+0x9a> <== NEVER TAKEN
* 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 );
488aa: 42aa 0010 clrl %a2@(16)
if ( prepend_it )
488ae: 4a04 tstb %d4
488b0: 6748 beqs 488fa <_Thread_Change_priority+0xd6>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
488b2: 2f0a movel %a2,%sp@-
488b4: 2079 0005 db38 moveal 5db38 <_Scheduler+0x28>,%a0
488ba: 4e90 jsr %a0@
488bc: 588f addql #4,%sp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
488be: 203c 0000 0700 movel #1792,%d0
488c4: 46c2 movew %d2,%sr
488c6: 8082 orl %d2,%d0
488c8: 46c0 movew %d0,%sr
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
488ca: 2079 0005 db18 moveal 5db18 <_Scheduler+0x8>,%a0
488d0: 4e90 jsr %a0@
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
488d2: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
488d8: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
488de: 670e beqs 488ee <_Thread_Change_priority+0xca>
488e0: 4a28 0074 tstb %a0@(116)
488e4: 6708 beqs 488ee <_Thread_Change_priority+0xca>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
488e6: 7001 moveq #1,%d0
488e8: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
_ISR_Enable( level );
488ee: 46c2 movew %d2,%sr
}
488f0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
488f6: 4e5e unlk %fp
488f8: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
488fa: 2f0a movel %a2,%sp@-
488fc: 2079 0005 db34 moveal 5db34 <_Scheduler+0x24>,%a0
48902: 4e90 jsr %a0@
48904: 588f addql #4,%sp
48906: 60b6 bras 488be <_Thread_Change_priority+0x9a>
00048964 <_Thread_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
48964: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
48966: 4e56 0000 linkw %fp,#0
4896a: 2f0b movel %a3,%sp@-
4896c: 266e 0008 moveal %fp@(8),%a3
48970: 2f0a movel %a2,%sp@-
48972: 246e 000c moveal %fp@(12),%a2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48976: 206b 0018 moveal %a3@(24),%a0
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
4897a: 302a 000a movew %a2@(10),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4897e: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
48982: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
48988: 5380 subql #1,%d0
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
4898a: 2f0a movel %a2,%sp@-
4898c: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
48992: 4eb9 0004 9a60 jsr 49a60 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
48998: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
4899e: 5280 addql #1,%d0
489a0: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
489a6: 2f0a movel %a2,%sp@-
489a8: 2f0b movel %a3,%sp@-
489aa: 4eb9 0004 7c18 jsr 47c18 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
489b0: 4878 0001 pea 1 <ADD>
489b4: 2f0a movel %a2,%sp@-
489b6: 4eb9 0004 95bc jsr 495bc <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
489bc: 2f0a movel %a2,%sp@-
489be: 4eb9 0004 93f4 jsr 493f4 <_Thread_queue_Extract_with_proxy>
489c4: 4fef 0018 lea %sp@(24),%sp
489c8: 4a00 tstb %d0
489ca: 660a bnes 489d6 <_Thread_Close+0x72>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
489cc: 7002 moveq #2,%d0
489ce: b0aa 0050 cmpl %a2@(80),%d0
489d2: 6700 0088 beqw 48a5c <_Thread_Close+0xf8>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Free(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.free( the_thread );
489d6: 2f0a movel %a2,%sp@-
489d8: 2079 0005 db2c moveal 5db2c <_Scheduler+0x1c>,%a0
489de: 4e90 jsr %a0@
/*
* The thread might have been FP. So deal with that.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
489e0: 588f addql #4,%sp
489e2: b5f9 0005 f4ca cmpal 5f4ca <_Thread_Allocated_fp>,%a2
489e8: 6736 beqs 48a20 <_Thread_Close+0xbc>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
_Workspace_Free( the_thread->Start.fp_context );
489ea: 2f2a 00b8 movel %a2@(184),%sp@-
489ee: 47f9 0004 9e1e lea 49e1e <_Workspace_Free>,%a3
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
489f4: 42aa 00f4 clrl %a2@(244)
_Workspace_Free( the_thread->Start.fp_context );
489f8: 4e93 jsr %a3@
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
489fa: 2f0a movel %a2,%sp@-
489fc: 4eb9 0004 96b4 jsr 496b4 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
48a02: 2f2a 0104 movel %a2@(260),%sp@-
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
48a06: 42aa 00bc clrl %a2@(188)
_Workspace_Free( the_thread->extensions );
48a0a: 4e93 jsr %a3@
the_thread->extensions = NULL;
}
48a0c: 266e fffc moveal %fp@(-4),%a3
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
48a10: 4fef 000c lea %sp@(12),%sp
48a14: 42aa 0104 clrl %a2@(260)
}
48a18: 246e fff8 moveal %fp@(-8),%a2
48a1c: 4e5e unlk %fp
48a1e: 4e75 rts
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
_Workspace_Free( the_thread->Start.fp_context );
48a20: 2f2a 00b8 movel %a2@(184),%sp@-
48a24: 47f9 0004 9e1e lea 49e1e <_Workspace_Free>,%a3
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
48a2a: 42aa 00f4 clrl %a2@(244)
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
48a2e: 42b9 0005 f4ca clrl 5f4ca <_Thread_Allocated_fp>
_Workspace_Free( the_thread->Start.fp_context );
48a34: 4e93 jsr %a3@
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
48a36: 2f0a movel %a2,%sp@-
48a38: 4eb9 0004 96b4 jsr 496b4 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
48a3e: 2f2a 0104 movel %a2@(260),%sp@-
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
48a42: 42aa 00bc clrl %a2@(188)
_Workspace_Free( the_thread->extensions );
48a46: 4e93 jsr %a3@
the_thread->extensions = NULL;
}
48a48: 266e fffc moveal %fp@(-4),%a3
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
48a4c: 4fef 000c lea %sp@(12),%sp
48a50: 42aa 0104 clrl %a2@(260)
}
48a54: 246e fff8 moveal %fp@(-8),%a2
48a58: 4e5e unlk %fp
48a5a: 4e75 rts
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
48a5c: 486a 0048 pea %a2@(72)
48a60: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
48a66: 588f addql #4,%sp
48a68: 2079 0005 db2c moveal 5db2c <_Scheduler+0x1c>,%a0
48a6e: 2f0a movel %a2,%sp@-
48a70: 4e90 jsr %a0@
/*
* The thread might have been FP. So deal with that.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
48a72: 588f addql #4,%sp
48a74: b5f9 0005 f4ca cmpal 5f4ca <_Thread_Allocated_fp>,%a2
48a7a: 6600 ff6e bnew 489ea <_Thread_Close+0x86>
48a7e: 60a0 bras 48a20 <_Thread_Close+0xbc> <== NOT EXECUTED
00048b30 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48b30: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
48b34: 486e fffc pea %fp@(-4)
48b38: 2f2e 0008 movel %fp@(8),%sp@-
48b3c: 4eb9 0004 8cfc jsr 48cfc <_Thread_Get>
switch ( location ) {
48b42: 508f addql #8,%sp
48b44: 4aae fffc tstl %fp@(-4)
48b48: 661e bnes 48b68 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
48b4a: 2f3c 1000 0018 movel #268435480,%sp@-
48b50: 2f00 movel %d0,%sp@-
48b52: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
48b58: 508f addql #8,%sp
48b5a: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
48b60: 5380 subql #1,%d0
48b62: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
48b68: 4e5e unlk %fp <== NOT EXECUTED
00048b6c <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
48b6c: 4e56 ffc8 linkw %fp,#-56
48b70: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
48b74: 283c 0000 0700 movel #1792,%d4
48b7a: 2004 movel %d4,%d0
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
48b7c: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
48b82: 40c1 movew %sr,%d1
48b84: 8081 orl %d1,%d0
48b86: 46c0 movew %d0,%sr
while ( _Thread_Dispatch_necessary == true ) {
48b88: 1039 0005 f5f0 moveb 5f5f0 <_Per_CPU_Information+0x18>,%d0
48b8e: 6700 0120 beqw 48cb0 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48b92: 7001 moveq #1,%d0
48b94: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
48b9a: 2679 0005 f5e8 moveal 5f5e8 <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48ba0: 4200 clrb %d0
_Thread_Executing = heir;
48ba2: 23cb 0005 f5e4 movel %a3,5f5e4 <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48ba8: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
48bae: b7ca cmpal %a2,%a3
48bb0: 6700 00fe beqw 48cb0 <_Thread_Dispatch+0x144>
48bb4: 260e movel %fp,%d3
48bb6: 240e movel %fp,%d2
48bb8: 5183 subql #8,%d3
48bba: 2e3c 0004 bdf8 movel #310776,%d7
48bc0: 0682 ffff fff0 addil #-16,%d2
48bc6: 2c3c 0004 9824 movel #301092,%d6
48bcc: 2a3c 0004 97dc movel #301020,%d5
48bd2: 4bf9 0004 9aec lea 49aec <_User_extensions_Thread_switch>,%a5
48bd8: 49f9 0004 9e6c lea 49e6c <_CPU_Context_switch>,%a4
*/
#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 )
48bde: 7001 moveq #1,%d0
48be0: b0ab 007a cmpl %a3@(122),%d0
48be4: 6700 00e2 beqw 48cc8 <_Thread_Dispatch+0x15c>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
48be8: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
48bea: 2f03 movel %d3,%sp@-
48bec: 2047 moveal %d7,%a0
48bee: 4e90 jsr %a0@
_Timestamp_Subtract(
48bf0: 2046 moveal %d6,%a0
48bf2: 2f02 movel %d2,%sp@-
48bf4: 2f03 movel %d3,%sp@-
48bf6: 4879 0005 f4f4 pea 5f4f4 <_Thread_Time_of_last_context_switch>
48bfc: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
48bfe: 2045 moveal %d5,%a0
48c00: 2f02 movel %d2,%sp@-
48c02: 486a 0082 pea %a2@(130)
48c06: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
48c08: 2079 0005 f4ce moveal 5f4ce <_Thread_libc_reent>,%a0
48c0e: 4fef 0018 lea %sp@(24),%sp
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
48c12: 202e fff8 movel %fp@(-8),%d0
48c16: 222e fffc movel %fp@(-4),%d1
48c1a: 23c0 0005 f4f4 movel %d0,5f4f4 <_Thread_Time_of_last_context_switch>
48c20: 23c1 0005 f4f8 movel %d1,5f4f8 <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
48c26: 4a88 tstl %a0
48c28: 6708 beqs 48c32 <_Thread_Dispatch+0xc6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
48c2a: 2550 00f8 movel %a0@,%a2@(248)
*_Thread_libc_reent = heir->libc_reent;
48c2e: 20ab 00f8 movel %a3@(248),%a0@
}
_User_extensions_Thread_switch( executing, heir );
48c32: 2f0b movel %a3,%sp@-
48c34: 2f0a movel %a2,%sp@-
48c36: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
48c38: 486b 00c0 pea %a3@(192)
48c3c: 486a 00c0 pea %a2@(192)
48c40: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
48c42: 4fef 0010 lea %sp@(16),%sp
48c46: 4aaa 00f4 tstl %a2@(244)
48c4a: 672c beqs 48c78 <_Thread_Dispatch+0x10c>
#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 );
48c4c: 2079 0005 f4ca moveal 5f4ca <_Thread_Allocated_fp>,%a0
48c52: b1ca cmpal %a2,%a0
48c54: 6722 beqs 48c78 <_Thread_Dispatch+0x10c>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
48c56: 4a88 tstl %a0
48c58: 670c beqs 48c66 <_Thread_Dispatch+0xfa>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
48c5a: 4868 00f4 pea %a0@(244)
48c5e: 4eb9 0004 9f92 jsr 49f92 <_CPU_Context_save_fp>
48c64: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
48c66: 486a 00f4 pea %a2@(244)
48c6a: 4eb9 0004 9fca jsr 49fca <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
48c70: 588f addql #4,%sp
48c72: 23ca 0005 f4ca movel %a2,5f4ca <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
48c78: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
48c7e: 2004 movel %d4,%d0
48c80: 40c1 movew %sr,%d1
48c82: 8081 orl %d1,%d0
48c84: 46c0 movew %d0,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
48c86: 1039 0005 f5f0 moveb 5f5f0 <_Per_CPU_Information+0x18>,%d0
48c8c: 6722 beqs 48cb0 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48c8e: 7001 moveq #1,%d0
48c90: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
48c96: 2679 0005 f5e8 moveal 5f5e8 <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48c9c: 4200 clrb %d0
_Thread_Executing = heir;
48c9e: 23cb 0005 f5e4 movel %a3,5f5e4 <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48ca4: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
48caa: b5cb cmpal %a3,%a2
48cac: 6600 ff30 bnew 48bde <_Thread_Dispatch+0x72>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
48cb0: 42b9 0005 f448 clrl 5f448 <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
48cb6: 46c1 movew %d1,%sr
_API_extensions_Run_postswitch();
48cb8: 4eb9 0004 7056 jsr 47056 <_API_extensions_Run_postswitch>
}
48cbe: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
48cc4: 4e5e unlk %fp
48cc6: 4e75 rts
#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;
48cc8: 41f9 0005 f400 lea 5f400 <_Thread_Ticks_per_timeslice>,%a0
48cce: 2750 0076 movel %a0@,%a3@(118)
48cd2: 6000 ff14 braw 48be8 <_Thread_Dispatch+0x7c>
0004d910 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4d910: 4e56 0000 linkw %fp,#0
4d914: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4d916: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4d91c: 2f02 movel %d2,%sp@-
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4d91e: 222a 00a8 movel %a2@(168),%d1
_ISR_Set_level(level);
4d922: 40c0 movew %sr,%d0
4d924: e189 lsll #8,%d1
4d926: 0280 0000 f8ff andil #63743,%d0
4d92c: 8081 orl %d1,%d0
4d92e: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
4d930: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4d932: 1439 0005 ec0c moveb 5ec0c <doneConstructors.3351>,%d2
doneConstructors = 1;
4d938: 13c0 0005 ec0c moveb %d0,5ec0c <doneConstructors.3351>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4d93e: 4aaa 00f4 tstl %a2@(244)
4d942: 6720 beqs 4d964 <_Thread_Handler+0x54>
#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 );
4d944: 2079 0005 f4ca moveal 5f4ca <_Thread_Allocated_fp>,%a0
4d94a: b1ca cmpal %a2,%a0
4d94c: 6716 beqs 4d964 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4d94e: 4a88 tstl %a0
4d950: 670c beqs 4d95e <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4d952: 4868 00f4 pea %a0@(244)
4d956: 4eb9 0004 9f92 jsr 49f92 <_CPU_Context_save_fp>
4d95c: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4d95e: 23ca 0005 f4ca movel %a2,5f4ca <_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 );
4d964: 2f0a movel %a2,%sp@-
4d966: 4eb9 0004 9938 jsr 49938 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4d96c: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
/*
* _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) */ {
4d972: 588f addql #4,%sp
4d974: 4a02 tstb %d2
4d976: 6746 beqs 4d9be <_Thread_Handler+0xae>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d978: 4aaa 0092 tstl %a2@(146)
4d97c: 6718 beqs 4d996 <_Thread_Handler+0x86> <== ALWAYS TAKEN
* 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 );
4d97e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4d980: 4eb9 0004 9976 jsr 49976 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4d986: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4d98a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4d98e: 42a7 clrl %sp@- <== NOT EXECUTED
4d990: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred> <== NOT EXECUTED
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4d996: 2f2a 009a movel %a2@(154),%sp@-
4d99a: 206a 008e moveal %a2@(142),%a0
4d99e: 4e90 jsr %a0@
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4d9a0: 588f addql #4,%sp
4d9a2: 2540 0028 movel %d0,%a2@(40)
* 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 );
4d9a6: 2f0a movel %a2,%sp@-
4d9a8: 4eb9 0004 9976 jsr 49976 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4d9ae: 4878 0005 pea 5 <COMPARE>
4d9b2: 4878 0001 pea 1 <ADD>
4d9b6: 42a7 clrl %sp@-
4d9b8: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
4d9be: 4eb9 0005 bf60 jsr 5bf60 <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d9c4: 4aaa 0092 tstl %a2@(146)
4d9c8: 66b4 bnes 4d97e <_Thread_Handler+0x6e> <== NEVER TAKEN
4d9ca: 60ca bras 4d996 <_Thread_Handler+0x86>
00048fa4 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48fa4: 4e56 0000 linkw %fp,#0
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
48fa8: 4ab9 0005 dc08 tstl 5dc08 <Configuration+0x24>
48fae: 57c1 seq %d1
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48fb0: 4ab9 0005 dc04 tstl 5dc04 <Configuration+0x20>
48fb6: 57c0 seq %d0
== (!Configuration.stack_free_hook) ) )
48fb8: 4481 negl %d1
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48fba: 4480 negl %d0
48fbc: b380 eorl %d1,%d0
uint32_t maximum_internal_threads;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
48fbe: 2239 0005 dbf4 movel 5dbf4 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
48fc4: 2079 0005 dbec moveal 5dbec <Configuration+0x8>,%a0
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48fca: 4a00 tstb %d0
48fcc: 6650 bnes 4901e <_Thread_Handler_initialization+0x7a>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
48fce: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Thread_Dispatch_necessary = false;
48fd2: 4200 clrb %d0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
48fd4: 42a7 clrl %sp@-
48fd6: 4878 010c pea 10c <DBL_MANT_DIG+0xd7>
48fda: 4878 0001 pea 1 <ADD>
48fde: 4878 0001 pea 1 <ADD>
48fe2: 4878 0001 pea 1 <ADD>
48fe6: 4879 0005 f558 pea 5f558 <_Thread_Internal_information>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Thread_Dispatch_necessary = false;
48fec: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
_Thread_Executing = NULL;
48ff2: 42b9 0005 f5e4 clrl 5f5e4 <_Per_CPU_Information+0xc>
_Thread_Heir = NULL;
48ff8: 42b9 0005 f5e8 clrl 5f5e8 <_Per_CPU_Information+0x10>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
48ffe: 42b9 0005 f4ca clrl 5f4ca <_Thread_Allocated_fp>
#endif
_Thread_Maximum_extensions = maximum_extensions;
49004: 23c8 0005 f4da movel %a0,5f4da <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
4900a: 23c1 0005 f400 movel %d1,5f400 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
49010: 4eb9 0004 80ac jsr 480ac <_Objects_Initialize_information>
49016: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
4901a: 4e5e unlk %fp
4901c: 4e75 rts
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
4901e: 4878 000e pea e <OPER1+0x2>
49022: 4878 0001 pea 1 <ADD>
49026: 42a7 clrl %sp@-
49028: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
...
0004d190 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4d190: 4e56 0000 linkw %fp,#0
4d194: 2f0a movel %a2,%sp@-
4d196: 246e 0008 moveal %fp@(8),%a2
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4d19a: 256a 00a0 007a movel %a2@(160),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4d1a0: 256a 00a4 007e movel %a2@(164),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4d1a6: 256e 000c 0096 movel %fp@(12),%a2@(150)
the_thread->Start.numeric_argument = numeric_argument;
4d1ac: 256e 0010 009a movel %fp@(16),%a2@(154)
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4d1b2: 156a 009e 0074 moveb %a2@(158),%a2@(116)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4d1b8: 42aa 001c clrl %a2@(28)
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 ) ) {
4d1bc: 2f0a movel %a2,%sp@-
4d1be: 4eb9 0004 a008 jsr 4a008 <_Thread_queue_Extract_with_proxy>
4d1c4: 588f addql #4,%sp
4d1c6: 4a00 tstb %d0
4d1c8: 6608 bnes 4d1d2 <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4d1ca: 7002 moveq #2,%d0
4d1cc: b0aa 0050 cmpl %a2@(80),%d0
4d1d0: 672a beqs 4d1fc <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4d1d2: 202a 00ac movel %a2@(172),%d0
4d1d6: b0aa 0014 cmpl %a2@(20),%d0
4d1da: 6718 beqs 4d1f4 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
4d1dc: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4d1e0: 2d4a 0008 movel %a2,%fp@(8)
}
}
4d1e4: 246e fffc moveal %fp@(-4),%a2
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4d1e8: 2d40 000c movel %d0,%fp@(12)
}
}
4d1ec: 4e5e unlk %fp
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4d1ee: 4ef9 0004 a248 jmp 4a248 <_Thread_Set_priority>
}
}
4d1f4: 246e fffc moveal %fp@(-4),%a2
4d1f8: 4e5e unlk %fp
4d1fa: 4e75 rts
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
4d1fc: 486a 0048 pea %a2@(72)
4d200: 4eb9 0004 a968 jsr 4a968 <_Watchdog_Remove>
4d206: 588f addql #4,%sp
4d208: 60c8 bras 4d1d2 <_Thread_Reset+0x42>
...
0004a1b8 <_Thread_Restart>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
4a1b8: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4a1ba: 4e56 0000 linkw %fp,#0
4a1be: 2f0a movel %a2,%sp@-
4a1c0: 246e 0008 moveal %fp@(8),%a2
4a1c4: c0aa 0010 andl %a2@(16),%d0
if ( !_States_Is_dormant( the_thread->current_state ) ) {
4a1c8: 670a beqs 4a1d4 <_Thread_Restart+0x1c>
return true;
}
return false;
}
4a1ca: 246e fffc moveal %fp@(-4),%a2
4a1ce: 4e5e unlk %fp
_Thread_Restart_self();
return true;
}
return false;
4a1d0: 4200 clrb %d0
}
4a1d2: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
4a1d4: 2f0a movel %a2,%sp@-
4a1d6: 4eb9 0004 a2ac jsr 4a2ac <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
4a1dc: 2f2e 0010 movel %fp@(16),%sp@-
4a1e0: 2f2e 000c movel %fp@(12),%sp@-
4a1e4: 2f0a movel %a2,%sp@-
4a1e6: 4eb9 0004 d190 jsr 4d190 <_Thread_Reset>
_Thread_Load_environment( the_thread );
4a1ec: 2f0a movel %a2,%sp@-
4a1ee: 4eb9 0004 ce7c jsr 4ce7c <_Thread_Load_environment>
_Thread_Ready( the_thread );
4a1f4: 2f0a movel %a2,%sp@-
4a1f6: 4eb9 0004 d160 jsr 4d160 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
4a1fc: 2f0a movel %a2,%sp@-
4a1fe: 4eb9 0004 a74c jsr 4a74c <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
4a204: 4fef 001c lea %sp@(28),%sp
4a208: b5f9 0006 057c cmpal 6057c <_Per_CPU_Information+0xc>,%a2
4a20e: 670a beqs 4a21a <_Thread_Restart+0x62>
return true;
}
return false;
}
4a210: 246e fffc moveal %fp@(-4),%a2
4a214: 4e5e unlk %fp
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
4a216: 7001 moveq #1,%d0
}
return false;
}
4a218: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
4a21a: 4aaa 00f4 tstl %a2@(244)
4a21e: 6712 beqs 4a232 <_Thread_Restart+0x7a>
_Context_Restore_fp( &_Thread_Executing->fp_context );
4a220: 486a 00f4 pea %a2@(244)
4a224: 4eb9 0004 acb2 jsr 4acb2 <_CPU_Context_restore_fp>
4a22a: 2479 0006 057c moveal 6057c <_Per_CPU_Information+0xc>,%a2
4a230: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
4a232: 486a 00c0 pea %a2@(192)
4a236: 4eb9 0004 ab6a jsr 4ab6a <_CPU_Context_Restart_self>
4a23c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4a240: 588f addql #4,%sp <== NOT EXECUTED
4a242: 4e5e unlk %fp <== NOT EXECUTED
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
4a244: 7001 moveq #1,%d0 <== NOT EXECUTED
}
return false;
}
000496b4 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
496b4: 4e56 0000 linkw %fp,#0
496b8: 206e 0008 moveal %fp@(8),%a0
* 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.stack_free_hook )
496bc: 2279 0005 dc08 moveal 5dc08 <Configuration+0x24>,%a1
496c2: 4a89 tstl %a1
496c4: 670a beqs 496d0 <_Thread_Stack_Free+0x1c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
496c6: 2d68 00b4 0008 movel %a0@(180),%fp@(8)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
496cc: 4e5e unlk %fp
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
496ce: 4ed1 jmp %a1@
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
496d0: 2d68 00b4 0008 movel %a0@(180),%fp@(8)
}
496d6: 4e5e unlk %fp
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
496d8: 4ef9 0004 9e1e jmp 49e1e <_Workspace_Free>
...
000487bc <_Thread_blocking_operation_Cancel>:
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
487bc: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
487be: 4e56 0000 linkw %fp,#0
487c2: 202e 0010 movel %fp@(16),%d0
487c6: 2f0a movel %a2,%sp@-
487c8: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
487cc: 42aa 0044 clrl %a2@(68)
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
487d0: b2aa 0050 cmpl %a2@(80),%d1
487d4: 671c beqs 487f2 <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
487d6: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
487d8: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
487dc: 246e fffc moveal %fp@(-4),%a2
487e0: 203c 1003 fff8 movel #268697592,%d0
487e6: 2d40 000c movel %d0,%fp@(12)
487ea: 4e5e unlk %fp
487ec: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
487f2: 123c 0003 moveb #3,%d1
487f6: 2541 0050 movel %d1,%a2@(80)
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
487fa: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
487fc: 486a 0048 pea %a2@(72)
48800: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
48806: 588f addql #4,%sp
48808: 203c 1003 fff8 movel #268697592,%d0
4880e: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
48812: 246e fffc moveal %fp@(-4),%a2
48816: 2d40 000c movel %d0,%fp@(12)
4881a: 4e5e unlk %fp
4881c: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
...
000490ac <_Thread_queue_Dequeue_priority>:
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
490ac: 203c 0000 0700 movel #1792,%d0
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
490b2: 4e56 ffe8 linkw %fp,#-24
490b6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
490ba: 266e 0008 moveal %fp@(8),%a3
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
490be: 40c3 movew %sr,%d3
490c0: 8083 orl %d3,%d0
490c2: 46c0 movew %d0,%sr
for( index=0 ;
490c4: 4280 clrl %d0
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
490c6: 204b moveal %a3,%a0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
490c8: 2400 movel %d0,%d2
490ca: 2200 movel %d0,%d1
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
490cc: 5280 addql #1,%d0
490ce: e58a lsll #2,%d2
490d0: e989 lsll #4,%d1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
490d2: 2450 moveal %a0@,%a2
490d4: 9282 subl %d2,%d1
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
490d6: 41e8 000c lea %a0@(12),%a0
490da: 43f3 1804 lea %a3@(00000004,%d1:l),%a1
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
490de: b3ca cmpal %a2,%a1
490e0: 6616 bnes 490f8 <_Thread_queue_Dequeue_priority+0x4c>
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
490e2: 7204 moveq #4,%d1
490e4: b280 cmpl %d0,%d1
490e6: 66e0 bnes 490c8 <_Thread_queue_Dequeue_priority+0x1c>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
490e8: 46c3 movew %d3,%sr
return NULL;
490ea: 4282 clrl %d2
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
490ec: 2002 movel %d2,%d0
490ee: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
490f4: 4e5e unlk %fp
490f6: 4e75 rts
490f8: 200a movel %a2,%d0
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) _Chain_First(
490fa: 240a movel %a2,%d2
490fc: 0680 0000 003c addil #60,%d0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49102: 206a 0038 moveal %a2@(56),%a0
dequeue:
the_thread->Wait.queue = NULL;
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
49106: 2252 moveal %a2@,%a1
previous_node = the_thread->Object.Node.previous;
49108: 266a 0004 moveal %a2@(4),%a3
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
4910c: 42aa 0044 clrl %a2@(68)
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
49110: b088 cmpl %a0,%d0
49112: 6700 008a beqw 4919e <_Thread_queue_Dequeue_priority+0xf2>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49116: 286a 0040 moveal %a2@(64),%a4
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
4911a: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4911c: 2348 0004 movel %a0,%a1@(4)
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
49120: 2688 movel %a0,%a3@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
49122: 214b 0004 movel %a3,%a0@(4)
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
49126: 2089 movel %a1,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
49128: 226a 0040 moveal %a2@(64),%a1
4912c: b3ea 0038 cmpal %a2@(56),%a1
49130: 6716 beqs 49148 <_Thread_queue_Dequeue_priority+0x9c>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
49132: 214d 0038 movel %a5,%a0@(56)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
49136: 43e8 003c lea %a0@(60),%a1
4913a: 2889 movel %a1,%a4@
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
4913c: 43e8 0038 lea %a0@(56),%a1
49140: 2b49 0004 movel %a1,%a5@(4)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
49144: 214c 0040 movel %a4,%a0@(64)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
49148: 7002 moveq #2,%d0
4914a: b0aa 0050 cmpl %a2@(80),%d0
4914e: 671e beqs 4916e <_Thread_queue_Dequeue_priority+0xc2>
_ISR_Enable( level );
49150: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
49152: 2f3c 1003 fff8 movel #268697592,%sp@-
49158: 2f0a movel %a2,%sp@-
4915a: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
49160: 508f addql #8,%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49162: 2002 movel %d2,%d0
49164: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4916a: 4e5e unlk %fp
4916c: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4916e: 7203 moveq #3,%d1
49170: 2541 0050 movel %d1,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
49174: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
49176: 486a 0048 pea %a2@(72)
4917a: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
49180: 2f3c 1003 fff8 movel #268697592,%sp@-
49186: 2f0a movel %a2,%sp@-
49188: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
4918e: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49192: 2002 movel %d2,%d0
49194: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4919a: 4e5e unlk %fp
4919c: 4e75 rts
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
4919e: 2689 movel %a1,%a3@
next_node->previous = previous_node;
491a0: 234b 0004 movel %a3,%a1@(4)
491a4: 60a2 bras 49148 <_Thread_queue_Dequeue_priority+0x9c>
...
00049250 <_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
)
{
49250: 4e56 ffe0 linkw %fp,#-32
49254: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
49258: 246e 000c moveal %fp@(12),%a2
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4925c: 41ea 003c lea %a2@(60),%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
49260: 49ea 0038 lea %a2@(56),%a4
49264: 266e 0008 moveal %fp@(8),%a3
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
49268: 222a 0014 movel %a2@(20),%d1
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
4926c: 2a01 movel %d1,%d5
4926e: ec8d lsrl #6,%d5
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
49270: 242b 0038 movel %a3@(56),%d2
Chain_Node *tail = _Chain_Tail( the_chain );
49274: 2548 0038 movel %a0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
49278: 254c 0040 movel %a4,%a2@(64)
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4927c: 42aa 003c clrl %a2@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
49280: 0801 0005 btst #5,%d1
49284: 665e bnes 492e4 <_Thread_queue_Enqueue_priority+0x94>
49286: 700c moveq #12,%d0
49288: 4c00 5800 mulsl %d0,%d5
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
4928c: 2c3c 0000 0700 movel #1792,%d6
49292: 2006 movel %d6,%d0
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
49294: 49f3 5804 lea %a3@(00000004,%d5:l),%a4
49298: 40c3 movew %sr,%d3
4929a: 8083 orl %d3,%d0
4929c: 46c0 movew %d0,%sr
4929e: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
492a0: 2073 5800 moveal %a3@(00000000,%d5:l),%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
492a4: b9c8 cmpal %a0,%a4
492a6: 6700 013a beqw 493e2 <_Thread_queue_Enqueue_priority+0x192>
search_priority = search_thread->current_priority;
492aa: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
492ae: b3c1 cmpal %d1,%a1
492b0: 6418 bccs 492ca <_Thread_queue_Enqueue_priority+0x7a>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
492b2: 2006 movel %d6,%d0
492b4: 46c3 movew %d3,%sr
492b6: 8083 orl %d3,%d0
492b8: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
492ba: 2002 movel %d2,%d0
492bc: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
492c0: 6700 00be beqw 49380 <_Thread_queue_Enqueue_priority+0x130>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
492c4: 2050 moveal %a0@,%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
492c6: b9c8 cmpal %a0,%a4
492c8: 66e0 bnes 492aa <_Thread_queue_Enqueue_priority+0x5a>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
492ca: 202b 0030 movel %a3@(48),%d0
492ce: 7401 moveq #1,%d2
492d0: b480 cmpl %d0,%d2
492d2: 6700 00c4 beqw 49398 <_Thread_queue_Enqueue_priority+0x148>
* 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;
492d6: 206e 0010 moveal %fp@(16),%a0
492da: 2084 movel %d4,%a0@
return the_thread_queue->sync_state;
}
492dc: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
492e0: 4e5e unlk %fp
492e2: 4e75 rts
492e4: 700c moveq #12,%d0
492e6: 4c00 5800 mulsl %d0,%d5
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
492ea: 4283 clrl %d3
492ec: 1639 0005 dbe2 moveb 5dbe2 <rtems_maximum_priority>,%d3
_ISR_Disable( level );
492f2: 2c3c 0000 0700 movel #1792,%d6
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
492f8: da8b addl %a3,%d5
492fa: 2845 moveal %d5,%a4
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
492fc: 2243 moveal %d3,%a1
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
492fe: 508c addql #8,%a4
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
49300: 2006 movel %d6,%d0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
49302: 5289 addql #1,%a1
_ISR_Disable( level );
49304: 40c3 movew %sr,%d3
49306: 8083 orl %d3,%d0
49308: 46c0 movew %d0,%sr
4930a: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
4930c: 2054 moveal %a4@,%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4930e: ba88 cmpl %a0,%d5
49310: 6720 beqs 49332 <_Thread_queue_Enqueue_priority+0xe2>
search_priority = search_thread->current_priority;
49312: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
49316: b3c1 cmpal %d1,%a1
49318: 6318 blss 49332 <_Thread_queue_Enqueue_priority+0xe2>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
4931a: 2006 movel %d6,%d0
4931c: 46c3 movew %d3,%sr
4931e: 8083 orl %d3,%d0
49320: 46c0 movew %d0,%sr
49322: 2002 movel %d2,%d0
49324: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
49328: 6736 beqs 49360 <_Thread_queue_Enqueue_priority+0x110>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
4932a: 2068 0004 moveal %a0@(4),%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4932e: ba88 cmpl %a0,%d5
49330: 66e0 bnes 49312 <_Thread_queue_Enqueue_priority+0xc2>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
49332: 202b 0030 movel %a3@(48),%d0
49336: 7401 moveq #1,%d2
49338: b480 cmpl %d0,%d2
4933a: 669a bnes 492d6 <_Thread_queue_Enqueue_priority+0x86>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4933c: 42ab 0030 clrl %a3@(48)
if ( priority == search_priority )
49340: b3c1 cmpal %d1,%a1
49342: 677a beqs 493be <_Thread_queue_Enqueue_priority+0x16e>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
49344: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
49346: 2548 0004 movel %a0,%a2@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
4934a: 2489 movel %a1,%a2@
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
4934c: 234a 0004 movel %a2,%a1@(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;
49350: 208a movel %a2,%a0@
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
49352: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
49356: 46c3 movew %d3,%sr
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
49358: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
4935c: 4e5e unlk %fp
4935e: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
49360: 46c3 movew %d3,%sr
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
49362: 4283 clrl %d3
49364: 1639 0005 dbe2 moveb 5dbe2 <rtems_maximum_priority>,%d3
_ISR_Disable( level );
4936a: 2006 movel %d6,%d0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
4936c: 2243 moveal %d3,%a1
4936e: 5289 addql #1,%a1
_ISR_Disable( level );
49370: 40c3 movew %sr,%d3
49372: 8083 orl %d3,%d0
49374: 46c0 movew %d0,%sr
49376: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
49378: 2054 moveal %a4@,%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4937a: ba88 cmpl %a0,%d5
4937c: 6694 bnes 49312 <_Thread_queue_Enqueue_priority+0xc2><== NEVER TAKEN
4937e: 60b2 bras 49332 <_Thread_queue_Enqueue_priority+0xe2>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
49380: 46c3 movew %d3,%sr
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
49382: 2006 movel %d6,%d0
49384: 40c3 movew %sr,%d3
49386: 8083 orl %d3,%d0
49388: 46c0 movew %d0,%sr
4938a: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
4938c: 2073 5800 moveal %a3@(00000000,%d5:l),%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
49390: b9c8 cmpal %a0,%a4
49392: 6600 ff16 bnew 492aa <_Thread_queue_Enqueue_priority+0x5a>
49396: 604a bras 493e2 <_Thread_queue_Enqueue_priority+0x192>
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49398: 42ab 0030 clrl %a3@(48)
if ( priority == search_priority )
4939c: b3c1 cmpal %d1,%a1
4939e: 671e beqs 493be <_Thread_queue_Enqueue_priority+0x16e>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
493a0: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
493a4: 2488 movel %a0,%a2@
the_node->previous = previous_node;
493a6: 2549 0004 movel %a1,%a2@(4)
previous_node->next = the_node;
493aa: 228a movel %a2,%a1@
search_node->previous = the_node;
493ac: 214a 0004 movel %a2,%a0@(4)
the_thread->Wait.queue = the_thread_queue;
493b0: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
493b4: 46c3 movew %d3,%sr
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
493b6: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
493ba: 4e5e unlk %fp
493bc: 4e75 rts
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
493be: 49e8 003c lea %a0@(60),%a4
previous_node = search_node->previous;
493c2: 2268 0040 moveal %a0@(64),%a1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
493c6: 248c movel %a4,%a2@
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
493c8: 2549 0004 movel %a1,%a2@(4)
previous_node->next = the_node;
493cc: 228a movel %a2,%a1@
search_node->previous = the_node;
493ce: 214a 0040 movel %a2,%a0@(64)
the_thread->Wait.queue = the_thread_queue;
493d2: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
493d6: 46c4 movew %d4,%sr
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
493d8: 7001 moveq #1,%d0
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
493da: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
493de: 4e5e unlk %fp
493e0: 4e75 rts
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
493e2: 202b 0030 movel %a3@(48),%d0
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
493e6: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
493ea: 7401 moveq #1,%d2
493ec: b480 cmpl %d0,%d2
493ee: 6600 fee6 bnew 492d6 <_Thread_queue_Enqueue_priority+0x86>
493f2: 60a4 bras 49398 <_Thread_queue_Enqueue_priority+0x148>
0004d9cc <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
4d9cc: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4d9d2: 4e56 0000 linkw %fp,#0
4d9d6: 2f0a movel %a2,%sp@-
4d9d8: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
4d9dc: 40c1 movew %sr,%d1
4d9de: 8081 orl %d1,%d0
4d9e0: 46c0 movew %d0,%sr
4d9e2: 202a 0010 movel %a2@(16),%d0
4d9e6: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4d9ec: 6734 beqs 4da22 <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4d9ee: 2252 moveal %a2@,%a1
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d9f0: 7002 moveq #2,%d0
previous = the_node->previous;
4d9f2: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4d9f6: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4d9fa: 2089 movel %a1,%a0@
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
4d9fc: 42aa 0044 clrl %a2@(68)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4da00: b0aa 0050 cmpl %a2@(80),%d0
4da04: 6726 beqs 4da2c <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4da06: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4da08: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4da0c: 246e fffc moveal %fp@(-4),%a2
4da10: 203c 1003 fff8 movel #268697592,%d0
4da16: 2d40 000c movel %d0,%fp@(12)
4da1a: 4e5e unlk %fp
4da1c: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4da22: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4da24: 246e fffc moveal %fp@(-4),%a2
4da28: 4e5e unlk %fp
4da2a: 4e75 rts
4da2c: 7003 moveq #3,%d0
4da2e: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4da32: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4da34: 486a 0048 pea %a2@(72)
4da38: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
4da3e: 588f addql #4,%sp
4da40: 203c 1003 fff8 movel #268697592,%d0
4da46: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4da4a: 246e fffc moveal %fp@(-4),%a2
4da4e: 2d40 000c movel %d0,%fp@(12)
4da52: 4e5e unlk %fp
4da54: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
...
0004c340 <_Thread_queue_Extract_priority_helper>:
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4c340: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
4c346: 4e56 ffec linkw %fp,#-20
4c34a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4c34e: 246e 000c moveal %fp@(12),%a2
4c352: 142e 0013 moveb %fp@(19),%d2
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4c356: 40c1 movew %sr,%d1
4c358: 8081 orl %d1,%d0
4c35a: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
4c35c: 202a 0010 movel %a2@(16),%d0
4c360: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4c366: 677e beqs 4c3e6 <_Thread_queue_Extract_priority_helper+0xa6><== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4c368: 200a movel %a2,%d0
4c36a: 0680 0000 003c addil #60,%d0
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
4c370: 2252 moveal %a2@,%a1
previous_node = the_node->previous;
4c372: 266a 0004 moveal %a2@(4),%a3
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c376: 206a 0038 moveal %a2@(56),%a0
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
4c37a: b088 cmpl %a0,%d0
4c37c: 6774 beqs 4c3f2 <_Thread_queue_Extract_priority_helper+0xb2>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c37e: 286a 0040 moveal %a2@(64),%a4
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
4c382: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4c384: 2348 0004 movel %a0,%a1@(4)
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
4c388: 2688 movel %a0,%a3@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4c38a: 214b 0004 movel %a3,%a0@(4)
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
4c38e: 2089 movel %a1,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4c390: 202a 0040 movel %a2@(64),%d0
4c394: b0aa 0038 cmpl %a2@(56),%d0
4c398: 6716 beqs 4c3b0 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
4c39a: 214d 0038 movel %a5,%a0@(56)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
4c39e: 43e8 003c lea %a0@(60),%a1
4c3a2: 2889 movel %a1,%a4@
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
4c3a4: 43e8 0038 lea %a0@(56),%a1
4c3a8: 2b49 0004 movel %a1,%a5@(4)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
4c3ac: 214c 0040 movel %a4,%a0@(64)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4c3b0: 4a02 tstb %d2
4c3b2: 6626 bnes 4c3da <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4c3b4: 7002 moveq #2,%d0
4c3b6: b0aa 0050 cmpl %a2@(80),%d0
4c3ba: 6742 beqs 4c3fe <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4c3bc: 46c1 movew %d1,%sr
4c3be: 2d4a 0008 movel %a2,%fp@(8)
4c3c2: 227c 1003 fff8 moveal #268697592,%a1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c3c8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c3ce: 2d49 000c movel %a1,%fp@(12)
4c3d2: 4e5e unlk %fp
4c3d4: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4c3da: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c3dc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c3e2: 4e5e unlk %fp
4c3e4: 4e75 rts
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4c3e6: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c3e8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c3ee: 4e5e unlk %fp
4c3f0: 4e75 rts
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
4c3f2: 2689 movel %a1,%a3@
next_node->previous = previous_node;
4c3f4: 234b 0004 movel %a3,%a1@(4)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4c3f8: 4a02 tstb %d2
4c3fa: 67b8 beqs 4c3b4 <_Thread_queue_Extract_priority_helper+0x74>
4c3fc: 60dc bras 4c3da <_Thread_queue_Extract_priority_helper+0x9a>
4c3fe: 7003 moveq #3,%d0
4c400: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4c404: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4c406: 486a 0048 pea %a2@(72)
4c40a: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
4c410: 588f addql #4,%sp
4c412: 227c 1003 fff8 moveal #268697592,%a1
4c418: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c41c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c422: 2d49 000c movel %a1,%fp@(12)
4c426: 4e5e unlk %fp
4c428: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
...
00049460 <_Thread_queue_Initialize>:
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
49460: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
49462: 4e56 0000 linkw %fp,#0
49466: 206e 0008 moveal %fp@(8),%a0
4946a: 2f0a movel %a2,%sp@-
4946c: 202e 000c movel %fp@(12),%d0
49470: 2f02 movel %d2,%sp@-
the_thread_queue->state = state;
49472: 216e 0010 0038 movel %fp@(16),%a0@(56)
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
49478: 216e 0014 003c movel %fp@(20),%a0@(60)
States_Control state,
uint32_t timeout_status
)
{
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
4947e: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49482: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
49486: b280 cmpl %d0,%d1
49488: 6716 beqs 494a0 <_Thread_queue_Initialize+0x40>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4948a: 2448 moveal %a0,%a2
4948c: 588a addql #4,%a2
head->next = tail;
head->previous = NULL;
4948e: 42a8 0004 clrl %a0@(4)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
49492: 208a movel %a2,%a0@
head->next = tail;
head->previous = NULL;
tail->previous = head;
49494: 2148 0008 movel %a0,%a0@(8)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
49498: 241f movel %sp@+,%d2
4949a: 245f moveal %sp@+,%a2
4949c: 4e5e unlk %fp
4949e: 4e75 rts
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
494a0: 2248 moveal %a0,%a1
494a2: 4280 clrl %d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
494a4: 2400 movel %d0,%d2
494a6: 2200 movel %d0,%d1
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494a8: 5280 addql #1,%d0
494aa: e58a lsll #2,%d2
494ac: e989 lsll #4,%d1
head->next = tail;
head->previous = NULL;
494ae: 42a9 0004 clrl %a1@(4)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
494b2: 9282 subl %d2,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
494b4: 45f0 1800 lea %a0@(00000000,%d1:l),%a2
494b8: 234a 0008 movel %a2,%a1@(8)
Chain_Node *tail = _Chain_Tail( the_chain );
494bc: 45f0 1804 lea %a0@(00000004,%d1:l),%a2
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494c0: 7204 moveq #4,%d1
494c2: 228a movel %a2,%a1@
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494c4: 43e9 000c lea %a1@(12),%a1
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494c8: b280 cmpl %d0,%d1
494ca: 67cc beqs 49498 <_Thread_queue_Initialize+0x38> <== NEVER TAKEN
494cc: 2400 movel %d0,%d2
494ce: 2200 movel %d0,%d1
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494d0: 5280 addql #1,%d0
494d2: e58a lsll #2,%d2
494d4: e989 lsll #4,%d1
head->next = tail;
head->previous = NULL;
494d6: 42a9 0004 clrl %a1@(4)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
494da: 9282 subl %d2,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
494dc: 45f0 1800 lea %a0@(00000000,%d1:l),%a2
494e0: 234a 0008 movel %a2,%a1@(8)
Chain_Node *tail = _Chain_Tail( the_chain );
494e4: 45f0 1804 lea %a0@(00000004,%d1:l),%a2
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494e8: 7204 moveq #4,%d1
494ea: 228a movel %a2,%a1@
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494ec: 43e9 000c lea %a1@(12),%a1
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494f0: b280 cmpl %d0,%d1
494f2: 66b0 bnes 494a4 <_Thread_queue_Initialize+0x44>
494f4: 60a2 bras 49498 <_Thread_queue_Initialize+0x38>
...
0004c430 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4c430: 4e56 0000 linkw %fp,#0
4c434: 206e 0008 moveal %fp@(8),%a0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4c438: 2268 0044 moveal %a0@(68),%a1
* 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 &&
4c43c: 2029 0030 movel %a1@(48),%d0
4c440: 6708 beqs 4c44a <_Thread_queue_Process_timeout+0x1a>
4c442: b1f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a0
4c448: 6716 beqs 4c460 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN
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;
4c44a: 2169 003c 0034 movel %a1@(60),%a0@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4c450: 2f08 movel %a0,%sp@-
4c452: 2f09 movel %a1,%sp@-
4c454: 4eb9 0004 c308 jsr 4c308 <_Thread_queue_Extract>
4c45a: 508f addql #8,%sp
}
}
4c45c: 4e5e unlk %fp
4c45e: 4e75 rts
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
4c460: 7203 moveq #3,%d1
4c462: b280 cmpl %d0,%d1
4c464: 67f6 beqs 4c45c <_Thread_queue_Process_timeout+0x2c>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4c466: 7002 moveq #2,%d0
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
4c468: 4e5e unlk %fp
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4c46a: 2169 003c 0034 movel %a1@(60),%a0@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4c470: 2340 0030 movel %d0,%a1@(48)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
...
000494f8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
494f8: 4e56 fff0 linkw %fp,#-16
494fc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
49500: 246e 0008 moveal %fp@(8),%a2
49504: 266e 000c moveal %fp@(12),%a3
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
49508: 4a8a tstl %a2
4950a: 6708 beqs 49514 <_Thread_queue_Requeue+0x1c> <== NEVER TAKEN
/*
* 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 ) {
4950c: 7001 moveq #1,%d0
4950e: b0aa 0034 cmpl %a2@(52),%d0
49512: 670a beqs 4951e <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
49514: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED
4951a: 4e5e unlk %fp <== NOT EXECUTED
4951c: 4e75 rts <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
4951e: 303c 0700 movew #1792,%d0
49522: 40c2 movew %sr,%d2
49524: 8082 orl %d2,%d0
49526: 46c0 movew %d0,%sr
49528: 202b 0010 movel %a3@(16),%d0
4952c: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
49532: 660c bnes 49540 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
49534: 46c2 movew %d2,%sr <== NOT EXECUTED
}
}
49536: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
4953c: 4e5e unlk %fp
4953e: 4e75 rts
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
49540: 4878 0001 pea 1 <ADD>
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;
49544: 7001 moveq #1,%d0
49546: 2f0b movel %a3,%sp@-
49548: 2540 0030 movel %d0,%a2@(48)
4954c: 2f0a movel %a2,%sp@-
4954e: 4eb9 0004 c340 jsr 4c340 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
49554: 486e fffc pea %fp@(-4)
49558: 2f0b movel %a3,%sp@-
4955a: 2f0a movel %a2,%sp@-
4955c: 4eb9 0004 9250 jsr 49250 <_Thread_queue_Enqueue_priority>
49562: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
49566: 46c2 movew %d2,%sr
49568: 60cc bras 49536 <_Thread_queue_Requeue+0x3e>
...
0004956c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
4956c: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
49570: 486e fffc pea %fp@(-4)
49574: 2f2e 0008 movel %fp@(8),%sp@-
49578: 4eb9 0004 8cfc jsr 48cfc <_Thread_Get>
switch ( location ) {
4957e: 508f addql #8,%sp
49580: 4aae fffc tstl %fp@(-4)
49584: 6618 bnes 4959e <_Thread_queue_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
49586: 2f00 movel %d0,%sp@-
49588: 4eb9 0004 c430 jsr 4c430 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4958e: 588f addql #4,%sp
49590: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
49596: 5380 subql #1,%d0
49598: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
4959e: 4e5e unlk %fp
...
00059448 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
59448: 4e56 ffb0 linkw %fp,#-80
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
5944c: 41ee fff4 lea %fp@(-12),%a0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
59450: 200e movel %fp,%d0
59452: 5180 subql #8,%d0
head->previous = NULL;
tail->previous = head;
59454: 2d48 fffc movel %a0,%fp@(-4)
59458: 41ee ffec lea %fp@(-20),%a0
5945c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
59460: 246e 0008 moveal %fp@(8),%a2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
59464: 260e movel %fp,%d3
59466: 0683 ffff ffe8 addil #-24,%d3
5946c: 240a movel %a2,%d2
5946e: 2a0a movel %a2,%d5
59470: 4bf9 0005 d86c lea 5d86c <_Watchdog_Adjust_to_chain>,%a5
59476: 0682 0000 0030 addil #48,%d2
5947c: 0685 0000 0068 addil #104,%d5
59482: 47f9 0005 a020 lea 5a020 <_Chain_Get>,%a3
59488: 49f9 0005 d8f4 lea 5d8f4 <_Watchdog_Insert>,%a4
5948e: 2c00 movel %d0,%d6
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59490: 283c 0000 0700 movel #1792,%d4
59496: 2d48 ffd8 movel %a0,%fp@(-40)
5949a: 41ea 0008 lea %a2@(8),%a0
5949e: 2d48 ffe4 movel %a0,%fp@(-28)
594a2: 41ea 0040 lea %a2@(64),%a0
594a6: 2d48 ffe0 movel %a0,%fp@(-32)
594aa: 41ee ffec lea %fp@(-20),%a0
594ae: 2d40 fff4 movel %d0,%fp@(-12)
head->previous = NULL;
594b2: 42ae fff8 clrl %fp@(-8)
594b6: 42ae ffec clrl %fp@(-20)
tail->previous = head;
594ba: 2d43 fff0 movel %d3,%fp@(-16)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
594be: 2d48 ffe8 movel %a0,%fp@(-24)
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
594c2: 41ee fff4 lea %fp@(-12),%a0
594c6: 2548 0078 movel %a0,%a2@(120)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
594ca: 2039 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
594d0: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
594d4: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
594d8: 9081 subl %d1,%d0
594da: 2f03 movel %d3,%sp@-
594dc: 2f00 movel %d0,%sp@-
594de: 2f02 movel %d2,%sp@-
594e0: 4e95 jsr %a5@
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
594e2: 2039 0007 e2ce movel 7e2ce <_TOD_Now>,%d0
/*
* 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 watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
594e8: 4fef 000c lea %sp@(12),%sp
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
594ec: 222a 0074 movel %a2@(116),%d1
/*
* 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 watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
594f0: b280 cmpl %d0,%d1
594f2: 6500 0086 bcsw 5957a <_Timer_server_Body+0x132>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
594f6: b280 cmpl %d0,%d1
594f8: 6200 00a4 bhiw 5959e <_Timer_server_Body+0x156>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
594fc: 2540 0074 movel %d0,%a2@(116)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59500: 202a 0078 movel %a2@(120),%d0
59504: 2f00 movel %d0,%sp@-
59506: 4e93 jsr %a3@
if ( timer == NULL ) {
59508: 588f addql #4,%sp
5950a: 4a80 tstl %d0
5950c: 672e beqs 5953c <_Timer_server_Body+0xf4> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5950e: 2040 moveal %d0,%a0 <== NOT EXECUTED
59510: 7e01 moveq #1,%d7 <== NOT EXECUTED
59512: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED
59516: be81 cmpl %d1,%d7 <== NOT EXECUTED
59518: 6700 00a8 beqw 595c2 <_Timer_server_Body+0x17a> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
5951c: 7e03 moveq #3,%d7 <== NOT EXECUTED
5951e: be81 cmpl %d1,%d7 <== NOT EXECUTED
59520: 66de bnes 59500 <_Timer_server_Body+0xb8> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59522: 2040 moveal %d0,%a0 <== NOT EXECUTED
59524: 4868 0010 pea %a0@(16) <== NOT EXECUTED
59528: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5952a: 4e94 jsr %a4@ <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
5952c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59530: 508f addql #8,%sp <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59532: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59534: 4e93 jsr %a3@ <== NOT EXECUTED
if ( timer == NULL ) {
59536: 588f addql #4,%sp <== NOT EXECUTED
59538: 4a80 tstl %d0 <== NOT EXECUTED
5953a: 66d2 bnes 5950e <_Timer_server_Body+0xc6> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
5953c: 2004 movel %d4,%d0
5953e: 40c1 movew %sr,%d1
59540: 8081 orl %d1,%d0
59542: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
59544: bcae fff4 cmpl %fp@(-12),%d6
59548: 6700 0086 beqw 595d0 <_Timer_server_Body+0x188>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
5954c: 46c1 movew %d1,%sr <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
5954e: 2039 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59554: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
59558: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5955c: 9081 subl %d1,%d0 <== NOT EXECUTED
5955e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59560: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59562: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59564: 4e95 jsr %a5@ <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59566: 2039 0007 e2ce movel 7e2ce <_TOD_Now>,%d0 <== NOT EXECUTED
/*
* 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 watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
5956c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
59570: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED
/*
* 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 watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
59574: b280 cmpl %d0,%d1 <== NOT EXECUTED
59576: 6400 ff7e bccw 594f6 <_Timer_server_Body+0xae> <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5957a: 2f03 movel %d3,%sp@-
5957c: 2e00 movel %d0,%d7
5957e: 9e81 subl %d1,%d7
59580: 2f07 movel %d7,%sp@-
59582: 2d40 ffdc movel %d0,%fp@(-36)
59586: 2f05 movel %d5,%sp@-
59588: 4eb9 0005 d86c jsr 5d86c <_Watchdog_Adjust_to_chain>
5958e: 202e ffdc movel %fp@(-36),%d0
59592: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59596: 2540 0074 movel %d0,%a2@(116)
5959a: 6000 ff64 braw 59500 <_Timer_server_Body+0xb8>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
5959e: 9280 subl %d0,%d1
595a0: 2f01 movel %d1,%sp@-
595a2: 4878 0001 pea 1 <ADD>
595a6: 2d40 ffdc movel %d0,%fp@(-36)
595aa: 2f05 movel %d5,%sp@-
595ac: 4eb9 0005 d7d8 jsr 5d7d8 <_Watchdog_Adjust>
595b2: 202e ffdc movel %fp@(-36),%d0
595b6: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
595ba: 2540 0074 movel %d0,%a2@(116)
595be: 6000 ff40 braw 59500 <_Timer_server_Body+0xb8>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
595c2: 4868 0010 pea %a0@(16) <== NOT EXECUTED
595c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
595c8: 4e94 jsr %a4@ <== NOT EXECUTED
595ca: 508f addql #8,%sp <== NOT EXECUTED
595cc: 6000 ff32 braw 59500 <_Timer_server_Body+0xb8> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
595d0: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
595d4: 46c1 movew %d1,%sr
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
595d6: 202e ffd8 movel %fp@(-40),%d0
595da: b0ae ffe8 cmpl %fp@(-24),%d0
595de: 6752 beqs 59632 <_Timer_server_Body+0x1ea>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
595e0: 2204 movel %d4,%d1
595e2: 40c0 movew %sr,%d0
595e4: 8280 orl %d0,%d1
595e6: 46c1 movew %d1,%sr
initialized = false;
}
#endif
return status;
}
595e8: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
595ec: b1ee ffd8 cmpal %fp@(-40),%a0
595f0: 6732 beqs 59624 <_Timer_server_Body+0x1dc> <== NEVER TAKEN
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
595f2: 2250 moveal %a0@,%a1
head->next = new_first;
new_first->previous = head;
595f4: 2343 0004 movel %d3,%a1@(4)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
595f8: 42a8 0008 clrl %a0@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
595fc: 2d49 ffe8 movel %a1,%fp@(-24)
_ISR_Enable( level );
59600: 46c0 movew %d0,%sr
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
59602: 2f28 0024 movel %a0@(36),%sp@-
59606: 2f28 0020 movel %a0@(32),%sp@-
5960a: 2068 001c moveal %a0@(28),%a0
5960e: 4e90 jsr %a0@
}
59610: 508f addql #8,%sp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59612: 2204 movel %d4,%d1
59614: 40c0 movew %sr,%d0
59616: 8280 orl %d0,%d1
59618: 46c1 movew %d1,%sr
initialized = false;
}
#endif
return status;
}
5961a: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
5961e: b1ee ffd8 cmpal %fp@(-40),%a0
59622: 66ce bnes 595f2 <_Timer_server_Body+0x1aa>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
59624: 46c0 movew %d0,%sr
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
59626: 41ee fff4 lea %fp@(-12),%a0
5962a: 2548 0078 movel %a0,%a2@(120)
5962e: 6000 fe9a braw 594ca <_Timer_server_Body+0x82>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
59632: 4207 clrb %d7
59634: 1547 007c moveb %d7,%a2@(124)
59638: 2039 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d0
5963e: 5280 addql #1,%d0
59640: 23c0 0007 e244 movel %d0,7e244 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
59646: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
5964a: 2f12 movel %a2@,%sp@-
5964c: 4eb9 0005 d1bc jsr 5d1bc <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
59652: 2f0a movel %a2,%sp@-
59654: 4eba fd1a jsr %pc@(59370 <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
59658: 2f0a movel %a2,%sp@-
5965a: 4eba fd7e jsr %pc@(593da <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
5965e: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
ts->active = true;
59664: 7001 moveq #1,%d0
59666: 1540 007c moveb %d0,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
5966a: 2f2e ffe4 movel %fp@(-28),%sp@-
5966e: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
59674: 2f2e ffe0 movel %fp@(-32),%sp@-
59678: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
5967e: 4fef 0018 lea %sp@(24),%sp
59682: 6000 fe3e braw 594c2 <_Timer_server_Body+0x7a>
00059686 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
59686: 4e56 fff0 linkw %fp,#-16
5968a: 206e 000c moveal %fp@(12),%a0
5968e: 48d7 041c moveml %d2-%d4/%a2,%sp@
59692: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
59696: 202a 0078 movel %a2@(120),%d0
5969a: 671a beqs 596b6 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
5969c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED
596a0: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED
}
}
596a4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
596aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
596ae: 4e5e unlk %fp <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
596b0: 4ef9 0005 9fc0 jmp 59fc0 <_Chain_Append> <== NOT EXECUTED
596b6: 2039 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d0
596bc: 5280 addql #1,%d0
596be: 23c0 0007 e244 movel %d0,7e244 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
596c4: 2028 0038 movel %a0@(56),%d0
596c8: 7201 moveq #1,%d1
596ca: b280 cmpl %d0,%d1
596cc: 6700 008a beqw 59758 <_Timer_server_Schedule_operation_method+0xd2>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
596d0: 7803 moveq #3,%d4
596d2: b880 cmpl %d0,%d4
596d4: 670e beqs 596e4 <_Timer_server_Schedule_operation_method+0x5e>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
596d6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
596dc: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
596de: 4ef9 0005 c846 jmp 5c846 <_Thread_Enable_dispatch>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
596e4: 203c 0000 0700 movel #1792,%d0
596ea: 40c2 movew %sr,%d2
596ec: 8082 orl %d2,%d0
596ee: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
596f0: 260a movel %a2,%d3
596f2: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
596f8: 2039 0007 e2ce movel 7e2ce <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
596fe: 222a 0074 movel %a2@(116),%d1
initialized = false;
}
#endif
return status;
}
59702: 226a 0068 moveal %a2@(104),%a1
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
59706: b689 cmpl %a1,%d3
59708: 671c beqs 59726 <_Timer_server_Schedule_operation_method+0xa0>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5970a: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
5970e: b280 cmpl %d0,%d1
59710: 6400 00ba bccw 597cc <_Timer_server_Schedule_operation_method+0x146>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
59714: 2800 movel %d0,%d4
59716: 9881 subl %d1,%d4
if (delta_interval > delta) {
59718: b883 cmpl %d3,%d4
5971a: 6400 00bc bccw 597d8 <_Timer_server_Schedule_operation_method+0x152>
delta_interval -= delta;
5971e: 9684 subl %d4,%d3
59720: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
59722: 2341 0010 movel %d1,%a1@(16)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
59726: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
5972a: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5972c: 4868 0010 pea %a0@(16)
59730: 486a 0068 pea %a2@(104)
59734: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
if ( !ts->active ) {
5973a: 508f addql #8,%sp
5973c: 102a 007c moveb %a2@(124),%d0
59740: 6694 bnes 596d6 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
59742: 2f0a movel %a2,%sp@-
59744: 4eba fc94 jsr %pc@(593da <_Timer_server_Reset_tod_system_watchdog>)
59748: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
59750: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
59752: 4ef9 0005 c846 jmp 5c846 <_Thread_Enable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
59758: 203c 0000 0700 movel #1792,%d0
5975e: 40c3 movew %sr,%d3
59760: 8083 orl %d3,%d0
59762: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
59764: 2039 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d0
5976a: 220a movel %a2,%d1
5976c: 0681 0000 0034 addil #52,%d1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
59772: 282a 003c movel %a2@(60),%d4
initialized = false;
}
#endif
return status;
}
59776: 226a 0030 moveal %a2@(48),%a1
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
5977a: b289 cmpl %a1,%d1
5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x10a>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
5977e: 2200 movel %d0,%d1
59780: 9284 subl %d4,%d1
delta_interval = first_watchdog->delta_interval;
59782: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
59786: b481 cmpl %d1,%d2
59788: 633a blss 597c4 <_Timer_server_Schedule_operation_method+0x13e><== NEVER TAKEN
delta_interval -= delta;
5978a: 9481 subl %d1,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5978c: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
59790: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
59794: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
59796: 4868 0010 pea %a0@(16)
5979a: 486a 0030 pea %a2@(48)
5979e: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
if ( !ts->active ) {
597a4: 508f addql #8,%sp
597a6: 102a 007c moveb %a2@(124),%d0
597aa: 6600 ff2a bnew 596d6 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
597ae: 2f0a movel %a2,%sp@-
597b0: 4eba fbbe jsr %pc@(59370 <_Timer_server_Reset_interval_system_watchdog>)
597b4: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
597bc: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
597be: 4ef9 0005 c846 jmp 5c846 <_Thread_Enable_dispatch>
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
597c4: 4282 clrl %d2
}
first_watchdog->delta_interval = delta_interval;
597c6: 2342 0010 movel %d2,%a1@(16)
597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x10a>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
597cc: d283 addl %d3,%d1
delta_interval += delta;
597ce: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
597d0: 2341 0010 movel %d1,%a1@(16)
597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0xa0>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
597d8: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
597da: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED
597de: 6000 ff46 braw 59726 <_Timer_server_Schedule_operation_method+0xa0><== NOT EXECUTED
000497dc <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
497dc: 4e56 0000 linkw %fp,#0
497e0: 226e 0008 moveal %fp@(8),%a1
497e4: 2f0a movel %a2,%sp@-
497e6: 246e 000c moveal %fp@(12),%a2
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
497ea: 206a 0004 moveal %a2@(4),%a0
497ee: d1e9 0004 addal %a1@(4),%a0
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
497f2: 2208 movel %a0,%d1
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
497f4: 2012 movel %a2@,%d0
/* Add the basics */
time->tv_sec += add->tv_sec;
497f6: d191 addl %d0,%a1@
time->tv_nsec += add->tv_nsec;
497f8: 2348 0004 movel %a0,%a1@(4)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
497fc: b1fc 3b9a c9ff cmpal #999999999,%a0
49802: 631a blss 4981e <_Timespec_Add_to+0x42>
49804: 2051 moveal %a1@,%a0
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
49806: 5288 addql #1,%a0
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
49808: 0681 c465 3600 addil #-1000000000,%d1
time->tv_sec++;
seconds++;
4980e: 5280 addql #1,%d0
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
49810: 0c81 3b9a c9ff cmpil #999999999,%d1
49816: 62ee bhis 49806 <_Timespec_Add_to+0x2a> <== NEVER TAKEN
49818: 2341 0004 movel %d1,%a1@(4)
4981c: 2288 movel %a0,%a1@
time->tv_sec++;
seconds++;
}
return seconds;
}
4981e: 245f moveal %sp@+,%a2
49820: 4e5e unlk %fp <== NOT EXECUTED
000499b6 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
499b6: 4e56 fff0 linkw %fp,#-16
499ba: 48d7 041c moveml %d2-%d4/%a2,%sp@
499be: 242e 0008 movel %fp@(8),%d2
499c2: 262e 0010 movel %fp@(16),%d3
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
499c6: 2479 0005 f59c moveal 5f59c <_User_extensions_List+0x8>,%a2
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
499cc: 182e 000f moveb %fp@(15),%d4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
499d0: b5fc 0005 f594 cmpal #390548,%a2
499d6: 6726 beqs 499fe <_User_extensions_Fatal+0x48> <== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
499d8: 0284 0000 00ff andil #255,%d4
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
499de: 206a 0030 moveal %a2@(48),%a0
499e2: 4a88 tstl %a0
499e4: 670c beqs 499f2 <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
499e6: 2f03 movel %d3,%sp@-
499e8: 2f04 movel %d4,%sp@-
499ea: 2f02 movel %d2,%sp@-
499ec: 4e90 jsr %a0@
499ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
499f2: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
499f6: b5fc 0005 f594 cmpal #390548,%a2
499fc: 66e0 bnes 499de <_User_extensions_Fatal+0x28> <== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
499fe: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
49a04: 4e5e unlk %fp <== NOT EXECUTED
00049874 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
49874: 4e56 ffec linkw %fp,#-20
head->next = tail;
49878: 203c 0005 f598 movel #390552,%d0
4987e: 23c0 0005 f594 movel %d0,5f594 <_User_extensions_List>
head->previous = NULL;
tail->previous = head;
49884: 203c 0005 f594 movel #390548,%d0
4988a: 23c0 0005 f59c movel %d0,5f59c <_User_extensions_List+0x8>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
49890: 203c 0005 f450 movel #390224,%d0
49896: 23c0 0005 f44c movel %d0,5f44c <_User_extensions_Switches_list>
head->previous = NULL;
tail->previous = head;
4989c: 203c 0005 f44c movel #390220,%d0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
498a2: 42b9 0005 f598 clrl 5f598 <_User_extensions_List+0x4>
498a8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
498ac: 2439 0005 dc1a movel 5dc1a <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
498b2: 2639 0005 dc1e movel 5dc1e <Configuration+0x3a>,%d3
498b8: 42b9 0005 f450 clrl 5f450 <_User_extensions_Switches_list+0x4>
tail->previous = head;
498be: 23c0 0005 f454 movel %d0,5f454 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
498c4: 4a83 tstl %d3
498c6: 6764 beqs 4992c <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
498c8: 7834 moveq #52,%d4
498ca: 4c02 4800 mulsl %d2,%d4
498ce: 2f04 movel %d4,%sp@-
498d0: 4eb9 0004 9e38 jsr 49e38 <_Workspace_Allocate_or_fatal_error>
498d6: 2440 moveal %d0,%a2
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
498d8: 2f04 movel %d4,%sp@-
498da: 42a7 clrl %sp@-
498dc: 2f00 movel %d0,%sp@-
498de: 4eb9 0004 e3f4 jsr 4e3f4 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
498e4: 4fef 0010 lea %sp@(16),%sp
498e8: 4a82 tstl %d2
498ea: 6740 beqs 4992c <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
498ec: 4284 clrl %d4
498ee: 47f9 0004 c4a8 lea 4c4a8 <_User_extensions_Add_set>,%a3
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
498f4: 2043 moveal %d3,%a0
498f6: 5284 addql #1,%d4
498f8: 0683 0000 0020 addil #32,%d3
498fe: 2558 0014 movel %a0@+,%a2@(20)
49902: 2558 0018 movel %a0@+,%a2@(24)
49906: 2558 001c movel %a0@+,%a2@(28)
4990a: 2558 0020 movel %a0@+,%a2@(32)
4990e: 2558 0024 movel %a0@+,%a2@(36)
49912: 2558 0028 movel %a0@+,%a2@(40)
49916: 2558 002c movel %a0@+,%a2@(44)
4991a: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
4991e: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
49920: 45ea 0034 lea %a2@(52),%a2
49924: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49926: 588f addql #4,%sp
49928: b882 cmpl %d2,%d4
4992a: 65c8 bcss 498f4 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
4992c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
49932: 4e5e unlk %fp
...
00049938 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
49938: 4e56 0000 linkw %fp,#0
4993c: 2f0a movel %a2,%sp@-
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
4993e: 2479 0005 f594 moveal 5f594 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
49944: 2f02 movel %d2,%sp@-
49946: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4994a: b5fc 0005 f598 cmpal #390552,%a2
49950: 6718 beqs 4996a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
!_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_begin != NULL )
49952: 206a 0028 moveal %a2@(40),%a0
49956: 4a88 tstl %a0
49958: 6706 beqs 49960 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
4995a: 2f02 movel %d2,%sp@-
4995c: 4e90 jsr %a0@
4995e: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49960: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49962: b5fc 0005 f598 cmpal #390552,%a2
49968: 66e8 bnes 49952 <_User_extensions_Thread_begin+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
4996a: 242e fff8 movel %fp@(-8),%d2
4996e: 246e fffc moveal %fp@(-4),%a2
49972: 4e5e unlk %fp <== NOT EXECUTED
00049a08 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49a08: 4e56 0000 linkw %fp,#0
49a0c: 2f0a movel %a2,%sp@-
return false;
}
}
return true;
}
49a0e: 2479 0005 f594 moveal 5f594 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49a14: 2f02 movel %d2,%sp@-
49a16: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
49a1a: b5fc 0005 f598 cmpal #390552,%a2
49a20: 6722 beqs 49a44 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
!_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 ) {
49a22: 206a 0014 moveal %a2@(20),%a0
49a26: 4a88 tstl %a0
49a28: 6710 beqs 49a3a <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
49a2a: 2f02 movel %d2,%sp@-
49a2c: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
49a32: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
49a34: 508f addql #8,%sp
49a36: 4a00 tstb %d0
49a38: 6718 beqs 49a52 <_User_extensions_Thread_create+0x4a>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49a3a: 2452 moveal %a2@,%a2
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
49a3c: b5fc 0005 f598 cmpal #390552,%a2
49a42: 66de bnes 49a22 <_User_extensions_Thread_create+0x1a>
return false;
}
}
return true;
}
49a44: 242e fff8 movel %fp@(-8),%d2
49a48: 246e fffc moveal %fp@(-4),%a2
49a4c: 4e5e unlk %fp
if ( !status )
return false;
}
}
return true;
49a4e: 7001 moveq #1,%d0
}
49a50: 4e75 rts
49a52: 242e fff8 movel %fp@(-8),%d2
49a56: 246e fffc moveal %fp@(-4),%a2
49a5a: 4e5e unlk %fp
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
49a5c: 4200 clrb %d0 <== NOT EXECUTED
}
}
return true;
}
00049a60 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
49a60: 4e56 0000 linkw %fp,#0
49a64: 2f0a movel %a2,%sp@-
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49a66: 2479 0005 f59c moveal 5f59c <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
49a6c: 2f02 movel %d2,%sp@-
49a6e: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49a72: b5fc 0005 f594 cmpal #390548,%a2
49a78: 6720 beqs 49a9a <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
49a7a: 206a 0020 moveal %a2@(32),%a0
49a7e: 4a88 tstl %a0
49a80: 670c beqs 49a8e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
49a82: 2f02 movel %d2,%sp@-
49a84: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
49a8a: 4e90 jsr %a0@
49a8c: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
49a8e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49a92: b5fc 0005 f594 cmpal #390548,%a2
49a98: 66e0 bnes 49a7a <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49a9a: 242e fff8 movel %fp@(-8),%d2
49a9e: 246e fffc moveal %fp@(-4),%a2
49aa2: 4e5e unlk %fp
...
00049976 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
49976: 4e56 0000 linkw %fp,#0
4997a: 2f0a movel %a2,%sp@-
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
4997c: 2479 0005 f59c moveal 5f59c <_User_extensions_List+0x8>,%a2
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
49982: 2f02 movel %d2,%sp@-
49984: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49988: b5fc 0005 f594 cmpal #390548,%a2
4998e: 671a beqs 499aa <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
49990: 206a 002c moveal %a2@(44),%a0
49994: 4a88 tstl %a0
49996: 6706 beqs 4999e <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
49998: 2f02 movel %d2,%sp@-
4999a: 4e90 jsr %a0@
4999c: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
4999e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
499a2: b5fc 0005 f594 cmpal #390548,%a2
499a8: 66e6 bnes 49990 <_User_extensions_Thread_exitted+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
499aa: 242e fff8 movel %fp@(-8),%d2
499ae: 246e fffc moveal %fp@(-4),%a2
499b2: 4e5e unlk %fp <== NOT EXECUTED
0004a74c <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a74c: 4e56 0000 linkw %fp,#0
4a750: 2f0a movel %a2,%sp@-
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a752: 2479 0006 052c moveal 6052c <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a758: 2f02 movel %d2,%sp@-
4a75a: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4a75e: b5fc 0006 0530 cmpal #394544,%a2
4a764: 671e beqs 4a784 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
!_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_restart != NULL )
4a766: 206a 001c moveal %a2@(28),%a0
4a76a: 4a88 tstl %a0
4a76c: 670c beqs 4a77a <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
4a76e: 2f02 movel %d2,%sp@-
4a770: 2f39 0006 057c movel 6057c <_Per_CPU_Information+0xc>,%sp@-
4a776: 4e90 jsr %a0@
4a778: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
4a77a: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4a77c: b5fc 0006 0530 cmpal #394544,%a2
4a782: 66e2 bnes 4a766 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a784: 242e fff8 movel %fp@(-8),%d2
4a788: 246e fffc moveal %fp@(-4),%a2
4a78c: 4e5e unlk %fp <== NOT EXECUTED
00049aa8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49aa8: 4e56 0000 linkw %fp,#0
49aac: 2f0a movel %a2,%sp@-
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49aae: 2479 0005 f594 moveal 5f594 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49ab4: 2f02 movel %d2,%sp@-
49ab6: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49aba: b5fc 0005 f598 cmpal #390552,%a2
49ac0: 671e beqs 49ae0 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
!_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_start != NULL )
49ac2: 206a 0018 moveal %a2@(24),%a0
49ac6: 4a88 tstl %a0
49ac8: 670c beqs 49ad6 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
49aca: 2f02 movel %d2,%sp@-
49acc: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
49ad2: 4e90 jsr %a0@
49ad4: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49ad6: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49ad8: b5fc 0005 f598 cmpal #390552,%a2
49ade: 66e2 bnes 49ac2 <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49ae0: 242e fff8 movel %fp@(-8),%d2
49ae4: 246e fffc moveal %fp@(-4),%a2
49ae8: 4e5e unlk %fp <== NOT EXECUTED
00049aec <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
49aec: 4e56 fff4 linkw %fp,#-12
49af0: 48d7 040c moveml %d2-%d3/%a2,%sp@
49af4: 262e 0008 movel %fp@(8),%d3
49af8: 242e 000c movel %fp@(12),%d2
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49afc: 2479 0005 f44c moveal 5f44c <_User_extensions_Switches_list>,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
49b02: b5fc 0005 f450 cmpal #390224,%a2
49b08: 6716 beqs 49b20 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
49b0a: 2f02 movel %d2,%sp@-
49b0c: 2f03 movel %d3,%sp@-
49b0e: 206a 0008 moveal %a2@(8),%a0
49b12: 4e90 jsr %a0@
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
49b14: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
49b16: 508f addql #8,%sp
49b18: b5fc 0005 f450 cmpal #390224,%a2
49b1e: 66ea bnes 49b0a <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49b20: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
49b26: 4e5e unlk %fp
...
0004b700 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b700: 4e56 ffe8 linkw %fp,#-24
4b704: 226e 000c moveal %fp@(12),%a1
4b708: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4b70c: 283c 0000 0700 movel #1792,%d4
4b712: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b714: 266e 0008 moveal %fp@(8),%a3
4b718: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4b71c: 40c1 movew %sr,%d1
4b71e: 8081 orl %d1,%d0
4b720: 46c0 movew %d0,%sr
}
}
_ISR_Enable( level );
}
4b722: 244b moveal %a3,%a2
4b724: 205a moveal %a2@+,%a0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4b726: b5c8 cmpal %a0,%a2
4b728: 6748 beqs 4b772 <_Watchdog_Adjust+0x72>
switch ( direction ) {
4b72a: 4a89 tstl %a1
4b72c: 6650 bnes 4b77e <_Watchdog_Adjust+0x7e>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b72e: 4a82 tstl %d2
4b730: 6740 beqs 4b772 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b732: 2628 0010 movel %a0@(16),%d3
4b736: 49f9 0004 b988 lea 4b988 <_Watchdog_Tickle>,%a4
4b73c: b682 cmpl %d2,%d3
4b73e: 622c bhis 4b76c <_Watchdog_Adjust+0x6c> <== NEVER TAKEN
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
4b740: 7001 moveq #1,%d0
4b742: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4b746: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4b748: 2f0b movel %a3,%sp@-
4b74a: 4e94 jsr %a4@
_ISR_Disable( level );
4b74c: 2004 movel %d4,%d0
4b74e: 40c1 movew %sr,%d1
4b750: 8081 orl %d1,%d0
4b752: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( header ) )
4b754: 588f addql #4,%sp
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
4b756: 9483 subl %d3,%d2
}
}
_ISR_Enable( level );
}
4b758: 2013 movel %a3@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
4b75a: 2040 moveal %d0,%a0
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4b75c: b08a cmpl %a2,%d0
4b75e: 6712 beqs 4b772 <_Watchdog_Adjust+0x72>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b760: 4a82 tstl %d2
4b762: 670e beqs 4b772 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b764: 2628 0010 movel %a0@(16),%d3
4b768: b483 cmpl %d3,%d2
4b76a: 64d4 bccs 4b740 <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4b76c: 9682 subl %d2,%d3
4b76e: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b772: 46c1 movew %d1,%sr
}
4b774: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b77a: 4e5e unlk %fp
4b77c: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4b77e: 7001 moveq #1,%d0
4b780: b089 cmpl %a1,%d0
4b782: 66ee bnes 4b772 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4b784: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b788: 46c1 movew %d1,%sr
}
4b78a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b790: 4e5e unlk %fp <== NOT EXECUTED
00049b2c <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
49b2c: 4e56 ffec linkw %fp,#-20
49b30: 226e 000c moveal %fp@(12),%a1
49b34: 48d7 043c moveml %d2-%d5/%a2,%sp@
49b38: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
49b3c: 2a3c 0000 0700 movel #1792,%d5
49b42: 2005 movel %d5,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
49b44: 2839 0005 f5e0 movel 5f5e0 <_Per_CPU_Information+0x8>,%d4
_ISR_Disable( level );
49b4a: 40c3 movew %sr,%d3
49b4c: 8083 orl %d3,%d0
49b4e: 46c0 movew %d0,%sr
/*
* 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 ) {
49b50: 4aa9 0008 tstl %a1@(8)
49b54: 6600 00c6 bnew 49c1c <_Watchdog_Insert+0xf0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
49b58: 2039 0005 f54c movel 5f54c <_Watchdog_Sync_count>,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49b5e: 7201 moveq #1,%d1
_Watchdog_Sync_count++;
49b60: 5280 addql #1,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49b62: 2341 0008 movel %d1,%a1@(8)
_Watchdog_Sync_count++;
49b66: 23c0 0005 f54c movel %d0,5f54c <_Watchdog_Sync_count>
restart:
delta_interval = the_watchdog->initial;
49b6c: 2029 000c movel %a1@(12),%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
49b70: 2052 moveal %a2@,%a0
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49b72: 6764 beqs 49bd8 <_Watchdog_Insert+0xac>
49b74: 4a90 tstl %a0@
49b76: 6760 beqs 49bd8 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49b78: 2228 0010 movel %a0@(16),%d1
49b7c: b280 cmpl %d0,%d1
49b7e: 6252 bhis 49bd2 <_Watchdog_Insert+0xa6>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
49b80: 2405 movel %d5,%d2
49b82: 46c3 movew %d3,%sr
49b84: 8483 orl %d3,%d2
49b86: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b88: 7401 moveq #1,%d2
49b8a: b4a9 0008 cmpl %a1@(8),%d2
49b8e: 666e bnes 49bfe <_Watchdog_Insert+0xd2>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b90: 2439 0005 f4ec movel 5f4ec <_Watchdog_Sync_level>,%d2
49b96: b484 cmpl %d4,%d2
49b98: 6230 bhis 49bca <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b9a: 9081 subl %d1,%d0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49b9c: 2050 moveal %a0@,%a0
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49b9e: 4a80 tstl %d0
49ba0: 6736 beqs 49bd8 <_Watchdog_Insert+0xac>
49ba2: 4a90 tstl %a0@
49ba4: 6732 beqs 49bd8 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49ba6: 2228 0010 movel %a0@(16),%d1
49baa: b081 cmpl %d1,%d0
49bac: 6524 bcss 49bd2 <_Watchdog_Insert+0xa6>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
49bae: 2405 movel %d5,%d2
49bb0: 46c3 movew %d3,%sr
49bb2: 8483 orl %d3,%d2
49bb4: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49bb6: 9081 subl %d1,%d0
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49bb8: 7201 moveq #1,%d1
49bba: b2a9 0008 cmpl %a1@(8),%d1
49bbe: 663e bnes 49bfe <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49bc0: 2239 0005 f4ec movel 5f4ec <_Watchdog_Sync_level>,%d1
49bc6: b284 cmpl %d4,%d1
49bc8: 63d2 blss 49b9c <_Watchdog_Insert+0x70> <== ALWAYS TAKEN
_Watchdog_Sync_level = insert_isr_nest_level;
49bca: 23c4 0005 f4ec movel %d4,5f4ec <_Watchdog_Sync_level>
goto restart;
49bd0: 609a bras 49b6c <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
49bd2: 9280 subl %d0,%d1
49bd4: 2141 0010 movel %d1,%a0@(16)
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
49bd8: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
49bdc: 7402 moveq #2,%d2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
49bde: 2450 moveal %a0@,%a2
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
49be0: 2340 0010 movel %d0,%a1@(16)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
49be4: 2039 0005 f550 movel 5f550 <_Watchdog_Ticks_since_boot>,%d0
49bea: 2342 0008 movel %d2,%a1@(8)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
49bee: 2348 0004 movel %a0,%a1@(4)
before_node = after_node->next;
after_node->next = the_node;
49bf2: 2089 movel %a1,%a0@
the_node->next = before_node;
before_node->previous = the_node;
49bf4: 2549 0004 movel %a1,%a2@(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;
49bf8: 228a movel %a2,%a1@
49bfa: 2340 0014 movel %d0,%a1@(20)
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
49bfe: 23c4 0005 f4ec movel %d4,5f4ec <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
49c04: 2039 0005 f54c movel 5f54c <_Watchdog_Sync_count>,%d0
49c0a: 5380 subql #1,%d0
49c0c: 23c0 0005 f54c movel %d0,5f54c <_Watchdog_Sync_count>
_ISR_Enable( level );
49c12: 46c3 movew %d3,%sr
}
49c14: 4cd7 043c moveml %sp@,%d2-%d5/%a2
49c18: 4e5e unlk %fp
49c1a: 4e75 rts
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
49c1c: 46c3 movew %d3,%sr
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49c1e: 4cd7 043c moveml %sp@,%d2-%d5/%a2
49c22: 4e5e unlk %fp
...
00049c80 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c80: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
49c86: 4e56 0000 linkw %fp,#0
49c8a: 206e 0008 moveal %fp@(8),%a0
49c8e: 2f0a movel %a2,%sp@-
49c90: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c92: 40c1 movew %sr,%d1
49c94: 8081 orl %d1,%d0
49c96: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49c98: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49c9c: 7401 moveq #1,%d2
49c9e: b480 cmpl %d0,%d2
49ca0: 6764 beqs 49d06 <_Watchdog_Remove+0x86>
49ca2: 6314 blss 49cb8 <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49ca4: 2279 0005 f550 moveal 5f550 <_Watchdog_Ticks_since_boot>,%a1
49caa: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49cae: 46c1 movew %d1,%sr
return( previous_state );
}
49cb0: 241f movel %sp@+,%d2
49cb2: 245f moveal %sp@+,%a2
49cb4: 4e5e unlk %fp
49cb6: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
49cb8: 143c 0003 moveb #3,%d2
49cbc: b480 cmpl %d0,%d2
49cbe: 65e4 bcss 49ca4 <_Watchdog_Remove+0x24> <== NEVER TAKEN
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
49cc0: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
49cc2: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49cc6: 4a91 tstl %a1@
49cc8: 6708 beqs 49cd2 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
49cca: 2428 0010 movel %a0@(16),%d2
49cce: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
49cd2: 2479 0005 f54c moveal 5f54c <_Watchdog_Sync_count>,%a2
49cd8: 4a8a tstl %a2
49cda: 670c beqs 49ce8 <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
49cdc: 45f9 0005 f5e0 lea 5f5e0 <_Per_CPU_Information+0x8>,%a2
49ce2: 23d2 0005 f4ec movel %a2@,5f4ec <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49ce8: 2468 0004 moveal %a0@(4),%a2
next->previous = previous;
49cec: 234a 0004 movel %a2,%a1@(4)
previous->next = next;
49cf0: 2489 movel %a1,%a2@
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49cf2: 2279 0005 f550 moveal 5f550 <_Watchdog_Ticks_since_boot>,%a1
49cf8: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49cfc: 46c1 movew %d1,%sr
return( previous_state );
}
49cfe: 241f movel %sp@+,%d2
49d00: 245f moveal %sp@+,%a2
49d02: 4e5e unlk %fp
49d04: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49d06: 2279 0005 f550 moveal 5f550 <_Watchdog_Ticks_since_boot>,%a1
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
49d0c: 42a8 0008 clrl %a0@(8)
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49d10: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49d14: 46c1 movew %d1,%sr
return( previous_state );
}
49d16: 241f movel %sp@+,%d2
49d18: 245f moveal %sp@+,%a2
49d1a: 4e5e unlk %fp
...
0004b0cc <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b0cc: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4b0d2: 4e56 ffe8 linkw %fp,#-24
4b0d6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
4b0da: 242e 0008 movel %fp@(8),%d2
4b0de: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b0e2: 40c3 movew %sr,%d3
4b0e4: 8083 orl %d3,%d0
4b0e6: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4b0e8: 2f0b movel %a3,%sp@-
4b0ea: 4bf9 0004 4b88 lea 44b88 <printk>,%a5
4b0f0: 2f02 movel %d2,%sp@-
4b0f2: 4879 0005 ee86 pea 5ee86 <_Status_Object_name_errors_to_status+0x14>
4b0f8: 4e95 jsr %a5@
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
4b0fa: 245b moveal %a3@+,%a2
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
4b0fc: 4fef 000c lea %sp@(12),%sp
4b100: b7ca cmpal %a2,%a3
4b102: 672c beqs 4b130 <_Watchdog_Report_chain+0x64>
4b104: 49f9 0004 b148 lea 4b148 <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4b10a: 2f0a movel %a2,%sp@-
4b10c: 42a7 clrl %sp@-
4b10e: 4e94 jsr %a4@
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
4b110: 2452 moveal %a2@,%a2
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
4b112: 508f addql #8,%sp
4b114: b7ca cmpal %a2,%a3
4b116: 66f2 bnes 4b10a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4b118: 2f02 movel %d2,%sp@-
4b11a: 4879 0005 ee9d pea 5ee9d <_Status_Object_name_errors_to_status+0x2b>
4b120: 4e95 jsr %a5@
4b122: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4b124: 46c3 movew %d3,%sr
}
4b126: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4b12c: 4e5e unlk %fp
4b12e: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4b130: 4879 0005 eeac pea 5eeac <_Status_Object_name_errors_to_status+0x3a>
4b136: 4e95 jsr %a5@
4b138: 588f addql #4,%sp
}
_ISR_Enable( level );
4b13a: 46c3 movew %d3,%sr
}
4b13c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4b142: 4e5e unlk %fp
...
00049d20 <_Watchdog_Tickle>:
* 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 );
49d20: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
49d26: 4e56 ffe8 linkw %fp,#-24
49d2a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
49d2e: 286e 0008 moveal %fp@(8),%a4
* 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 );
49d32: 40c2 movew %sr,%d2
49d34: 8082 orl %d2,%d0
49d36: 46c0 movew %d0,%sr
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
49d38: 264c moveal %a4,%a3
49d3a: 245b moveal %a3@+,%a2
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
49d3c: b7ca cmpal %a2,%a3
49d3e: 673e beqs 49d7e <_Watchdog_Tickle+0x5e>
* 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) {
49d40: 202a 0010 movel %a2@(16),%d0
49d44: 4bf9 0004 9c80 lea 49c80 <_Watchdog_Remove>,%a5
49d4a: 6708 beqs 49d54 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
49d4c: 5380 subql #1,%d0
49d4e: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
49d52: 662a bnes 49d7e <_Watchdog_Tickle+0x5e>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49d54: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
49d5a: 2f0a movel %a2,%sp@-
49d5c: 4e95 jsr %a5@
_ISR_Enable( level );
49d5e: 46c2 movew %d2,%sr
switch( watchdog_state ) {
49d60: 7202 moveq #2,%d1
49d62: 588f addql #4,%sp
49d64: b280 cmpl %d0,%d1
49d66: 6722 beqs 49d8a <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49d68: 2003 movel %d3,%d0
49d6a: 40c2 movew %sr,%d2
49d6c: 8082 orl %d2,%d0
49d6e: 46c0 movew %d0,%sr
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
49d70: 2014 movel %a4@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
49d72: 2440 moveal %d0,%a2
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
49d74: b7c0 cmpal %d0,%a3
49d76: 6706 beqs 49d7e <_Watchdog_Tickle+0x5e>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
49d78: 4aaa 0010 tstl %a2@(16)
49d7c: 67dc beqs 49d5a <_Watchdog_Tickle+0x3a>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
49d7e: 46c2 movew %d2,%sr
}
49d80: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
49d86: 4e5e unlk %fp
49d88: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
49d8a: 2f2a 0024 movel %a2@(36),%sp@-
49d8e: 2f2a 0020 movel %a2@(32),%sp@-
49d92: 206a 001c moveal %a2@(28),%a0
49d96: 4e90 jsr %a0@
the_watchdog->id,
the_watchdog->user_data
);
break;
49d98: 508f addql #8,%sp
49d9a: 60cc bras 49d68 <_Watchdog_Tickle+0x48>
0005b864 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
5b864: 4280 clrl %d0 <== NOT EXECUTED
return 0;
}
#endif
int __kill( pid_t pid, int sig )
{
5b866: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0;
}
5b86a: 4e5e unlk %fp <== NOT EXECUTED
...
0005b740 <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
5b740: 4e56 0000 linkw %fp,#0
5b744: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
5b748: 2d6e 0010 000c movel %fp@(16),%fp@(12)
5b74e: 2d40 0008 movel %d0,%fp@(8)
}
5b752: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
5b754: 4ef9 0004 2bd8 jmp 42bd8 <calloc>
...
0005b75c <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
5b75c: 4e56 0000 linkw %fp,#0
free( ptr );
5b760: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5b766: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
5b768: 4ef9 0004 2fe4 jmp 42fe4 <free>
...
0005b80c <_fstat_r>:
int _fstat_r(
struct _reent *ptr __attribute__((unused)),
int fd,
struct stat *buf
)
{
5b80c: 4e56 0000 linkw %fp,#0
5b810: 202e 000c movel %fp@(12),%d0
return fstat( fd, buf );
5b814: 2d6e 0010 000c movel %fp@(16),%fp@(12)
5b81a: 2d40 0008 movel %d0,%fp@(8)
}
5b81e: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
int fd,
struct stat *buf
)
{
return fstat( fd, buf );
5b820: 4ef9 0005 b770 jmp 5b770 <fstat>
...
000430f2 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
430f2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return gettimeofday( tp, tzp );
}
430f6: 4e5e unlk %fp <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
430f8: 4ef9 0004 3074 jmp 43074 <gettimeofday> <== NOT EXECUTED
...
0005b83c <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
5b83c: 4e56 0000 linkw %fp,#0
return isatty( fd );
5b840: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5b846: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
5b848: 4ef9 0005 becc jmp 5becc <isatty>
...
0005b9cc <_lseek_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
off_t offset,
int whence
)
{
5b9cc: 4e56 0000 linkw %fp,#0
5b9d0: 206e 000c moveal %fp@(12),%a0
5b9d4: 202e 0010 movel %fp@(16),%d0
5b9d8: 222e 0014 movel %fp@(20),%d1
return lseek( fd, offset, whence );
5b9dc: 2d6e 0018 0014 movel %fp@(24),%fp@(20)
5b9e2: 2d40 000c movel %d0,%fp@(12)
5b9e6: 2d41 0010 movel %d1,%fp@(16)
5b9ea: 2d48 0008 movel %a0,%fp@(8)
}
5b9ee: 4e5e unlk %fp
int fd,
off_t offset,
int whence
)
{
return lseek( fd, offset, whence );
5b9f0: 4ef9 0005 b870 jmp 5b870 <lseek>
...
00045294 <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
45294: 4e56 0000 linkw %fp,#0
45298: 202e 000c movel %fp@(12),%d0
return _STAT_NAME( path, buf );
4529c: 2d6e 0010 000c movel %fp@(16),%fp@(12)
452a2: 2d40 0008 movel %d0,%fp@(8)
}
452a6: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
452a8: 4ef9 0004 51fc jmp 451fc <lstat>
...
0005b9f8 <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
5b9f8: 4e56 0000 linkw %fp,#0
return malloc( size );
5b9fc: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5ba02: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
5ba04: 4ef9 0004 3314 jmp 43314 <malloc>
...
0005bae4 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5bae4: 4e56 0000 linkw %fp,#0
5bae8: 202e 000c movel %fp@(12),%d0
return realloc( ptr, size );
5baec: 2d6e 0010 000c movel %fp@(16),%fp@(12)
5baf2: 2d40 0008 movel %d0,%fp@(8)
}
5baf6: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
5baf8: 4ef9 0005 bb24 jmp 5bb24 <realloc>
...
00047818 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
47818: 4e56 ffa4 linkw %fp,#-92
4781c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
47820: 262e 000c movel %fp@(12),%d3
47824: 282e 0010 movel %fp@(16),%d4
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
47828: 2f03 movel %d3,%sp@-
4782a: 4eb9 0004 5fe8 jsr 45fe8 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
47830: 588f addql #4,%sp
47832: 4a80 tstl %d0
47834: 6600 017c bnew 479b2 <_rename_r+0x19a>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
47838: 45ee ffd0 lea %fp@(-48),%a2
4783c: 4282 clrl %d2
4783e: 2f0a movel %a2,%sp@-
47840: 486e fffc pea %fp@(-4)
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
47844: 4205 clrb %d5
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
47846: 2f03 movel %d3,%sp@-
47848: 4eb9 0004 7c34 jsr 47c34 <rtems_filesystem_get_start_loc>
4784e: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
47852: 2d52 ffe4 movel %a2@,%fp@(-28)
name = old + old_parent_pathlen;
47856: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
47858: 47f9 0005 4ab8 lea 54ab8 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4785e: 260e movel %fp,%d3
47860: 0683 ffff ffe4 addil #-28,%d3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
47866: 2d6e ffd4 ffe8 movel %fp@(-44),%fp@(-24)
4786c: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20)
47872: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16)
47878: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12)
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4787e: 2f02 movel %d2,%sp@-
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
47880: 2d42 fff8 movel %d2,%fp@(-8)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
47884: 4e93 jsr %a3@
47886: 2e80 movel %d0,%sp@
47888: 2f02 movel %d2,%sp@-
4788a: 4eb9 0004 602a jsr 4602a <rtems_filesystem_prefix_separators>
47890: d480 addl %d0,%d2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
47892: 2f02 movel %d2,%sp@-
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
47894: 2d42 fff8 movel %d2,%fp@(-8)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
47898: 4e93 jsr %a3@
4789a: 4297 clrl %sp@
4789c: 2f03 movel %d3,%sp@-
4789e: 42a7 clrl %sp@-
478a0: 2f00 movel %d0,%sp@-
478a2: 2f02 movel %d2,%sp@-
478a4: 4eb9 0004 5f2c jsr 45f2c <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
478aa: 4fef 001c lea %sp@(28),%sp
478ae: 4a80 tstl %d0
478b0: 6600 00d6 bnew 47988 <_rename_r+0x170>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
478b4: 240e movel %fp,%d2
478b6: 0682 ffff ffbc addil #-68,%d2
478bc: 2f02 movel %d2,%sp@-
478be: 486e fffc pea %fp@(-4)
478c2: 2f04 movel %d4,%sp@-
478c4: 4eb9 0004 7c34 jsr 47c34 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
478ca: 486e fff8 pea %fp@(-8)
478ce: d8ae fffc addl %fp@(-4),%d4
478d2: 2f02 movel %d2,%sp@-
478d4: 206e ffc8 moveal %fp@(-56),%a0
478d8: 2f04 movel %d4,%sp@-
478da: 2068 0004 moveal %a0@(4),%a0
478de: 4e90 jsr %a0@
if ( result != 0 ) {
478e0: 4fef 0018 lea %sp@(24),%sp
478e4: 4a80 tstl %d0
478e6: 6600 00f0 bnew 479d8 <_rename_r+0x1c0>
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
478ea: 202e ffcc movel %fp@(-52),%d0
478ee: b0ae ffe0 cmpl %fp@(-32),%d0
478f2: 6648 bnes 4793c <_rename_r+0x124>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
478f4: 2f2e fff8 movel %fp@(-8),%sp@-
rtems_filesystem_freenode( &new_parent_loc );
478f8: 47f9 0004 62b0 lea 462b0 <rtems_filesystem_freenode>,%a3
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
478fe: 206e ffc8 moveal %fp@(-56),%a0
47902: 2f02 movel %d2,%sp@-
47904: 2f03 movel %d3,%sp@-
47906: 2f0a movel %a2,%sp@-
47908: 2068 0040 moveal %a0@(64),%a0
4790c: 4e90 jsr %a0@
4790e: 2800 movel %d0,%d4
rtems_filesystem_freenode( &new_parent_loc );
47910: 2f02 movel %d2,%sp@-
47912: 4e93 jsr %a3@
if ( free_old_parentloc )
47914: 4fef 0014 lea %sp@(20),%sp
47918: 4a05 tstb %d5
4791a: 6612 bnes 4792e <_rename_r+0x116>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
4791c: 2f03 movel %d3,%sp@-
4791e: 4e93 jsr %a3@
return result;
47920: 588f addql #4,%sp
}
47922: 2004 movel %d4,%d0
47924: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3
4792a: 4e5e unlk %fp
4792c: 4e75 rts
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
4792e: 2f0a movel %a2,%sp@-
47930: 4e93 jsr %a3@
47932: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
47934: 2f03 movel %d3,%sp@-
47936: 4e93 jsr %a3@
return result;
47938: 588f addql #4,%sp
4793a: 60e6 bras 47922 <_rename_r+0x10a>
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
4793c: 2f02 movel %d2,%sp@-
4793e: 47f9 0004 62b0 lea 462b0 <rtems_filesystem_freenode>,%a3
47944: 4e93 jsr %a3@
if ( free_old_parentloc )
47946: 588f addql #4,%sp
47948: 4a05 tstb %d5
4794a: 6620 bnes 4796c <_rename_r+0x154>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
4794c: 2f03 movel %d3,%sp@-
rtems_set_errno_and_return_minus_one( EXDEV );
4794e: 78ff moveq #-1,%d4
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
47950: 4e93 jsr %a3@
rtems_set_errno_and_return_minus_one( EXDEV );
47952: 4eb9 0005 1a8c jsr 51a8c <__errno>
47958: 588f addql #4,%sp
4795a: 2040 moveal %d0,%a0
4795c: 7012 moveq #18,%d0
4795e: 2080 movel %d0,%a0@
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47960: 2004 movel %d4,%d0
47962: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3
47968: 4e5e unlk %fp
4796a: 4e75 rts
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
4796c: 2f0a movel %a2,%sp@-
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
4796e: 78ff moveq #-1,%d4
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
47970: 4e93 jsr %a3@
47972: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
47974: 2f03 movel %d3,%sp@-
47976: 4e93 jsr %a3@
rtems_set_errno_and_return_minus_one( EXDEV );
47978: 4eb9 0005 1a8c jsr 51a8c <__errno>
4797e: 588f addql #4,%sp
47980: 2040 moveal %d0,%a0
47982: 7012 moveq #18,%d0
47984: 2080 movel %d0,%a0@
47986: 60d8 bras 47960 <_rename_r+0x148>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
47988: 4a05 tstb %d5
4798a: 660e bnes 4799a <_rename_r+0x182> <== ALWAYS TAKEN
rtems_filesystem_freenode( &old_parent_loc );
return -1;
4798c: 78ff moveq #-1,%d4 <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
4798e: 2004 movel %d4,%d0 <== NOT EXECUTED
47990: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED
47996: 4e5e unlk %fp <== NOT EXECUTED
47998: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
4799a: 2f0a movel %a2,%sp@-
return -1;
4799c: 78ff moveq #-1,%d4
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
4799e: 4eb9 0004 62b0 jsr 462b0 <rtems_filesystem_freenode>
479a4: 588f addql #4,%sp
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
479a6: 2004 movel %d4,%d0
479a8: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3
479ae: 4e5e unlk %fp
479b0: 4e75 rts
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
479b2: 42a7 clrl %sp@-
479b4: 45ee ffd0 lea %fp@(-48),%a2
479b8: 2400 movel %d0,%d2
479ba: 2f0a movel %a2,%sp@-
479bc: 4878 0002 pea 2 <DOUBLE_FLOAT>
479c0: 2f00 movel %d0,%sp@-
479c2: 2f03 movel %d3,%sp@-
479c4: 4eb9 0004 5f9c jsr 45f9c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
479ca: 4fef 0014 lea %sp@(20),%sp
479ce: 4a80 tstl %d0
479d0: 66ba bnes 4798c <_rename_r+0x174> <== NEVER TAKEN
return -1;
free_old_parentloc = true;
479d2: 7a01 moveq #1,%d5
479d4: 6000 fe7c braw 47852 <_rename_r+0x3a>
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
479d8: 2f02 movel %d2,%sp@-
479da: 47f9 0004 62b0 lea 462b0 <rtems_filesystem_freenode>,%a3
479e0: 4e93 jsr %a3@
if ( free_old_parentloc )
479e2: 588f addql #4,%sp
479e4: 4a05 tstb %d5
479e6: 6614 bnes 479fc <_rename_r+0x1e4> <== ALWAYS TAKEN
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
479e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
return -1;
479ea: 78ff moveq #-1,%d4 <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
479ec: 4e93 jsr %a3@ <== NOT EXECUTED
return -1;
479ee: 588f addql #4,%sp <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
479f0: 2004 movel %d4,%d0
479f2: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3
479f8: 4e5e unlk %fp
479fa: 4e75 rts
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
479fc: 2f0a movel %a2,%sp@-
rtems_filesystem_freenode( &old_loc );
return -1;
479fe: 78ff moveq #-1,%d4
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
47a00: 4e93 jsr %a3@
47a02: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
47a04: 2f03 movel %d3,%sp@-
47a06: 4e93 jsr %a3@
return -1;
47a08: 588f addql #4,%sp
47a0a: 60e4 bras 479f0 <_rename_r+0x1d8>
000470f4 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
470f4: 4e56 0000 linkw %fp,#0
return unlink( path );
470f8: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
470fe: 4e5e unlk %fp
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
47100: 4ef9 0004 6f80 jmp 46f80 <unlink>
...
0005bb00 <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5bb00: 4e56 0000 linkw %fp,#0
5bb04: 222e 0010 movel %fp@(16),%d1
5bb08: 202e 000c movel %fp@(12),%d0
return write( fd, buf, nbytes );
5bb0c: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
5bb12: 2d41 000c movel %d1,%fp@(12)
5bb16: 2d40 0008 movel %d0,%fp@(8)
}
5bb1a: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
5bb1c: 4ef9 0005 bc40 jmp 5bc40 <write>
...
00044f80 <access>:
int access(
const char *path,
int amode
)
{
44f80: 4e56 ffb8 linkw %fp,#-72
44f84: 2f02 movel %d2,%sp@-
struct stat statbuf;
if ( stat(path, &statbuf) )
44f86: 486e ffba pea %fp@(-70)
44f8a: 2f2e 0008 movel %fp@(8),%sp@-
int access(
const char *path,
int amode
)
{
44f8e: 242e 000c movel %fp@(12),%d2
struct stat statbuf;
if ( stat(path, &statbuf) )
44f92: 4eb9 0004 6ad8 jsr 46ad8 <stat>
44f98: 508f addql #8,%sp
44f9a: 4a80 tstl %d0
44f9c: 6626 bnes 44fc4 <access+0x44>
return -1;
if ( amode & R_OK ) {
44f9e: 44c2 movew %d2,%ccr
44fa0: 672c beqs 44fce <access+0x4e>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
44fa2: 0802 0001 btst #1,%d2
44fa6: 6610 bnes 44fb8 <access+0x38>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
44fa8: 0802 0000 btst #0,%d2
44fac: 6634 bnes 44fe2 <access+0x62>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44fae: 242e ffb4 movel %fp@(-76),%d2
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
44fb2: 4280 clrl %d0
}
44fb4: 4e5e unlk %fp
44fb6: 4e75 rts
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
44fb8: 202e ffc6 movel %fp@(-58),%d0
44fbc: 0280 0000 0080 andil #128,%d0
44fc2: 66e4 bnes 44fa8 <access+0x28>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44fc4: 242e ffb4 movel %fp@(-76),%d2
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
44fc8: 70ff moveq #-1,%d0
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44fca: 4e5e unlk %fp
44fcc: 4e75 rts
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
44fce: 202e ffc6 movel %fp@(-58),%d0
44fd2: 0280 0000 0100 andil #256,%d0
44fd8: 67ea beqs 44fc4 <access+0x44>
return -1;
}
if ( amode & W_OK ) {
44fda: 0802 0001 btst #1,%d2
44fde: 67c8 beqs 44fa8 <access+0x28> <== NEVER TAKEN
44fe0: 60d6 bras 44fb8 <access+0x38>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
44fe2: 7040 moveq #64,%d0
44fe4: c0ae ffc6 andl %fp@(-58),%d0
return -1;
}
return 0;
}
44fe8: 242e ffb4 movel %fp@(-76),%d2
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
44fec: 4a80 tstl %d0
44fee: 57c0 seq %d0
}
44ff0: 4e5e unlk %fp
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
44ff2: 49c0 extbl %d0
}
...
00043008 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
43008: 4e56 ffec linkw %fp,#-20
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) {
4300c: 203c 0005 fd18 movel #392472,%d0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
43012: 2f0b movel %a3,%sp@-
43014: 2f0a movel %a2,%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) {
43016: b0b9 0005 e71c cmpl 5e71c <rtems_current_user_env>,%d0
4301c: 6778 beqs 43096 <chroot+0x8e>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
4301e: 2f2e 0008 movel %fp@(8),%sp@-
43022: 4eb9 0004 bc8c jsr 4bc8c <chdir>
if (result) {
43028: 588f addql #4,%sp
4302a: 4a80 tstl %d0
4302c: 6600 009a bnew 430c8 <chroot+0xc0>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
43030: 42a7 clrl %sp@-
43032: 45ee ffec lea %fp@(-20),%a2
43036: 2f0a movel %a2,%sp@-
43038: 42a7 clrl %sp@-
4303a: 4878 0001 pea 1 <ADD>
4303e: 4879 0005 daae pea 5daae <dotdotname+0x4>
43044: 4eb9 0004 3438 jsr 43438 <rtems_filesystem_evaluate_path>
4304a: 4fef 0014 lea %sp@(20),%sp
4304e: 4a80 tstl %d0
43050: 6676 bnes 430c8 <chroot+0xc0> <== NEVER TAKEN
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
43052: 2079 0005 e71c moveal 5e71c <rtems_current_user_env>,%a0
43058: 41e8 0018 lea %a0@(24),%a0
4305c: 2f08 movel %a0,%sp@-
4305e: 4eb9 0004 351c jsr 4351c <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
43064: 2079 0005 e71c moveal 5e71c <rtems_current_user_env>,%a0
return 0;
4306a: 588f addql #4,%sp
4306c: 4280 clrl %d0
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
4306e: 2152 0018 movel %a2@,%a0@(24)
43072: 216e fff0 001c movel %fp@(-16),%a0@(28)
43078: 216e fff4 0020 movel %fp@(-12),%a0@(32)
4307e: 216e fff8 0024 movel %fp@(-8),%a0@(36)
43084: 216e fffc 0028 movel %fp@(-4),%a0@(40)
return 0;
}
4308a: 246e ffe4 moveal %fp@(-28),%a2
4308e: 266e ffe8 moveal %fp@(-24),%a3
43092: 4e5e unlk %fp
43094: 4e75 rts
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
43096: 4eb9 0004 4754 jsr 44754 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
4309c: 41f9 0005 fd18 lea 5fd18 <rtems_global_user_env>,%a0
430a2: b1f9 0005 e71c cmpal 5e71c <rtems_current_user_env>,%a0
430a8: 6600 ff74 bnew 4301e <chroot+0x16>
rtems_set_errno_and_return_minus_one( ENOTSUP );
430ac: 4eb9 0004 e44c jsr 4e44c <__errno>
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
430b2: 246e ffe4 moveal %fp@(-28),%a2
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
430b6: 2040 moveal %d0,%a0
430b8: 70ff moveq #-1,%d0
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
430ba: 266e ffe8 moveal %fp@(-24),%a3
430be: 4e5e unlk %fp
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
430c0: 20bc 0000 0086 movel #134,%a0@
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
430c6: 4e75 rts
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
430c8: 45f9 0004 e44c lea 4e44c <__errno>,%a2
430ce: 4e92 jsr %a2@
430d0: 2640 moveal %d0,%a3
430d2: 4e92 jsr %a2@
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
430d4: 246e ffe4 moveal %fp@(-28),%a2
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
430d8: 2040 moveal %d0,%a0
430da: 70ff moveq #-1,%d0
430dc: 2690 movel %a0@,%a3@
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
430de: 266e ffe8 moveal %fp@(-24),%a3
430e2: 4e5e unlk %fp
...
0004c588 <devFS_evaluate_path>:
{
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
4c588: 70f8 moveq #-8,%d0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
4c58a: 4e56 ffdc linkw %fp,#-36
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
4c58e: c0ae 0010 andl %fp@(16),%d0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
4c592: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4c596: 2c2e 0008 movel %fp@(8),%d6
4c59a: 262e 000c movel %fp@(12),%d3
4c59e: 286e 0014 moveal %fp@(20),%a4
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
4c5a2: 4a80 tstl %d0
4c5a4: 6600 0090 bnew 4c636 <devFS_evaluate_path+0xae>
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
4c5a8: 2814 movel %a4@,%d4
if (!device_name_table)
4c5aa: 6700 00a2 beqw 4c64e <devFS_evaluate_path+0xc6>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
4c5ae: 2a39 0005 c988 movel 5c988 <rtems_device_table_size>,%d5
4c5b4: 673c beqs 4c5f2 <devFS_evaluate_path+0x6a> <== NEVER TAKEN
4c5b6: 4280 clrl %d0
4c5b8: 4282 clrl %d2
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
4c5ba: 4bf9 0004 f668 lea 4f668 <strncmp>,%a5
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
4c5c0: 2200 movel %d0,%d1
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
4c5c2: 5282 addql #1,%d2
if (!device_name_table[i].device_name)
4c5c4: e989 lsll #4,%d1
4c5c6: 2041 moveal %d1,%a0
4c5c8: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3
4c5cc: 47f3 4800 lea %a3@(00000000,%d4:l),%a3
4c5d0: 2453 moveal %a3@,%a2
4c5d2: 4a8a tstl %a2
4c5d4: 6716 beqs 4c5ec <devFS_evaluate_path+0x64>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
4c5d6: 2f03 movel %d3,%sp@-
4c5d8: 2f0a movel %a2,%sp@-
4c5da: 2f06 movel %d6,%sp@-
4c5dc: 4e95 jsr %a5@
4c5de: 4fef 000c lea %sp@(12),%sp
4c5e2: 4a80 tstl %d0
4c5e4: 6606 bnes 4c5ec <devFS_evaluate_path+0x64>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
4c5e6: 4a32 3800 tstb %a2@(00000000,%d3:l)
4c5ea: 671e beqs 4c60a <devFS_evaluate_path+0x82> <== ALWAYS TAKEN
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
4c5ec: 2002 movel %d2,%d0
4c5ee: b485 cmpl %d5,%d2
4c5f0: 65ce bcss 4c5c0 <devFS_evaluate_path+0x38>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
4c5f2: 4eb9 0004 e2ac jsr 4e2ac <__errno>
4c5f8: 7202 moveq #2,%d1
4c5fa: 2040 moveal %d0,%a0
4c5fc: 70ff moveq #-1,%d0
}
4c5fe: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
4c604: 2081 movel %d1,%a0@
}
4c606: 4e5e unlk %fp
4c608: 4e75 rts
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
4c60a: 2079 0005 cc58 moveal 5cc58 <rtems_current_user_env>,%a0
4c610: 2968 0028 0010 movel %a0@(40),%a4@(16)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
4c616: 223c 0005 cb04 movel #379652,%d1
pathloc->ops = &devFS_ops;
4c61c: 41f9 0005 cabc lea 5cabc <devFS_ops>,%a0
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
4c622: 2941 0008 movel %d1,%a4@(8)
pathloc->ops = &devFS_ops;
4c626: 2948 000c movel %a0,%a4@(12)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
4c62a: 288b movel %a3,%a4@
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
4c62c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4c632: 4e5e unlk %fp
4c634: 4e75 rts
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4c636: 4eb9 0004 e2ac jsr 4e2ac <__errno> <== NOT EXECUTED
4c63c: 7601 moveq #1,%d3 <== NOT EXECUTED
4c63e: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c640: 70ff moveq #-1,%d0 <== NOT EXECUTED
4c642: 2083 movel %d3,%a0@ <== NOT EXECUTED
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
4c644: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
4c64a: 4e5e unlk %fp <== NOT EXECUTED
4c64c: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
4c64e: 4eb9 0004 e2ac jsr 4e2ac <__errno>
4c654: 740e moveq #14,%d2
4c656: 2040 moveal %d0,%a0
4c658: 70ff moveq #-1,%d0
4c65a: 2082 movel %d2,%a0@
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
4c65c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4c662: 4e5e unlk %fp <== NOT EXECUTED
00043fe0 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
43fe0: 4e56 fff4 linkw %fp,#-12
43fe4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
43fe8: 246e 0008 moveal %fp@(8),%a2
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
43fec: 4aaa 00b4 tstl %a2@(180)
43ff0: 6750 beqs 44042 <drainOutput+0x62>
rtems_interrupt_disable (level);
43ff2: 243c 0000 0700 movel #1792,%d2
43ff8: 2002 movel %d2,%d0
43ffa: 40c1 movew %sr,%d1
43ffc: 8081 orl %d1,%d0
43ffe: 46c0 movew %d0,%sr
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
44000: 206a 0084 moveal %a2@(132),%a0
44004: 202a 0080 movel %a2@(128),%d0
44008: b088 cmpl %a0,%d0
4400a: 6734 beqs 44040 <drainOutput+0x60>
4400c: 47f9 0004 6768 lea 46768 <rtems_semaphore_obtain>,%a3
tty->rawOutBufState = rob_wait;
44012: 7002 moveq #2,%d0
44014: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
44018: 46c1 movew %d1,%sr
sc = rtems_semaphore_obtain(
4401a: 42a7 clrl %sp@-
4401c: 42a7 clrl %sp@-
4401e: 2f2a 008c movel %a2@(140),%sp@-
44022: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44024: 4fef 000c lea %sp@(12),%sp
44028: 4a80 tstl %d0
4402a: 6620 bnes 4404c <drainOutput+0x6c> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
4402c: 2002 movel %d2,%d0
4402e: 40c1 movew %sr,%d1
44030: 8081 orl %d1,%d0
44032: 46c0 movew %d0,%sr
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) {
44034: 206a 0084 moveal %a2@(132),%a0
44038: 202a 0080 movel %a2@(128),%d0
4403c: b088 cmpl %a0,%d0
4403e: 66d2 bnes 44012 <drainOutput+0x32>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
44040: 46c1 movew %d1,%sr
}
}
44042: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
44048: 4e5e unlk %fp
4404a: 4e75 rts
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
4404c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4404e: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00044d2c <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44d2c: 4e56 fffc linkw %fp,#-4
44d30: 222e 0008 movel %fp@(8),%d1
44d34: 2f0a movel %a2,%sp@-
44d36: 246e 000c moveal %fp@(12),%a2
44d3a: 2f02 movel %d2,%sp@-
if ((tty->termios.c_lflag & ECHOCTL) &&
44d3c: 242a 003c movel %a2@(60),%d2
44d40: 0282 0000 0200 andil #512,%d2
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44d46: 1001 moveb %d1,%d0
if ((tty->termios.c_lflag & ECHOCTL) &&
44d48: 4a82 tstl %d2
44d4a: 673e beqs 44d8a <echo+0x5e> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
44d4c: 1001 moveb %d1,%d0
44d4e: 2079 0005 ddd4 moveal 5ddd4 <__ctype_ptr__>,%a0
44d54: 0280 0000 00ff andil #255,%d0
44d5a: 1430 0801 moveb %a0@(00000001,%d0:l),%d2
44d5e: 49c2 extbl %d2
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
44d60: 0802 0005 btst #5,%d2
44d64: 670e beqs 44d74 <echo+0x48>
iscntrl(c) && (c != '\t') && (c != '\n')) {
44d66: 7409 moveq #9,%d2
44d68: b480 cmpl %d0,%d2
44d6a: 6708 beqs 44d74 <echo+0x48>
44d6c: 143c 000a moveb #10,%d2
44d70: b480 cmpl %d0,%d2
44d72: 662a bnes 44d9e <echo+0x72>
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
44d74: 2f0a movel %a2,%sp@-
44d76: 2f00 movel %d0,%sp@-
44d78: 4eba fdd4 jsr %pc@(44b4e <oproc>)
44d7c: 508f addql #8,%sp
}
}
44d7e: 242e fff4 movel %fp@(-12),%d2
44d82: 246e fff8 moveal %fp@(-8),%a2
44d86: 4e5e unlk %fp
44d88: 4e75 rts
44d8a: 1001 moveb %d1,%d0 <== NOT EXECUTED
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
44d8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44d8e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
44d94: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44d96: 4eba fdb6 jsr %pc@(44b4e <oproc>) <== NOT EXECUTED
44d9a: 508f addql #8,%sp <== NOT EXECUTED
44d9c: 60e0 bras 44d7e <echo+0x52> <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
44d9e: 2f0a movel %a2,%sp@-
44da0: 4878 0002 pea 2 <DOUBLE_FLOAT>
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
44da4: 7040 moveq #64,%d0
rtems_termios_puts (echobuf, 2, tty);
44da6: 486e fffe pea %fp@(-2)
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
44daa: b181 eorl %d0,%d1
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44dac: 745e moveq #94,%d2
echobuf[1] = c ^ 0x40;
44dae: 1d41 ffff moveb %d1,%fp@(-1)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44db2: 1d42 fffe moveb %d2,%fp@(-2)
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
44db6: 4eb9 0004 4a4a jsr 44a4a <rtems_termios_puts>
tty->column += 2;
} else {
oproc (c, tty);
}
}
44dbc: 242e fff4 movel %fp@(-12),%d2
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
44dc0: 54aa 0028 addql #2,%a2@(40)
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
44dc4: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
}
}
44dc8: 246e fff8 moveal %fp@(-8),%a2
44dcc: 4e5e unlk %fp <== NOT EXECUTED
00043fc2 <endgrent>:
void endgrent(void)
{
43fc2: 4e56 0000 linkw %fp,#0
if (group_fp != NULL)
43fc6: 2039 0006 05d4 movel 605d4 <group_fp>,%d0
43fcc: 670a beqs 43fd8 <endgrent+0x16> <== NEVER TAKEN
fclose(group_fp);
43fce: 2f00 movel %d0,%sp@-
43fd0: 4eb9 0004 eb3e jsr 4eb3e <fclose>
43fd6: 588f addql #4,%sp
}
43fd8: 4e5e unlk %fp <== NOT EXECUTED
00043e76 <endpwent>:
void endpwent(void)
{
43e76: 4e56 0000 linkw %fp,#0
if (passwd_fp != NULL)
43e7a: 2039 0006 06ae movel 606ae <passwd_fp>,%d0
43e80: 670a beqs 43e8c <endpwent+0x16> <== NEVER TAKEN
fclose(passwd_fp);
43e82: 2f00 movel %d0,%sp@-
43e84: 4eb9 0004 eb3e jsr 4eb3e <fclose>
43e8a: 588f addql #4,%sp
}
43e8c: 4e5e unlk %fp <== NOT EXECUTED
00044dd0 <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)
{
44dd0: 4e56 ffe4 linkw %fp,#-28
44dd4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
44dd8: 246e 0008 moveal %fp@(8),%a2
44ddc: 282e 000c movel %fp@(12),%d4
if (tty->ccount == 0)
44de0: 202a 0020 movel %a2@(32),%d0
44de4: 6734 beqs 44e1a <erase+0x4a>
return;
if (lineFlag) {
44de6: 4a84 tstl %d4
44de8: 673a beqs 44e24 <erase+0x54>
if (!(tty->termios.c_lflag & ECHO)) {
44dea: 262a 003c movel %a2@(60),%d3
44dee: 7208 moveq #8,%d1
44df0: c283 andl %d3,%d1
44df2: 6700 01b0 beqw 44fa4 <erase+0x1d4>
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
44df6: 0803 0004 btst #4,%d3
44dfa: 6630 bnes 44e2c <erase+0x5c> <== ALWAYS TAKEN
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
44dfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44dfe: 4280 clrl %d0 <== NOT EXECUTED
44e00: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
44e04: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
44e08: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44e0a: 4eba ff20 jsr %pc@(44d2c <echo>) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
44e0e: 508f addql #8,%sp <== NOT EXECUTED
44e10: 7020 moveq #32,%d0 <== NOT EXECUTED
44e12: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED
44e16: 6600 019a bnew 44fb2 <erase+0x1e2> <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44e1a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
44e20: 4e5e unlk %fp
44e22: 4e75 rts
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
44e24: 262a 003c movel %a2@(60),%d3
44e28: 7208 moveq #8,%d1
44e2a: c283 andl %d3,%d1
44e2c: 47f9 0004 4a4a lea 44a4a <rtems_termios_puts>,%a3
unsigned char c = tty->cbuf[--tty->ccount];
44e32: 5380 subql #1,%d0
44e34: 206a 001c moveal %a2@(28),%a0
44e38: 2540 0020 movel %d0,%a2@(32)
44e3c: 1430 0800 moveb %a0@(00000000,%d0:l),%d2
if (tty->termios.c_lflag & ECHO) {
44e40: 4a81 tstl %d1
44e42: 6734 beqs 44e78 <erase+0xa8> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
44e44: 4a84 tstl %d4
44e46: 6608 bnes 44e50 <erase+0x80>
44e48: 0803 0004 btst #4,%d3
44e4c: 6700 013c beqw 44f8a <erase+0x1ba>
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
44e50: 7209 moveq #9,%d1
44e52: 0282 0000 00ff andil #255,%d2
44e58: b282 cmpl %d2,%d1
44e5a: 6700 0090 beqw 44eec <erase+0x11c>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
44e5e: 2079 0005 ddd4 moveal 5ddd4 <__ctype_ptr__>,%a0
44e64: 5282 addql #1,%d2
44e66: 1030 2800 moveb %a0@(00000000,%d2:l),%d0
44e6a: 49c0 extbl %d0
44e6c: 0800 0005 btst #5,%d0
44e70: 6756 beqs 44ec8 <erase+0xf8> <== ALWAYS TAKEN
44e72: 0803 0009 btst #9,%d3 <== NOT EXECUTED
44e76: 6614 bnes 44e8c <erase+0xbc> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
44e78: 4a84 tstl %d4
44e7a: 679e beqs 44e1a <erase+0x4a>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
44e7c: 202a 0020 movel %a2@(32),%d0
44e80: 6798 beqs 44e1a <erase+0x4a>
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44e82: 262a 003c movel %a2@(60),%d3
44e86: 7208 moveq #8,%d1
44e88: c283 andl %d3,%d1
44e8a: 60a6 bras 44e32 <erase+0x62>
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
44e8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44e8e: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED
44e92: 4879 0005 ce33 pea 5ce33 <rtems_filesystem_default_pathconf+0xb1><== NOT EXECUTED
44e98: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->column)
44e9a: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
44e9e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44ea2: 6706 beqs 44eaa <erase+0xda> <== NOT EXECUTED
tty->column--;
44ea4: 5380 subql #1,%d0 <== NOT EXECUTED
44ea6: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
44eaa: 2079 0005 ddd4 moveal 5ddd4 <__ctype_ptr__>,%a0 <== NOT EXECUTED
44eb0: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED
44eb4: 49c0 extbl %d0 <== NOT EXECUTED
44eb6: 0800 0005 btst #5,%d0 <== NOT EXECUTED
44eba: 670c beqs 44ec8 <erase+0xf8> <== NOT EXECUTED
44ebc: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED
44ec0: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED
44ec6: 67b0 beqs 44e78 <erase+0xa8> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
44ec8: 2f0a movel %a2,%sp@-
44eca: 4878 0003 pea 3 <DIVIDE>
44ece: 4879 0005 ce33 pea 5ce33 <rtems_filesystem_default_pathconf+0xb1>
44ed4: 4eb9 0004 4a4a jsr 44a4a <rtems_termios_puts>
if (tty->column)
44eda: 202a 0028 movel %a2@(40),%d0
44ede: 4fef 000c lea %sp@(12),%sp
44ee2: 6794 beqs 44e78 <erase+0xa8> <== NEVER TAKEN
tty->column--;
44ee4: 5380 subql #1,%d0
44ee6: 2540 0028 movel %d0,%a2@(40)
44eea: 608c bras 44e78 <erase+0xa8>
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;
44eec: 242a 002c movel %a2@(44),%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44ef0: 4a80 tstl %d0
44ef2: 6732 beqs 44f26 <erase+0x156>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
44ef4: 2c03 movel %d3,%d6
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;
int i = 0;
44ef6: 4201 clrb %d1
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
44ef8: 0286 0000 0200 andil #512,%d6
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
44efe: 2279 0005 ddd4 moveal 5ddd4 <__ctype_ptr__>,%a1
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
44f04: 4283 clrl %d3
44f06: 1618 moveb %a0@+,%d3
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
44f08: 5281 addql #1,%d1
if (c == '\t') {
44f0a: 7a09 moveq #9,%d5
44f0c: ba83 cmpl %d3,%d5
44f0e: 676c beqs 44f7c <erase+0x1ac>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
44f10: 1a31 3801 moveb %a1@(00000001,%d3:l),%d5
44f14: 49c5 extbl %d5
44f16: 0805 0005 btst #5,%d5
44f1a: 6758 beqs 44f74 <erase+0x1a4> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
44f1c: 4a86 tstl %d6 <== NOT EXECUTED
44f1e: 6702 beqs 44f22 <erase+0x152> <== NOT EXECUTED
col += 2;
44f20: 5482 addql #2,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44f22: b280 cmpl %d0,%d1 <== NOT EXECUTED
44f24: 66de bnes 44f04 <erase+0x134> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44f26: b4aa 0028 cmpl %a2@(40),%d2
44f2a: 6c00 ff4c bgew 44e78 <erase+0xa8>
rtems_termios_puts ("\b", 1, tty);
44f2e: 2f0a movel %a2,%sp@-
44f30: 4878 0001 pea 1 <ADD>
44f34: 4879 0005 ce35 pea 5ce35 <rtems_filesystem_default_pathconf+0xb3>
44f3a: 4e93 jsr %a3@
tty->column--;
44f3c: 202a 0028 movel %a2@(40),%d0
44f40: 5380 subql #1,%d0
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44f42: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts ("\b", 1, tty);
tty->column--;
44f46: 2540 0028 movel %d0,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44f4a: b480 cmpl %d0,%d2
44f4c: 6c00 ff2a bgew 44e78 <erase+0xa8>
rtems_termios_puts ("\b", 1, tty);
44f50: 2f0a movel %a2,%sp@-
44f52: 4878 0001 pea 1 <ADD>
44f56: 4879 0005 ce35 pea 5ce35 <rtems_filesystem_default_pathconf+0xb3>
44f5c: 4e93 jsr %a3@
tty->column--;
44f5e: 202a 0028 movel %a2@(40),%d0
44f62: 5380 subql #1,%d0
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44f64: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts ("\b", 1, tty);
tty->column--;
44f68: 2540 0028 movel %d0,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44f6c: b480 cmpl %d0,%d2
44f6e: 6dbe blts 44f2e <erase+0x15e>
44f70: 6000 ff06 braw 44e78 <erase+0xa8>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
44f74: 5282 addql #1,%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44f76: b280 cmpl %d0,%d1
44f78: 668a bnes 44f04 <erase+0x134>
44f7a: 60aa bras 44f26 <erase+0x156>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
44f7c: 7607 moveq #7,%d3
44f7e: 8483 orl %d3,%d2
44f80: 5282 addql #1,%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44f82: b280 cmpl %d0,%d1
44f84: 6600 ff7e bnew 44f04 <erase+0x134>
44f88: 609c bras 44f26 <erase+0x156> <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
44f8a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
44f8e: 4280 clrl %d0 <== NOT EXECUTED
44f90: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44f94: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
44f9a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44f9e: 4e5e unlk %fp <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
44fa0: 6000 fd8a braw 44d2c <echo> <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
44fa4: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44fa8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
44fae: 4e5e unlk %fp <== NOT EXECUTED
44fb0: 4e75 rts <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44fb2: 700a moveq #10,%d0 <== NOT EXECUTED
44fb4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44fb8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44fbe: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44fc2: 4e5e unlk %fp <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44fc4: 6000 fd66 braw 44d2c <echo> <== NOT EXECUTED
00043ab4 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
43ab4: 4e56 fff0 linkw %fp,#-16
43ab8: 202e 0008 movel %fp@(8),%d0
int ret;
va_list ap;
va_start( ap, cmd );
43abc: 41ee 0010 lea %fp@(16),%a0
int fcntl(
int fd,
int cmd,
...
)
{
43ac0: 48d7 041c moveml %d2-%d4/%a2,%sp@
43ac4: 242e 000c movel %fp@(12),%d2
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
43ac8: 2239 0005 f844 movel 5f844 <rtems_libio_number_iops>,%d1
43ace: b280 cmpl %d0,%d1
43ad0: 6300 0188 blsw 43c5a <fcntl+0x1a6>
iop = rtems_libio_iop( fd );
43ad4: 2600 movel %d0,%d3
43ad6: ed88 lsll #6,%d0
43ad8: e78b lsll #3,%d3
43ada: 2279 0006 1038 moveal 61038 <rtems_libio_iops>,%a1
43ae0: 9083 subl %d3,%d0
43ae2: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
rtems_libio_check_is_open(iop);
43ae6: 282a 0014 movel %a2@(20),%d4
43aea: 0804 0008 btst #8,%d4
43aee: 6700 016a beqw 43c5a <fcntl+0x1a6>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43af2: 7009 moveq #9,%d0
43af4: b082 cmpl %d2,%d0
43af6: 641a bccs 43b12 <fcntl+0x5e>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
43af8: 4eb9 0004 edbc jsr 4edbc <__errno>
43afe: 2040 moveal %d0,%a0
43b00: 7016 moveq #22,%d0
43b02: 2080 movel %d0,%a0@
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43b04: 76ff moveq #-1,%d3
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
43b06: 2003 movel %d3,%d0
43b08: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
43b0e: 4e5e unlk %fp
43b10: 4e75 rts
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43b12: 303b 2a08 movew %pc@(43b1c <fcntl+0x68>,%d2:l:2),%d0
43b16: 48c0 extl %d0
43b18: 4efb 0802 jmp %pc@(43b1c <fcntl+0x68>,%d0:l)
43b1c: 00aa 009e 008e oril #10354830,%d2 <== NOT EXECUTED
43b22: 0074 .short 0x0074 <== NOT EXECUTED
43b24: 0026 .short 0x0026 <== NOT EXECUTED
43b26: 0014 .short 0x0014 <== NOT EXECUTED
43b28: 0014 .short 0x0014 <== NOT EXECUTED
43b2a: 0014 .short 0x0014 <== NOT EXECUTED
43b2c: 0014 .short 0x0014 <== NOT EXECUTED
43b2e: 0014 .short 0x0014 <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
43b30: 4eb9 0004 edbc jsr 4edbc <__errno>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43b36: 76ff moveq #-1,%d3
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
43b38: 2040 moveal %d0,%a0
43b3a: 20bc 0000 0086 movel #134,%a0@
43b40: 60c4 bras 43b06 <fcntl+0x52>
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
43b42: 2f10 movel %a0@,%sp@-
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
43b44: 4283 clrl %d3
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
43b46: 4eb9 0004 4160 jsr 44160 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
43b4c: 222a 0014 movel %a2@(20),%d1
43b50: 588f addql #4,%sp
43b52: 0280 0000 0201 andil #513,%d0
43b58: 0281 ffff fdfe andil #-514,%d1
43b5e: 8081 orl %d1,%d0
43b60: 2540 0014 movel %d0,%a2@(20)
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
43b64: 206a 0020 moveal %a2@(32),%a0
43b68: 2f0a movel %a2,%sp@-
43b6a: 2f02 movel %d2,%sp@-
43b6c: 2068 0030 moveal %a0@(48),%a0
43b70: 4e90 jsr %a0@
if (err) {
43b72: 508f addql #8,%sp
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
43b74: 2400 movel %d0,%d2
if (err) {
43b76: 678e beqs 43b06 <fcntl+0x52> <== ALWAYS TAKEN
errno = err;
43b78: 4eb9 0004 edbc jsr 4edbc <__errno> <== NOT EXECUTED
ret = -1;
43b7e: 76ff moveq #-1,%d3 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
43b80: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
43b82: 2003 movel %d3,%d0 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
43b84: 2082 movel %d2,%a0@ <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
43b86: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
43b8c: 4e5e unlk %fp <== NOT EXECUTED
43b8e: 4e75 rts <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
43b90: 2f04 movel %d4,%sp@-
43b92: 4eb9 0004 41a0 jsr 441a0 <rtems_libio_to_fcntl_flags>
43b98: 588f addql #4,%sp
43b9a: 2600 movel %d0,%d3
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
43b9c: 6cc6 bges 43b64 <fcntl+0xb0> <== ALWAYS TAKEN
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
43b9e: 2003 movel %d3,%d0 <== NOT EXECUTED
43ba0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
43ba6: 4e5e unlk %fp <== NOT EXECUTED
43ba8: 4e75 rts <== NOT EXECUTED
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
43baa: 4a90 tstl %a0@
43bac: 6768 beqs 43c16 <fcntl+0x162>
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
43bae: 4283 clrl %d3
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
43bb0: 08c4 000b bset #11,%d4
43bb4: 2544 0014 movel %d4,%a2@(20)
43bb8: 60aa bras 43b64 <fcntl+0xb0>
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
43bba: 0804 000b btst #11,%d4
43bbe: 56c3 sne %d3
43bc0: 49c3 extbl %d3
43bc2: 4483 negl %d3
43bc4: 609e bras 43b64 <fcntl+0xb0>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
43bc6: 2010 movel %a0@,%d0
if ( fd2 )
43bc8: 6700 00aa beqw 43c74 <fcntl+0x1c0>
diop = rtems_libio_iop( fd2 );
43bcc: b081 cmpl %d1,%d0
43bce: 6454 bccs 43c24 <fcntl+0x170> <== NEVER TAKEN
43bd0: 2200 movel %d0,%d1
43bd2: ed88 lsll #6,%d0
43bd4: e789 lsll #3,%d1
43bd6: 9081 subl %d1,%d0
43bd8: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
43bdc: 2608 movel %a0,%d3
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43bde: 9689 subl %a1,%d3
43be0: e683 asrl #3,%d3
43be2: 203c b6db 6db7 movel #-1227133513,%d0
43be8: 4c00 3800 mulsl %d0,%d3
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43bec: 216a 0018 0018 movel %a2@(24),%a0@(24)
43bf2: 216a 001c 001c movel %a2@(28),%a0@(28)
43bf8: 216a 0020 0020 movel %a2@(32),%a0@(32)
43bfe: 216a 0024 0024 movel %a2@(36),%a0@(36)
43c04: 216a 0028 0028 movel %a2@(40),%a0@(40)
ret = -1;
break;
}
}
diop->flags = iop->flags;
43c0a: 2144 0014 movel %d4,%a0@(20)
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
43c0e: 4a83 tstl %d3
43c10: 6c00 ff52 bgew 43b64 <fcntl+0xb0>
43c14: 6088 bras 43b9e <fcntl+0xea> <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
43c16: 4283 clrl %d3
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
43c18: 0884 000b bclr #11,%d4
43c1c: 2544 0014 movel %d4,%a2@(20)
43c20: 6000 ff42 braw 43b64 <fcntl+0xb0>
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
43c24: 91c8 subal %a0,%a0 <== NOT EXECUTED
43c26: 4283 clrl %d3 <== NOT EXECUTED
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43c28: 9689 subl %a1,%d3 <== NOT EXECUTED
43c2a: e683 asrl #3,%d3 <== NOT EXECUTED
43c2c: 203c b6db 6db7 movel #-1227133513,%d0 <== NOT EXECUTED
43c32: 4c00 3800 mulsl %d0,%d3 <== NOT EXECUTED
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43c36: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED
43c3c: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED
43c42: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED
43c48: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED
43c4e: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
43c54: 2144 0014 movel %d4,%a0@(20) <== NOT EXECUTED
43c58: 60b4 bras 43c0e <fcntl+0x15a> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43c5a: 4eb9 0004 edbc jsr 4edbc <__errno>
43c60: 76ff moveq #-1,%d3
43c62: 7209 moveq #9,%d1
43c64: 2040 moveal %d0,%a0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
43c66: 2003 movel %d3,%d0
43c68: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43c6e: 2081 movel %d1,%a0@
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
43c70: 4e5e unlk %fp
43c72: 4e75 rts
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
43c74: 4eb9 0004 41ee jsr 441ee <rtems_libio_allocate>
43c7a: 2040 moveal %d0,%a0
if ( diop == 0 ) {
43c7c: 4a80 tstl %d0
43c7e: 6700 fe84 beqw 43b04 <fcntl+0x50>
43c82: 282a 0014 movel %a2@(20),%d4
43c86: 2600 movel %d0,%d3
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43c88: 203c b6db 6db7 movel #-1227133513,%d0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43c8e: 216a 0018 0018 movel %a2@(24),%a0@(24)
43c94: 216a 001c 001c movel %a2@(28),%a0@(28)
43c9a: 216a 0020 0020 movel %a2@(32),%a0@(32)
43ca0: 216a 0024 0024 movel %a2@(36),%a0@(36)
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
if ( diop == 0 ) {
43ca6: 2279 0006 1038 moveal 61038 <rtems_libio_iops>,%a1
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43cac: 9689 subl %a1,%d3
43cae: e683 asrl #3,%d3
43cb0: 4c00 3800 mulsl %d0,%d3
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43cb4: 216a 0028 0028 movel %a2@(40),%a0@(40)
ret = -1;
break;
}
}
diop->flags = iop->flags;
43cba: 2144 0014 movel %d4,%a0@(20)
43cbe: 6000 ff4e braw 43c0e <fcntl+0x15a>
0004d0c4 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4d0c4: 4e56 ffe0 linkw %fp,#-32
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4d0c8: 2039 0006 14bc movel 614bc <pipe_semaphore>,%d0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4d0ce: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
4d0d2: 286e 0008 moveal %fp@(8),%a4
4d0d6: 47f9 0004 899c lea 4899c <rtems_semaphore_obtain>,%a3
4d0dc: 242e 000c movel %fp@(12),%d2
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4d0e0: 4a80 tstl %d0
4d0e2: 677e beqs 4d162 <fifo_open+0x9e>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4d0e4: 42a7 clrl %sp@-
4d0e6: 42a7 clrl %sp@-
4d0e8: 2f00 movel %d0,%sp@-
4d0ea: 4e93 jsr %a3@
}
if (sc == RTEMS_SUCCESSFUL) {
4d0ec: 4fef 000c lea %sp@(12),%sp
4d0f0: 4a80 tstl %d0
4d0f2: 6600 0328 bnew 4d41c <fifo_open+0x358>
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
4d0f6: 2a54 moveal %a4@,%a5
if (pipe == NULL) {
4d0f8: 4a8d tstl %a5
4d0fa: 6700 0118 beqw 4d214 <fifo_open+0x150>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4d0fe: 42a7 clrl %sp@-
4d100: 42a7 clrl %sp@-
4d102: 2f2d 0028 movel %a5@(40),%sp@-
4d106: 4e93 jsr %a3@
4d108: 4fef 000c lea %sp@(12),%sp
4d10c: 4a80 tstl %d0
4d10e: 6600 0084 bnew 4d194 <fifo_open+0xd0>
4d112: 95ca subal %a2,%a2
err = -EINTR;
if (*pipep == NULL) {
4d114: 4a94 tstl %a4@
4d116: 6700 02c0 beqw 4d3d8 <fifo_open+0x314>
else
*pipep = pipe;
}
out:
pipe_unlock();
4d11a: 4eba fec4 jsr %pc@(4cfe0 <pipe_unlock>)
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4d11e: 4a8a tstl %a2
4d120: 6634 bnes 4d156 <fifo_open+0x92> <== NEVER TAKEN
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4d122: 7006 moveq #6,%d0
4d124: 2042 moveal %d2,%a0
4d126: 7204 moveq #4,%d1
4d128: c0a8 0014 andl %a0@(20),%d0
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4d12c: 2454 moveal %a4@,%a2
switch (LIBIO_ACCMODE(iop)) {
4d12e: b280 cmpl %d0,%d1
4d130: 6700 022a beqw 4d35c <fifo_open+0x298>
4d134: 123c 0006 moveb #6,%d1
4d138: b280 cmpl %d0,%d1
4d13a: 6700 01d0 beqw 4d30c <fifo_open+0x248>
4d13e: 123c 0002 moveb #2,%d1
4d142: b280 cmpl %d0,%d1
4d144: 6756 beqs 4d19c <fifo_open+0xd8> <== ALWAYS TAKEN
4d146: 4bf9 0004 8adc lea 48adc <rtems_semaphore_release>,%a5
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d14c: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d150: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d152: 4e95 jsr %a5@
return 0;
4d154: 588f addql #4,%sp
out_error:
pipe_release(pipep, iop);
return err;
}
4d156: 200a movel %a2,%d0
4d158: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5
4d15e: 4e5e unlk %fp
4d160: 4e75 rts
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4d162: 42a7 clrl %sp@-
4d164: 42a7 clrl %sp@-
4d166: 2f39 0006 1bb4 movel 61bb4 <rtems_libio_semaphore>,%sp@-
4d16c: 4e93 jsr %a3@
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
4d16e: 4fef 000c lea %sp@(12),%sp
4d172: 4ab9 0006 14bc tstl 614bc <pipe_semaphore>
4d178: 6700 026e beqw 4d3e8 <fifo_open+0x324>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4d17c: 2f39 0006 1bb4 movel 61bb4 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED
4d182: 4eb9 0004 8adc jsr 48adc <rtems_semaphore_release> <== NOT EXECUTED
4d188: 2039 0006 14bc movel 614bc <pipe_semaphore>,%d0 <== NOT EXECUTED
4d18e: 588f addql #4,%sp <== NOT EXECUTED
4d190: 6000 ff52 braw 4d0e4 <fifo_open+0x20> <== NOT EXECUTED
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
4d194: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
4d198: 6000 ff7a braw 4d114 <fifo_open+0x50> <== NOT EXECUTED
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4d19c: 202a 0010 movel %a2@(16),%d0
4d1a0: 2040 moveal %d0,%a0
4d1a2: 5288 addql #1,%a0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4d1a4: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4d1a8: 2548 0010 movel %a0,%a2@(16)
4d1ac: 4a80 tstl %d0
4d1ae: 6700 02a4 beqw 4d454 <fifo_open+0x390>
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
4d1b2: 4aaa 0014 tstl %a2@(20)
4d1b6: 668e bnes 4d146 <fifo_open+0x82>
/* Not an error */
if (LIBIO_NODELAY(iop))
4d1b8: 7001 moveq #1,%d0
4d1ba: 2042 moveal %d2,%a0
4d1bc: c0a8 0014 andl %a0@(20),%d0
4d1c0: 6684 bnes 4d146 <fifo_open+0x82>
break;
prevCounter = pipe->writerCounter;
4d1c2: 282a 0024 movel %a2@(36),%d4
4d1c6: 4bf9 0004 8adc lea 48adc <rtems_semaphore_release>,%a5
4d1cc: 263c 0004 e6c0 movel #321216,%d3
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4d1d2: 2f2a 0028 movel %a2@(40),%sp@-
4d1d6: 4e95 jsr %a5@
if (! PIPE_READWAIT(pipe))
4d1d8: 2043 moveal %d3,%a0
4d1da: 42a7 clrl %sp@-
4d1dc: 2f2a 002c movel %a2@(44),%sp@-
4d1e0: 4e90 jsr %a0@
4d1e2: 4fef 000c lea %sp@(12),%sp
4d1e6: 4a80 tstl %d0
4d1e8: 6600 027e bnew 4d468 <fifo_open+0x3a4>
goto out_error;
if (! PIPE_LOCK(pipe))
4d1ec: 42a7 clrl %sp@-
4d1ee: 42a7 clrl %sp@-
4d1f0: 2f2a 0028 movel %a2@(40),%sp@-
4d1f4: 4e93 jsr %a3@
4d1f6: 4fef 000c lea %sp@(12),%sp
4d1fa: 4a80 tstl %d0
4d1fc: 6600 026a bnew 4d468 <fifo_open+0x3a4>
goto out_error;
} while (prevCounter == pipe->writerCounter);
4d200: b8aa 0024 cmpl %a2@(36),%d4
4d204: 67cc beqs 4d1d2 <fifo_open+0x10e> <== NEVER TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d206: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d20a: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d20c: 4e95 jsr %a5@
return 0;
4d20e: 588f addql #4,%sp
4d210: 6000 ff44 braw 4d156 <fifo_open+0x92>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4d214: 4878 0034 pea 34 <OPER2+0x20>
4d218: 45f9 0004 5438 lea 45438 <malloc>,%a2
4d21e: 4e92 jsr %a2@
if (pipe == NULL)
4d220: 588f addql #4,%sp
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4d222: 2a40 moveal %d0,%a5
4d224: 2600 movel %d0,%d3
if (pipe == NULL)
4d226: 6700 02e0 beqw 4d508 <fifo_open+0x444>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4d22a: 2040 moveal %d0,%a0
pipe->Size = PIPE_BUF;
4d22c: 203c 0000 0200 movel #512,%d0
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4d232: 4298 clrl %a0@+
4d234: 5888 addql #4,%a0
4d236: 4298 clrl %a0@+
4d238: 4298 clrl %a0@+
4d23a: 4298 clrl %a0@+
4d23c: 4298 clrl %a0@+
4d23e: 4298 clrl %a0@+
4d240: 4298 clrl %a0@+
4d242: 4298 clrl %a0@+
4d244: 4298 clrl %a0@+
4d246: 4298 clrl %a0@+
4d248: 4298 clrl %a0@+
4d24a: 4290 clrl %a0@
pipe->Size = PIPE_BUF;
4d24c: 2b40 0004 movel %d0,%a5@(4)
pipe->Buffer = malloc(pipe->Size);
4d250: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4d254: 4e92 jsr %a2@
if (! pipe->Buffer)
4d256: 588f addql #4,%sp
4d258: 45f9 0004 4c48 lea 44c48 <free>,%a2
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
4d25e: 2a80 movel %d0,%a5@
if (! pipe->Buffer)
4d260: 6700 02a0 beqw 4d502 <fifo_open+0x43e>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4d264: 486d 002c pea %a5@(44)
4d268: 45f9 0004 e4b0 lea 4e4b0 <rtems_barrier_create>,%a2
rtems_build_name ('P', 'I', 'r', c),
4d26e: 1039 0006 05ec moveb 605ec <c.5614>,%d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4d274: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'r', c),
4d276: 49c0 extbl %d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4d278: 42a7 clrl %sp@-
4d27a: 0080 5049 7200 oril #1346990592,%d0
4d280: 2f00 movel %d0,%sp@-
4d282: 4e92 jsr %a2@
4d284: 4fef 0010 lea %sp@(16),%sp
4d288: 4a80 tstl %d0
4d28a: 6600 0268 bnew 4d4f4 <fifo_open+0x430>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4d28e: 486d 0030 pea %a5@(48)
rtems_build_name ('P', 'I', 'w', c),
4d292: 1039 0006 05ec moveb 605ec <c.5614>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4d298: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'w', c),
4d29a: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4d29c: 42a7 clrl %sp@-
4d29e: 0080 5049 7700 oril #1346991872,%d0
4d2a4: 2f00 movel %d0,%sp@-
4d2a6: 4e92 jsr %a2@
4d2a8: 4fef 0010 lea %sp@(16),%sp
4d2ac: 45f9 0004 e5a8 lea 4e5a8 <rtems_barrier_delete>,%a2
4d2b2: 4a80 tstl %d0
4d2b4: 6600 0234 bnew 4d4ea <fifo_open+0x426>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4d2b8: 486d 0028 pea %a5@(40)
rtems_build_name ('P', 'I', 's', c), 1,
4d2bc: 1039 0006 05ec moveb 605ec <c.5614>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4d2c2: 42a7 clrl %sp@-
4d2c4: 4878 0010 pea 10 <INVALID_OPERATION>
rtems_build_name ('P', 'I', 's', c), 1,
4d2c8: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4d2ca: 4878 0001 pea 1 <ADD>
4d2ce: 0080 5049 7300 oril #1346990848,%d0
4d2d4: 2f00 movel %d0,%sp@-
4d2d6: 4eb9 0004 8700 jsr 48700 <rtems_semaphore_create>
4d2dc: 4fef 0014 lea %sp@(20),%sp
4d2e0: 4a80 tstl %d0
4d2e2: 6600 01f8 bnew 4d4dc <fifo_open+0x418>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4d2e6: 1039 0006 05ec moveb 605ec <c.5614>,%d0
4d2ec: 49c0 extbl %d0
4d2ee: 2200 movel %d0,%d1
4d2f0: 5281 addql #1,%d1
4d2f2: 13c1 0006 05ec moveb %d1,605ec <c.5614>
4d2f8: 727a moveq #122,%d1
4d2fa: b280 cmpl %d0,%d1
4d2fc: 6600 fe00 bnew 4d0fe <fifo_open+0x3a>
c = 'a';
4d300: 7061 moveq #97,%d0
4d302: 13c0 0006 05ec moveb %d0,605ec <c.5614>
4d308: 6000 fdf4 braw 4d0fe <fifo_open+0x3a>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4d30c: 202a 0010 movel %a2@(16),%d0
4d310: 2200 movel %d0,%d1
4d312: 5281 addql #1,%d1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4d314: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4d318: 2541 0010 movel %d1,%a2@(16)
4d31c: 4a80 tstl %d0
4d31e: 6700 0120 beqw 4d440 <fifo_open+0x37c>
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4d322: 202a 0014 movel %a2@(20),%d0
4d326: 2040 moveal %d0,%a0
4d328: 5288 addql #1,%a0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4d32a: 52aa 0024 addql #1,%a2@(36)
4d32e: 4bf9 0004 8adc lea 48adc <rtems_semaphore_release>,%a5
if (pipe->Writers ++ == 0)
4d334: 2548 0014 movel %a0,%a2@(20)
4d338: 4a80 tstl %d0
4d33a: 6600 fe10 bnew 4d14c <fifo_open+0x88>
PIPE_WAKEUPREADERS(pipe);
4d33e: 486e fffc pea %fp@(-4)
4d342: 2f2a 002c movel %a2@(44),%sp@-
4d346: 4eb9 0004 e648 jsr 4e648 <rtems_barrier_release>
4d34c: 508f addql #8,%sp
break;
}
PIPE_UNLOCK(pipe);
4d34e: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d352: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d354: 4e95 jsr %a5@
return 0;
4d356: 588f addql #4,%sp
4d358: 6000 fdfc braw 4d156 <fifo_open+0x92>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4d35c: 202a 0014 movel %a2@(20),%d0
4d360: 2200 movel %d0,%d1
4d362: 5281 addql #1,%d1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
4d364: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4d368: 2541 0014 movel %d1,%a2@(20)
4d36c: 4a80 tstl %d0
4d36e: 6700 00bc beqw 4d42c <fifo_open+0x368>
4d372: 4bf9 0004 8adc lea 48adc <rtems_semaphore_release>,%a5
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4d378: 4aaa 0010 tstl %a2@(16)
4d37c: 6600 fdce bnew 4d14c <fifo_open+0x88>
4d380: 7001 moveq #1,%d0
4d382: 2042 moveal %d2,%a0
4d384: c0a8 0014 andl %a0@(20),%d0
4d388: 6600 0138 bnew 4d4c2 <fifo_open+0x3fe>
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
4d38c: 282a 0020 movel %a2@(32),%d4
4d390: 263c 0004 e6c0 movel #321216,%d3
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4d396: 2f2a 0028 movel %a2@(40),%sp@-
4d39a: 4e95 jsr %a5@
if (! PIPE_WRITEWAIT(pipe))
4d39c: 2043 moveal %d3,%a0
4d39e: 42a7 clrl %sp@-
4d3a0: 2f2a 0030 movel %a2@(48),%sp@-
4d3a4: 4e90 jsr %a0@
4d3a6: 4fef 000c lea %sp@(12),%sp
4d3aa: 4a80 tstl %d0
4d3ac: 6600 00ba bnew 4d468 <fifo_open+0x3a4>
goto out_error;
if (! PIPE_LOCK(pipe))
4d3b0: 42a7 clrl %sp@-
4d3b2: 42a7 clrl %sp@-
4d3b4: 2f2a 0028 movel %a2@(40),%sp@-
4d3b8: 4e93 jsr %a3@
4d3ba: 4fef 000c lea %sp@(12),%sp
4d3be: 4a80 tstl %d0
4d3c0: 6600 00a6 bnew 4d468 <fifo_open+0x3a4>
goto out_error;
} while (prevCounter == pipe->readerCounter);
4d3c4: b8aa 0020 cmpl %a2@(32),%d4
4d3c8: 67cc beqs 4d396 <fifo_open+0x2d2> <== NEVER TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d3ca: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d3ce: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d3d0: 4e95 jsr %a5@
return 0;
4d3d2: 588f addql #4,%sp
4d3d4: 6000 fd80 braw 4d156 <fifo_open+0x92>
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
4d3d8: 4a8a tstl %a2
4d3da: 6600 00a8 bnew 4d484 <fifo_open+0x3c0>
pipe_free(pipe);
else
*pipep = pipe;
4d3de: 288d movel %a5,%a4@
}
out:
pipe_unlock();
4d3e0: 4eba fbfe jsr %pc@(4cfe0 <pipe_unlock>)
4d3e4: 6000 fd3c braw 4d122 <fifo_open+0x5e>
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
4d3e8: 4879 0006 14bc pea 614bc <pipe_semaphore>
4d3ee: 42a7 clrl %sp@-
4d3f0: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4d3f4: 4878 0001 pea 1 <ADD>
4d3f8: 2f3c 5049 5045 movel #1346981957,%sp@-
4d3fe: 4eb9 0004 8700 jsr 48700 <rtems_semaphore_create>
4d404: 2f39 0006 1bb4 movel 61bb4 <rtems_libio_semaphore>,%sp@-
4d40a: 2600 movel %d0,%d3
4d40c: 4eb9 0004 8adc jsr 48adc <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4d412: 4fef 0018 lea %sp@(24),%sp
4d416: 4a83 tstl %d3
4d418: 6700 00f8 beqw 4d512 <fifo_open+0x44e>
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
4d41c: 347c fff4 moveaw #-12,%a2
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4d420: 200a movel %a2,%d0
4d422: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5
4d428: 4e5e unlk %fp
4d42a: 4e75 rts
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
4d42c: 486e fffc pea %fp@(-4)
4d430: 2f2a 002c movel %a2@(44),%sp@-
4d434: 4eb9 0004 e648 jsr 4e648 <rtems_barrier_release>
4d43a: 508f addql #8,%sp
4d43c: 6000 ff34 braw 4d372 <fifo_open+0x2ae>
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4d440: 486e fffc pea %fp@(-4)
4d444: 2f2a 0030 movel %a2@(48),%sp@-
4d448: 4eb9 0004 e648 jsr 4e648 <rtems_barrier_release>
4d44e: 508f addql #8,%sp
4d450: 6000 fed0 braw 4d322 <fifo_open+0x25e>
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4d454: 486e fffc pea %fp@(-4)
4d458: 2f2a 0030 movel %a2@(48),%sp@-
4d45c: 4eb9 0004 e648 jsr 4e648 <rtems_barrier_release>
4d462: 508f addql #8,%sp
4d464: 6000 fd4c braw 4d1b2 <fifo_open+0xee>
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4d468: 2f02 movel %d2,%sp@- <== NOT EXECUTED
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
4d46a: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4d46e: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4d470: 4eb9 0004 cff6 jsr 4cff6 <pipe_release> <== NOT EXECUTED
return err;
4d476: 508f addql #8,%sp <== NOT EXECUTED
}
4d478: 200a movel %a2,%d0
4d47a: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5
4d480: 4e5e unlk %fp
4d482: 4e75 rts
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4d484: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED
4d488: 49f9 0004 e5a8 lea 4e5a8 <rtems_barrier_delete>,%a4 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
4d48e: 47f9 0004 4c48 lea 44c48 <free>,%a3 <== NOT EXECUTED
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4d494: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4d496: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED
4d49a: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4d49c: 2f2d 0028 movel %a5@(40),%sp@- <== NOT EXECUTED
4d4a0: 4eb9 0004 88c4 jsr 488c4 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4d4a6: 2f15 movel %a5@,%sp@- <== NOT EXECUTED
4d4a8: 4e93 jsr %a3@ <== NOT EXECUTED
free(pipe);
4d4aa: 2f0d movel %a5,%sp@- <== NOT EXECUTED
4d4ac: 4e93 jsr %a3@ <== NOT EXECUTED
4d4ae: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
4d4b2: 4eba fb2c jsr %pc@(4cfe0 <pipe_unlock>) <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4d4b6: 200a movel %a2,%d0
4d4b8: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5
4d4be: 4e5e unlk %fp
4d4c0: 4e75 rts
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4d4c2: 2f2a 0028 movel %a2@(40),%sp@-
err = -ENXIO;
4d4c6: 347c fffa moveaw #-6,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4d4ca: 4e95 jsr %a5@
err = -ENXIO;
goto out_error;
4d4cc: 588f addql #4,%sp
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4d4ce: 2f02 movel %d2,%sp@-
4d4d0: 2f0c movel %a4,%sp@-
4d4d2: 4eb9 0004 cff6 jsr 4cff6 <pipe_release>
return err;
4d4d8: 508f addql #8,%sp
4d4da: 609c bras 4d478 <fifo_open+0x3b4>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4d4dc: 2f2d 0030 movel %a5@(48),%sp@-
4d4e0: 45f9 0004 e5a8 lea 4e5a8 <rtems_barrier_delete>,%a2
4d4e6: 4e92 jsr %a2@
4d4e8: 588f addql #4,%sp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
4d4ea: 2043 moveal %d3,%a0
4d4ec: 2f28 002c movel %a0@(44),%sp@-
4d4f0: 4e92 jsr %a2@
4d4f2: 588f addql #4,%sp
err_rbar:
free(pipe->Buffer);
4d4f4: 2043 moveal %d3,%a0
4d4f6: 45f9 0004 4c48 lea 44c48 <free>,%a2
4d4fc: 2f10 movel %a0@,%sp@-
4d4fe: 4e92 jsr %a2@
4d500: 588f addql #4,%sp
err_buf:
free(pipe);
4d502: 2f03 movel %d3,%sp@-
4d504: 4e92 jsr %a2@
4d506: 588f addql #4,%sp
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
4d508: 347c fff4 moveaw #-12,%a2
else
*pipep = pipe;
}
out:
pipe_unlock();
4d50c: 4eba fad2 jsr %pc@(4cfe0 <pipe_unlock>)
4d510: 60a4 bras 4d4b6 <fifo_open+0x3f2>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4d512: 2039 0006 14bc movel 614bc <pipe_semaphore>,%d0
4d518: 6000 fbca braw 4d0e4 <fifo_open+0x20>
00043d48 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
43d48: 4e56 0000 linkw %fp,#0
43d4c: 202e 0008 movel %fp@(8),%d0
43d50: 222e 000c movel %fp@(12),%d1
43d54: 2f02 movel %d2,%sp@-
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
43d56: b0b9 0005 f844 cmpl 5f844 <rtems_libio_number_iops>,%d0
43d5c: 6400 00f6 bccw 43e54 <fpathconf+0x10c>
iop = rtems_libio_iop(fd);
43d60: 2400 movel %d0,%d2
43d62: ed88 lsll #6,%d0
43d64: e78a lsll #3,%d2
43d66: 2079 0006 1038 moveal 61038 <rtems_libio_iops>,%a0
43d6c: 9082 subl %d2,%d0
43d6e: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43d70: 2428 0014 movel %a0@(20),%d2
43d74: 0802 0008 btst #8,%d2
43d78: 6700 00da beqw 43e54 <fpathconf+0x10c>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
43d7c: 0802 0001 btst #1,%d2
43d80: 670a beqs 43d8c <fpathconf+0x44>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
43d82: 2068 0028 moveal %a0@(40),%a0
switch ( name ) {
43d86: 700b moveq #11,%d0
43d88: b081 cmpl %d1,%d0
43d8a: 6416 bccs 43da2 <fpathconf+0x5a>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43d8c: 4eb9 0004 edbc jsr 4edbc <__errno>
break;
}
return return_value;
}
43d92: 242e fffc movel %fp@(-4),%d2
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43d96: 2040 moveal %d0,%a0
43d98: 7216 moveq #22,%d1
43d9a: 70ff moveq #-1,%d0
break;
}
return return_value;
}
43d9c: 4e5e unlk %fp
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43d9e: 2081 movel %d1,%a0@
break;
}
return return_value;
}
43da0: 4e75 rts
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
43da2: 303b 1a08 movew %pc@(43dac <fpathconf+0x64>,%d1:l:2),%d0
43da6: 48c0 extl %d0
43da8: 4efb 0802 jmp %pc@(43dac <fpathconf+0x64>,%d0:l)
43dac: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED
43db2: 006c .short 0x006c <== NOT EXECUTED
43db4: 0060 .short 0x0060 <== NOT EXECUTED
43db6: 0054 .short 0x0054 <== NOT EXECUTED
43db8: 0048 .short 0x0048 <== NOT EXECUTED
43dba: 003c .short 0x003c <== NOT EXECUTED
43dbc: 0030 .short 0x0030 <== NOT EXECUTED
43dbe: 0024 .short 0x0024 <== NOT EXECUTED
43dc0: 0018 .short 0x0018 <== NOT EXECUTED
43dc2: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43dc8: 4e5e unlk %fp
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
43dca: 2028 005c movel %a0@(92),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43dce: 4e75 rts
43dd0: 242e fffc movel %fp@(-4),%d2
43dd4: 4e5e unlk %fp
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
43dd6: 2028 0050 movel %a0@(80),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43dda: 4e75 rts
43ddc: 242e fffc movel %fp@(-4),%d2
43de0: 4e5e unlk %fp
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
43de2: 2028 0064 movel %a0@(100),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43de6: 4e75 rts
43de8: 242e fffc movel %fp@(-4),%d2
43dec: 4e5e unlk %fp
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
43dee: 2028 0058 movel %a0@(88),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43df2: 4e75 rts
43df4: 242e fffc movel %fp@(-4),%d2
43df8: 4e5e unlk %fp
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
43dfa: 2028 0054 movel %a0@(84),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43dfe: 4e75 rts
43e00: 242e fffc movel %fp@(-4),%d2
43e04: 4e5e unlk %fp
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
43e06: 2028 004c movel %a0@(76),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e0a: 4e75 rts
43e0c: 242e fffc movel %fp@(-4),%d2
43e10: 4e5e unlk %fp
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
43e12: 2028 0048 movel %a0@(72),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e16: 4e75 rts
43e18: 242e fffc movel %fp@(-4),%d2
43e1c: 4e5e unlk %fp
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
43e1e: 2028 0044 movel %a0@(68),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e22: 4e75 rts
43e24: 242e fffc movel %fp@(-4),%d2
43e28: 4e5e unlk %fp
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
43e2a: 2028 0040 movel %a0@(64),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e2e: 4e75 rts
43e30: 242e fffc movel %fp@(-4),%d2
43e34: 4e5e unlk %fp
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
43e36: 2028 003c movel %a0@(60),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e3a: 4e75 rts
43e3c: 242e fffc movel %fp@(-4),%d2
43e40: 4e5e unlk %fp
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
43e42: 2028 0038 movel %a0@(56),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e46: 4e75 rts
43e48: 242e fffc movel %fp@(-4),%d2
43e4c: 4e5e unlk %fp
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
43e4e: 2028 0060 movel %a0@(96),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e52: 4e75 rts
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
43e54: 4eb9 0004 edbc jsr 4edbc <__errno>
43e5a: 7409 moveq #9,%d2
43e5c: 2040 moveal %d0,%a0
43e5e: 70ff moveq #-1,%d0
43e60: 2082 movel %d2,%a0@
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e62: 242e fffc movel %fp@(-4),%d2
43e66: 4e5e unlk %fp
...
00042fe4 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
42fe4: 4e56 0000 linkw %fp,#0
MSBUMP(free_calls, 1);
42fe8: 52b9 0005 f31c addql #1,5f31c <rtems_malloc_statistics+0xc>
#include <stdlib.h>
void free(
void *ptr
)
{
42fee: 2f02 movel %d2,%sp@-
42ff0: 242e 0008 movel %fp@(8),%d2
MSBUMP(free_calls, 1);
if ( !ptr )
42ff4: 6732 beqs 43028 <free+0x44>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42ff6: 7003 moveq #3,%d0
42ff8: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
42ffe: 6758 beqs 43058 <free+0x74> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
43000: 2079 0005 e2c6 moveal 5e2c6 <rtems_malloc_statistics_helpers>,%a0
43006: 4a88 tstl %a0
43008: 670a beqs 43014 <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
4300a: 2f02 movel %d2,%sp@-
4300c: 2068 0008 moveal %a0@(8),%a0
43010: 4e90 jsr %a0@
43012: 588f addql #4,%sp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
43014: 2f02 movel %d2,%sp@-
43016: 2f39 0005 db40 movel 5db40 <RTEMS_Malloc_Heap>,%sp@-
4301c: 4eb9 0004 8318 jsr 48318 <_Protected_heap_Free>
43022: 508f addql #8,%sp
43024: 4a00 tstb %d0
43026: 6708 beqs 43030 <free+0x4c>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
43028: 242e fffc movel %fp@(-4),%d2
4302c: 4e5e unlk %fp
4302e: 4e75 rts
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
43030: 2079 0005 db40 moveal 5db40 <RTEMS_Malloc_Heap>,%a0
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
43036: 2f28 001c movel %a0@(28),%sp@-
4303a: 2f28 0018 movel %a0@(24),%sp@-
4303e: 2f02 movel %d2,%sp@-
43040: 4879 0005 cd4a pea 5cd4a <rtems_status_assoc+0x168>
43046: 4eb9 0004 3eb0 jsr 43eb0 <printk>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4304c: 242e fffc movel %fp@(-4),%d2
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
43050: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
43054: 4e5e unlk %fp
43056: 4e75 rts
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
43058: 4eb9 0004 31a8 jsr 431a8 <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4305e: 4a00 tstb %d0
43060: 669e bnes 43000 <free+0x1c>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
43062: 2d42 0008 movel %d2,%fp@(8)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
43066: 242e fffc movel %fp@(-4),%d2
4306a: 4e5e unlk %fp
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
4306c: 4ef9 0004 322a jmp 4322a <malloc_deferred_free>
...
0004470c <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
4470c: 4e56 0000 linkw %fp,#0
44710: 2f0b movel %a3,%sp@-
44712: 2f0a movel %a2,%sp@-
44714: 246e 0008 moveal %fp@(8),%a2
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
44718: b5fc 0005 fd18 cmpal #392472,%a2
4471e: 6728 beqs 44748 <free_user_env+0x3c> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
44720: 486a 0004 pea %a2@(4)
44724: 47f9 0004 351c lea 4351c <rtems_filesystem_freenode>,%a3
4472a: 4e93 jsr %a3@
rtems_filesystem_freenode( &env->root_directory);
4472c: 486a 0018 pea %a2@(24)
44730: 4e93 jsr %a3@
free(env);
}
}
44732: 266e fffc moveal %fp@(-4),%a3
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
44736: 508f addql #8,%sp
44738: 2d4a 0008 movel %a2,%fp@(8)
}
}
4473c: 246e fff8 moveal %fp@(-8),%a2
44740: 4e5e unlk %fp
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
44742: 4ef9 0004 3530 jmp 43530 <free>
}
}
44748: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
4474c: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED
44750: 4e5e unlk %fp <== NOT EXECUTED
0005b770 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
5b770: 4e56 0000 linkw %fp,#0
5b774: 202e 0008 movel %fp@(8),%d0
5b778: 2f0a movel %a2,%sp@-
5b77a: 2f02 movel %d2,%sp@-
5b77c: 242e 000c movel %fp@(12),%d2
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
5b780: 6770 beqs 5b7f2 <fstat+0x82> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
5b782: b0b9 0005 db04 cmpl 5db04 <rtems_libio_number_iops>,%d0
5b788: 644e bccs 5b7d8 <fstat+0x68>
5b78a: 2200 movel %d0,%d1
5b78c: ed88 lsll #6,%d0
5b78e: e789 lsll #3,%d1
5b790: 2479 0005 f2f8 moveal 5f2f8 <rtems_libio_iops>,%a2
5b796: 9081 subl %d1,%d0
5b798: d5c0 addal %d0,%a2
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
5b79a: 202a 0014 movel %a2@(20),%d0
5b79e: 0280 0000 0100 andil #256,%d0
5b7a4: 6732 beqs 5b7d8 <fstat+0x68>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
5b7a6: 4878 0046 pea 46 <DBL_MANT_DIG+0x11>
5b7aa: 42a7 clrl %sp@-
5b7ac: 2f02 movel %d2,%sp@-
5b7ae: 4eb9 0004 e3f4 jsr 4e3f4 <memset>
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
5b7b4: 206a 0020 moveal %a2@(32),%a0
5b7b8: 45ea 0018 lea %a2@(24),%a2
5b7bc: 4fef 000c lea %sp@(12),%sp
5b7c0: 2d42 000c movel %d2,%fp@(12)
}
5b7c4: 242e fff8 movel %fp@(-8),%d2
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
5b7c8: 2d4a 0008 movel %a2,%fp@(8)
}
5b7cc: 246e fffc moveal %fp@(-4),%a2
5b7d0: 4e5e unlk %fp
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
5b7d2: 2268 0018 moveal %a0@(24),%a1
5b7d6: 4ed1 jmp %a1@
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
5b7d8: 4eb9 0004 dad8 jsr 4dad8 <__errno>
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5b7de: 242e fff8 movel %fp@(-8),%d2
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
5b7e2: 2040 moveal %d0,%a0
5b7e4: 7009 moveq #9,%d0
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5b7e6: 246e fffc moveal %fp@(-4),%a2
5b7ea: 4e5e unlk %fp
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
5b7ec: 2080 movel %d0,%a0@
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5b7ee: 70ff moveq #-1,%d0
5b7f0: 4e75 rts
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5b7f2: 4eb9 0004 dad8 jsr 4dad8 <__errno>
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5b7f8: 242e fff8 movel %fp@(-8),%d2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5b7fc: 2040 moveal %d0,%a0
5b7fe: 720e moveq #14,%d1
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5b800: 70ff moveq #-1,%d0
5b802: 246e fffc moveal %fp@(-4),%a2
5b806: 4e5e unlk %fp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5b808: 2081 movel %d1,%a0@ <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
00043fc8 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
43fc8: 4e56 0000 linkw %fp,#0
43fcc: 202e 0008 movel %fp@(8),%d0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
43fd0: b0b9 0005 f844 cmpl 5f844 <rtems_libio_number_iops>,%d0
43fd6: 642e bccs 44006 <fsync+0x3e>
iop = rtems_libio_iop( fd );
43fd8: 2200 movel %d0,%d1
43fda: ed88 lsll #6,%d0
43fdc: e789 lsll #3,%d1
43fde: 2079 0006 1038 moveal 61038 <rtems_libio_iops>,%a0
43fe4: 9081 subl %d1,%d0
43fe6: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43fe8: 2028 0014 movel %a0@(20),%d0
43fec: 0800 0008 btst #8,%d0
43ff0: 6714 beqs 44006 <fsync+0x3e>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43ff2: 44c0 movew %d0,%ccr
43ff4: 6622 bnes 44018 <fsync+0x50> <== NEVER TAKEN
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
43ff6: 2268 0020 moveal %a0@(32),%a1
43ffa: 2d48 0008 movel %a0,%fp@(8)
}
43ffe: 4e5e unlk %fp
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
44000: 2269 0028 moveal %a1@(40),%a1
44004: 4ed1 jmp %a1@
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
44006: 4eb9 0004 edbc jsr 4edbc <__errno>
4400c: 7209 moveq #9,%d1
4400e: 2040 moveal %d0,%a0
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
}
44010: 70ff moveq #-1,%d0
44012: 4e5e unlk %fp
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
44014: 2081 movel %d1,%a0@
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
}
44016: 4e75 rts
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
44018: 4eb9 0004 edbc jsr 4edbc <__errno>
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
}
4401e: 4e5e unlk %fp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
44020: 2040 moveal %d0,%a0
44022: 7016 moveq #22,%d0
44024: 2080 movel %d0,%a0@
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
}
44026: 70ff moveq #-1,%d0
...
0004b128 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
4b128: 4e56 ffec linkw %fp,#-20
4b12c: 202e 0008 movel %fp@(8),%d0
4b130: 2f0a movel %a2,%sp@-
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
4b132: b0b9 0005 db04 cmpl 5db04 <rtems_libio_number_iops>,%d0
4b138: 6478 bccs 4b1b2 <ftruncate+0x8a>
iop = rtems_libio_iop( fd );
4b13a: 2200 movel %d0,%d1
4b13c: ed88 lsll #6,%d0
4b13e: e789 lsll #3,%d1
4b140: 2479 0005 f2f8 moveal 5f2f8 <rtems_libio_iops>,%a2
4b146: 9081 subl %d1,%d0
4b148: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4b14a: 202a 0014 movel %a2@(20),%d0
4b14e: 0280 0000 0100 andil #256,%d0
4b154: 675c beqs 4b1b2 <ftruncate+0x8a>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4b156: 2d6a 0018 ffec movel %a2@(24),%fp@(-20)
4b15c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16)
4b162: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12)
4b168: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4b16e: 206e fff8 moveal %fp@(-8),%a0
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4b172: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4b178: 486e ffec pea %fp@(-20)
4b17c: 2068 0010 moveal %a0@(16),%a0
4b180: 4e90 jsr %a0@
4b182: 588f addql #4,%sp
4b184: 7201 moveq #1,%d1
4b186: b280 cmpl %d0,%d1
4b188: 6754 beqs 4b1de <ftruncate+0xb6> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4b18a: 7004 moveq #4,%d0
4b18c: c0aa 0014 andl %a2@(20),%d0
4b190: 6736 beqs 4b1c8 <ftruncate+0xa0> <== NEVER TAKEN
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
4b192: 206a 0020 moveal %a2@(32),%a0
4b196: 2f2e 0010 movel %fp@(16),%sp@-
4b19a: 2f2e 000c movel %fp@(12),%sp@-
4b19e: 2f0a movel %a2,%sp@-
4b1a0: 2068 0020 moveal %a0@(32),%a0
4b1a4: 4e90 jsr %a0@
}
4b1a6: 246e ffe8 moveal %fp@(-24),%a2
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
4b1aa: 4fef 000c lea %sp@(12),%sp
}
4b1ae: 4e5e unlk %fp
4b1b0: 4e75 rts
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4b1b2: 4eb9 0004 dad8 jsr 4dad8 <__errno>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1b8: 246e ffe8 moveal %fp@(-24),%a2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4b1bc: 2040 moveal %d0,%a0
4b1be: 7209 moveq #9,%d1
4b1c0: 70ff moveq #-1,%d0
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1c2: 4e5e unlk %fp
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4b1c4: 2081 movel %d1,%a0@
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1c6: 4e75 rts
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4b1c8: 4eb9 0004 dad8 jsr 4dad8 <__errno>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1ce: 246e ffe8 moveal %fp@(-24),%a2
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4b1d2: 2040 moveal %d0,%a0
4b1d4: 7216 moveq #22,%d1
4b1d6: 70ff moveq #-1,%d0
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1d8: 4e5e unlk %fp
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4b1da: 2081 movel %d1,%a0@
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1dc: 4e75 rts
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4b1de: 4eb9 0004 dad8 jsr 4dad8 <__errno>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1e4: 246e ffe8 moveal %fp@(-24),%a2
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4b1e8: 2040 moveal %d0,%a0
4b1ea: 7215 moveq #21,%d1
4b1ec: 70ff moveq #-1,%d0
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b1ee: 4e5e unlk %fp
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4b1f0: 2081 movel %d1,%a0@ <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
0005d3c8 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5d3c8: 4e56 ffec linkw %fp,#-20
5d3cc: 202e 0008 movel %fp@(8),%d0
5d3d0: 2f0a movel %a2,%sp@-
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5d3d2: b0b9 0005 ffd4 cmpl 5ffd4 <rtems_libio_number_iops>,%d0
5d3d8: 6464 bccs 5d43e <getdents+0x76> <== NEVER TAKEN
5d3da: 2200 movel %d0,%d1
5d3dc: ed88 lsll #6,%d0
5d3de: e789 lsll #3,%d1
5d3e0: 2479 0006 18e8 moveal 618e8 <rtems_libio_iops>,%a2
5d3e6: 9081 subl %d1,%d0
5d3e8: d5c0 addal %d0,%a2
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5d3ea: 2d6a 0018 ffec movel %a2@(24),%fp@(-20)
5d3f0: 2d6a 001c fff0 movel %a2@(28),%fp@(-16)
5d3f6: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12)
5d3fc: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5d402: 206e fff8 moveal %fp@(-8),%a0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5d406: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5d40c: 486e ffec pea %fp@(-20)
5d410: 2068 0010 moveal %a0@(16),%a0
5d414: 4e90 jsr %a0@
5d416: 588f addql #4,%sp
5d418: 7201 moveq #1,%d1
5d41a: b280 cmpl %d0,%d1
5d41c: 6624 bnes 5d442 <getdents+0x7a>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
5d41e: 206a 0020 moveal %a2@(32),%a0
5d422: 2f2e 0010 movel %fp@(16),%sp@-
5d426: 2f2e 000c movel %fp@(12),%sp@-
5d42a: 2f0a movel %a2,%sp@-
5d42c: 2068 0008 moveal %a0@(8),%a0
5d430: 4e90 jsr %a0@
}
5d432: 246e ffe8 moveal %fp@(-24),%a2
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
5d436: 4fef 000c lea %sp@(12),%sp
}
5d43a: 4e5e unlk %fp
5d43c: 4e75 rts
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5d43e: 95ca subal %a2,%a2 <== NOT EXECUTED
5d440: 60a8 bras 5d3ea <getdents+0x22> <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5d442: 4eb9 0004 ee84 jsr 4ee84 <__errno>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
}
5d448: 246e ffe8 moveal %fp@(-24),%a2
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5d44c: 2040 moveal %d0,%a0
5d44e: 7214 moveq #20,%d1
5d450: 70ff moveq #-1,%d0
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
}
5d452: 4e5e unlk %fp
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5d454: 2081 movel %d1,%a0@ <== NOT EXECUTED
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
}
00043b9c <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
43b9c: 4e56 ffe0 linkw %fp,#-32
43ba0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
43ba4: 242e 0008 movel %fp@(8),%d2
43ba8: 47fa fce0 lea %pc@(4388a <scangr>),%a3
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
43bac: 49f9 0005 03bc lea 503bc <strcmp>,%a4
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
43bb2: 2c2e 000c movel %fp@(12),%d6
43bb6: 246e 0010 moveal %fp@(16),%a2
43bba: 2a2e 0014 movel %fp@(20),%d5
43bbe: 282e 0018 movel %fp@(24),%d4
FILE *fp;
int match;
init_etc_passwd_group();
43bc2: 4eb9 0004 3a92 jsr 43a92 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL)
43bc8: 4879 0005 eec9 pea 5eec9 <_global_impure_ptr+0xbf>
43bce: 4879 0005 e81e pea 5e81e <rtems_status_assoc+0x21a>
43bd4: 4eb9 0004 f23c jsr 4f23c <fopen>
43bda: 508f addql #8,%sp
43bdc: 2600 movel %d0,%d3
43bde: 6778 beqs 43c58 <getgr_r+0xbc> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
43be0: 2f04 movel %d4,%sp@-
43be2: 2f05 movel %d5,%sp@-
43be4: 2f0a movel %a2,%sp@-
43be6: 2f03 movel %d3,%sp@-
43be8: 4e93 jsr %a3@
43bea: 4fef 0010 lea %sp@(16),%sp
43bee: 4a80 tstl %d0
43bf0: 6744 beqs 43c36 <getgr_r+0x9a>
goto error_einval;
if (name) {
43bf2: 4a82 tstl %d2
43bf4: 672e beqs 43c24 <getgr_r+0x88>
match = (strcmp(grp->gr_name, name) == 0);
43bf6: 2f02 movel %d2,%sp@-
43bf8: 2f12 movel %a2@,%sp@-
43bfa: 4e94 jsr %a4@
43bfc: 508f addql #8,%sp
43bfe: 4a80 tstl %d0
43c00: 57c0 seq %d0
43c02: 49c0 extbl %d0
43c04: 4480 negl %d0
} else {
match = (grp->gr_gid == gid);
}
if (match) {
43c06: 67d8 beqs 43be0 <getgr_r+0x44>
fclose(fp);
43c08: 2f03 movel %d3,%sp@-
43c0a: 4eb9 0004 eb3e jsr 4eb3e <fclose>
*result = grp;
43c10: 206e 001c moveal %fp@(28),%a0
return 0;
43c14: 588f addql #4,%sp
43c16: 4280 clrl %d0
match = (grp->gr_gid == gid);
}
if (match) {
fclose(fp);
*result = grp;
43c18: 208a movel %a2,%a0@
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
43c1a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
43c20: 4e5e unlk %fp
43c22: 4e75 rts
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
} else {
match = (grp->gr_gid == gid);
43c24: 4280 clrl %d0
43c26: 302a 0008 movew %a2@(8),%d0
43c2a: bc80 cmpl %d0,%d6
43c2c: 57c0 seq %d0
43c2e: 49c0 extbl %d0
43c30: 4480 negl %d0
}
if (match) {
43c32: 67ac beqs 43be0 <getgr_r+0x44>
43c34: 60d2 bras 43c08 <getgr_r+0x6c>
*result = grp;
return 0;
}
}
error_einval:
fclose(fp);
43c36: 2f03 movel %d3,%sp@-
43c38: 4eb9 0004 eb3e jsr 4eb3e <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
43c3e: 4eb9 0004 e9f0 jsr 4e9f0 <__errno>
43c44: 588f addql #4,%sp
43c46: 7216 moveq #22,%d1
43c48: 2040 moveal %d0,%a0
43c4a: 70ff moveq #-1,%d0
}
43c4c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
return 0;
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
43c52: 2081 movel %d1,%a0@
}
43c54: 4e5e unlk %fp
43c56: 4e75 rts
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
43c58: 4eb9 0004 e9f0 jsr 4e9f0 <__errno>
43c5e: 7416 moveq #22,%d2
43c60: 2040 moveal %d0,%a0
43c62: 70ff moveq #-1,%d0
43c64: 2082 movel %d2,%a0@
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
43c66: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
43c6c: 4e5e unlk %fp <== NOT EXECUTED
00043074 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
43074: 4e56 ffec linkw %fp,#-20
43078: 48d7 040c moveml %d2-%d3/%a2,%sp@
4307c: 246e 0008 moveal %fp@(8),%a2
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
43080: 4a8a tstl %a2
43082: 673c beqs 430c0 <gettimeofday+0x4c> <== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
43084: 203c 0000 0700 movel #1792,%d0
4308a: 40c2 movew %sr,%d2
4308c: 8082 orl %d2,%d0
4308e: 46c0 movew %d0,%sr
_TOD_Get( &now );
43090: 486e fff8 pea %fp@(-8)
43094: 4eb9 0004 75fc jsr 475fc <_TOD_Get>
_ISR_Enable(level);
4309a: 46c2 movew %d2,%sr
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
4309c: 263c 0000 03e8 movel #1000,%d3
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
430a2: 588f addql #4,%sp
430a4: 4280 clrl %d0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
430a6: 222e fffc movel %fp@(-4),%d1
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
430aa: 4c43 1801 remsl %d3,%d1,%d1
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
430ae: 24ae fff8 movel %fp@(-8),%a2@
time->tv_usec = useconds;
430b2: 2541 0004 movel %d1,%a2@(4)
}
430b6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
430bc: 4e5e unlk %fp
430be: 4e75 rts
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
rtems_set_errno_and_return_minus_one( EFAULT );
430c0: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
430c6: 720e moveq #14,%d1 <== NOT EXECUTED
430c8: 2040 moveal %d0,%a0 <== NOT EXECUTED
430ca: 70ff moveq #-1,%d0 <== NOT EXECUTED
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
430cc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
rtems_set_errno_and_return_minus_one( EFAULT );
430d2: 2081 movel %d1,%a0@ <== NOT EXECUTED
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
430d4: 4e5e unlk %fp <== NOT EXECUTED
0004d2ac <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4d2ac: 7001 moveq #1,%d0
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4d2ae: 4e56 0000 linkw %fp,#0
4d2b2: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4d2b6: 2268 0018 moveal %a0@(24),%a1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4d2ba: 2f02 movel %d2,%sp@-
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4d2bc: b0a9 0048 cmpl %a1@(72),%d0
4d2c0: 6708 beqs 4d2ca <imfs_dir_open+0x1e> <== ALWAYS TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
4d2c2: 241f movel %sp@+,%d2 <== NOT EXECUTED
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
4d2c4: 70ff moveq #-1,%d0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
4d2c6: 4e5e unlk %fp <== NOT EXECUTED
4d2c8: 4e75 rts <== NOT EXECUTED
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
4d2ca: 4200 clrb %d0
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
4d2cc: 4281 clrl %d1
4d2ce: 4282 clrl %d2
4d2d0: 2141 000c movel %d1,%a0@(12)
4d2d4: 2142 0010 movel %d2,%a0@(16)
return 0;
}
4d2d8: 241f movel %sp@+,%d2
4d2da: 4e5e unlk %fp <== NOT EXECUTED
0004d50e <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4d50e: 4e56 0000 linkw %fp,#0
4d512: 206e 000c moveal %fp@(12),%a0
4d516: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4d518: 2450 moveal %a0@,%a2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4d51a: 200a movel %a2,%d0
4d51c: 0680 0000 0050 addil #80,%d0
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
4d522: b0aa 004c cmpl %a2@(76),%d0
4d526: 6642 bnes 4d56a <imfs_dir_rmnod+0x5c>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
4d528: 2068 0010 moveal %a0@(16),%a0
4d52c: b5e8 001c cmpal %a0@(28),%a2
4d530: 6722 beqs 4d554 <imfs_dir_rmnod+0x46>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
4d532: 4aaa 0058 tstl %a2@(88)
4d536: 661c bnes 4d554 <imfs_dir_rmnod+0x46> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
4d538: 2f0a movel %a2,%sp@-
4d53a: 4eb9 0004 ad10 jsr 4ad10 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
4d540: 2f0a movel %a2,%sp@-
4d542: 4eb9 0004 ad54 jsr 4ad54 <IMFS_check_node_remove>
return 0;
}
4d548: 246e fffc moveal %fp@(-4),%a2
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
4d54c: 508f addql #8,%sp
4d54e: 4280 clrl %d0
}
4d550: 4e5e unlk %fp
4d552: 4e75 rts
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4d554: 4eb9 0004 dad8 jsr 4dad8 <__errno>
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4d55a: 246e fffc moveal %fp@(-4),%a2
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4d55e: 2040 moveal %d0,%a0
4d560: 7210 moveq #16,%d1
4d562: 70ff moveq #-1,%d0
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4d564: 4e5e unlk %fp
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4d566: 2081 movel %d1,%a0@
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4d568: 4e75 rts
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
4d56a: 4eb9 0004 dad8 jsr 4dad8 <__errno>
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4d570: 246e fffc moveal %fp@(-4),%a2
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
4d574: 2040 moveal %d0,%a0
4d576: 725a moveq #90,%d1
4d578: 70ff moveq #-1,%d0
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4d57a: 4e5e unlk %fp
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
4d57c: 2081 movel %d1,%a0@ <== NOT EXECUTED
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
00044fc8 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44fc8: 4e56 fff4 linkw %fp,#-12
44fcc: 222e 0008 movel %fp@(8),%d1
44fd0: 48d7 040c moveml %d2-%d3/%a2,%sp@
44fd4: 246e 000c moveal %fp@(12),%a2
if (tty->termios.c_iflag & ISTRIP)
44fd8: 202a 0030 movel %a2@(48),%d0
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44fdc: 1401 moveb %d1,%d2
if (tty->termios.c_iflag & ISTRIP)
44fde: 0800 0005 btst #5,%d0
44fe2: 6704 beqs 44fe8 <iproc+0x20> <== ALWAYS TAKEN
c &= 0x7f;
44fe4: 747f moveq #127,%d2 <== NOT EXECUTED
44fe6: c481 andl %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
44fe8: 0800 0009 btst #9,%d0
44fec: 6720 beqs 4500e <iproc+0x46>
c = tolower (c);
44fee: 2079 0005 ddd4 moveal 5ddd4 <__ctype_ptr__>,%a0
44ff4: 7603 moveq #3,%d3
44ff6: 0282 0000 00ff andil #255,%d2
44ffc: 1230 2801 moveb %a0@(00000001,%d2:l),%d1
45000: 49c1 extbl %d1
45002: c283 andl %d3,%d1
45004: 163c 0001 moveb #1,%d3
45008: b681 cmpl %d1,%d3
4500a: 6700 00e0 beqw 450ec <iproc+0x124>
if (c == '\r') {
4500e: 4281 clrl %d1
45010: 1202 moveb %d2,%d1
45012: 760d moveq #13,%d3
45014: b681 cmpl %d1,%d3
45016: 6740 beqs 45058 <iproc+0x90>
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)) {
45018: 760a moveq #10,%d3
4501a: b681 cmpl %d1,%d3
4501c: 6700 00c4 beqw 450e2 <iproc+0x11a>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
45020: 4a02 tstb %d2
45022: 664c bnes 45070 <iproc+0xa8> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
45024: 2039 0005 dd44 movel 5dd44 <rtems_termios_cbufsize>,%d0
4502a: 5380 subql #1,%d0
4502c: 222a 0020 movel %a2@(32),%d1
45030: b081 cmpl %d1,%d0
45032: 6f28 bles 4505c <iproc+0x94> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
45034: 7008 moveq #8,%d0
45036: c0aa 003c andl %a2@(60),%d0
4503a: 6600 00ba bnew 450f6 <iproc+0x12e>
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
4503e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
}
return 0;
45042: 4280 clrl %d0 <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
45044: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED
45048: 5281 addql #1,%d1 <== NOT EXECUTED
4504a: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
}
return 0;
}
4504e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
45054: 4e5e unlk %fp
45056: 4e75 rts
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
45058: 4a00 tstb %d0
4505a: 6c0c bges 45068 <iproc+0xa0> <== ALWAYS TAKEN
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
4505c: 4280 clrl %d0 <== NOT EXECUTED
}
4505e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
45064: 4e5e unlk %fp <== NOT EXECUTED
45066: 4e75 rts <== NOT EXECUTED
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
45068: 0800 0008 btst #8,%d0
4506c: 6702 beqs 45070 <iproc+0xa8> <== NEVER TAKEN
c = '\n';
4506e: 740a moveq #10,%d2
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
45070: 222a 003c movel %a2@(60),%d1
45074: 0801 0001 btst #1,%d1
45078: 67aa beqs 45024 <iproc+0x5c>
if (c == tty->termios.c_cc[VERASE]) {
4507a: 4283 clrl %d3
4507c: 162a 0043 moveb %a2@(67),%d3
45080: 4280 clrl %d0
45082: 1002 moveb %d2,%d0
45084: b083 cmpl %d3,%d0
45086: 6700 0122 beqw 451aa <iproc+0x1e2>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
4508a: 4283 clrl %d3
4508c: 162a 0044 moveb %a2@(68),%d3
45090: b083 cmpl %d3,%d0
45092: 6700 00a8 beqw 4513c <iproc+0x174>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
45096: 4283 clrl %d3
45098: 162a 0045 moveb %a2@(69),%d3
4509c: b083 cmpl %d3,%d0
4509e: 6700 00fe beqw 4519e <iproc+0x1d6>
return 1;
} else if (c == '\n') {
450a2: 760a moveq #10,%d3
450a4: b680 cmpl %d0,%d3
450a6: 6700 00ac beqw 45154 <iproc+0x18c>
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
450aa: 4283 clrl %d3
450ac: 162a 004c moveb %a2@(76),%d3
450b0: b083 cmpl %d3,%d0
450b2: 670c beqs 450c0 <iproc+0xf8> <== NEVER TAKEN
450b4: 4283 clrl %d3
450b6: 162a 0051 moveb %a2@(81),%d3
450ba: b083 cmpl %d3,%d0
450bc: 6600 ff66 bnew 45024 <iproc+0x5c>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
450c0: 44c1 movew %d1,%ccr <== NOT EXECUTED
450c2: 6b58 bmis 4511c <iproc+0x154> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
450c4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
450c8: 7001 moveq #1,%d0 <== NOT EXECUTED
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
450ca: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
450ce: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED
450d2: 5281 addql #1,%d1 <== NOT EXECUTED
450d4: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
450d8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
450de: 4e5e unlk %fp <== NOT EXECUTED
450e0: 4e75 rts <== NOT EXECUTED
if (c == '\r') {
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)) {
450e2: 0800 0006 btst #6,%d0
450e6: 6788 beqs 45070 <iproc+0xa8> <== ALWAYS TAKEN
c = '\r';
450e8: 740d moveq #13,%d2 <== NOT EXECUTED
450ea: 6084 bras 45070 <iproc+0xa8> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
450ec: 0682 0000 0020 addil #32,%d2
450f2: 6000 ff1a braw 4500e <iproc+0x46>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
450f6: 2f0a movel %a2,%sp@-
450f8: 4280 clrl %d0
450fa: 1002 moveb %d2,%d0
450fc: 2f00 movel %d0,%sp@-
450fe: 4eba fc2c jsr %pc@(44d2c <echo>)
45102: 222a 0020 movel %a2@(32),%d1
45106: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
}
return 0;
45108: 4280 clrl %d0
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
4510a: 206a 001c moveal %a2@(28),%a0
4510e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l)
45112: 5281 addql #1,%d1
45114: 2541 0020 movel %d1,%a2@(32)
45118: 6000 ff34 braw 4504e <iproc+0x86>
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
4511c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4511e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
45120: 4eba fc0a jsr %pc@(44d2c <echo>) <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
45124: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
45128: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
return 1;
4512a: 7001 moveq #1,%d0 <== NOT EXECUTED
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
4512c: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
45130: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED
45134: 5281 addql #1,%d1 <== NOT EXECUTED
45136: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
4513a: 609c bras 450d8 <iproc+0x110> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
4513c: 4878 0001 pea 1 <ADD>
45140: 2f0a movel %a2,%sp@-
45142: 4eba fc8c jsr %pc@(44dd0 <erase>)
return 0;
45146: 508f addql #8,%sp
45148: 4280 clrl %d0
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
4514a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
45150: 4e5e unlk %fp
45152: 4e75 rts
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
45154: 7048 moveq #72,%d0
45156: c280 andl %d0,%d1
45158: 6620 bnes 4517a <iproc+0x1b2> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
4515a: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
4515e: 7001 moveq #1,%d0 <== NOT EXECUTED
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
45160: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
45164: 740a moveq #10,%d2 <== NOT EXECUTED
45166: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED
4516a: 5281 addql #1,%d1 <== NOT EXECUTED
4516c: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
45170: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
45176: 4e5e unlk %fp
45178: 4e75 rts
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
4517a: 2f0a movel %a2,%sp@-
4517c: 4878 000a pea a <LASTO>
tty->cbuf[tty->ccount++] = c;
45180: 740a moveq #10,%d2
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
45182: 4eba fba8 jsr %pc@(44d2c <echo>)
tty->cbuf[tty->ccount++] = c;
45186: 222a 0020 movel %a2@(32),%d1
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
4518a: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
return 1;
4518c: 7001 moveq #1,%d0
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
4518e: 206a 001c moveal %a2@(28),%a0
45192: 1182 1800 moveb %d2,%a0@(00000000,%d1:l)
45196: 5281 addql #1,%d1
45198: 2541 0020 movel %d1,%a2@(32)
4519c: 60d2 bras 45170 <iproc+0x1a8>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
4519e: 7001 moveq #1,%d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
451a0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
451a6: 4e5e unlk %fp <== NOT EXECUTED
451a8: 4e75 rts <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
451aa: 42a7 clrl %sp@-
451ac: 2f0a movel %a2,%sp@-
451ae: 4eba fc20 jsr %pc@(44dd0 <erase>)
return 0;
451b2: 508f addql #8,%sp
451b4: 4280 clrl %d0
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
451b6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
451bc: 4e5e unlk %fp <== NOT EXECUTED
0005b850 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
5b850: 4280 clrl %d0 <== NOT EXECUTED
* These are directly supported (and completely correct) in the posix api.
*/
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
5b852: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0;
}
5b856: 4e5e unlk %fp <== NOT EXECUTED
000438a8 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
438a8: 7003 moveq #3,%d0
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
438aa: 4e56 0000 linkw %fp,#0
438ae: 2f0a movel %a2,%sp@-
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
438b0: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
438b6: 6708 beqs 438c0 <libc_wrapup+0x18> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
438b8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
438bc: 4e5e unlk %fp <== NOT EXECUTED
438be: 4e75 rts <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
438c0: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
438c6: 2479 0005 d338 moveal 5d338 <_global_impure_ptr>,%a2
438cc: b5c8 cmpal %a0,%a2
438ce: 6712 beqs 438e2 <libc_wrapup+0x3a>
_wrapup_reent(_global_impure_ptr);
438d0: 2f0a movel %a2,%sp@-
438d2: 4eb9 0004 e682 jsr 4e682 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
438d8: 588f addql #4,%sp
438da: 204a moveal %a2,%a0
438dc: 23ca 0005 ddd8 movel %a2,5ddd8 <_impure_ptr>
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
438e2: 2f28 0004 movel %a0@(4),%sp@-
438e6: 45f9 0004 dc26 lea 4dc26 <fclose>,%a2
438ec: 4e92 jsr %a2@
fclose (stdout);
438ee: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
438f4: 2f28 0008 movel %a0@(8),%sp@-
438f8: 4e92 jsr %a2@
fclose (stderr);
438fa: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
43900: 2f28 000c movel %a0@(12),%sp@-
43904: 4e92 jsr %a2@
}
43906: 246e fffc moveal %fp@(-4),%a2
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
4390a: 4fef 000c lea %sp@(12),%sp
}
4390e: 4e5e unlk %fp <== NOT EXECUTED
00043314 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
43314: 4e56 0000 linkw %fp,#0
void *return_this;
MSBUMP(malloc_calls, 1);
43318: 52b9 0005 f314 addql #1,5f314 <rtems_malloc_statistics+0x4>
#include "malloc_p.h"
void *malloc(
size_t size
)
{
4331e: 2f03 movel %d3,%sp@-
43320: 262e 0008 movel %fp@(8),%d3
43324: 2f02 movel %d2,%sp@-
MSBUMP(malloc_calls, 1);
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
43326: 4eb9 0004 31e8 jsr 431e8 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
4332c: 4a83 tstl %d3
4332e: 6762 beqs 43392 <malloc+0x7e>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
43330: 7003 moveq #3,%d0
43332: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
43338: 674e beqs 43388 <malloc+0x74>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
4333a: 42a7 clrl %sp@-
4333c: 42a7 clrl %sp@-
4333e: 2f03 movel %d3,%sp@-
43340: 2f39 0005 db40 movel 5db40 <RTEMS_Malloc_Heap>,%sp@-
43346: 4eb9 0004 82d8 jsr 482d8 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
4334c: 4fef 0010 lea %sp@(16),%sp
43350: 2400 movel %d0,%d2
43352: 674e beqs 433a2 <malloc+0x8e>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
43354: 2079 0005 e2ce moveal 5e2ce <rtems_malloc_dirty_helper>,%a0
4335a: 4a88 tstl %a0
4335c: 6708 beqs 43366 <malloc+0x52>
(*rtems_malloc_dirty_helper)( return_this, size );
4335e: 2f03 movel %d3,%sp@-
43360: 2f02 movel %d2,%sp@-
43362: 4e90 jsr %a0@
43364: 508f addql #8,%sp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
43366: 2079 0005 e2c6 moveal 5e2c6 <rtems_malloc_statistics_helpers>,%a0
4336c: 4a88 tstl %a0
4336e: 670a beqs 4337a <malloc+0x66>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
43370: 2f02 movel %d2,%sp@-
43372: 2068 0004 moveal %a0@(4),%a0
43376: 4e90 jsr %a0@
43378: 588f addql #4,%sp
return return_this;
}
4337a: 2002 movel %d2,%d0
4337c: 242e fff8 movel %fp@(-8),%d2
43380: 262e fffc movel %fp@(-4),%d3
43384: 4e5e unlk %fp
43386: 4e75 rts
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
43388: 4eb9 0004 31a8 jsr 431a8 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4338e: 4a00 tstb %d0
43390: 66a8 bnes 4333a <malloc+0x26> <== ALWAYS TAKEN
!malloc_is_system_state_OK() )
return NULL;
43392: 4282 clrl %d2
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
43394: 2002 movel %d2,%d0
43396: 242e fff8 movel %fp@(-8),%d2
4339a: 262e fffc movel %fp@(-4),%d3
4339e: 4e5e unlk %fp
433a0: 4e75 rts
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
433a2: 2079 0005 e2ca moveal 5e2ca <rtems_malloc_sbrk_helpers>,%a0
433a8: 4a88 tstl %a0
433aa: 671c beqs 433c8 <malloc+0xb4>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
433ac: 2f03 movel %d3,%sp@-
433ae: 2068 0004 moveal %a0@(4),%a0
433b2: 4e90 jsr %a0@
if ( !return_this ) {
433b4: 588f addql #4,%sp
433b6: 4a80 tstl %d0
433b8: 670e beqs 433c8 <malloc+0xb4>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
433ba: 2079 0005 e2ce moveal 5e2ce <rtems_malloc_dirty_helper>,%a0
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
433c0: 2400 movel %d0,%d2
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
433c2: 4a88 tstl %a0
433c4: 6698 bnes 4335e <malloc+0x4a> <== NEVER TAKEN
433c6: 609e bras 43366 <malloc+0x52>
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
433c8: 4eb9 0004 dad8 jsr 4dad8 <__errno>
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
433ce: 262e fffc movel %fp@(-4),%d3
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
433d2: 2040 moveal %d0,%a0
433d4: 700c moveq #12,%d0
433d6: 2080 movel %d0,%a0@
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
433d8: 2002 movel %d2,%d0
433da: 242e fff8 movel %fp@(-8),%d2
433de: 4e5e unlk %fp
...
000431e8 <malloc_deferred_frees_process>:
void malloc_deferred_frees_process(void)
{
431e8: 4e56 0000 linkw %fp,#0
431ec: 2f0b movel %a3,%sp@-
/*
* 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);
431ee: 47f9 0004 2fe4 lea 42fe4 <free>,%a3
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
431f4: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
431f6: 4879 0005 f304 pea 5f304 <RTEMS_Malloc_GC_list>
431fc: 45f9 0004 71e4 lea 471e4 <_Chain_Get>,%a2
43202: 4e92 jsr %a2@
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)
43204: 588f addql #4,%sp
43206: 4a80 tstl %d0
43208: 6714 beqs 4321e <malloc_deferred_frees_process+0x36>
free(to_be_freed);
4320a: 2f00 movel %d0,%sp@-
4320c: 4e93 jsr %a3@
4320e: 588f addql #4,%sp
43210: 4879 0005 f304 pea 5f304 <RTEMS_Malloc_GC_list>
43216: 4e92 jsr %a2@
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)
43218: 588f addql #4,%sp
4321a: 4a80 tstl %d0
4321c: 66ec bnes 4320a <malloc_deferred_frees_process+0x22><== NEVER TAKEN
free(to_be_freed);
}
4321e: 246e fff8 moveal %fp@(-8),%a2
43222: 266e fffc moveal %fp@(-4),%a3
43226: 4e5e unlk %fp <== NOT EXECUTED
00043684 <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
43684: 4e56 0000 linkw %fp,#0
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
43688: 2039 0005 fa14 movel 5fa14 <RTEMS_Malloc_Sbrk_amount>,%d0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
4368e: 2f0a movel %a2,%sp@-
43690: 2f02 movel %d2,%sp@-
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
43692: 4a80 tstl %d0
43694: 660e bnes 436a4 <malloc_sbrk_extend_and_allocate+0x20><== ALWAYS TAKEN
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
43696: 242e fff8 movel %fp@(-8),%d2
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
4369a: 4280 clrl %d0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
4369c: 246e fffc moveal %fp@(-4),%a2
436a0: 4e5e unlk %fp
436a2: 4e75 rts
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
436a4: 242e 0008 movel %fp@(8),%d2
436a8: d480 addl %d0,%d2
starting_address = (void *) sbrk(the_size);
436aa: 45f9 0004 0812 lea 40812 <sbrk>,%a2
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
436b0: 4c40 2002 remul %d0,%d2,%d2
436b4: 4c00 2800 mulsl %d0,%d2
starting_address = (void *) sbrk(the_size);
436b8: 2f02 movel %d2,%sp@-
436ba: 4e92 jsr %a2@
if ( starting_address == (void*) -1 )
436bc: 588f addql #4,%sp
436be: 72ff moveq #-1,%d1
436c0: b280 cmpl %d0,%d1
436c2: 67d2 beqs 43696 <malloc_sbrk_extend_and_allocate+0x12>
return (void *) 0;
if ( !_Protected_heap_Extend(
436c4: 2f02 movel %d2,%sp@-
436c6: 2f00 movel %d0,%sp@-
436c8: 2f39 0005 e0d0 movel 5e0d0 <RTEMS_Malloc_Heap>,%sp@-
436ce: 4eb9 0004 85e4 jsr 485e4 <_Protected_heap_Extend>
436d4: 4fef 000c lea %sp@(12),%sp
436d8: 4a00 tstb %d0
436da: 672a beqs 43706 <malloc_sbrk_extend_and_allocate+0x82>
436dc: 42a7 clrl %sp@-
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
436de: d5b9 0005 f9e8 addl %d2,5f9e8 <rtems_malloc_statistics>
436e4: 42a7 clrl %sp@-
436e6: 2f2e 0008 movel %fp@(8),%sp@-
436ea: 2f39 0005 e0d0 movel 5e0d0 <RTEMS_Malloc_Heap>,%sp@-
436f0: 4eb9 0004 85a4 jsr 485a4 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
436f6: 242e fff8 movel %fp@(-8),%d2
}
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
436fa: 4fef 0010 lea %sp@(16),%sp
}
436fe: 246e fffc moveal %fp@(-4),%a2
43702: 4e5e unlk %fp
43704: 4e75 rts
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
43706: 4482 negl %d2
43708: 2f02 movel %d2,%sp@-
4370a: 4e92 jsr %a2@
errno = ENOMEM;
4370c: 4eb9 0004 e05c jsr 4e05c <__errno>
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
43712: 242e fff8 movel %fp@(-8),%d2
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
errno = ENOMEM;
43716: 2040 moveal %d0,%a0
43718: 720c moveq #12,%d1
return (void *) 0;
4371a: 588f addql #4,%sp
4371c: 4280 clrl %d0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
4371e: 246e fffc moveal %fp@(-4),%a2
43722: 4e5e unlk %fp
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
errno = ENOMEM;
43724: 2081 movel %d1,%a0@ <== NOT EXECUTED
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
0004c9e2 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
4c9e2: 4e56 ffec linkw %fp,#-20
4c9e6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4c9ea: 286e 0008 moveal %fp@(8),%a4
4c9ee: 47f9 0004 c9c8 lea 4c9c8 <memfile_free_block>,%a3
4c9f4: 262e 000c movel %fp@(12),%d3
IMFS_assert( block_table );
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
4c9f8: 2454 moveal %a4@,%a2
for ( i=0 ; i<entries ; i++ ) {
4c9fa: 6f1a bles 4ca16 <memfile_free_blocks_in_table+0x34><== NEVER TAKEN
4c9fc: 4282 clrl %d2
if ( b[i] ) {
4c9fe: 201a movel %a2@+,%d0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4ca00: 5282 addql #1,%d2
if ( b[i] ) {
4ca02: 4a80 tstl %d0
4ca04: 670a beqs 4ca10 <memfile_free_blocks_in_table+0x2e>
memfile_free_block( b[i] );
4ca06: 2f00 movel %d0,%sp@-
4ca08: 4e93 jsr %a3@
b[i] = 0;
4ca0a: 588f addql #4,%sp
4ca0c: 42aa fffc clrl %a2@(-4)
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4ca10: b483 cmpl %d3,%d2
4ca12: 6dea blts 4c9fe <memfile_free_blocks_in_table+0x1c>
4ca14: 2454 moveal %a4@,%a2
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
4ca16: 2f0a movel %a2,%sp@-
4ca18: 4e93 jsr %a3@
*block_table = 0;
4ca1a: 588f addql #4,%sp
4ca1c: 4294 clrl %a4@
}
4ca1e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4ca24: 4e5e unlk %fp <== NOT EXECUTED
0004cfa4 <memfile_lseek>:
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4cfa4: 7006 moveq #6,%d0
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
4cfa6: 4e56 ffe4 linkw %fp,#-28
4cfaa: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
4cfae: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4cfb2: 266a 0018 moveal %a2@(24),%a3
if (the_jnode->type == IMFS_LINEAR_FILE) {
4cfb6: b0ab 0048 cmpl %a3@(72),%d0
4cfba: 673e beqs 4cffa <memfile_lseek+0x56>
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
4cfbc: 2f2a 0010 movel %a2@(16),%sp@-
4cfc0: 2f2a 000c movel %a2@(12),%sp@-
4cfc4: 2f0b movel %a3,%sp@-
4cfc6: 4eb9 0004 cb6a jsr 4cb6a <IMFS_memfile_extend>
4cfcc: 4fef 000c lea %sp@(12),%sp
4cfd0: 4a80 tstl %d0
4cfd2: 665a bnes 4d02e <memfile_lseek+0x8a>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
4cfd4: 202b 004c movel %a3@(76),%d0
4cfd8: 222b 0050 movel %a3@(80),%d1
4cfdc: 2540 0004 movel %d0,%a2@(4)
4cfe0: 2541 0008 movel %d1,%a2@(8)
4cfe4: 222a 000c movel %a2@(12),%d1
4cfe8: 242a 0010 movel %a2@(16),%d2
}
return iop->offset;
}
4cfec: 2001 movel %d1,%d0
4cfee: 2202 movel %d2,%d1
4cff0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4cff6: 4e5e unlk %fp
4cff8: 4e75 rts
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
4cffa: 222a 000c movel %a2@(12),%d1
4cffe: 242a 0010 movel %a2@(16),%d2
4d002: 262b 004c movel %a3@(76),%d3
4d006: 282b 0050 movel %a3@(80),%d4
4d00a: 2a01 movel %d1,%d5
4d00c: 2c02 movel %d2,%d6
4d00e: 9c84 subl %d4,%d6
4d010: 9b83 subxl %d3,%d5
4d012: 6fd8 bles 4cfec <memfile_lseek+0x48> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
4d014: 2203 movel %d3,%d1 <== NOT EXECUTED
4d016: 2404 movel %d4,%d2 <== NOT EXECUTED
4d018: 2543 000c movel %d3,%a2@(12) <== NOT EXECUTED
4d01c: 2544 0010 movel %d4,%a2@(16) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4d020: 2001 movel %d1,%d0 <== NOT EXECUTED
4d022: 2202 movel %d2,%d1 <== NOT EXECUTED
4d024: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
4d02a: 4e5e unlk %fp <== NOT EXECUTED
4d02c: 4e75 rts <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
4d02e: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4d034: 781c moveq #28,%d4
4d036: 2040 moveal %d0,%a0
4d038: 72ff moveq #-1,%d1
4d03a: 74ff moveq #-1,%d2
4d03c: 2084 movel %d4,%a0@
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4d03e: 2001 movel %d1,%d0
4d040: 2202 movel %d2,%d1
4d042: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4d048: 4e5e unlk %fp <== NOT EXECUTED
0004ce6c <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4ce6c: 4e56 fff0 linkw %fp,#-16
4ce70: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4ce74: 246e 0008 moveal %fp@(8),%a2
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4ce78: 202a 0014 movel %a2@(20),%d0
4ce7c: 2200 movel %d0,%d1
4ce7e: 0281 0000 0204 andil #516,%d1
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4ce84: 266a 0018 moveal %a2@(24),%a3
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4ce88: 6708 beqs 4ce92 <memfile_open+0x26>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
4ce8a: 7206 moveq #6,%d1
4ce8c: b2ab 0048 cmpl %a3@(72),%d1
4ce90: 6732 beqs 4cec4 <memfile_open+0x58> <== NEVER TAKEN
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4ce92: 222b 004c movel %a3@(76),%d1
4ce96: 242b 0050 movel %a3@(80),%d2
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4ce9a: 0800 0009 btst #9,%d0
4ce9e: 6710 beqs 4ceb0 <memfile_open+0x44>
iop->offset = the_jnode->info.file.size;
4cea0: 2541 000c movel %d1,%a2@(12)
4cea4: 2542 0010 movel %d2,%a2@(16)
4cea8: 222b 004c movel %a3@(76),%d1
4ceac: 242b 0050 movel %a3@(80),%d2
iop->size = the_jnode->info.file.size;
return 0;
4ceb0: 4280 clrl %d0
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
4ceb2: 2541 0004 movel %d1,%a2@(4)
4ceb6: 2542 0008 movel %d2,%a2@(8)
return 0;
}
4ceba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4cec0: 4e5e unlk %fp
4cec2: 4e75 rts
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
4cec4: 202b 0050 movel %a3@(80),%d0 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4cec8: 4282 clrl %d2 <== NOT EXECUTED
4ceca: 4283 clrl %d3 <== NOT EXECUTED
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
4cecc: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4ced0: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED
4ced4: 2743 0050 movel %d3,%a3@(80) <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
4ced8: 7605 moveq #5,%d3 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
4ceda: 42ab 0054 clrl %a3@(84) <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
4cede: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
4cee2: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
4cee6: 42ab 005c clrl %a3@(92) <== NOT EXECUTED
if ((count != 0)
4ceea: 4a80 tstl %d0 <== NOT EXECUTED
4ceec: 6610 bnes 4cefe <memfile_open+0x92> <== NOT EXECUTED
4ceee: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED
4cef2: 4281 clrl %d1 <== NOT EXECUTED
4cef4: 4282 clrl %d2 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4cef6: 0800 0009 btst #9,%d0 <== NOT EXECUTED
4cefa: 67b4 beqs 4ceb0 <memfile_open+0x44> <== NOT EXECUTED
4cefc: 60a2 bras 4cea0 <memfile_open+0x34> <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4cefe: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4cf00: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4cf02: 42a7 clrl %sp@- <== NOT EXECUTED
4cf04: 42a7 clrl %sp@- <== NOT EXECUTED
4cf06: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4cf08: 4eb9 0004 cc70 jsr 4cc70 <IMFS_memfile_write> <== NOT EXECUTED
4cf0e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4cf12: 72ff moveq #-1,%d1 <== NOT EXECUTED
4cf14: b280 cmpl %d0,%d1 <== NOT EXECUTED
4cf16: 6710 beqs 4cf28 <memfile_open+0xbc> <== NOT EXECUTED
4cf18: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED
4cf1c: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED
4cf20: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED
4cf24: 6000 ff74 braw 4ce9a <memfile_open+0x2e> <== NOT EXECUTED
return -1;
4cf28: 70ff moveq #-1,%d0 <== NOT EXECUTED
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
return 0;
}
4cf2a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4cf30: 4e5e unlk %fp <== NOT EXECUTED
00043404 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
43404: 4e56 ffd4 linkw %fp,#-44
43408: 48d7 001c moveml %d2-%d4,%sp@
4340c: 242e 000c movel %fp@(12),%d2
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
43410: 2002 movel %d2,%d0
43412: 0280 0000 f000 andil #61440,%d0
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
43418: 282e 0008 movel %fp@(8),%d4
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
4341c: 0c80 0000 4000 cmpil #16384,%d0
43422: 673a beqs 4345e <mknod+0x5a>
43424: 6328 blss 4344e <mknod+0x4a>
43426: 0c80 0000 6000 cmpil #24576,%d0
4342c: 6730 beqs 4345e <mknod+0x5a>
4342e: 0c80 0000 8000 cmpil #32768,%d0
43434: 6728 beqs 4345e <mknod+0x5a> <== ALWAYS TAKEN
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43436: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4343c: 7216 moveq #22,%d1
4343e: 2040 moveal %d0,%a0
43440: 70ff moveq #-1,%d0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
43442: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43448: 2081 movel %d1,%a0@
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
4344a: 4e5e unlk %fp
4344c: 4e75 rts
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
4344e: 0c80 0000 1000 cmpil #4096,%d0
43454: 6708 beqs 4345e <mknod+0x5a>
43456: 0c80 0000 2000 cmpil #8192,%d0
4345c: 66d8 bnes 43436 <mknod+0x32>
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
4345e: 260e movel %fp,%d3
43460: 0683 ffff ffe4 addil #-28,%d3
43466: 2f03 movel %d3,%sp@-
43468: 486e fffc pea %fp@(-4)
4346c: 2f04 movel %d4,%sp@-
4346e: 4eb9 0004 3ec8 jsr 43ec8 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
43474: 486e fff8 pea %fp@(-8)
43478: d8ae fffc addl %fp@(-4),%d4
4347c: 2f03 movel %d3,%sp@-
4347e: 206e fff0 moveal %fp@(-16),%a0
43482: 2f04 movel %d4,%sp@-
43484: 2068 0004 moveal %a0@(4),%a0
43488: 4e90 jsr %a0@
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
4348a: 4fef 0018 lea %sp@(24),%sp
4348e: 4a80 tstl %d0
43490: 670c beqs 4349e <mknod+0x9a>
return -1;
43492: 70ff moveq #-1,%d0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
43494: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4
4349a: 4e5e unlk %fp
4349c: 4e75 rts
&name_start
);
if ( result != 0 )
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
4349e: 2f03 movel %d3,%sp@-
434a0: 2f2e 0014 movel %fp@(20),%sp@-
434a4: 2f2e 0010 movel %fp@(16),%sp@-
434a8: 206e fff0 moveal %fp@(-16),%a0
434ac: 2f02 movel %d2,%sp@-
434ae: 2f2e fff8 movel %fp@(-8),%sp@-
434b2: 2068 0014 moveal %a0@(20),%a0
434b6: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
434b8: 2f03 movel %d3,%sp@-
434ba: 2d40 ffe0 movel %d0,%fp@(-32)
434be: 4eb9 0004 2fd0 jsr 42fd0 <rtems_filesystem_freenode>
return result;
434c4: 202e ffe0 movel %fp@(-32),%d0
434c8: 4fef 0018 lea %sp@(24),%sp
}
434cc: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4
434d2: 4e5e unlk %fp
...
0004356c <mount>:
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
4356c: 7001 moveq #1,%d0
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
4356e: 4e56 ffb8 linkw %fp,#-72
43572: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
43576: 262e 0008 movel %fp@(8),%d3
4357a: 242e 000c movel %fp@(12),%d2
4357e: 2a6e 0010 moveal %fp@(16),%a5
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
43582: b0ae 0014 cmpl %fp@(20),%d0
43586: 6500 0288 bcsw 43810 <mount+0x2a4>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
4358a: 2f0d movel %a5,%sp@-
4358c: 4eb9 0004 b5bc jsr 4b5bc <rtems_filesystem_get_mount_handler>
if ( !mount_h )
43592: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
43594: 2840 moveal %d0,%a4
if ( !mount_h )
43596: 4a80 tstl %d0
43598: 6700 0276 beqw 43810 <mount+0x2a4>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
4359c: 4a82 tstl %d2
4359e: 56c4 sne %d4
435a0: 4484 negl %d4
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
435a2: 4a04 tstb %d4
435a4: 6700 023c beqw 437e2 <mount+0x276>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
435a8: 2f02 movel %d2,%sp@-
435aa: 45f9 0004 ef30 lea 4ef30 <strlen>,%a2
435b0: 2d42 ffe0 movel %d2,%fp@(-32)
435b4: 4e92 jsr %a2@
435b6: 588f addql #4,%sp
435b8: 2e00 movel %d0,%d7
435ba: 5287 addql #1,%d7
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
435bc: 2f0d movel %a5,%sp@-
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
435be: 2d40 ffe8 movel %d0,%fp@(-24)
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
435c2: 4e92 jsr %a2@
435c4: 588f addql #4,%sp
435c6: 2a00 movel %d0,%d5
435c8: 5285 addql #1,%d5
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
435ca: 4a83 tstl %d3
435cc: 6700 023c beqw 4380a <mount+0x29e>
435d0: 2f03 movel %d3,%sp@-
435d2: 4eb9 0004 ef30 jsr 4ef30 <strlen>
435d8: 588f addql #4,%sp
435da: 2640 moveal %d0,%a3
435dc: 528b addql #1,%a3
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
435de: 2245 moveal %d5,%a1
435e0: 41f1 7874 lea %a1@(00000074,%d7:l),%a0
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
435e4: 4870 b800 pea %a0@(00000000,%a3:l)
435e8: 4878 0001 pea 1 <ADD>
435ec: 4eb9 0004 2bd8 jsr 42bd8 <calloc>
if ( mt_entry != NULL ) {
435f2: 508f addql #8,%sp
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
435f4: 2440 moveal %d0,%a2
if ( mt_entry != NULL ) {
435f6: 4a80 tstl %d0
435f8: 6700 01d0 beqw 437ca <mount+0x25e>
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
435fc: 2f05 movel %d5,%sp@-
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
435fe: 2c00 movel %d0,%d6
43600: 0686 0000 0074 addil #116,%d6
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
43606: da86 addl %d6,%d5
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
43608: 41f3 5800 lea %a3@(00000000,%d5:l),%a0
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
4360c: 2f0d movel %a5,%sp@-
4360e: 4bf9 0004 e384 lea 4e384 <memcpy>,%a5
43614: 2f06 movel %d6,%sp@-
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
43616: 2d48 ffe4 movel %a0,%fp@(-28)
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
4361a: 4e95 jsr %a5@
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
4361c: 2f0b movel %a3,%sp@-
4361e: 2f03 movel %d3,%sp@-
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
43620: 2546 006c movel %d6,%a2@(108)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
43624: 2f05 movel %d5,%sp@-
43626: 4e95 jsr %a5@
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
43628: 2f07 movel %d7,%sp@-
4362a: 2f2e ffe0 movel %fp@(-32),%sp@-
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
4362e: 2545 0070 movel %d5,%a2@(112)
str += source_size;
memcpy( str, target, target_size );
43632: 2f2e ffe4 movel %fp@(-28),%sp@-
43636: 4e95 jsr %a5@
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
43638: 202e 0014 movel %fp@(20),%d0
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
4363c: 7205 moveq #5,%d1
4363e: 307c 0080 moveaw #128,%a0
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
43642: 4fef 0024 lea %sp@(36),%sp
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
43646: 2540 0030 movel %d0,%a2@(48)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
4364a: 7007 moveq #7,%d0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
4364c: 226e ffe4 moveal %fp@(-28),%a1
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
43650: 2541 0038 movel %d1,%a2@(56)
43654: 123c ffff moveb #-1,%d1
43658: 2548 003c movel %a0,%a2@(60)
4365c: 307c 0400 moveaw #1024,%a0
43660: 2540 0040 movel %d0,%a2@(64)
43664: 103c 0001 moveb #1,%d0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
43668: 2549 0068 movel %a1,%a2@(104)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
4366c: 254a 002c movel %a2,%a2@(44)
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
43670: 2541 0044 movel %d1,%a2@(68)
43674: 2541 0048 movel %d1,%a2@(72)
43678: 2548 004c movel %a0,%a2@(76)
4367c: 42aa 0050 clrl %a2@(80)
43680: 42aa 0054 clrl %a2@(84)
43684: 2540 0058 movel %d0,%a2@(88)
43688: 42aa 005c clrl %a2@(92)
4368c: 42aa 0060 clrl %a2@(96)
43690: 42aa 0064 clrl %a2@(100)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
43694: 4a04 tstb %d4
43696: 6600 0092 bnew 4372a <mount+0x1be>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
4369a: 203c 0005 dc3c movel #384060,%d0
436a0: b0b9 0005 dc38 cmpl 5dc38 <mount_chain>,%d0
436a6: 6600 0180 bnew 43828 <mount+0x2bc>
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
436aa: 4283 clrl %d3
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
436ac: 2f2e 0018 movel %fp@(24),%sp@-
436b0: 2f0a movel %a2,%sp@-
436b2: 4e94 jsr %a4@
436b4: 508f addql #8,%sp
436b6: 4a80 tstl %d0
436b8: 6600 0190 bnew 4384a <mount+0x2de>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
436bc: 42a7 clrl %sp@-
436be: 42a7 clrl %sp@-
436c0: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
436c6: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
436cc: 2f0a movel %a2,%sp@-
436ce: 4879 0005 dc38 pea 5dc38 <mount_chain>
436d4: 4eb9 0004 7184 jsr 47184 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
436da: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
436e0: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
436e6: 4fef 0018 lea %sp@(24),%sp
436ea: 4a04 tstb %d4
436ec: 6630 bnes 4371e <mount+0x1b2>
rtems_filesystem_root = mt_entry->mt_fs_root;
436ee: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
return 0;
436f4: 4280 clrl %d0
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
436f6: 216a 001c 0018 movel %a2@(28),%a0@(24)
436fc: 216a 0020 001c movel %a2@(32),%a0@(28)
43702: 216a 0024 0020 movel %a2@(36),%a0@(32)
43708: 216a 0028 0024 movel %a2@(40),%a0@(36)
4370e: 216a 002c 0028 movel %a2@(44),%a0@(40)
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43714: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5
4371a: 4e5e unlk %fp
4371c: 4e75 rts
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
4371e: 4280 clrl %d0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43720: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5
43726: 4e5e unlk %fp
43728: 4e75 rts
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
4372a: 4878 0001 pea 1 <ADD>
4372e: 260e movel %fp,%d3
43730: 0683 ffff ffec addil #-20,%d3
43736: 2f03 movel %d3,%sp@-
43738: 4878 0007 pea 7 <TRUNCDFSF>
4373c: 2f2e ffe8 movel %fp@(-24),%sp@-
43740: 2f02 movel %d2,%sp@-
43742: 4eb9 0004 2eec jsr 42eec <rtems_filesystem_evaluate_path>
43748: 4fef 0014 lea %sp@(20),%sp
4374c: 72ff moveq #-1,%d1
4374e: b280 cmpl %d0,%d1
43750: 6700 00e2 beqw 43834 <mount+0x2c8>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
43754: 206e fff8 moveal %fp@(-8),%a0
43758: 2f03 movel %d3,%sp@-
4375a: 2068 0010 moveal %a0@(16),%a0
4375e: 4e90 jsr %a0@
43760: 588f addql #4,%sp
43762: 7201 moveq #1,%d1
43764: b280 cmpl %d0,%d1
43766: 6600 010a bnew 43872 <mount+0x306>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
4376a: 2f2e ffec movel %fp@(-20),%sp@-
4376e: 487a fd68 pea %pc@(434d8 <is_node_fs_root>)
43772: 4eb9 0004 34f0 jsr 434f0 <rtems_filesystem_mount_iterate>
43778: 508f addql #8,%sp
4377a: 4a00 tstb %d0
4377c: 6600 010e bnew 4388c <mount+0x320>
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
43780: 206e fff8 moveal %fp@(-8),%a0
* 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.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
43784: 256e ffec 0008 movel %fp@(-20),%a2@(8)
mt_entry->mt_point_node.handlers = loc.handlers;
4378a: 256e fff4 0010 movel %fp@(-12),%a2@(16)
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
43790: 256e fffc 0018 movel %fp@(-4),%a2@(24)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
43796: 2f0a movel %a2,%sp@-
43798: 2268 0020 moveal %a0@(32),%a1
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
4379c: 2548 0014 movel %a0,%a2@(20)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
437a0: 4e91 jsr %a1@
437a2: 588f addql #4,%sp
437a4: 4a80 tstl %d0
437a6: 6700 ff04 beqw 436ac <mount+0x140>
return 0;
cleanup_and_bail:
free( mt_entry );
437aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
437ac: 4eb9 0004 2fe4 jsr 42fe4 <free> <== NOT EXECUTED
437b2: 588f addql #4,%sp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
437b4: 2f03 movel %d3,%sp@-
437b6: 4eb9 0004 2fd0 jsr 42fd0 <rtems_filesystem_freenode>
437bc: 588f addql #4,%sp
return -1;
437be: 70ff moveq #-1,%d0
}
437c0: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5
437c6: 4e5e unlk %fp
437c8: 4e75 rts
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
437ca: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
437d0: 760c moveq #12,%d3 <== NOT EXECUTED
437d2: 2040 moveal %d0,%a0 <== NOT EXECUTED
437d4: 70ff moveq #-1,%d0 <== NOT EXECUTED
437d6: 2083 movel %d3,%a0@ <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
437d8: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5 <== NOT EXECUTED
437de: 4e5e unlk %fp <== NOT EXECUTED
437e0: 4e75 rts <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
437e2: 7201 moveq #1,%d1
437e4: 41f9 0005 c8ce lea 5c8ce <IMFS_ops+0x48>,%a0
437ea: 45f9 0004 ef30 lea 4ef30 <strlen>,%a2
437f0: 7e02 moveq #2,%d7
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
437f2: 2f0d movel %a5,%sp@-
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
437f4: 2d41 ffe8 movel %d1,%fp@(-24)
437f8: 2d48 ffe0 movel %a0,%fp@(-32)
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
437fc: 4e92 jsr %a2@
437fe: 588f addql #4,%sp
43800: 2a00 movel %d0,%d5
43802: 5285 addql #1,%d5
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
43804: 4a83 tstl %d3
43806: 6600 fdc8 bnew 435d0 <mount+0x64>
4380a: 97cb subal %a3,%a3
4380c: 6000 fdd0 braw 435de <mount+0x72>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
43810: 4eb9 0004 dad8 jsr 4dad8 <__errno>
43816: 7816 moveq #22,%d4
43818: 2040 moveal %d0,%a0
4381a: 70ff moveq #-1,%d0
4381c: 2084 movel %d4,%a0@
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
4381e: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5
43824: 4e5e unlk %fp
43826: 4e75 rts
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
43828: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
4382e: 2040 moveal %d0,%a0 <== NOT EXECUTED
43830: 7016 moveq #22,%d0 <== NOT EXECUTED
43832: 2080 movel %d0,%a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
43834: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43836: 4eb9 0004 2fe4 jsr 42fe4 <free> <== NOT EXECUTED
4383c: 588f addql #4,%sp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
4383e: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43840: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5 <== NOT EXECUTED
43846: 4e5e unlk %fp <== NOT EXECUTED
43848: 4e75 rts <== NOT EXECUTED
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
4384a: 206e fff8 moveal %fp@(-8),%a0
4384e: 2f0a movel %a2,%sp@-
43850: 2068 0028 moveal %a0@(40),%a0
43854: 4e90 jsr %a0@
return 0;
cleanup_and_bail:
free( mt_entry );
43856: 2e8a movel %a2,%sp@
43858: 4eb9 0004 2fe4 jsr 42fe4 <free>
if ( loc_to_free )
4385e: 588f addql #4,%sp
43860: 4a83 tstl %d3
43862: 6600 ff50 bnew 437b4 <mount+0x248>
rtems_filesystem_freenode( loc_to_free );
return -1;
43866: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43868: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4386e: 4e5e unlk %fp <== NOT EXECUTED
43870: 4e75 rts <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
43872: 4eb9 0004 dad8 jsr 4dad8 <__errno>
43878: 7414 moveq #20,%d2
4387a: 2040 moveal %d0,%a0
4387c: 2082 movel %d2,%a0@
return 0;
cleanup_and_bail:
free( mt_entry );
4387e: 2f0a movel %a2,%sp@-
43880: 4eb9 0004 2fe4 jsr 42fe4 <free>
43886: 588f addql #4,%sp
43888: 6000 ff2a braw 437b4 <mount+0x248>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
4388c: 4eb9 0004 dad8 jsr 4dad8 <__errno>
43892: 7210 moveq #16,%d1
43894: 2240 moveal %d0,%a1
43896: 2281 movel %d1,%a1@
return 0;
cleanup_and_bail:
free( mt_entry );
43898: 2f0a movel %a2,%sp@-
4389a: 4eb9 0004 2fe4 jsr 42fe4 <free>
438a0: 588f addql #4,%sp
438a2: 6000 ff10 braw 437b4 <mount+0x248>
...
00043cc0 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
43cc0: 4e56 ffec linkw %fp,#-20
43cc4: 48d7 007c moveml %d2-%d6,%sp@
43cc8: 262e 0008 movel %fp@(8),%d3
43ccc: 242e 000c movel %fp@(12),%d2
43cd0: 282e 0010 movel %fp@(16),%d4
43cd4: 2a2e 0014 movel %fp@(20),%d5
43cd8: 2c2e 0018 movel %fp@(24),%d6
int rv = -1;
if (target != NULL) {
43cdc: 4a82 tstl %d2
43cde: 673e beqs 43d1e <mount_and_make_target_path+0x5e>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
43ce0: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
43ce4: 2f02 movel %d2,%sp@-
43ce6: 4eb9 0004 4728 jsr 44728 <rtems_mkdir>
if (rv == 0) {
43cec: 508f addql #8,%sp
43cee: 4a80 tstl %d0
43cf0: 670a beqs 43cfc <mount_and_make_target_path+0x3c><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
43cf2: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED
43cf8: 4e5e unlk %fp <== NOT EXECUTED
43cfa: 4e75 rts <== NOT EXECUTED
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
43cfc: 2d46 0018 movel %d6,%fp@(24)
43d00: 2d45 0014 movel %d5,%fp@(20)
43d04: 2d44 0010 movel %d4,%fp@(16)
43d08: 2d42 000c movel %d2,%fp@(12)
43d0c: 2d43 0008 movel %d3,%fp@(8)
} else {
errno = EINVAL;
}
return rv;
}
43d10: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
43d16: 4e5e unlk %fp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
43d18: 4ef9 0004 3dcc jmp 43dcc <mount>
options,
data
);
}
} else {
errno = EINVAL;
43d1e: 4eb9 0004 e2c0 jsr 4e2c0 <__errno>
43d24: 7216 moveq #22,%d1
43d26: 2040 moveal %d0,%a0
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
43d28: 70ff moveq #-1,%d0
} else {
errno = EINVAL;
}
return rv;
}
43d2a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
options,
data
);
}
} else {
errno = EINVAL;
43d30: 2081 movel %d1,%a0@
}
return rv;
}
43d32: 4e5e unlk %fp
...
00043b4c <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
43b4c: 4e56 fff4 linkw %fp,#-12
43b50: 48d7 040c moveml %d2-%d3/%a2,%sp@
43b54: 262e 0008 movel %fp@(8),%d3
43b58: 246e 000c moveal %fp@(12),%a2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
43b5c: b5c3 cmpal %d3,%a2
43b5e: 674c beqs 43bac <newlib_delete_hook+0x60>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
43b60: 242a 00f8 movel %a2@(248),%d2
}
if (ptr && ptr != _global_impure_ptr) {
43b64: 4a82 tstl %d2
43b66: 6722 beqs 43b8a <newlib_delete_hook+0x3e> <== NEVER TAKEN
43b68: b4b9 0005 d338 cmpl 5d338 <_global_impure_ptr>,%d2
43b6e: 671a beqs 43b8a <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
43b70: 4879 0004 3934 pea 43934 <newlib_free_buffers>
43b76: 2f02 movel %d2,%sp@-
43b78: 4eb9 0004 e28c jsr 4e28c <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
43b7e: 2f02 movel %d2,%sp@-
43b80: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
43b86: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
43b8a: 42aa 00f8 clrl %a2@(248)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
43b8e: b5c3 cmpal %d3,%a2
43b90: 670a beqs 43b9c <newlib_delete_hook+0x50>
_REENT = 0;
}
}
43b92: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
43b98: 4e5e unlk %fp
43b9a: 4e75 rts
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
43b9c: 42b9 0005 ddd8 clrl 5ddd8 <_impure_ptr>
}
}
43ba2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
43ba8: 4e5e unlk %fp
43baa: 4e75 rts
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
43bac: 2439 0005 ddd8 movel 5ddd8 <_impure_ptr>,%d2
43bb2: 60b0 bras 43b64 <newlib_delete_hook+0x18>
00043934 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
43934: 4e56 0000 linkw %fp,#0
43938: 2f0a movel %a2,%sp@-
4393a: 246e 0008 moveal %fp@(8),%a2
switch ( fileno(fp) ) {
4393e: 2f0a movel %a2,%sp@-
43940: 4eb9 0004 de78 jsr 4de78 <fileno>
43946: 588f addql #4,%sp
43948: 7202 moveq #2,%d1
4394a: b280 cmpl %d0,%d1
4394c: 6414 bccs 43962 <newlib_free_buffers+0x2e> <== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
4394e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43950: 4eb9 0004 dc26 jsr 4dc26 <fclose> <== NOT EXECUTED
43956: 588f addql #4,%sp <== NOT EXECUTED
}
return 0;
}
43958: 246e fffc moveal %fp@(-4),%a2
4395c: 4280 clrl %d0
4395e: 4e5e unlk %fp
43960: 4e75 rts
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
43962: 302a 000c movew %a2@(12),%d0
43966: 48c0 extl %d0
43968: 4a00 tstb %d0
4396a: 6cec bges 43958 <newlib_free_buffers+0x24> <== ALWAYS TAKEN
free( fp->_bf._base );
4396c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
43970: 4eb9 0004 2fe4 jsr 42fe4 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43976: 588f addql #4,%sp <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43978: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
4397c: 4292 clrl %a2@ <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
4397e: 0880 0007 bclr #7,%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43982: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43986: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
4398a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4398e: 4280 clrl %d0 <== NOT EXECUTED
43990: 4e5e unlk %fp <== NOT EXECUTED
00043c28 <open>:
int open(
const char *pathname,
int flags,
...
)
{
43c28: 4e56 ffcc linkw %fp,#-52
43c2c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
43c30: 242e 000c movel %fp@(12),%d2
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
43c34: 2002 movel %d2,%d0
43c36: 5280 addql #1,%d0
int open(
const char *pathname,
int flags,
...
)
{
43c38: 262e 0008 movel %fp@(8),%d3
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
43c3c: 0800 0000 btst #0,%d0
43c40: 6700 00cc beqw 43d0e <open+0xe6>
eval_flags |= RTEMS_LIBIO_PERMS_READ;
43c44: 7804 moveq #4,%d4
if ( ( status & _FWRITE ) == _FWRITE )
43c46: 0800 0001 btst #1,%d0
43c4a: 6704 beqs 43c50 <open+0x28>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
43c4c: 7002 moveq #2,%d0
43c4e: 8880 orl %d0,%d4
va_start(ap, flags);
mode = va_arg( ap, int );
43c50: 2a2e 0010 movel %fp@(16),%d5
* 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();
43c54: 4eb9 0004 b282 jsr 4b282 <rtems_libio_allocate>
43c5a: 2440 moveal %d0,%a2
if ( iop == 0 ) {
43c5c: 4a80 tstl %d0
43c5e: 6700 00b4 beqw 43d14 <open+0xec>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
43c62: 2f03 movel %d3,%sp@-
43c64: 4bf9 0004 ef30 lea 4ef30 <strlen>,%a5
43c6a: 4e95 jsr %a5@
43c6c: 47ee ffec lea %fp@(-20),%a3
43c70: 7201 moveq #1,%d1
43c72: 49f9 0004 2eec lea 42eec <rtems_filesystem_evaluate_path>,%a4
43c78: 2e81 movel %d1,%sp@
43c7a: 2f0b movel %a3,%sp@-
43c7c: 2f04 movel %d4,%sp@-
43c7e: 2f00 movel %d0,%sp@-
43c80: 2f03 movel %d3,%sp@-
43c82: 4e94 jsr %a4@
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
43c84: 4fef 0014 lea %sp@(20),%sp
43c88: 72ff moveq #-1,%d1
43c8a: b280 cmpl %d0,%d1
43c8c: 6700 0162 beqw 43df0 <open+0x1c8>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
43c90: 2002 movel %d2,%d0
43c92: 0280 0000 0a00 andil #2560,%d0
43c98: 0c80 0000 0a00 cmpil #2560,%d0
43c9e: 6700 0090 beqw 43d30 <open+0x108>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
43ca2: 282a 0014 movel %a2@(20),%d4
43ca6: 2f02 movel %d2,%sp@-
43ca8: 4eb9 0004 b1f4 jsr 4b1f4 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
43cae: 256e fff4 0020 movel %fp@(-12),%a2@(32)
43cb4: 256e fff0 001c movel %fp@(-16),%a2@(28)
43cba: 256e fff8 0024 movel %fp@(-8),%a2@(36)
43cc0: 256e fffc 0028 movel %fp@(-4),%a2@(40)
43cc6: 2553 0018 movel %a3@,%a2@(24)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
43cca: 206a 0020 moveal %a2@(32),%a0
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
43cce: 8084 orl %d4,%d0
43cd0: 2540 0014 movel %d0,%a2@(20)
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
43cd4: 2f05 movel %d5,%sp@-
43cd6: 2f02 movel %d2,%sp@-
43cd8: 2f03 movel %d3,%sp@-
43cda: 2f0a movel %a2,%sp@-
43cdc: 2050 moveal %a0@,%a0
43cde: 4e90 jsr %a0@
if ( rc ) {
43ce0: 4fef 0014 lea %sp@(20),%sp
43ce4: 4a80 tstl %d0
43ce6: 6600 00f4 bnew 43ddc <open+0x1b4>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
43cea: 0802 000a btst #10,%d2
43cee: 6670 bnes 43d60 <open+0x138>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43cf0: 200a movel %a2,%d0
43cf2: 90b9 0005 f2f8 subl 5f2f8 <rtems_libio_iops>,%d0
43cf8: 223c b6db 6db7 movel #-1227133513,%d1
43cfe: e680 asrl #3,%d0
43d00: 4c01 0800 mulsl %d1,%d0
}
43d04: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5
43d0a: 4e5e unlk %fp
43d0c: 4e75 rts
int eval_flags;
/*
* Set the Evaluation flags
*/
eval_flags = 0;
43d0e: 4284 clrl %d4
43d10: 6000 ff34 braw 43c46 <open+0x1e>
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
43d14: 7417 moveq #23,%d2
43d16: 283c 0004 dad8 movel #318168,%d4
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
43d1c: 2044 moveal %d4,%a0
43d1e: 4e90 jsr %a0@
43d20: 2040 moveal %d0,%a0
43d22: 70ff moveq #-1,%d0
43d24: 2082 movel %d2,%a0@
}
return iop - rtems_libio_iops;
}
43d26: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5
43d2c: 4e5e unlk %fp
43d2e: 4e75 rts
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
43d30: 7411 moveq #17,%d2
43d32: 283c 0004 dad8 movel #318168,%d4
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
43d38: 4a8a tstl %a2
43d3a: 670a beqs 43d46 <open+0x11e>
rtems_libio_free( iop );
43d3c: 2f0a movel %a2,%sp@-
43d3e: 4eb9 0004 b346 jsr 4b346 <rtems_libio_free>
43d44: 588f addql #4,%sp
if ( loc_to_free )
43d46: 4a8b tstl %a3
43d48: 67d2 beqs 43d1c <open+0xf4>
rtems_filesystem_freenode( loc_to_free );
43d4a: 2f0b movel %a3,%sp@-
43d4c: 4eb9 0004 2fd0 jsr 42fd0 <rtems_filesystem_freenode>
43d52: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( rc );
43d54: 2044 moveal %d4,%a0
43d56: 4e90 jsr %a0@
43d58: 2040 moveal %d0,%a0
43d5a: 70ff moveq #-1,%d0
43d5c: 2082 movel %d2,%a0@
43d5e: 60c6 bras 43d26 <open+0xfe>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
43d60: 200a movel %a2,%d0
43d62: 90b9 0005 f2f8 subl 5f2f8 <rtems_libio_iops>,%d0
43d68: 223c b6db 6db7 movel #-1227133513,%d1
43d6e: e680 asrl #3,%d0
43d70: 4c00 1800 mulsl %d0,%d1
43d74: 42a7 clrl %sp@-
43d76: 42a7 clrl %sp@-
43d78: 2f01 movel %d1,%sp@-
43d7a: 4eb9 0004 b128 jsr 4b128 <ftruncate>
if ( rc ) {
43d80: 4fef 000c lea %sp@(12),%sp
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
43d84: 2400 movel %d0,%d2
if ( rc ) {
43d86: 6700 ff68 beqw 43cf0 <open+0xc8>
if(errno) rc = errno;
43d8a: 283c 0004 dad8 movel #318168,%d4
43d90: 2044 moveal %d4,%a0
43d92: 4e90 jsr %a0@
43d94: 2040 moveal %d0,%a0
43d96: 4a90 tstl %a0@
43d98: 6600 0086 bnew 43e20 <open+0x1f8>
close( iop - rtems_libio_iops );
43d9c: 200a movel %a2,%d0 <== NOT EXECUTED
43d9e: 90b9 0005 f2f8 subl 5f2f8 <rtems_libio_iops>,%d0 <== NOT EXECUTED
43da4: 223c b6db 6db7 movel #-1227133513,%d1 <== NOT EXECUTED
43daa: e680 asrl #3,%d0 <== NOT EXECUTED
43dac: 4c00 1800 mulsl %d0,%d1 <== NOT EXECUTED
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
43db0: 97cb subal %a3,%a3 <== NOT EXECUTED
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
43db2: 95ca subal %a2,%a2 <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
43db4: 2f01 movel %d1,%sp@- <== NOT EXECUTED
43db6: 4eb9 0004 b0a0 jsr 4b0a0 <close> <== NOT EXECUTED
43dbc: 588f addql #4,%sp <== NOT EXECUTED
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
43dbe: 4a82 tstl %d2
43dc0: 6600 ff76 bnew 43d38 <open+0x110>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43dc4: 200a movel %a2,%d0 <== NOT EXECUTED
43dc6: 90b9 0005 f2f8 subl 5f2f8 <rtems_libio_iops>,%d0 <== NOT EXECUTED
43dcc: 223c b6db 6db7 movel #-1227133513,%d1 <== NOT EXECUTED
43dd2: e680 asrl #3,%d0 <== NOT EXECUTED
43dd4: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED
43dd8: 6000 ff2a braw 43d04 <open+0xdc> <== NOT EXECUTED
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
43ddc: 283c 0004 dad8 movel #318168,%d4
43de2: 2044 moveal %d4,%a0
43de4: 4e90 jsr %a0@
43de6: 2040 moveal %d0,%a0
43de8: 2410 movel %a0@,%d2
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
43dea: 67d8 beqs 43dc4 <open+0x19c> <== NEVER TAKEN
43dec: 6000 ff4a braw 43d38 <open+0x110>
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
43df0: 283c 0004 dad8 movel #318168,%d4
43df6: 2044 moveal %d4,%a0
43df8: 4e90 jsr %a0@
43dfa: 7202 moveq #2,%d1
43dfc: 2040 moveal %d0,%a0
43dfe: b290 cmpl %a0@,%d1
43e00: 6710 beqs 43e12 <open+0x1ea>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
43e02: 2044 moveal %d4,%a0
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
43e04: 97cb subal %a3,%a3
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
43e06: 4e90 jsr %a0@
43e08: 2040 moveal %d0,%a0
43e0a: 2410 movel %a0@,%d2
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
43e0c: 67b6 beqs 43dc4 <open+0x19c> <== NEVER TAKEN
43e0e: 6000 ff28 braw 43d38 <open+0x110>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
43e12: 0802 0009 btst #9,%d2
43e16: 6636 bnes 43e4e <open+0x226>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
43e18: 97cb subal %a3,%a3
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
43e1a: 7402 moveq #2,%d2
43e1c: 6000 ff1a braw 43d38 <open+0x110>
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43e20: 2044 moveal %d4,%a0
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
43e22: 97cb subal %a3,%a3
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43e24: 4e90 jsr %a0@
close( iop - rtems_libio_iops );
43e26: 223c b6db 6db7 movel #-1227133513,%d1
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43e2c: 2040 moveal %d0,%a0
close( iop - rtems_libio_iops );
43e2e: 200a movel %a2,%d0
43e30: 90b9 0005 f2f8 subl 5f2f8 <rtems_libio_iops>,%d0
/* those are released by close(): */
iop = 0;
43e36: 95ca subal %a2,%a2
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
43e38: e680 asrl #3,%d0
43e3a: 4c00 1800 mulsl %d0,%d1
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43e3e: 2410 movel %a0@,%d2
close( iop - rtems_libio_iops );
43e40: 2f01 movel %d1,%sp@-
43e42: 4eb9 0004 b0a0 jsr 4b0a0 <close>
43e48: 588f addql #4,%sp
43e4a: 6000 ff72 braw 43dbe <open+0x196>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
43e4e: 42a7 clrl %sp@-
43e50: 2005 movel %d5,%d0
43e52: 42a7 clrl %sp@-
43e54: 08c0 000f bset #15,%d0
43e58: 2f00 movel %d0,%sp@-
43e5a: 2f03 movel %d3,%sp@-
43e5c: 4eb9 0004 3404 jsr 43404 <mknod>
if ( rc ) {
43e62: 4fef 0010 lea %sp@(16),%sp
43e66: 4a80 tstl %d0
43e68: 6698 bnes 43e02 <open+0x1da> <== NEVER TAKEN
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
43e6a: 2f03 movel %d3,%sp@-
43e6c: 4e95 jsr %a5@
43e6e: 7201 moveq #1,%d1
43e70: 2e81 movel %d1,%sp@
43e72: 2f0b movel %a3,%sp@-
43e74: 42a7 clrl %sp@-
43e76: 2f00 movel %d0,%sp@-
43e78: 2f03 movel %d3,%sp@-
43e7a: 4e94 jsr %a4@
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
43e7c: 4fef 0014 lea %sp@(20),%sp
43e80: 4a80 tstl %d0
43e82: 6700 fe1e beqw 43ca2 <open+0x7a>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
43e86: 97cb subal %a3,%a3 <== NOT EXECUTED
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
43e88: 740d moveq #13,%d2 <== NOT EXECUTED
43e8a: 6000 feac braw 43d38 <open+0x110> <== NOT EXECUTED
00043bb4 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
43bb4: 4e56 0000 linkw %fp,#0
43bb8: 2f0a movel %a2,%sp@-
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
43bba: 45f9 0004 3c28 lea 43c28 <open>,%a2
43bc0: 42a7 clrl %sp@-
43bc2: 42a7 clrl %sp@-
43bc4: 4879 0005 c7f0 pea 5c7f0 <CSWTCH.58+0x100>
43bca: 4e92 jsr %a2@
43bcc: 4fef 000c lea %sp@(12),%sp
43bd0: 72ff moveq #-1,%d1
43bd2: b280 cmpl %d0,%d1
43bd4: 6730 beqs 43c06 <open_dev_console+0x52>
/*
* 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)
43bd6: 42a7 clrl %sp@-
43bd8: 4878 0001 pea 1 <ADD>
43bdc: 4879 0005 c7f0 pea 5c7f0 <CSWTCH.58+0x100>
43be2: 4e92 jsr %a2@
43be4: 4fef 000c lea %sp@(12),%sp
43be8: 72ff moveq #-1,%d1
43bea: b280 cmpl %d0,%d1
43bec: 672c beqs 43c1a <open_dev_console+0x66>
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
43bee: 42a7 clrl %sp@-
43bf0: 4878 0001 pea 1 <ADD>
43bf4: 4879 0005 c7f0 pea 5c7f0 <CSWTCH.58+0x100>
43bfa: 4e92 jsr %a2@
43bfc: 4fef 000c lea %sp@(12),%sp
43c00: 72ff moveq #-1,%d1
43c02: b280 cmpl %d0,%d1
43c04: 6708 beqs 43c0e <open_dev_console+0x5a>
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
}
43c06: 246e fffc moveal %fp@(-4),%a2
43c0a: 4e5e unlk %fp
43c0c: 4e75 rts
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
43c0e: 2f3c 5554 4432 movel #1431585842,%sp@-
43c14: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred>
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
43c1a: 2f3c 5554 4431 movel #1431585841,%sp@-
43c20: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred>
...
00044b4e <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
44b4e: 4e56 fff0 linkw %fp,#-16
44b52: 202e 0008 movel %fp@(8),%d0
44b56: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
44b5a: 246e 000c moveal %fp@(12),%a2
int i;
if (tty->termios.c_oflag & OPOST) {
44b5e: 222a 0034 movel %a2@(52),%d1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
44b62: 1d40 fffe moveb %d0,%fp@(-2)
int i;
if (tty->termios.c_oflag & OPOST) {
44b66: 0801 0000 btst #0,%d1
44b6a: 6700 0092 beqw 44bfe <oproc+0xb0>
switch (c) {
44b6e: 7409 moveq #9,%d2
44b70: 0280 0000 00ff andil #255,%d0
44b76: b480 cmpl %d0,%d2
44b78: 6700 0118 beqw 44c92 <oproc+0x144>
44b7c: 6450 bccs 44bce <oproc+0x80>
44b7e: 740a moveq #10,%d2
44b80: b480 cmpl %d0,%d2
44b82: 6700 0092 beqw 44c16 <oproc+0xc8>
44b86: 143c 000d moveb #13,%d2
44b8a: b480 cmpl %d0,%d2
44b8c: 6700 00c6 beqw 44c54 <oproc+0x106>
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
44b90: 0801 0001 btst #1,%d1
44b94: 6600 0138 bnew 44cce <oproc+0x180>
44b98: 2079 0005 ddd4 moveal 5ddd4 <__ctype_ptr__>,%a0
44b9e: 47f9 0004 4a4a lea 44a4a <rtems_termios_puts>,%a3
c = toupper(c);
if (!iscntrl(c))
44ba4: 1030 0801 moveb %a0@(00000001,%d0:l),%d0
44ba8: 49c0 extbl %d0
44baa: 0800 0005 btst #5,%d0
44bae: 6604 bnes 44bb4 <oproc+0x66> <== NEVER TAKEN
tty->column++;
44bb0: 52aa 0028 addql #1,%a2@(40)
break;
}
}
rtems_termios_puts (&c, 1, tty);
44bb4: 2f0a movel %a2,%sp@-
44bb6: 4878 0001 pea 1 <ADD>
44bba: 486e fffe pea %fp@(-2)
44bbe: 4e93 jsr %a3@
44bc0: 4fef 000c lea %sp@(12),%sp
}
44bc4: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
44bca: 4e5e unlk %fp
44bcc: 4e75 rts
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
44bce: 143c 0008 moveb #8,%d2
44bd2: b480 cmpl %d0,%d2
44bd4: 66ba bnes 44b90 <oproc+0x42> <== ALWAYS TAKEN
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
44bd6: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
44bda: 47f9 0004 4a4a lea 44a4a <rtems_termios_puts>,%a3 <== NOT EXECUTED
44be0: 6fd2 bles 44bb4 <oproc+0x66> <== NOT EXECUTED
tty->column--;
44be2: 5380 subql #1,%d0 <== NOT EXECUTED
44be4: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44be8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44bea: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44bee: 486e fffe pea %fp@(-2) <== NOT EXECUTED
44bf2: 4e93 jsr %a3@ <== NOT EXECUTED
44bf4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44bf8: 60ca bras 44bc4 <oproc+0x76> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
44bfa: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44bfe: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44c00: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44c04: 47f9 0004 4a4a lea 44a4a <rtems_termios_puts>,%a3 <== NOT EXECUTED
44c0a: 486e fffe pea %fp@(-2) <== NOT EXECUTED
44c0e: 4e93 jsr %a3@ <== NOT EXECUTED
44c10: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44c14: 60ae bras 44bc4 <oproc+0x76> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
44c16: 0801 0005 btst #5,%d1
44c1a: 6704 beqs 44c20 <oproc+0xd2> <== ALWAYS TAKEN
tty->column = 0;
44c1c: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
44c20: 47f9 0004 4a4a lea 44a4a <rtems_termios_puts>,%a3
if (tty->termios.c_oflag & ONLCR) {
44c26: 44c1 movew %d1,%ccr
44c28: 668a bnes 44bb4 <oproc+0x66> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
44c2a: 2f0a movel %a2,%sp@-
44c2c: 4878 0001 pea 1 <ADD>
44c30: 4879 0005 ce28 pea 5ce28 <rtems_filesystem_default_pathconf+0xa6>
44c36: 4e93 jsr %a3@
tty->column = 0;
44c38: 4fef 000c lea %sp@(12),%sp
44c3c: 42aa 0028 clrl %a2@(40)
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44c40: 2f0a movel %a2,%sp@-
44c42: 4878 0001 pea 1 <ADD>
44c46: 486e fffe pea %fp@(-2)
44c4a: 4e93 jsr %a3@
44c4c: 4fef 000c lea %sp@(12),%sp
44c50: 6000 ff72 braw 44bc4 <oproc+0x76>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
44c54: 0801 0004 btst #4,%d1 <== NOT EXECUTED
44c58: 6708 beqs 44c62 <oproc+0x114> <== NOT EXECUTED
44c5a: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED
44c5e: 6700 ff64 beqw 44bc4 <oproc+0x76> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
44c62: 44c1 movew %d1,%ccr <== NOT EXECUTED
44c64: 6a94 bpls 44bfa <oproc+0xac> <== NOT EXECUTED
44c66: 47f9 0004 4a4a lea 44a4a <rtems_termios_puts>,%a3 <== NOT EXECUTED
c = '\n';
44c6c: 700a moveq #10,%d0 <== NOT EXECUTED
44c6e: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
44c72: 0801 0005 btst #5,%d1 <== NOT EXECUTED
44c76: 6700 ff3c beqw 44bb4 <oproc+0x66> <== NOT EXECUTED
tty->column = 0;
44c7a: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44c7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44c80: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44c84: 486e fffe pea %fp@(-2) <== NOT EXECUTED
44c88: 4e93 jsr %a3@ <== NOT EXECUTED
44c8a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44c8e: 6000 ff34 braw 44bc4 <oproc+0x76> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
44c92: 202a 0028 movel %a2@(40),%d0
44c96: 7407 moveq #7,%d2
44c98: 307c 0008 moveaw #8,%a0
44c9c: c480 andl %d0,%d2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44c9e: 0281 0000 1800 andil #6144,%d1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
44ca4: 91c2 subal %d2,%a0
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44ca6: 0c81 0000 1800 cmpil #6144,%d1
44cac: 675a beqs 44d08 <oproc+0x1ba> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
44cae: d1c0 addal %d0,%a0 <== NOT EXECUTED
44cb0: 47f9 0004 4a4a lea 44a4a <rtems_termios_puts>,%a3 <== NOT EXECUTED
44cb6: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44cba: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44cbc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44cc0: 486e fffe pea %fp@(-2) <== NOT EXECUTED
44cc4: 4e93 jsr %a3@ <== NOT EXECUTED
44cc6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44cca: 6000 fef8 braw 44bc4 <oproc+0x76> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
44cce: 2079 0005 ddd4 moveal 5ddd4 <__ctype_ptr__>,%a0 <== NOT EXECUTED
44cd4: 7403 moveq #3,%d2 <== NOT EXECUTED
44cd6: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED
44cda: 49c1 extbl %d1 <== NOT EXECUTED
44cdc: c282 andl %d2,%d1 <== NOT EXECUTED
44cde: 143c 0002 moveb #2,%d2 <== NOT EXECUTED
44ce2: b481 cmpl %d1,%d2 <== NOT EXECUTED
44ce4: 670e beqs 44cf4 <oproc+0x1a6> <== NOT EXECUTED
44ce6: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
44cea: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
44cf0: 6000 feac braw 44b9e <oproc+0x50> <== NOT EXECUTED
44cf4: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED
44cfa: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
44cfe: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
44d04: 6000 fe98 braw 44b9e <oproc+0x50> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
44d08: 2f0a movel %a2,%sp@-
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
44d0a: d088 addl %a0,%d0
44d0c: 2540 0028 movel %d0,%a2@(40)
rtems_termios_puts ( " ", i, tty);
44d10: 2f08 movel %a0,%sp@-
44d12: 4879 0005 ce2a pea 5ce2a <rtems_filesystem_default_pathconf+0xa8>
44d18: 4eb9 0004 4a4a jsr 44a4a <rtems_termios_puts>
return;
44d1e: 4fef 000c lea %sp@(12),%sp
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
}
44d22: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
44d28: 4e5e unlk %fp <== NOT EXECUTED
0004c2f8 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4c2f8: 4e56 ffe4 linkw %fp,#-28
4c2fc: 48d7 1c00 moveml %a2-%a4,%sp@
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4c300: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
4c304: 4879 0005 eb4a pea 5eb4a <_CPU_m68k_BFFFO_table+0x100>
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4c30a: 266e 0008 moveal %fp@(8),%a3
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4c30e: 4eb9 0004 db8c jsr 4db8c <rtems_mkdir>
4c314: 508f addql #8,%sp
4c316: 4a80 tstl %d0
4c318: 670c beqs 4c326 <pipe_create+0x2e> <== ALWAYS TAKEN
return -1;
4c31a: 70ff moveq #-1,%d0 <== NOT EXECUTED
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4c31c: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 <== NOT EXECUTED
4c322: 4e5e unlk %fp <== NOT EXECUTED
4c324: 4e75 rts <== NOT EXECUTED
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c326: 45ee fff1 lea %fp@(-15),%a2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c32a: 3039 0006 063c movew 6063c <rtems_pipe_no>,%d0
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c330: 24bc 2f74 6d70 movel #796159344,%a2@
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c336: 2200 movel %d0,%d1
4c338: 5281 addql #1,%d1
4c33a: 3f00 movew %d0,%sp@-
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c33c: 203c 2f2e 6669 movel #791570025,%d0
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c342: 4267 clrw %sp@-
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c344: 307c 666f moveaw #26223,%a0
4c348: 2d40 fff5 movel %d0,%fp@(-11)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c34c: 4879 0005 eb4f pea 5eb4f <_CPU_m68k_BFFFO_table+0x105>
4c352: 486e fffb pea %fp@(-5)
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c356: 3d48 fff9 movew %a0,%fp@(-7)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c35a: 33c1 0006 063c movew %d1,6063c <rtems_pipe_no>
4c360: 4eb9 0005 0100 jsr 50100 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4c366: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b>
4c36a: 2f0a movel %a2,%sp@-
4c36c: 4eb9 0004 d8b8 jsr 4d8b8 <mkfifo>
4c372: 4fef 0014 lea %sp@(20),%sp
4c376: 4a80 tstl %d0
4c378: 6600 009a bnew 4c414 <pipe_create+0x11c>
return -1;
/* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
4c37c: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
4c380: 49f9 0004 5258 lea 45258 <open>,%a4
4c386: 2f0a movel %a2,%sp@-
4c388: 4e94 jsr %a4@
if (filsdes[0] < 0) {
4c38a: 508f addql #8,%sp
return -1;
/* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
4c38c: 2680 movel %d0,%a3@
if (filsdes[0] < 0) {
4c38e: 6d4e blts 4c3de <pipe_create+0xe6>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4c390: b0b9 0005 f514 cmpl 5f514 <rtems_libio_number_iops>,%d0
4c396: 6442 bccs 4c3da <pipe_create+0xe2> <== NEVER TAKEN
4c398: 2200 movel %d0,%d1
4c39a: ed88 lsll #6,%d0
4c39c: e789 lsll #3,%d1
4c39e: 2079 0006 0d30 moveal 60d30 <rtems_libio_iops>,%a0
4c3a4: 9081 subl %d1,%d0
4c3a6: d1c0 addal %d0,%a0
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4c3a8: 70fe moveq #-2,%d0
4c3aa: c1a8 0014 andl %d0,%a0@(20)
filsdes[1] = open(fifopath, O_WRONLY);
4c3ae: 4878 0001 pea 1 <ADD>
4c3b2: 2f0a movel %a2,%sp@-
4c3b4: 4e94 jsr %a4@
if (filsdes[1] < 0) {
4c3b6: 508f addql #8,%sp
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
4c3b8: 2740 0004 movel %d0,%a3@(4)
if (filsdes[1] < 0) {
4c3bc: 6d36 blts 4c3f4 <pipe_create+0xfc>
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4c3be: 2f0a movel %a2,%sp@-
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
4c3c0: 99cc subal %a4,%a4
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4c3c2: 4eb9 0004 7378 jsr 47378 <unlink>
4c3c8: 588f addql #4,%sp
}
if(err != 0)
4c3ca: 4a8c tstl %a4
4c3cc: 6658 bnes 4c426 <pipe_create+0x12e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(err);
return 0;
4c3ce: 4280 clrl %d0
}
4c3d0: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4
4c3d6: 4e5e unlk %fp
4c3d8: 4e75 rts
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4c3da: 91c8 subal %a0,%a0 <== NOT EXECUTED
4c3dc: 60ca bras 4c3a8 <pipe_create+0xb0> <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
4c3de: 4eb9 0004 f3dc jsr 4f3dc <__errno>
4c3e4: 2040 moveal %d0,%a0
4c3e6: 2850 moveal %a0@,%a4
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
4c3e8: 2f0a movel %a2,%sp@-
4c3ea: 4eb9 0004 7378 jsr 47378 <unlink>
4c3f0: 588f addql #4,%sp
4c3f2: 60d6 bras 4c3ca <pipe_create+0xd2>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
4c3f4: 4eb9 0004 f3dc jsr 4f3dc <__errno>
4c3fa: 2040 moveal %d0,%a0
4c3fc: 2850 moveal %a0@,%a4
close(filsdes[0]);
4c3fe: 2f13 movel %a3@,%sp@-
4c400: 4eb9 0004 3ed4 jsr 43ed4 <close>
4c406: 588f addql #4,%sp
}
unlink(fifopath);
4c408: 2f0a movel %a2,%sp@-
4c40a: 4eb9 0004 7378 jsr 47378 <unlink>
4c410: 588f addql #4,%sp
4c412: 60b6 bras 4c3ca <pipe_create+0xd2>
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
4c414: 4eb9 0004 f3dc jsr 4f3dc <__errno>
return -1;
4c41a: 70ff moveq #-1,%d0
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4c41c: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4
4c422: 4e5e unlk %fp
4c424: 4e75 rts
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
4c426: 4eb9 0004 f3dc jsr 4f3dc <__errno>
4c42c: 2040 moveal %d0,%a0
4c42e: 70ff moveq #-1,%d0
4c430: 208c movel %a4,%a0@
return 0;
}
4c432: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4
4c438: 4e5e unlk %fp <== NOT EXECUTED
0004d8fe <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4d8fe: 4e56 0000 linkw %fp,#0
if (cmd == FIONREAD) {
4d902: 203c 4004 667f movel #1074030207,%d0
4d908: b0ae 000c cmpl %fp@(12),%d0
4d90c: 6706 beqs 4d914 <pipe_ioctl+0x16>
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
4d90e: 70ea moveq #-22,%d0
}
4d910: 4e5e unlk %fp
4d912: 4e75 rts
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
4d914: 4aae 0010 tstl %fp@(16)
4d918: 6606 bnes 4d920 <pipe_ioctl+0x22>
return -EFAULT;
4d91a: 70f2 moveq #-14,%d0
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4d91c: 4e5e unlk %fp
4d91e: 4e75 rts
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
4d920: 42a7 clrl %sp@-
4d922: 206e 0008 moveal %fp@(8),%a0
4d926: 42a7 clrl %sp@-
4d928: 2f28 0028 movel %a0@(40),%sp@-
4d92c: 4eb9 0004 899c jsr 4899c <rtems_semaphore_obtain>
4d932: 4fef 000c lea %sp@(12),%sp
4d936: 4a80 tstl %d0
4d938: 6706 beqs 4d940 <pipe_ioctl+0x42> <== ALWAYS TAKEN
return -EINTR;
4d93a: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4d93c: 4e5e unlk %fp <== NOT EXECUTED
4d93e: 4e75 rts <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
4d940: 206e 0008 moveal %fp@(8),%a0
4d944: 226e 0010 moveal %fp@(16),%a1
4d948: 22a8 000c movel %a0@(12),%a1@
PIPE_UNLOCK(pipe);
4d94c: 2f28 0028 movel %a0@(40),%sp@-
4d950: 4eb9 0004 8adc jsr 48adc <rtems_semaphore_release>
return 0;
4d956: 588f addql #4,%sp
4d958: 4280 clrl %d0
}
return -EINVAL;
}
4d95a: 4e5e unlk %fp <== NOT EXECUTED
0004d51c <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4d51c: 4e56 ffc8 linkw %fp,#-56
4d520: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4d524: 42a7 clrl %sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4d526: 246e 0008 moveal %fp@(8),%a2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4d52a: 47f9 0004 899c lea 4899c <rtems_semaphore_obtain>,%a3
4d530: 42a7 clrl %sp@-
4d532: 2f2a 0028 movel %a2@(40),%sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4d536: 282e 0010 movel %fp@(16),%d4
4d53a: 2a6e 0014 moveal %fp@(20),%a5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4d53e: 4e93 jsr %a3@
4d540: 4fef 000c lea %sp@(12),%sp
4d544: 4a80 tstl %d0
4d546: 6600 00aa bnew 4d5f2 <pipe_read+0xd6>
return -EINTR;
while (read < count) {
4d54a: 4a84 tstl %d4
4d54c: 6700 01a8 beqw 4d6f6 <pipe_read+0x1da>
4d550: 4285 clrl %d5
4d552: 4283 clrl %d3
4d554: 49f9 0004 8adc lea 48adc <rtems_semaphore_release>,%a4
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
4d55a: 243c 0004 e6c0 movel #321216,%d2
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4d560: 2e3c 0004 e648 movel #321096,%d7
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4d566: 2c3c 0005 0a00 movel #330240,%d6
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4d56c: 222a 000c movel %a2@(12),%d1
4d570: 6600 008c bnew 4d5fe <pipe_read+0xe2>
/* Not an error */
if (pipe->Writers == 0)
4d574: 4aaa 0014 tstl %a2@(20)
4d578: 6700 0106 beqw 4d680 <pipe_read+0x164>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4d57c: 7001 moveq #1,%d0
4d57e: c0ad 0014 andl %a5@(20),%d0
4d582: 6600 010c bnew 4d690 <pipe_read+0x174>
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
4d586: 2f2a 0028 movel %a2@(40),%sp@-
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
4d58a: 52aa 0018 addql #1,%a2@(24)
PIPE_UNLOCK(pipe);
4d58e: 4e94 jsr %a4@
if (! PIPE_READWAIT(pipe))
4d590: 2042 moveal %d2,%a0
4d592: 42a7 clrl %sp@-
4d594: 2f2a 002c movel %a2@(44),%sp@-
4d598: 4e90 jsr %a0@
4d59a: 4fef 000c lea %sp@(12),%sp
4d59e: 4a80 tstl %d0
4d5a0: 663a bnes 4d5dc <pipe_read+0xc0> <== NEVER TAKEN
4d5a2: 42ae fff8 clrl %fp@(-8)
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4d5a6: 42a7 clrl %sp@-
4d5a8: 42a7 clrl %sp@-
4d5aa: 2f2a 0028 movel %a2@(40),%sp@-
4d5ae: 4e93 jsr %a3@
4d5b0: 4fef 000c lea %sp@(12),%sp
4d5b4: 4a80 tstl %d0
4d5b6: 6600 00ea bnew 4d6a2 <pipe_read+0x186>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4d5ba: 53aa 0018 subql #1,%a2@(24)
if (ret != 0)
4d5be: 4aae fff8 tstl %fp@(-8)
4d5c2: 67a8 beqs 4d56c <pipe_read+0x50> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4d5c4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
4d5c8: 4e94 jsr %a4@ <== NOT EXECUTED
4d5ca: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
if (read > 0)
4d5cc: 4a83 tstl %d3
4d5ce: 6f14 bles 4d5e4 <pipe_read+0xc8>
4d5d0: 2003 movel %d3,%d0
return read;
return ret;
}
4d5d2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4d5d8: 4e5e unlk %fp
4d5da: 4e75 rts
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
4d5dc: 70fc moveq #-4,%d0 <== NOT EXECUTED
4d5de: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
4d5e2: 60c2 bras 4d5a6 <pipe_read+0x8a> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
4d5e4: 202e fff8 movel %fp@(-8),%d0
}
4d5e8: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4d5ee: 4e5e unlk %fp
4d5f0: 4e75 rts
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4d5f2: 70fc moveq #-4,%d0 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
4d5f4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4d5fa: 4e5e unlk %fp <== NOT EXECUTED
4d5fc: 4e75 rts <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4d5fe: 2004 movel %d4,%d0
4d600: 9085 subl %d5,%d0
4d602: b081 cmpl %d1,%d0
4d604: 6402 bccs 4d608 <pipe_read+0xec>
4d606: 2200 movel %d0,%d1
chunk1 = pipe->Size - pipe->Start;
4d608: 202a 0008 movel %a2@(8),%d0
4d60c: 206a 0004 moveal %a2@(4),%a0
4d610: 91c0 subal %d0,%a0
if (chunk > chunk1) {
4d612: b1c1 cmpal %d1,%a0
4d614: 6d00 009c bltw 4d6b2 <pipe_read+0x196>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4d618: 2f01 movel %d1,%sp@-
4d61a: d092 addl %a2@,%d0
4d61c: 2246 moveal %d6,%a1
4d61e: 206e 000c moveal %fp@(12),%a0
4d622: 2f00 movel %d0,%sp@-
4d624: 4870 5800 pea %a0@(00000000,%d5:l)
4d628: 2d41 fff4 movel %d1,%fp@(-12)
4d62c: 4e91 jsr %a1@
4d62e: 222e fff4 movel %fp@(-12),%d1
4d632: 4fef 000c lea %sp@(12),%sp
pipe->Start += chunk;
4d636: 2041 moveal %d1,%a0
4d638: d1ea 0008 addal %a2@(8),%a0
pipe->Start %= pipe->Size;
4d63c: 2008 movel %a0,%d0
pipe->Length -= chunk;
4d63e: 226a 000c moveal %a2@(12),%a1
4d642: 93c1 subal %d1,%a1
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4d644: 4c6a 0005 0004 remul %a2@(4),%d5,%d0
pipe->Length -= chunk;
4d64a: 2549 000c movel %a1,%a2@(12)
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4d64e: 2545 0008 movel %d5,%a2@(8)
pipe->Length -= chunk;
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4d652: 4a89 tstl %a1
4d654: 6604 bnes 4d65a <pipe_read+0x13e>
pipe->Start = 0;
4d656: 42aa 0008 clrl %a2@(8)
if (pipe->waitingWriters > 0)
4d65a: 4aaa 001c tstl %a2@(28)
4d65e: 6716 beqs 4d676 <pipe_read+0x15a>
PIPE_WAKEUPWRITERS(pipe);
4d660: 486e fffc pea %fp@(-4)
4d664: 2047 moveal %d7,%a0
4d666: 2f2a 0030 movel %a2@(48),%sp@-
4d66a: 2d41 fff4 movel %d1,%fp@(-12)
4d66e: 4e90 jsr %a0@
4d670: 222e fff4 movel %fp@(-12),%d1
4d674: 508f addql #8,%sp
read += chunk;
4d676: d681 addl %d1,%d3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4d678: 2a03 movel %d3,%d5
4d67a: b883 cmpl %d3,%d4
4d67c: 6200 feee bhiw 4d56c <pipe_read+0x50>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4d680: 2f2a 0028 movel %a2@(40),%sp@-
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
4d684: 42ae fff8 clrl %fp@(-8)
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4d688: 4e94 jsr %a4@
4d68a: 588f addql #4,%sp
4d68c: 6000 ff3e braw 4d5cc <pipe_read+0xb0>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4d690: 70f5 moveq #-11,%d0
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4d692: 2f2a 0028 movel %a2@(40),%sp@-
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4d696: 2d40 fff8 movel %d0,%fp@(-8)
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4d69a: 4e94 jsr %a4@
4d69c: 588f addql #4,%sp
4d69e: 6000 ff2c braw 4d5cc <pipe_read+0xb0>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
4d6a2: 7afc moveq #-4,%d5 <== NOT EXECUTED
4d6a4: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4d6a8: 4a83 tstl %d3 <== NOT EXECUTED
4d6aa: 6e00 ff24 bgtw 4d5d0 <pipe_read+0xb4> <== NOT EXECUTED
4d6ae: 6000 ff34 braw 4d5e4 <pipe_read+0xc8> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
4d6b2: 2f08 movel %a0,%sp@-
4d6b4: d092 addl %a2@,%d0
4d6b6: 226e 000c moveal %fp@(12),%a1
4d6ba: 2f00 movel %d0,%sp@-
4d6bc: 4871 5800 pea %a1@(00000000,%d5:l)
4d6c0: 2246 moveal %d6,%a1
4d6c2: 2d41 fff4 movel %d1,%fp@(-12)
4d6c6: 2d48 fff0 movel %a0,%fp@(-16)
4d6ca: 4e91 jsr %a1@
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4d6cc: 222e fff4 movel %fp@(-12),%d1
4d6d0: 2001 movel %d1,%d0
4d6d2: 2246 moveal %d6,%a1
4d6d4: 206e fff0 moveal %fp@(-16),%a0
4d6d8: 9088 subl %a0,%d0
4d6da: da88 addl %a0,%d5
4d6dc: 2f00 movel %d0,%sp@-
4d6de: 2f12 movel %a2@,%sp@-
4d6e0: 206e 000c moveal %fp@(12),%a0
4d6e4: 4870 5800 pea %a0@(00000000,%d5:l)
4d6e8: 4e91 jsr %a1@
4d6ea: 222e fff4 movel %fp@(-12),%d1
4d6ee: 4fef 0018 lea %sp@(24),%sp
4d6f2: 6000 ff42 braw 4d636 <pipe_read+0x11a>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4d6f6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
4d6fa: 49f9 0004 8adc lea 48adc <rtems_semaphore_release>,%a4 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4d700: 4283 clrl %d3 <== NOT EXECUTED
4d702: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4d706: 4e94 jsr %a4@ <== NOT EXECUTED
4d708: 588f addql #4,%sp <== NOT EXECUTED
4d70a: 6000 fec0 braw 4d5cc <pipe_read+0xb0> <== NOT EXECUTED
0004cff6 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4cff6: 4e56 ffe8 linkw %fp,#-24
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4cffa: 206e 000c moveal %fp@(12),%a0
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4cffe: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4d002: 266e 0008 moveal %fp@(8),%a3
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4d006: 7406 moveq #6,%d2
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
4d008: 2453 moveal %a3@,%a2
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4d00a: c4a8 0014 andl %a0@(20),%d2
if (mode & LIBIO_FLAGS_READ)
4d00e: 0802 0001 btst #1,%d2
4d012: 6704 beqs 4d018 <pipe_release+0x22>
pipe->Readers --;
4d014: 53aa 0010 subql #1,%a2@(16)
if (mode & LIBIO_FLAGS_WRITE)
4d018: 44c2 movew %d2,%ccr
4d01a: 6604 bnes 4d020 <pipe_release+0x2a>
pipe->Writers --;
4d01c: 53aa 0014 subql #1,%a2@(20)
PIPE_UNLOCK(pipe);
4d020: 2f2a 0028 movel %a2@(40),%sp@-
4d024: 4eb9 0004 8adc jsr 48adc <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
4d02a: 588f addql #4,%sp
4d02c: 4aaa 0010 tstl %a2@(16)
4d030: 672a beqs 4d05c <pipe_release+0x66>
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
4d032: 4aaa 0014 tstl %a2@(20)
4d036: 6616 bnes 4d04e <pipe_release+0x58> <== NEVER TAKEN
4d038: 7002 moveq #2,%d0
4d03a: b082 cmpl %d2,%d0
4d03c: 6710 beqs 4d04e <pipe_release+0x58> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4d03e: 486e fffc pea %fp@(-4)
4d042: 2f2a 002c movel %a2@(44),%sp@-
4d046: 4eb9 0004 e648 jsr 4e648 <rtems_barrier_release>
4d04c: 508f addql #8,%sp
pipe_unlock();
4d04e: 4eba ff90 jsr %pc@(4cfe0 <pipe_unlock>)
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4d052: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5
4d058: 4e5e unlk %fp
4d05a: 4e75 rts
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
4d05c: 4aaa 0014 tstl %a2@(20)
4d060: 6724 beqs 4d086 <pipe_release+0x90>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4d062: 7004 moveq #4,%d0
4d064: b082 cmpl %d2,%d0
4d066: 67e6 beqs 4d04e <pipe_release+0x58> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4d068: 486e fffc pea %fp@(-4)
4d06c: 2f2a 0030 movel %a2@(48),%sp@-
4d070: 4eb9 0004 e648 jsr 4e648 <rtems_barrier_release>
4d076: 508f addql #8,%sp
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
4d078: 4eba ff66 jsr %pc@(4cfe0 <pipe_unlock>)
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4d07c: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5
4d082: 4e5e unlk %fp
4d084: 4e75 rts
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4d086: 2f2a 002c movel %a2@(44),%sp@-
4d08a: 4bf9 0004 e5a8 lea 4e5a8 <rtems_barrier_delete>,%a5
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
4d090: 49f9 0004 4c48 lea 44c48 <free>,%a4
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4d096: 4e95 jsr %a5@
rtems_barrier_delete(pipe->writeBarrier);
4d098: 2f2a 0030 movel %a2@(48),%sp@-
4d09c: 4e95 jsr %a5@
rtems_semaphore_delete(pipe->Semaphore);
4d09e: 2f2a 0028 movel %a2@(40),%sp@-
4d0a2: 4eb9 0004 88c4 jsr 488c4 <rtems_semaphore_delete>
free(pipe->Buffer);
4d0a8: 2f12 movel %a2@,%sp@-
4d0aa: 4e94 jsr %a4@
free(pipe);
4d0ac: 2f0a movel %a2,%sp@-
4d0ae: 4e94 jsr %a4@
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
4d0b0: 4fef 0014 lea %sp@(20),%sp
4d0b4: 4293 clrl %a3@
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
4d0b6: 4eba ff28 jsr %pc@(4cfe0 <pipe_unlock>)
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4d0ba: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5
4d0c0: 4e5e unlk %fp <== NOT EXECUTED
0004d70e <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4d70e: 4e56 ffcc linkw %fp,#-52
4d712: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4d716: 246e 0008 moveal %fp@(8),%a2
4d71a: 242e 0010 movel %fp@(16),%d2
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4d71e: 660c bnes 4d72c <pipe_write+0x1e> <== ALWAYS TAKEN
return 0;
4d720: 4280 clrl %d0 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4d722: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4d728: 4e5e unlk %fp <== NOT EXECUTED
4d72a: 4e75 rts <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
4d72c: 42a7 clrl %sp@-
4d72e: 47f9 0004 899c lea 4899c <rtems_semaphore_obtain>,%a3
4d734: 42a7 clrl %sp@-
4d736: 2f2a 0028 movel %a2@(40),%sp@-
4d73a: 4e93 jsr %a3@
4d73c: 4fef 000c lea %sp@(12),%sp
4d740: 4a80 tstl %d0
4d742: 6600 00aa bnew 4d7ee <pipe_write+0xe0>
return -EINTR;
if (pipe->Readers == 0) {
4d746: 4aaa 0010 tstl %a2@(16)
4d74a: 6700 00e2 beqw 4d82e <pipe_write+0x120>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4d74e: 202a 0004 movel %a2@(4),%d0
4d752: b082 cmpl %d2,%d0
4d754: 6500 00bc bcsw 4d812 <pipe_write+0x104>
4d758: 2602 movel %d2,%d3
4d75a: 4285 clrl %d5
4d75c: 4284 clrl %d4
4d75e: 49f9 0004 8adc lea 48adc <rtems_semaphore_release>,%a4
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4d764: 4bf9 0004 e6c0 lea 4e6c0 <rtems_barrier_wait>,%a5
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4d76a: 2c3c 0005 0a00 movel #330240,%d6
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
4d770: 222a 000c movel %a2@(12),%d1
4d774: 2040 moveal %d0,%a0
4d776: 91c1 subal %d1,%a0
4d778: b688 cmpl %a0,%d3
4d77a: 6300 00c6 blsw 4d842 <pipe_write+0x134>
if (LIBIO_NODELAY(iop)) {
4d77e: 206e 0014 moveal %fp@(20),%a0
4d782: 7001 moveq #1,%d0
4d784: c0a8 0014 andl %a0@(20),%d0
4d788: 6600 0144 bnew 4d8ce <pipe_write+0x1c0>
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
4d78c: 2f2a 0028 movel %a2@(40),%sp@-
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
4d790: 52aa 001c addql #1,%a2@(28)
PIPE_UNLOCK(pipe);
4d794: 4e94 jsr %a4@
if (! PIPE_WRITEWAIT(pipe))
4d796: 42a7 clrl %sp@-
4d798: 2f2a 0030 movel %a2@(48),%sp@-
4d79c: 4e95 jsr %a5@
4d79e: 4fef 000c lea %sp@(12),%sp
4d7a2: 4a80 tstl %d0
4d7a4: 662a bnes 4d7d0 <pipe_write+0xc2> <== NEVER TAKEN
4d7a6: 4287 clrl %d7
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4d7a8: 42a7 clrl %sp@-
4d7aa: 42a7 clrl %sp@-
4d7ac: 2f2a 0028 movel %a2@(40),%sp@-
4d7b0: 4e93 jsr %a3@
4d7b2: 4fef 000c lea %sp@(12),%sp
4d7b6: 4a80 tstl %d0
4d7b8: 6600 010e bnew 4d8c8 <pipe_write+0x1ba>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4d7bc: 53aa 001c subql #1,%a2@(28)
if (ret != 0)
4d7c0: 4a87 tstl %d7
4d7c2: 6612 bnes 4d7d6 <pipe_write+0xc8> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
4d7c4: 4aaa 0010 tstl %a2@(16)
4d7c8: 6730 beqs 4d7fa <pipe_write+0xec> <== NEVER TAKEN
4d7ca: 202a 0004 movel %a2@(4),%d0
4d7ce: 60a0 bras 4d770 <pipe_write+0x62>
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
4d7d0: 7efc moveq #-4,%d7 <== NOT EXECUTED
4d7d2: 60d4 bras 4d7a8 <pipe_write+0x9a> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4d7d4: 4287 clrl %d7
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d7d6: 2f2a 0028 movel %a2@(40),%sp@-
4d7da: 4e94 jsr %a4@
4d7dc: 588f addql #4,%sp
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4d7de: 4a84 tstl %d4
4d7e0: 6f24 bles 4d806 <pipe_write+0xf8>
4d7e2: 2004 movel %d4,%d0
return written;
return ret;
}
4d7e4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4d7ea: 4e5e unlk %fp
4d7ec: 4e75 rts
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4d7ee: 70fc moveq #-4,%d0 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4d7f0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4d7f6: 4e5e unlk %fp <== NOT EXECUTED
4d7f8: 4e75 rts <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d7fa: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
4d7fe: 7ee0 moveq #-32,%d7 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d800: 4e94 jsr %a4@ <== NOT EXECUTED
4d802: 588f addql #4,%sp <== NOT EXECUTED
4d804: 60d8 bras 4d7de <pipe_write+0xd0> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
return written;
return ret;
4d806: 2007 movel %d7,%d0
}
4d808: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4d80e: 4e5e unlk %fp
4d810: 4e75 rts
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4d812: 7601 moveq #1,%d3 <== NOT EXECUTED
4d814: 4285 clrl %d5 <== NOT EXECUTED
4d816: 4284 clrl %d4 <== NOT EXECUTED
4d818: 49f9 0004 8adc lea 48adc <rtems_semaphore_release>,%a4 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4d81e: 4bf9 0004 e6c0 lea 4e6c0 <rtems_barrier_wait>,%a5 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4d824: 2c3c 0005 0a00 movel #330240,%d6 <== NOT EXECUTED
4d82a: 6000 ff44 braw 4d770 <pipe_write+0x62> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d82e: 2f2a 0028 movel %a2@(40),%sp@-
4d832: 49f9 0004 8adc lea 48adc <rtems_semaphore_release>,%a4
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
4d838: 7ee0 moveq #-32,%d7
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
4d83a: 4284 clrl %d4
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d83c: 4e94 jsr %a4@
4d83e: 588f addql #4,%sp
4d840: 609c bras 4d7de <pipe_write+0xd0>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4d842: 2242 moveal %d2,%a1
4d844: 93c5 subal %d5,%a1
4d846: 2608 movel %a0,%d3
4d848: b3c8 cmpal %a0,%a1
4d84a: 6402 bccs 4d84e <pipe_write+0x140>
4d84c: 2609 movel %a1,%d3
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4d84e: 2241 moveal %d1,%a1
4d850: d3ea 0008 addal %a2@(8),%a1
4d854: 2209 movel %a1,%d1
4d856: 4c40 1007 remul %d0,%d7,%d1
4d85a: 2200 movel %d0,%d1
4d85c: 2047 moveal %d7,%a0
4d85e: 9287 subl %d7,%d1
if (chunk > chunk1) {
4d860: b283 cmpl %d3,%d1
4d862: 6c78 bges 4d8dc <pipe_write+0x1ce>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4d864: 226e 000c moveal %fp@(12),%a1
4d868: 2f01 movel %d1,%sp@-
4d86a: 4871 5800 pea %a1@(00000000,%d5:l)
4d86e: d1d2 addal %a2@,%a0
4d870: 2d41 fff4 movel %d1,%fp@(-12)
4d874: 2f08 movel %a0,%sp@-
4d876: 2046 moveal %d6,%a0
4d878: 4e90 jsr %a0@
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4d87a: 222e fff4 movel %fp@(-12),%d1
4d87e: 2003 movel %d3,%d0
4d880: 9081 subl %d1,%d0
4d882: da81 addl %d1,%d5
4d884: 2246 moveal %d6,%a1
4d886: 206e 000c moveal %fp@(12),%a0
4d88a: 2f00 movel %d0,%sp@-
4d88c: 4870 5800 pea %a0@(00000000,%d5:l)
4d890: 2f12 movel %a2@,%sp@-
4d892: 4e91 jsr %a1@
4d894: 4fef 0018 lea %sp@(24),%sp
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
4d898: d7aa 000c addl %d3,%a2@(12)
if (pipe->waitingReaders > 0)
4d89c: 4aaa 0018 tstl %a2@(24)
4d8a0: 6614 bnes 4d8b6 <pipe_write+0x1a8> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
written += chunk;
4d8a2: d883 addl %d3,%d4
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4d8a4: 2a04 movel %d4,%d5
4d8a6: b882 cmpl %d2,%d4
4d8a8: 6400 ff2a bccw 4d7d4 <pipe_write+0xc6>
4d8ac: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
4d8b0: 7601 moveq #1,%d3 <== NOT EXECUTED
4d8b2: 6000 febc braw 4d770 <pipe_write+0x62> <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4d8b6: 486e fffc pea %fp@(-4)
4d8ba: 2f2a 002c movel %a2@(44),%sp@-
4d8be: 4eb9 0004 e648 jsr 4e648 <rtems_barrier_release>
4d8c4: 508f addql #8,%sp
4d8c6: 60da bras 4d8a2 <pipe_write+0x194>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
4d8c8: 7efc moveq #-4,%d7 <== NOT EXECUTED
4d8ca: 6000 ff12 braw 4d7de <pipe_write+0xd0> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d8ce: 2f2a 0028 movel %a2@(40),%sp@-
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4d8d2: 7ef5 moveq #-11,%d7
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d8d4: 4e94 jsr %a4@
4d8d6: 588f addql #4,%sp
4d8d8: 6000 ff04 braw 4d7de <pipe_write+0xd0>
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4d8dc: 226e 000c moveal %fp@(12),%a1
4d8e0: 2f03 movel %d3,%sp@-
4d8e2: 4871 5800 pea %a1@(00000000,%d5:l)
4d8e6: d1d2 addal %a2@,%a0
4d8e8: 2f08 movel %a0,%sp@-
4d8ea: 2046 moveal %d6,%a0
4d8ec: 4e90 jsr %a0@
4d8ee: 4fef 000c lea %sp@(12),%sp
pipe->Length += chunk;
4d8f2: d7aa 000c addl %d3,%a2@(12)
if (pipe->waitingReaders > 0)
4d8f6: 4aaa 0018 tstl %a2@(24)
4d8fa: 67a6 beqs 4d8a2 <pipe_write+0x194>
4d8fc: 60b8 bras 4d8b6 <pipe_write+0x1a8>
00047e44 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
47e44: 4e56 0000 linkw %fp,#0
47e48: 222e 000c movel %fp@(12),%d1
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47e4c: 2001 movel %d1,%d0
47e4e: 5380 subql #1,%d0
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
47e50: 52b9 0006 5774 addql #1,65774 <rtems_malloc_statistics+0x8>
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47e56: c081 andl %d1,%d0
47e58: 6608 bnes 47e62 <posix_memalign+0x1e> <== NEVER TAKEN
47e5a: 103c 0003 moveb #3,%d0
47e5e: b081 cmpl %d1,%d0
47e60: 6506 bcss 47e68 <posix_memalign+0x24>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
47e62: 7016 moveq #22,%d0
47e64: 4e5e unlk %fp
47e66: 4e75 rts
47e68: 4e5e unlk %fp
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
47e6a: 4ef9 0004 801c jmp 4801c <rtems_memalign>
000440a4 <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
440a4: 4e56 0000 linkw %fp,#0
440a8: 2f0a movel %a2,%sp@-
440aa: 246e 0008 moveal %fp@(8),%a2
const char *p;
for (p=s ; *p ; p++ )
440ae: 1012 moveb %a2@,%d0
440b0: 6714 beqs 440c6 <putk+0x22>
/*
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
440b2: 528a addql #1,%a2
{
const char *p;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
440b4: 49c0 extbl %d0
440b6: 2079 0005 df14 moveal 5df14 <BSP_output_char>,%a0
440bc: 2f00 movel %d0,%sp@-
440be: 4e90 jsr %a0@
*/
void putk(const char *s)
{
const char *p;
for (p=s ; *p ; p++ )
440c0: 588f addql #4,%sp
440c2: 101a moveb %a2@+,%d0
440c4: 66ee bnes 440b4 <putk+0x10>
BSP_output_char(*p);
BSP_output_char('\n');
440c6: 700a moveq #10,%d0
}
440c8: 246e fffc moveal %fp@(-4),%a2
{
const char *p;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
440cc: 2d40 0008 movel %d0,%fp@(8)
}
440d0: 4e5e unlk %fp
{
const char *p;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
440d2: 2279 0005 df14 moveal 5df14 <BSP_output_char>,%a1
440d8: 4ed1 jmp %a1@
...
0005ba0c <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
5ba0c: 4e56 fff4 linkw %fp,#-12
5ba10: 202e 0008 movel %fp@(8),%d0
5ba14: 222e 000c movel %fp@(12),%d1
5ba18: 206e 0010 moveal %fp@(16),%a0
5ba1c: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5ba20: b0b9 0005 db04 cmpl 5db04 <rtems_libio_number_iops>,%d0
5ba26: 646a bccs 5ba92 <read+0x86> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
5ba28: 2400 movel %d0,%d2
5ba2a: ed88 lsll #6,%d0
5ba2c: e78a lsll #3,%d2
5ba2e: 2479 0005 f2f8 moveal 5f2f8 <rtems_libio_iops>,%a2
5ba34: 9082 subl %d2,%d0
5ba36: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5ba38: 202a 0014 movel %a2@(20),%d0
5ba3c: 0800 0008 btst #8,%d0
5ba40: 6750 beqs 5ba92 <read+0x86>
rtems_libio_check_buffer( buffer );
5ba42: 4a81 tstl %d1
5ba44: 6764 beqs 5baaa <read+0x9e> <== NEVER TAKEN
rtems_libio_check_count( count );
5ba46: 4a88 tstl %a0
5ba48: 673c beqs 5ba86 <read+0x7a>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5ba4a: 0800 0001 btst #1,%d0
5ba4e: 675a beqs 5baaa <read+0x9e>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5ba50: 226a 0020 moveal %a2@(32),%a1
5ba54: 2f08 movel %a0,%sp@-
5ba56: 2f01 movel %d1,%sp@-
5ba58: 2f0a movel %a2,%sp@-
5ba5a: 2069 0008 moveal %a1@(8),%a0
5ba5e: 4e90 jsr %a0@
if ( rc > 0 )
5ba60: 4fef 000c lea %sp@(12),%sp
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5ba64: 2200 movel %d0,%d1
if ( rc > 0 )
5ba66: 6f14 bles 5ba7c <read+0x70>
iop->offset += rc;
5ba68: 2401 movel %d1,%d2
5ba6a: 5bc1 smi %d1
5ba6c: 49c1 extbl %d1
5ba6e: d5aa 0010 addl %d2,%a2@(16)
5ba72: 262a 000c movel %a2@(12),%d3
5ba76: d781 addxl %d1,%d3
5ba78: 2543 000c movel %d3,%a2@(12)
return rc;
}
5ba7c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5ba82: 4e5e unlk %fp
5ba84: 4e75 rts
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
5ba86: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5ba88: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5ba8e: 4e5e unlk %fp
5ba90: 4e75 rts
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
5ba92: 4eb9 0004 dad8 jsr 4dad8 <__errno>
5ba98: 7409 moveq #9,%d2
5ba9a: 2040 moveal %d0,%a0
5ba9c: 70ff moveq #-1,%d0
5ba9e: 2082 movel %d2,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5baa0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5baa6: 4e5e unlk %fp
5baa8: 4e75 rts
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5baaa: 4eb9 0004 dad8 jsr 4dad8 <__errno>
5bab0: 7216 moveq #22,%d1
5bab2: 2040 moveal %d0,%a0
5bab4: 70ff moveq #-1,%d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5bab6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5babc: 2081 movel %d1,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5babe: 4e5e unlk %fp <== NOT EXECUTED
000468a4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
468a4: 4e56 ffe0 linkw %fp,#-32
468a8: 48d7 001c moveml %d2-%d4,%sp@
468ac: 242e 0008 movel %fp@(8),%d2
468b0: 282e 000c movel %fp@(12),%d4
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
468b4: 6774 beqs 4692a <readlink+0x86>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
468b6: 2f02 movel %d2,%sp@-
468b8: 260e movel %fp,%d3
468ba: 0683 ffff ffec addil #-20,%d3
468c0: 4eb9 0005 29e0 jsr 529e0 <strlen>
468c6: 4297 clrl %sp@
468c8: 2f03 movel %d3,%sp@-
468ca: 42a7 clrl %sp@-
468cc: 2f00 movel %d0,%sp@-
468ce: 2f02 movel %d2,%sp@-
468d0: 4eb9 0004 55fc jsr 455fc <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
468d6: 4fef 0014 lea %sp@(20),%sp
468da: 4a80 tstl %d0
468dc: 670c beqs 468ea <readlink+0x46> <== ALWAYS TAKEN
return -1;
468de: 70ff moveq #-1,%d0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
468e0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
468e6: 4e5e unlk %fp <== NOT EXECUTED
468e8: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
468ea: 206e fff8 moveal %fp@(-8),%a0
468ee: 2f03 movel %d3,%sp@-
468f0: 2068 0010 moveal %a0@(16),%a0
468f4: 4e90 jsr %a0@
468f6: 588f addql #4,%sp
468f8: 7204 moveq #4,%d1
468fa: b280 cmpl %d0,%d1
468fc: 6644 bnes 46942 <readlink+0x9e>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
468fe: 2f2e 0010 movel %fp@(16),%sp@-
46902: 206e fff8 moveal %fp@(-8),%a0
46906: 2f04 movel %d4,%sp@-
46908: 2f03 movel %d3,%sp@-
4690a: 2068 003c moveal %a0@(60),%a0
4690e: 4e90 jsr %a0@
46910: 2400 movel %d0,%d2
rtems_filesystem_freenode( &loc );
46912: 2f03 movel %d3,%sp@-
46914: 4eb9 0004 56e0 jsr 456e0 <rtems_filesystem_freenode>
return result;
4691a: 4fef 0010 lea %sp@(16),%sp
4691e: 2002 movel %d2,%d0
}
46920: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4
46926: 4e5e unlk %fp
46928: 4e75 rts
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
4692a: 4eb9 0005 0f0c jsr 50f0c <__errno>
46930: 740e moveq #14,%d2
46932: 2040 moveal %d0,%a0
46934: 70ff moveq #-1,%d0
46936: 2082 movel %d2,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
46938: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4
4693e: 4e5e unlk %fp
46940: 4e75 rts
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
46942: 2f03 movel %d3,%sp@-
46944: 4eb9 0004 56e0 jsr 456e0 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
4694a: 4eb9 0005 0f0c jsr 50f0c <__errno>
46950: 588f addql #4,%sp
46952: 7216 moveq #22,%d1
46954: 2040 moveal %d0,%a0
46956: 70ff moveq #-1,%d0
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
46958: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
4695e: 2081 movel %d1,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
46960: 4e5e unlk %fp <== NOT EXECUTED
00045150 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
45150: 4e56 ffe4 linkw %fp,#-28
45154: 202e 0008 movel %fp@(8),%d0
45158: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
4515c: 246e 000c moveal %fp@(12),%a2
45160: 242e 0010 movel %fp@(16),%d2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
45164: b0b9 0005 e8d4 cmpl 5e8d4 <rtems_libio_number_iops>,%d0
4516a: 6400 00ec bccw 45258 <readv+0x108>
iop = rtems_libio_iop( fd );
4516e: 2200 movel %d0,%d1
45170: ed88 lsll #6,%d0
45172: e789 lsll #3,%d1
45174: 2679 0006 00c8 moveal 600c8 <rtems_libio_iops>,%a3
4517a: 9081 subl %d1,%d0
4517c: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
4517e: 202b 0014 movel %a3@(20),%d0
45182: 0800 0008 btst #8,%d0
45186: 6700 00d0 beqw 45258 <readv+0x108>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
4518a: 0800 0001 btst #1,%d0
4518e: 6700 0092 beqw 45222 <readv+0xd2>
/*
* Argument validation on IO vector
*/
if ( !iov )
45192: 4a8a tstl %a2
45194: 6700 008c beqw 45222 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
45198: 4a82 tstl %d2
4519a: 6f00 0086 blew 45222 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
4519e: 0c82 0000 0400 cmpil #1024,%d2
451a4: 6e7c bgts 45222 <readv+0xd2> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
451a6: 204a moveal %a2,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
451a8: 4281 clrl %d1
451aa: 4280 clrl %d0
451ac: 7801 moveq #1,%d4
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
451ae: 4a90 tstl %a0@
451b0: 6770 beqs 45222 <readv+0xd2> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
451b2: 2628 0004 movel %a0@(4),%d3
451b6: 2240 moveal %d0,%a1
451b8: d3c3 addal %d3,%a1
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
451ba: 5281 addql #1,%d1
451bc: 5088 addql #8,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
451be: b3c0 cmpal %d0,%a1
451c0: 6d60 blts 45222 <readv+0xd2> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
451c2: 4a83 tstl %d3
451c4: 57c3 seq %d3
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
451c6: 2009 movel %a1,%d0
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
451c8: c883 andl %d3,%d4
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
451ca: b282 cmpl %d2,%d1
451cc: 6de0 blts 451ae <readv+0x5e>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
451ce: 4a04 tstb %d4
451d0: 666a bnes 4523c <readv+0xec> <== NEVER TAKEN
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
451d2: 588a addql #4,%a2
451d4: 4283 clrl %d3
451d6: 4284 clrl %d4
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
451d8: 206b 0020 moveal %a3@(32),%a0
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
451dc: 5283 addql #1,%d3
bytes = (*iop->pathinfo.handlers->read_h)(
451de: 2f12 movel %a2@,%sp@-
451e0: 2f2a fffc movel %a2@(-4),%sp@-
451e4: 2f0b movel %a3,%sp@-
451e6: 2068 0008 moveal %a0@(8),%a0
451ea: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
451ec: 4fef 000c lea %sp@(12),%sp
451f0: 4a80 tstl %d0
451f2: 6d56 blts 4524a <readv+0xfa> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
451f4: 6716 beqs 4520c <readv+0xbc> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
451f6: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
451f8: 2c00 movel %d0,%d6
451fa: 5bc5 smi %d5
451fc: 49c5 extbl %d5
451fe: ddab 0010 addl %d6,%a3@(16)
45202: 222b 000c movel %a3@(12),%d1
45206: d385 addxl %d5,%d1
45208: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
4520c: b092 cmpl %a2@,%d0
4520e: 6606 bnes 45216 <readv+0xc6> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
45210: 508a addql #8,%a2
45212: b682 cmpl %d2,%d3
45214: 6dc2 blts 451d8 <readv+0x88> <== NEVER TAKEN
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
45216: 2004 movel %d4,%d0
45218: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4521e: 4e5e unlk %fp
45220: 4e75 rts
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
45222: 4eb9 0004 eb64 jsr 4eb64 <__errno>
45228: 78ff moveq #-1,%d4
4522a: 2040 moveal %d0,%a0
4522c: 7016 moveq #22,%d0
4522e: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
45230: 2004 movel %d4,%d0
45232: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
45238: 4e5e unlk %fp
4523a: 4e75 rts
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
return 0;
4523c: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4523e: 2004 movel %d4,%d0
45240: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
45246: 4e5e unlk %fp
45248: 4e75 rts
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
4524a: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4524c: 2004 movel %d4,%d0 <== NOT EXECUTED
4524e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
45254: 4e5e unlk %fp <== NOT EXECUTED
45256: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
45258: 4eb9 0004 eb64 jsr 4eb64 <__errno>
4525e: 78ff moveq #-1,%d4
45260: 7209 moveq #9,%d1
45262: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
45264: 2004 movel %d4,%d0
45266: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
4526c: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4526e: 4e5e unlk %fp
...
0005bb24 <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5bb24: 7003 moveq #3,%d0
void *realloc(
void *ptr,
size_t size
)
{
5bb26: 4e56 fff0 linkw %fp,#-16
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
5bb2a: 52b9 0005 f320 addql #1,5f320 <rtems_malloc_statistics+0x10>
void *realloc(
void *ptr,
size_t size
)
{
5bb30: 48d7 001c moveml %d2-%d4,%sp@
5bb34: 242e 0008 movel %fp@(8),%d2
5bb38: 262e 000c movel %fp@(12),%d3
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5bb3c: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
5bb42: 677a beqs 5bbbe <realloc+0x9a> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
5bb44: 4a82 tstl %d2
5bb46: 6700 00de beqw 5bc26 <realloc+0x102>
return malloc( size );
if ( !size ) {
5bb4a: 4a83 tstl %d3
5bb4c: 673e beqs 5bb8c <realloc+0x68> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5bb4e: 486e fffc pea %fp@(-4)
5bb52: 2f02 movel %d2,%sp@-
5bb54: 2f39 0005 db40 movel 5db40 <RTEMS_Malloc_Heap>,%sp@-
5bb5a: 4eb9 0005 bcf4 jsr 5bcf4 <_Protected_heap_Get_block_size>
5bb60: 4fef 000c lea %sp@(12),%sp
5bb64: 4a00 tstb %d0
5bb66: 673c beqs 5bba4 <realloc+0x80>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
5bb68: 2f03 movel %d3,%sp@-
5bb6a: 2f02 movel %d2,%sp@-
5bb6c: 2f39 0005 db40 movel 5db40 <RTEMS_Malloc_Heap>,%sp@-
5bb72: 4eb9 0005 bd30 jsr 5bd30 <_Protected_heap_Resize_block>
5bb78: 4fef 000c lea %sp@(12),%sp
5bb7c: 4a00 tstb %d0
5bb7e: 6754 beqs 5bbd4 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bb80: 2002 movel %d2,%d0
5bb82: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5bb88: 4e5e unlk %fp
5bb8a: 4e75 rts
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5bb8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
return (void *) 0;
5bb8e: 4282 clrl %d2 <== NOT EXECUTED
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5bb90: 4eb9 0004 2fe4 jsr 42fe4 <free> <== NOT EXECUTED
return (void *) 0;
5bb96: 588f addql #4,%sp <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bb98: 2002 movel %d2,%d0 <== NOT EXECUTED
5bb9a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED
5bba0: 4e5e unlk %fp <== NOT EXECUTED
5bba2: 4e75 rts <== NOT EXECUTED
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5bba4: 4eb9 0004 dad8 jsr 4dad8 <__errno>
return (void *) 0;
5bbaa: 4282 clrl %d2
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5bbac: 2040 moveal %d0,%a0
5bbae: 7016 moveq #22,%d0
5bbb0: 2080 movel %d0,%a0@
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bbb2: 2002 movel %d2,%d0
5bbb4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5bbba: 4e5e unlk %fp
5bbbc: 4e75 rts
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
5bbbe: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
5bbc4: 6752 beqs 5bc18 <realloc+0xf4> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
5bbc6: 4282 clrl %d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bbc8: 2002 movel %d2,%d0
5bbca: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5bbd0: 4e5e unlk %fp
5bbd2: 4e75 rts
* 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 );
5bbd4: 2f03 movel %d3,%sp@-
5bbd6: 4eb9 0004 3314 jsr 43314 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5bbdc: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5bbde: 53b9 0005 f314 subql #1,5f314 <rtems_malloc_statistics+0x4>
* 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 );
5bbe4: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5bbe6: 67de beqs 5bbc6 <realloc+0xa2>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5bbe8: 202e fffc movel %fp@(-4),%d0
5bbec: b083 cmpl %d3,%d0
5bbee: 6402 bccs 5bbf2 <realloc+0xce> <== NEVER TAKEN
5bbf0: 2600 movel %d0,%d3
5bbf2: 2f03 movel %d3,%sp@-
5bbf4: 2f02 movel %d2,%sp@-
5bbf6: 2f04 movel %d4,%sp@-
5bbf8: 4eb9 0004 e384 jsr 4e384 <memcpy>
free( ptr );
5bbfe: 2f02 movel %d2,%sp@-
return new_area;
5bc00: 2404 movel %d4,%d2
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
5bc02: 4eb9 0004 2fe4 jsr 42fe4 <free>
return new_area;
5bc08: 4fef 0010 lea %sp@(16),%sp
}
5bc0c: 2002 movel %d2,%d0
5bc0e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5bc14: 4e5e unlk %fp
5bc16: 4e75 rts
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
5bc18: 4ab9 0005 f5e0 tstl 5f5e0 <_Per_CPU_Information+0x8>
5bc1e: 6700 ff24 beqw 5bb44 <realloc+0x20>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
5bc22: 4282 clrl %d2 <== NOT EXECUTED
5bc24: 60a2 bras 5bbc8 <realloc+0xa4> <== NOT EXECUTED
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5bc26: 2f03 movel %d3,%sp@-
5bc28: 4eb9 0004 3314 jsr 43314 <malloc>
5bc2e: 588f addql #4,%sp
5bc30: 2400 movel %d0,%d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bc32: 2002 movel %d2,%d0
5bc34: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5bc3a: 4e5e unlk %fp
...
000443fc <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
443fc: 4e56 ffc0 linkw %fp,#-64
44400: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
44404: 242e 0008 movel %fp@(8),%d2
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
44408: 2f02 movel %d2,%sp@-
4440a: 4eb9 0004 346c jsr 4346c <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
44410: 588f addql #4,%sp
44412: 4a80 tstl %d0
44414: 6600 0132 bnew 44548 <rmdir+0x14c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44418: 45ee ffe8 lea %fp@(-24),%a2
4441c: 4283 clrl %d3
4441e: 2f0a movel %a2,%sp@-
44420: 486e fffc pea %fp@(-4)
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
44424: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44426: 2f02 movel %d2,%sp@-
44428: 4eb9 0004 4570 jsr 44570 <rtems_filesystem_get_start_loc>
4442e: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
44432: 2d52 ffd4 movel %a2@,%fp@(-44)
name = pathname + parentpathlen;
44436: d682 addl %d2,%d3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44438: 47f9 0004 f7a4 lea 4f7a4 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4443e: 240e movel %fp,%d2
44440: 0682 ffff ffd4 addil #-44,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
44446: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40)
4444c: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36)
44452: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32)
44458: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4445e: 2f03 movel %d3,%sp@-
44460: 4e93 jsr %a3@
44462: 2e80 movel %d0,%sp@
44464: 2f03 movel %d3,%sp@-
44466: 4eb9 0004 34ae jsr 434ae <rtems_filesystem_prefix_separators>
4446c: d680 addl %d0,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4446e: 2f03 movel %d3,%sp@-
44470: 4e93 jsr %a3@
44472: 4297 clrl %sp@
44474: 2f02 movel %d2,%sp@-
44476: 42a7 clrl %sp@-
44478: 2f00 movel %d0,%sp@-
4447a: 2f03 movel %d3,%sp@-
4447c: 4eb9 0004 33b0 jsr 433b0 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
44482: 4fef 001c lea %sp@(28),%sp
44486: 4a80 tstl %d0
44488: 6654 bnes 444de <rmdir+0xe2>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
4448a: 206e ffe0 moveal %fp@(-32),%a0
4448e: 2f02 movel %d2,%sp@-
44490: 2068 0010 moveal %a0@(16),%a0
44494: 4e90 jsr %a0@
44496: 588f addql #4,%sp
44498: 7201 moveq #1,%d1
4449a: b280 cmpl %d0,%d1
4449c: 6652 bnes 444f0 <rmdir+0xf4>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
4449e: 2f02 movel %d2,%sp@-
444a0: 206e ffdc moveal %fp@(-36),%a0
444a4: 2f0a movel %a2,%sp@-
444a6: 2068 0034 moveal %a0@(52),%a0
rtems_filesystem_freenode( &loc );
444aa: 47f9 0004 3504 lea 43504 <rtems_filesystem_freenode>,%a3
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
444b0: 4e90 jsr %a0@
444b2: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
444b4: 2f02 movel %d2,%sp@-
444b6: 4e93 jsr %a3@
if ( free_parentloc )
444b8: 4fef 000c lea %sp@(12),%sp
444bc: 4a04 tstb %d4
444be: 660c bnes 444cc <rmdir+0xd0>
rtems_filesystem_freenode( &parentloc );
return result;
}
444c0: 2003 movel %d3,%d0
444c2: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
444c8: 4e5e unlk %fp
444ca: 4e75 rts
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
444cc: 2f0a movel %a2,%sp@-
444ce: 4e93 jsr %a3@
444d0: 588f addql #4,%sp
return result;
}
444d2: 2003 movel %d3,%d0
444d4: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
444da: 4e5e unlk %fp
444dc: 4e75 rts
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
444de: 4a04 tstb %d4
444e0: 664e bnes 44530 <rmdir+0x134>
rtems_filesystem_freenode( &parentloc );
return -1;
444e2: 76ff moveq #-1,%d3
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
444e4: 2003 movel %d3,%d0
444e6: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
444ec: 4e5e unlk %fp
444ee: 4e75 rts
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
444f0: 2f02 movel %d2,%sp@-
444f2: 47f9 0004 3504 lea 43504 <rtems_filesystem_freenode>,%a3
444f8: 4e93 jsr %a3@
if ( free_parentloc )
444fa: 588f addql #4,%sp
444fc: 4a04 tstb %d4
444fe: 661a bnes 4451a <rmdir+0x11e> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
44500: 4eb9 0004 e400 jsr 4e400 <__errno> <== NOT EXECUTED
44506: 76ff moveq #-1,%d3 <== NOT EXECUTED
44508: 2040 moveal %d0,%a0 <== NOT EXECUTED
4450a: 7014 moveq #20,%d0 <== NOT EXECUTED
4450c: 2080 movel %d0,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4450e: 2003 movel %d3,%d0
44510: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
44516: 4e5e unlk %fp
44518: 4e75 rts
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4451a: 2f0a movel %a2,%sp@-
rtems_set_errno_and_return_minus_one( ENOTDIR );
4451c: 76ff moveq #-1,%d3
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4451e: 4e93 jsr %a3@
44520: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
44522: 4eb9 0004 e400 jsr 4e400 <__errno>
44528: 2040 moveal %d0,%a0
4452a: 7014 moveq #20,%d0
4452c: 2080 movel %d0,%a0@
4452e: 60de bras 4450e <rmdir+0x112>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
44530: 2f0a movel %a2,%sp@-
return -1;
44532: 76ff moveq #-1,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
44534: 4eb9 0004 3504 jsr 43504 <rtems_filesystem_freenode>
4453a: 588f addql #4,%sp
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4453c: 2003 movel %d3,%d0
4453e: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
44544: 4e5e unlk %fp
44546: 4e75 rts
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
44548: 42a7 clrl %sp@-
4454a: 45ee ffe8 lea %fp@(-24),%a2
4454e: 2600 movel %d0,%d3
44550: 2f0a movel %a2,%sp@-
44552: 4878 0002 pea 2 <DOUBLE_FLOAT>
44556: 2f00 movel %d0,%sp@-
44558: 2f02 movel %d2,%sp@-
4455a: 4eb9 0004 3420 jsr 43420 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
44560: 4fef 0014 lea %sp@(20),%sp
44564: 4a80 tstl %d0
44566: 6600 ff7a bnew 444e2 <rmdir+0xe6>
return -1;
free_parentloc = true;
4456a: 7801 moveq #1,%d4
4456c: 6000 fec4 braw 44432 <rmdir+0x36>
0004d5d0 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4d5d0: 4e56 ffe8 linkw %fp,#-24
4d5d4: 48d7 047c moveml %d2-%d6/%a2,%sp@
4d5d8: 2c2e 0008 movel %fp@(8),%d6
4d5dc: 7620 moveq #32,%d3
uint32_t b;
uint32_t local_value = 0;
4d5de: 4285 clrl %d5
for (b = 1; b; b <<= 1) {
4d5e0: 7401 moveq #1,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4d5e2: 45f9 0004 af70 lea 4af70 <rtems_assoc_local_by_remote>,%a2
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4d5e8: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
4d5ec: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4d5ee: 5383 subql #1,%d3
if (b & remote_value)
4d5f0: c084 andl %d4,%d0
4d5f2: 6612 bnes 4d606 <rtems_assoc_local_by_remote_bitfield+0x36>
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4d5f4: d482 addl %d2,%d2
4d5f6: 4a83 tstl %d3
4d5f8: 66f2 bnes 4d5ec <rtems_assoc_local_by_remote_bitfield+0x1c>
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
4d5fa: 2005 movel %d5,%d0
4d5fc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
4d602: 4e5e unlk %fp
4d604: 4e75 rts
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4d606: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4d608: d482 addl %d2,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4d60a: 2f06 movel %d6,%sp@-
4d60c: 4e92 jsr %a2@
4d60e: 508f addql #8,%sp
4d610: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4d612: 4a83 tstl %d3
4d614: 66d6 bnes 4d5ec <rtems_assoc_local_by_remote_bitfield+0x1c><== ALWAYS TAKEN
4d616: 60e2 bras 4d5fa <rtems_assoc_local_by_remote_bitfield+0x2a><== NOT EXECUTED
0004382c <rtems_assoc_name_by_local_bitfield>:
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
4382c: 4e56 ffe0 linkw %fp,#-32
43830: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
43834: 246e 0010 moveal %fp@(16),%a2
uint32_t b;
*buffer = 0;
43838: 7620 moveq #32,%d3
for (b = 1; b; b <<= 1) {
4383a: 7401 moveq #1,%d2
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
4383c: 49f9 0004 38a8 lea 438a8 <rtems_assoc_name_by_local>,%a4
43842: 47f9 0004 f770 lea 4f770 <strcat>,%a3
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
43848: 4bf9 0004 fd34 lea 4fd34 <strlen>,%a5
char *buffer
)
{
uint32_t b;
*buffer = 0;
4384e: 4212 clrb %a2@
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43850: 2a2e 0008 movel %fp@(8),%d5
43854: 282e 000c movel %fp@(12),%d4
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
43858: 2002 movel %d2,%d0
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
4385a: 5383 subql #1,%d3
if (b & value) {
4385c: c084 andl %d4,%d0
4385e: 6714 beqs 43874 <rtems_assoc_name_by_local_bitfield+0x48>
if (*buffer)
43860: 4a12 tstb %a2@
43862: 6622 bnes 43886 <rtems_assoc_name_by_local_bitfield+0x5a>
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
43864: 2f02 movel %d2,%sp@-
43866: 2f05 movel %d5,%sp@-
43868: 4e94 jsr %a4@
4386a: 2f00 movel %d0,%sp@-
4386c: 2f0a movel %a2,%sp@-
4386e: 4e93 jsr %a3@
43870: 4fef 0010 lea %sp@(16),%sp
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
43874: d482 addl %d2,%d2
43876: 4a83 tstl %d3
43878: 66de bnes 43858 <rtems_assoc_name_by_local_bitfield+0x2c>
strcat(buffer, rtems_assoc_name_by_local(ap, b));
}
}
return buffer;
}
4387a: 200a movel %a2,%d0
4387c: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
43882: 4e5e unlk %fp
43884: 4e75 rts
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
43886: 2f0a movel %a2,%sp@-
43888: 4e95 jsr %a5@
4388a: 588f addql #4,%sp
4388c: 323c 2000 movew #8192,%d1
43890: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat(buffer, rtems_assoc_name_by_local(ap, b));
43894: 2f02 movel %d2,%sp@-
43896: 2f05 movel %d5,%sp@-
43898: 4e94 jsr %a4@
4389a: 2f00 movel %d0,%sp@-
4389c: 2f0a movel %a2,%sp@-
4389e: 4e93 jsr %a3@
438a0: 4fef 0010 lea %sp@(16),%sp
438a4: 60ce bras 43874 <rtems_assoc_name_by_local_bitfield+0x48>
...
000438e0 <rtems_assoc_name_by_remote_bitfield>:
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
438e0: 4e56 ffe0 linkw %fp,#-32
438e4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
438e8: 246e 0010 moveal %fp@(16),%a2
uint32_t b;
*buffer = 0;
438ec: 7620 moveq #32,%d3
for (b = 1; b; b <<= 1) {
438ee: 7401 moveq #1,%d2
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
438f0: 49f9 0004 395c lea 4395c <rtems_assoc_name_by_remote>,%a4
438f6: 47f9 0004 f770 lea 4f770 <strcat>,%a3
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
438fc: 4bf9 0004 fd34 lea 4fd34 <strlen>,%a5
char *buffer
)
{
uint32_t b;
*buffer = 0;
43902: 4212 clrb %a2@
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43904: 2a2e 0008 movel %fp@(8),%d5
43908: 282e 000c movel %fp@(12),%d4
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
4390c: 2002 movel %d2,%d0
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
4390e: 5383 subql #1,%d3
if (b & value) {
43910: c084 andl %d4,%d0
43912: 6714 beqs 43928 <rtems_assoc_name_by_remote_bitfield+0x48>
if (*buffer)
43914: 4a12 tstb %a2@
43916: 6622 bnes 4393a <rtems_assoc_name_by_remote_bitfield+0x5a>
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
43918: 2f02 movel %d2,%sp@-
4391a: 2f05 movel %d5,%sp@-
4391c: 4e94 jsr %a4@
4391e: 2f00 movel %d0,%sp@-
43920: 2f0a movel %a2,%sp@-
43922: 4e93 jsr %a3@
43924: 4fef 0010 lea %sp@(16),%sp
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
43928: d482 addl %d2,%d2
4392a: 4a83 tstl %d3
4392c: 66de bnes 4390c <rtems_assoc_name_by_remote_bitfield+0x2c>
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
}
}
return buffer;
}
4392e: 200a movel %a2,%d0
43930: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
43936: 4e5e unlk %fp
43938: 4e75 rts
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
4393a: 2f0a movel %a2,%sp@-
4393c: 4e95 jsr %a5@
4393e: 588f addql #4,%sp
43940: 323c 2000 movew #8192,%d1
43944: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
43948: 2f02 movel %d2,%sp@-
4394a: 2f05 movel %d5,%sp@-
4394c: 4e94 jsr %a4@
4394e: 2f00 movel %d0,%sp@-
43950: 2f0a movel %a2,%sp@-
43952: 4e93 jsr %a3@
43954: 4fef 0010 lea %sp@(16),%sp
43958: 60ce bras 43928 <rtems_assoc_name_by_remote_bitfield+0x48>
...
0004afd0 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4afd0: 4e56 0000 linkw %fp,#0
4afd4: 2f0a movel %a2,%sp@-
4afd6: 246e 0008 moveal %fp@(8),%a2
4afda: 2f02 movel %d2,%sp@-
4afdc: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4afe0: 2012 movel %a2@,%d0
4afe2: 6742 beqs 4b026 <rtems_assoc_ptr_by_local+0x56>
4afe4: 4879 0005 d124 pea 5d124 <IMFS_memfile_handlers+0x38>
4afea: 2f00 movel %d0,%sp@-
4afec: 4eb9 0004 e9d8 jsr 4e9d8 <strcmp>
4aff2: 508f addql #8,%sp
4aff4: 4a80 tstl %d0
4aff6: 662a bnes 4b022 <rtems_assoc_ptr_by_local+0x52>
default_ap = ap++;
4aff8: 41ea 000c lea %a2@(12),%a0
for ( ; ap->name; ap++)
4affc: 4a90 tstl %a0@
4affe: 6714 beqs 4b014 <rtems_assoc_ptr_by_local+0x44> <== NEVER TAKEN
4b000: 200a movel %a2,%d0
4b002: 2448 moveal %a0,%a2
if (ap->local_value == local_value)
4b004: b4aa 0004 cmpl %a2@(4),%d2
4b008: 670a beqs 4b014 <rtems_assoc_ptr_by_local+0x44>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4b00a: 45ea 000c lea %a2@(12),%a2
4b00e: 4a92 tstl %a2@
4b010: 66f2 bnes 4b004 <rtems_assoc_ptr_by_local+0x34>
4b012: 2440 moveal %d0,%a2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4b014: 200a movel %a2,%d0
4b016: 242e fff8 movel %fp@(-8),%d2
4b01a: 246e fffc moveal %fp@(-4),%a2
4b01e: 4e5e unlk %fp
4b020: 4e75 rts
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
4b022: 4280 clrl %d0
4b024: 60de bras 4b004 <rtems_assoc_ptr_by_local+0x34>
4b026: 95ca subal %a2,%a2
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4b028: 200a movel %a2,%d0
4b02a: 242e fff8 movel %fp@(-8),%d2
4b02e: 246e fffc moveal %fp@(-4),%a2
4b032: 4e5e unlk %fp
...
000439fc <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
439fc: 4e56 ffec linkw %fp,#-20
43a00: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
43a04: 246e 0008 moveal %fp@(8),%a2
43a08: 262e 000c movel %fp@(12),%d3
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
43a0c: 2412 movel %a2@,%d2
43a0e: 6748 beqs 43a58 <rtems_assoc_ptr_by_name+0x5c>
43a10: 4879 0005 d5a3 pea 5d5a3 <_rodata_start+0x603>
43a16: 47f9 0004 f7dc lea 4f7dc <strcmp>,%a3
43a1c: 2f02 movel %d2,%sp@-
43a1e: 4e93 jsr %a3@
43a20: 508f addql #8,%sp
43a22: 4a80 tstl %d0
43a24: 662e bnes 43a54 <rtems_assoc_ptr_by_name+0x58>
default_ap = ap++;
43a26: 41ea 000c lea %a2@(12),%a0
for ( ; ap->name; ap++)
43a2a: 2410 movel %a0@,%d2
43a2c: 671a beqs 43a48 <rtems_assoc_ptr_by_name+0x4c> <== NEVER TAKEN
43a2e: 280a movel %a2,%d4
43a30: 2448 moveal %a0,%a2
if (strcmp(ap->name, name) == 0)
43a32: 2f03 movel %d3,%sp@-
43a34: 2f02 movel %d2,%sp@-
43a36: 4e93 jsr %a3@
43a38: 508f addql #8,%sp
43a3a: 4a80 tstl %d0
43a3c: 670a beqs 43a48 <rtems_assoc_ptr_by_name+0x4c>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
43a3e: 45ea 000c lea %a2@(12),%a2
43a42: 2412 movel %a2@,%d2
43a44: 66ec bnes 43a32 <rtems_assoc_ptr_by_name+0x36>
43a46: 2444 moveal %d4,%a2
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
43a48: 200a movel %a2,%d0
43a4a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
43a50: 4e5e unlk %fp
43a52: 4e75 rts
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
43a54: 4284 clrl %d4
43a56: 60da bras 43a32 <rtems_assoc_ptr_by_name+0x36>
43a58: 95ca subal %a2,%a2
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
43a5a: 200a movel %a2,%d0
43a5c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
43a62: 4e5e unlk %fp
...
0004b038 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4b038: 4e56 0000 linkw %fp,#0
4b03c: 2f0a movel %a2,%sp@-
4b03e: 246e 0008 moveal %fp@(8),%a2
4b042: 2f02 movel %d2,%sp@-
4b044: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4b048: 2012 movel %a2@,%d0
4b04a: 6742 beqs 4b08e <rtems_assoc_ptr_by_remote+0x56>
4b04c: 4879 0005 d124 pea 5d124 <IMFS_memfile_handlers+0x38>
4b052: 2f00 movel %d0,%sp@-
4b054: 4eb9 0004 e9d8 jsr 4e9d8 <strcmp>
4b05a: 508f addql #8,%sp
4b05c: 4a80 tstl %d0
4b05e: 662a bnes 4b08a <rtems_assoc_ptr_by_remote+0x52>
default_ap = ap++;
4b060: 41ea 000c lea %a2@(12),%a0
for ( ; ap->name; ap++)
4b064: 4a90 tstl %a0@
4b066: 6714 beqs 4b07c <rtems_assoc_ptr_by_remote+0x44> <== NEVER TAKEN
4b068: 200a movel %a2,%d0
4b06a: 2448 moveal %a0,%a2
if (ap->remote_value == remote_value)
4b06c: b4aa 0008 cmpl %a2@(8),%d2
4b070: 670a beqs 4b07c <rtems_assoc_ptr_by_remote+0x44>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4b072: 45ea 000c lea %a2@(12),%a2
4b076: 4a92 tstl %a2@
4b078: 66f2 bnes 4b06c <rtems_assoc_ptr_by_remote+0x34>
4b07a: 2440 moveal %d0,%a2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4b07c: 200a movel %a2,%d0
4b07e: 242e fff8 movel %fp@(-8),%d2
4b082: 246e fffc moveal %fp@(-4),%a2
4b086: 4e5e unlk %fp
4b088: 4e75 rts
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
4b08a: 4280 clrl %d0
4b08c: 60de bras 4b06c <rtems_assoc_ptr_by_remote+0x34>
4b08e: 95ca subal %a2,%a2
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4b090: 200a movel %a2,%d0
4b092: 242e fff8 movel %fp@(-8),%d2
4b096: 246e fffc moveal %fp@(-4),%a2
4b09a: 4e5e unlk %fp
...
00043ad0 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
43ad0: 4e56 ffe8 linkw %fp,#-24
43ad4: 48d7 047c moveml %d2-%d6/%a2,%sp@
43ad8: 2c2e 0008 movel %fp@(8),%d6
43adc: 7620 moveq #32,%d3
uint32_t b;
uint32_t remote_value = 0;
43ade: 4285 clrl %d5
for (b = 1; b; b <<= 1)
43ae0: 7401 moveq #1,%d2
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
43ae2: 45f9 0004 3b18 lea 43b18 <rtems_assoc_remote_by_local>,%a2
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
43ae8: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
if (b & local_value)
43aec: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43aee: 5383 subql #1,%d3
if (b & local_value)
43af0: c084 andl %d4,%d0
43af2: 6612 bnes 43b06 <rtems_assoc_remote_by_local_bitfield+0x36>
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43af4: d482 addl %d2,%d2
43af6: 4a83 tstl %d3
43af8: 66f2 bnes 43aec <rtems_assoc_remote_by_local_bitfield+0x1c>
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
43afa: 2005 movel %d5,%d0
43afc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
43b02: 4e5e unlk %fp
43b04: 4e75 rts
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
43b06: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43b08: d482 addl %d2,%d2
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
43b0a: 2f06 movel %d6,%sp@-
43b0c: 4e92 jsr %a2@
43b0e: 508f addql #8,%sp
43b10: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43b12: 4a83 tstl %d3
43b14: 66d6 bnes 43aec <rtems_assoc_remote_by_local_bitfield+0x1c><== ALWAYS TAKEN
43b16: 60e2 bras 43afa <rtems_assoc_remote_by_local_bitfield+0x2a><== NOT EXECUTED
0004e4b0 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4e4b0: 4e56 ffe8 linkw %fp,#-24
4e4b4: 202e 0010 movel %fp@(16),%d0
4e4b8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4e4bc: 242e 0008 movel %fp@(8),%d2
4e4c0: 262e 000c movel %fp@(12),%d3
4e4c4: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4e4c8: 4a82 tstl %d2
4e4ca: 677a beqs 4e546 <rtems_barrier_create+0x96>
return RTEMS_INVALID_NAME;
if ( !id )
4e4cc: 4a8a tstl %a2
4e4ce: 6700 00cc beqw 4e59c <rtems_barrier_create+0xec>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4e4d2: 0803 0004 btst #4,%d3
4e4d6: 677a beqs 4e552 <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4e4d8: 42ae fff8 clrl %fp@(-8)
if ( maximum_waiters == 0 )
4e4dc: 4a80 tstl %d0
4e4de: 6700 00b0 beqw 4e590 <rtems_barrier_create+0xe0>
4e4e2: 2239 0006 1cfc movel 61cfc <_Thread_Dispatch_disable_level>,%d1
4e4e8: 5281 addql #1,%d1
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4e4ea: 2d40 fffc movel %d0,%fp@(-4)
4e4ee: 23c1 0006 1cfc movel %d1,61cfc <_Thread_Dispatch_disable_level>
* 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 );
4e4f4: 4879 0006 1ecc pea 61ecc <_Barrier_Information>
4e4fa: 4eb9 0004 9d6c jsr 49d6c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4e500: 588f addql #4,%sp
4e502: 2640 moveal %d0,%a3
4e504: 4a80 tstl %d0
4e506: 6776 beqs 4e57e <rtems_barrier_create+0xce> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
4e508: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4e50c: 486e fff8 pea %fp@(-8)
4e510: 486b 0014 pea %a3@(20)
4e514: 4eb9 0004 ed60 jsr 4ed60 <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
4e51a: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
4e51e: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e520: 2079 0006 1ee4 moveal 61ee4 <_Barrier_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
4e526: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e528: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4e52c: 2742 000c movel %d2,%a3@(12)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4e530: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4e532: 4eb9 0004 ae6a jsr 4ae6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4e538: 508f addql #8,%sp
4e53a: 4280 clrl %d0
}
4e53c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e542: 4e5e unlk %fp
4e544: 4e75 rts
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
4e546: 7003 moveq #3,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e548: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e54e: 4e5e unlk %fp
4e550: 4e75 rts
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
4e552: 7201 moveq #1,%d1
4e554: 2d41 fff8 movel %d1,%fp@(-8)
4e558: 2239 0006 1cfc movel 61cfc <_Thread_Dispatch_disable_level>,%d1
4e55e: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4e560: 2d40 fffc movel %d0,%fp@(-4)
4e564: 23c1 0006 1cfc movel %d1,61cfc <_Thread_Dispatch_disable_level>
4e56a: 4879 0006 1ecc pea 61ecc <_Barrier_Information>
4e570: 4eb9 0004 9d6c jsr 49d6c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4e576: 588f addql #4,%sp
4e578: 2640 moveal %d0,%a3
4e57a: 4a80 tstl %d0
4e57c: 668a bnes 4e508 <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4e57e: 4eb9 0004 ae6a jsr 4ae6a <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
4e584: 7005 moveq #5,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e586: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e58c: 4e5e unlk %fp
4e58e: 4e75 rts
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
4e590: 700a moveq #10,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e592: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e598: 4e5e unlk %fp
4e59a: 4e75 rts
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
4e59c: 7009 moveq #9,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e59e: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e5a4: 4e5e unlk %fp <== NOT EXECUTED
00042b18 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
42b18: 4e56 ffe8 linkw %fp,#-24
42b1c: 202e 0008 movel %fp@(8),%d0
42b20: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
42b24: 246e 000c moveal %fp@(12),%a2
const char *p;
if ( !name )
42b28: 4a80 tstl %d0
42b2a: 660c bnes 42b38 <rtems_bsp_cmdline_get_param+0x20>
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
42b2c: 4280 clrl %d0
copy_string( p, value, length );
return value;
}
42b2e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
42b34: 4e5e unlk %fp
42b36: 4e75 rts
const char *p;
if ( !name )
return NULL;
if ( !value )
42b38: 4a8a tstl %a2
42b3a: 67f0 beqs 42b2c <rtems_bsp_cmdline_get_param+0x14>
return NULL;
if ( !length )
42b3c: 4aae 0010 tstl %fp@(16)
42b40: 67ea beqs 42b2c <rtems_bsp_cmdline_get_param+0x14>
return NULL;
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
42b42: 2f00 movel %d0,%sp@-
return NULL;
if ( !length )
return NULL;
value[0] = '\0';
42b44: 4212 clrb %a2@
p = rtems_bsp_cmdline_get_param_raw( name );
42b46: 4eb9 0004 2ba8 jsr 42ba8 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
42b4c: 588f addql #4,%sp
42b4e: 4a80 tstl %d0
42b50: 67da beqs 42b2c <rtems_bsp_cmdline_get_param+0x14>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42b52: 2040 moveal %d0,%a0
42b54: 1210 moveb %a0@,%d1
42b56: 673e beqs 42b96 <rtems_bsp_cmdline_get_param+0x7e><== NEVER TAKEN
42b58: 282e 0010 movel %fp@(16),%d4
42b5c: 5384 subql #1,%d4
42b5e: 6736 beqs 42b96 <rtems_bsp_cmdline_get_param+0x7e><== NEVER TAKEN
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
42b60: 2240 moveal %d0,%a1
42b62: 47ea 0001 lea %a2@(1),%a3
42b66: 5289 addql #1,%a1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42b68: 91c8 subal %a0,%a0
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
42b6a: 4280 clrl %d0
42b6c: 4283 clrl %d3
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
42b6e: 7a22 moveq #34,%d5
42b70: 1401 moveb %d1,%d2
42b72: 49c2 extbl %d2
42b74: ba82 cmpl %d2,%d5
42b76: 672a beqs 42ba2 <rtems_bsp_cmdline_get_param+0x8a>
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
42b78: 0803 0000 btst #0,%d3
42b7c: 6606 bnes 42b84 <rtems_bsp_cmdline_get_param+0x6c>
42b7e: 7a20 moveq #32,%d5
42b80: ba82 cmpl %d2,%d5
42b82: 6712 beqs 42b96 <rtems_bsp_cmdline_get_param+0x7e>
break;
value[i++] = *p++;
42b84: 5280 addql #1,%d0
42b86: 1581 8800 moveb %d1,%a2@(00000000,%a0:l)
value[i] = '\0';
42b8a: 421b clrb %a3@+
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42b8c: 2040 moveal %d0,%a0
42b8e: 1219 moveb %a1@+,%d1
42b90: 6704 beqs 42b96 <rtems_bsp_cmdline_get_param+0x7e>
42b92: b880 cmpl %d0,%d4
42b94: 62d8 bhis 42b6e <rtems_bsp_cmdline_get_param+0x56>
42b96: 200a movel %a2,%d0
return NULL;
copy_string( p, value, length );
return value;
}
42b98: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
42b9e: 4e5e unlk %fp
42ba0: 4e75 rts
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
42ba2: 5283 addql #1,%d3
42ba4: 60de bras 42b84 <rtems_bsp_cmdline_get_param+0x6c>
...
00042bd0 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42bd0: 4e56 fff0 linkw %fp,#-16
42bd4: 48d7 041c moveml %d2-%d4/%a2,%sp@
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42bd8: 2f2e 0010 movel %fp@(16),%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42bdc: 282e 000c movel %fp@(12),%d4
42be0: 262e 0008 movel %fp@(8),%d3
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42be4: 2f04 movel %d4,%sp@-
42be6: 2f03 movel %d3,%sp@-
42be8: 4eb9 0004 2b18 jsr 42b18 <rtems_bsp_cmdline_get_param>
if ( !p )
42bee: 4fef 000c lea %sp@(12),%sp
{
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42bf2: 2400 movel %d0,%d2
if ( !p )
42bf4: 660c bnes 42c02 <rtems_bsp_cmdline_get_param_rhs+0x32><== NEVER TAKEN
return NULL;
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
42bf6: 4280 clrl %d0
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
}
42bf8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
42bfe: 4e5e unlk %fp
42c00: 4e75 rts
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
42c02: 2f03 movel %d3,%sp@-
42c04: 4eb9 0004 f628 jsr 4f628 <strlen>
42c0a: 588f addql #4,%sp
42c0c: 2242 moveal %d2,%a1
42c0e: d3c0 addal %d0,%a1
if ( *rhs != '=' )
42c10: 723d moveq #61,%d1
42c12: 1011 moveb %a1@,%d0
42c14: 49c0 extbl %d0
42c16: b280 cmpl %d0,%d1
42c18: 66dc bnes 42bf6 <rtems_bsp_cmdline_get_param_rhs+0x26><== NEVER TAKEN
return NULL;
rhs++;
42c1a: 5289 addql #1,%a1
if ( *rhs == '\"' )
42c1c: 7422 moveq #34,%d2
42c1e: 1011 moveb %a1@,%d0
42c20: 1200 moveb %d0,%d1
42c22: 49c1 extbl %d1
42c24: b481 cmpl %d1,%d2
42c26: 6732 beqs 42c5a <rtems_bsp_cmdline_get_param_rhs+0x8a>
rhs++;
for ( d=value ; *rhs ; )
42c28: 4a00 tstb %d0
42c2a: 6734 beqs 42c60 <rtems_bsp_cmdline_get_param_rhs+0x90>
42c2c: 2044 moveal %d4,%a0
#include <string.h>
#include <rtems/bspcmdline.h>
const char *rtems_bsp_cmdline_get_param_rhs(
42c2e: 5289 addql #1,%a1
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
42c30: 10c0 moveb %d0,%a0@+
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c32: 1019 moveb %a1@+,%d0
*d++ = *rhs++;
42c34: 2448 moveal %a0,%a2
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c36: 66f8 bnes 42c30 <rtems_bsp_cmdline_get_param_rhs+0x60>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42c38: 204a moveal %a2,%a0
42c3a: 7222 moveq #34,%d1
42c3c: 1020 moveb %a0@-,%d0
42c3e: 49c0 extbl %d0
42c40: b280 cmpl %d0,%d1
42c42: 670e beqs 42c52 <rtems_bsp_cmdline_get_param_rhs+0x82>
d--;
*d = '\0';
return value;
42c44: 2004 movel %d4,%d0
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
42c46: 4212 clrb %a2@
return value;
}
42c48: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
42c4e: 4e5e unlk %fp
42c50: 4e75 rts
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42c52: 2448 moveal %a0,%a2
d--;
*d = '\0';
return value;
42c54: 2004 movel %d4,%d0
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
42c56: 4212 clrb %a2@
42c58: 60ee bras 42c48 <rtems_bsp_cmdline_get_param_rhs+0x78>
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
42c5a: 5289 addql #1,%a1
42c5c: 1011 moveb %a1@,%d0
42c5e: 60c8 bras 42c28 <rtems_bsp_cmdline_get_param_rhs+0x58>
for ( d=value ; *rhs ; )
42c60: 2444 moveal %d4,%a2
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42c62: 204a moveal %a2,%a0
42c64: 7222 moveq #34,%d1
42c66: 1020 moveb %a0@-,%d0
42c68: 49c0 extbl %d0
42c6a: b280 cmpl %d0,%d1
42c6c: 66d6 bnes 42c44 <rtems_bsp_cmdline_get_param_rhs+0x74><== ALWAYS TAKEN
42c6e: 60e2 bras 42c52 <rtems_bsp_cmdline_get_param_rhs+0x82><== NOT EXECUTED
00047490 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
47490: 4e56 0000 linkw %fp,#0
47494: 2f03 movel %d3,%sp@-
47496: 262e 0014 movel %fp@(20),%d3
4749a: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
4749c: 2f2e 000c movel %fp@(12),%sp@-
474a0: 2f2e 0008 movel %fp@(8),%sp@-
474a4: 242e 0010 movel %fp@(16),%d2
474a8: 4eb9 0004 79fc jsr 479fc <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
474ae: 508f addql #8,%sp
474b0: 4a00 tstb %d0
474b2: 660e bnes 474c2 <rtems_chain_append_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
474b4: 242e fff8 movel %fp@(-8),%d2
474b8: 4280 clrl %d0
474ba: 262e fffc movel %fp@(-4),%d3
474be: 4e5e unlk %fp
474c0: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
474c2: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
474c6: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
474ca: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
474ce: 242e fff8 movel %fp@(-8),%d2
474d2: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
474d4: 4ef9 0004 69c4 jmp 469c4 <rtems_event_send>
...
000474dc <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
474dc: 4e56 0000 linkw %fp,#0
474e0: 2f03 movel %d3,%sp@-
474e2: 262e 0010 movel %fp@(16),%d3
474e6: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
474e8: 2f2e 0014 movel %fp@(20),%sp@-
474ec: 2f2e 0008 movel %fp@(8),%sp@-
474f0: 242e 000c movel %fp@(12),%d2
474f4: 4eb9 0004 7a9c jsr 47a9c <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
474fa: 508f addql #8,%sp
474fc: 4a00 tstb %d0
474fe: 660e bnes 4750e <rtems_chain_get_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
47500: 242e fff8 movel %fp@(-8),%d2
47504: 4280 clrl %d0
47506: 262e fffc movel %fp@(-4),%d3
4750a: 4e5e unlk %fp
4750c: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
4750e: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
47512: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
47516: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
4751a: 242e fff8 movel %fp@(-8),%d2
4751e: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
47520: 4ef9 0004 69c4 jmp 469c4 <rtems_event_send>
...
00047528 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
47528: 4e56 ffe0 linkw %fp,#-32
4752c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
47530: 2c0e movel %fp,%d6
47532: 45f9 0004 7aec lea 47aec <_Chain_Get>,%a2
47538: 5986 subql #4,%d6
4753a: 47f9 0004 681c lea 4681c <rtems_event_receive>,%a3
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
47540: 262e 0008 movel %fp@(8),%d3
47544: 2a2e 000c movel %fp@(12),%d5
47548: 282e 0010 movel %fp@(16),%d4
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
4754c: 2f03 movel %d3,%sp@-
4754e: 4e92 jsr %a2@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
47550: 588f addql #4,%sp
47552: 2400 movel %d0,%d2
47554: 6622 bnes 47578 <rtems_chain_get_with_wait+0x50>
) {
rtems_event_set out;
sc = rtems_event_receive(
47556: 2f06 movel %d6,%sp@-
47558: 2f04 movel %d4,%sp@-
4755a: 42a7 clrl %sp@-
4755c: 2f05 movel %d5,%sp@-
4755e: 4e93 jsr %a3@
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
47560: 4fef 0010 lea %sp@(16),%sp
47564: 4a80 tstl %d0
47566: 67e4 beqs 4754c <rtems_chain_get_with_wait+0x24> <== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
47568: 206e 0014 moveal %fp@(20),%a0
4756c: 2082 movel %d2,%a0@
return sc;
}
4756e: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3
47574: 4e5e unlk %fp
47576: 4e75 rts
timeout,
&out
);
}
*node_ptr = node;
47578: 206e 0014 moveal %fp@(20),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
4757c: 4280 clrl %d0
timeout,
&out
);
}
*node_ptr = node;
4757e: 2082 movel %d2,%a0@
return sc;
}
47580: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3
47586: 4e5e unlk %fp
...
0004758c <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
4758c: 4e56 0000 linkw %fp,#0
47590: 2f03 movel %d3,%sp@-
47592: 262e 0014 movel %fp@(20),%d3
47596: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
47598: 2f2e 000c movel %fp@(12),%sp@-
4759c: 2f2e 0008 movel %fp@(8),%sp@-
475a0: 242e 0010 movel %fp@(16),%d2
475a4: 4eb9 0004 7b58 jsr 47b58 <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
475aa: 508f addql #8,%sp
475ac: 4a00 tstb %d0
475ae: 660e bnes 475be <rtems_chain_prepend_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
475b0: 242e fff8 movel %fp@(-8),%d2
475b4: 4280 clrl %d0
475b6: 262e fffc movel %fp@(-4),%d3
475ba: 4e5e unlk %fp
475bc: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
475be: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
475c2: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
475c6: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
475ca: 242e fff8 movel %fp@(-8),%d2
475ce: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
475d0: 4ef9 0004 69c4 jmp 469c4 <rtems_event_send>
...
0004da5c <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
4da5c: 4e56 0000 linkw %fp,#0
4da60: 202e 0008 movel %fp@(8),%d0
4da64: 2f02 movel %d2,%sp@-
if (sc == RTEMS_SUCCESSFUL) {
4da66: 4a80 tstl %d0
4da68: 660a bnes 4da74 <rtems_deviceio_errno+0x18>
errno = eno;
return -1;
}
}
4da6a: 242e fffc movel %fp@(-4),%d2
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4da6e: 4280 clrl %d0
errno = eno;
return -1;
}
}
4da70: 4e5e unlk %fp
4da72: 4e75 rts
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
4da74: 721c moveq #28,%d1
4da76: b280 cmpl %d0,%d1
4da78: 651e bcss 4da98 <rtems_deviceio_errno+0x3c> <== NEVER TAKEN
eno = status_code_to_errno [sc];
4da7a: 41f9 0005 d1c2 lea 5d1c2 <status_code_to_errno>,%a0
4da80: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2
}
errno = eno;
4da84: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4da8a: 2040 moveal %d0,%a0
return -1;
4da8c: 70ff moveq #-1,%d0
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4da8e: 2082 movel %d2,%a0@
return -1;
}
}
4da90: 242e fffc movel %fp@(-4),%d2
4da94: 4e5e unlk %fp
4da96: 4e75 rts
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4da98: 4eb9 0004 dad8 jsr 4dad8 <__errno> <== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
4da9e: 7416 moveq #22,%d2 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4daa0: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
4daa2: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4daa4: 2082 movel %d2,%a0@ <== NOT EXECUTED
4daa6: 60e8 bras 4da90 <rtems_deviceio_errno+0x34> <== NOT EXECUTED
00042f38 <rtems_filesystem_dirname>:
int rtems_filesystem_dirname(
const char *pathname
)
{
42f38: 4e56 fff4 linkw %fp,#-12
42f3c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
42f40: 246e 0008 moveal %fp@(8),%a2
int len = strlen( pathname );
42f44: 2f0a movel %a2,%sp@-
42f46: 4eb9 0004 ef30 jsr 4ef30 <strlen>
42f4c: 588f addql #4,%sp
42f4e: 2400 movel %d0,%d2
while ( len ) {
42f50: 671c beqs 42f6e <rtems_filesystem_dirname+0x36> <== NEVER TAKEN
flags,
pathloc,
follow_link );
}
int rtems_filesystem_dirname(
42f52: d5c0 addal %d0,%a2
42f54: 47f9 0004 3f3c lea 43f3c <rtems_filesystem_is_separator>,%a3
)
{
int len = strlen( pathname );
while ( len ) {
len--;
42f5a: 5382 subql #1,%d2
if ( rtems_filesystem_is_separator( pathname[len] ) )
42f5c: 1022 moveb %a2@-,%d0
42f5e: 49c0 extbl %d0
42f60: 2f00 movel %d0,%sp@-
42f62: 4e93 jsr %a3@
42f64: 588f addql #4,%sp
42f66: 4a80 tstl %d0
42f68: 6604 bnes 42f6e <rtems_filesystem_dirname+0x36>
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
42f6a: 4a82 tstl %d2
42f6c: 66ec bnes 42f5a <rtems_filesystem_dirname+0x22>
if ( rtems_filesystem_is_separator( pathname[len] ) )
break;
}
return len;
}
42f6e: 2002 movel %d2,%d0
42f70: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
42f76: 4e5e unlk %fp <== NOT EXECUTED
0004b5bc <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
4b5bc: 4e56 fff8 linkw %fp,#-8
4b5c0: 202e 0008 movel %fp@(8),%d0
find_arg fa = {
4b5c4: 42ae fffc clrl %fp@(-4)
4b5c8: 2d40 fff8 movel %d0,%fp@(-8)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4b5cc: 6718 beqs 4b5e6 <rtems_filesystem_get_mount_handler+0x2a><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
4b5ce: 486e fff8 pea %fp@(-8)
4b5d2: 487a fefc pea %pc@(4b4d0 <find_handler>)
4b5d6: 4eb9 0004 b512 jsr 4b512 <rtems_filesystem_iterate>
4b5dc: 202e fffc movel %fp@(-4),%d0
4b5e0: 508f addql #8,%sp
}
return fa.mount_h;
}
4b5e2: 4e5e unlk %fp
4b5e4: 4e75 rts
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4b5e6: 4280 clrl %d0 <== NOT EXECUTED
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
4b5e8: 4e5e unlk %fp <== NOT EXECUTED
00042ad4 <rtems_filesystem_initialize>:
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42ad4: 7012 moveq #18,%d0
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
42ad6: 4e56 ffe0 linkw %fp,#-32
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42ada: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
42ae0: 48d7 1c00 moveml %a2-%a4,%sp@
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42ae4: 2140 002c movel %d0,%a0@(44)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
42ae8: 4ab9 0005 c21e tstl 5c21e <rtems_filesystem_mount_table_size>
42aee: 6700 00c2 beqw 42bb2 <rtems_filesystem_initialize+0xde>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
42af2: 2079 0005 db0c moveal 5db0c <rtems_filesystem_mount_table>,%a0
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
42af8: 42a7 clrl %sp@-
42afa: 2f28 0004 movel %a0@(4),%sp@-
42afe: 2f10 movel %a0@,%sp@-
42b00: 2f28 000c movel %a0@(12),%sp@-
42b04: 2f28 0008 movel %a0@(8),%sp@-
42b08: 4eb9 0004 356c jsr 4356c <mount>
if ( status == -1 )
42b0e: 4fef 0014 lea %sp@(20),%sp
42b12: 72ff moveq #-1,%d1
42b14: b280 cmpl %d0,%d1
42b16: 6700 00b2 beqw 42bca <rtems_filesystem_initialize+0xf6>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
42b1a: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
42b20: 45ee ffec lea %fp@(-20),%a2
42b24: 49f9 0004 2eec lea 42eec <rtems_filesystem_evaluate_path>,%a4
rtems_filesystem_root = loc;
42b2a: 264e moveal %fp,%a3
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
42b2c: 4240 clrw %d0
42b2e: 3140 0030 movew %d0,%a0@(48)
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
42b32: 42a7 clrl %sp@-
42b34: 2f0a movel %a2,%sp@-
42b36: 42a7 clrl %sp@-
42b38: 4878 0001 pea 1 <ADD>
42b3c: 4879 0005 c8ce pea 5c8ce <IMFS_ops+0x48>
42b42: 4e94 jsr %a4@
rtems_filesystem_root = loc;
42b44: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
42b4a: 2163 0028 movel %a3@-,%a0@(40)
42b4e: 216e fff8 0024 movel %fp@(-8),%a0@(36)
42b54: 2152 0018 movel %a2@,%a0@(24)
42b58: 216e fff0 001c movel %fp@(-16),%a0@(28)
42b5e: 216e fff4 0020 movel %fp@(-12),%a0@(32)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
42b64: 42a7 clrl %sp@-
42b66: 2f0a movel %a2,%sp@-
42b68: 42a7 clrl %sp@-
42b6a: 4878 0001 pea 1 <ADD>
42b6e: 4879 0005 c8ce pea 5c8ce <IMFS_ops+0x48>
42b74: 4e94 jsr %a4@
rtems_filesystem_current = loc;
42b76: 2079 0005 dd54 moveal 5dd54 <rtems_current_user_env>,%a0
42b7c: 5888 addql #4,%a0
*
* 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);
42b7e: 4fef 0028 lea %sp@(40),%sp
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
42b82: 20d2 movel %a2@,%a0@+
42b84: 20ee fff0 movel %fp@(-16),%a0@+
42b88: 20ee fff4 movel %fp@(-12),%a0@+
42b8c: 20ee fff8 movel %fp@(-8),%a0@+
42b90: 2093 movel %a3@,%a0@
*
* 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);
42b92: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
42b96: 4879 0005 c8d0 pea 5c8d0 <IMFS_ops+0x4a>
42b9c: 4eb9 0004 33e4 jsr 433e4 <mkdir>
if ( status != 0 )
42ba2: 508f addql #8,%sp
42ba4: 4a80 tstl %d0
42ba6: 6616 bnes 42bbe <rtems_filesystem_initialize+0xea><== NEVER TAKEN
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
42ba8: 4cee 1c00 ffe0 moveml %fp@(-32),%a2-%a4
42bae: 4e5e unlk %fp
42bb0: 4e75 rts
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
42bb2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED
42bb8: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
42bbe: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED
42bc4: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
42bca: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED
42bd0: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
0004b512 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4b512: 4e56 fff0 linkw %fp,#-16
4b516: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4b51a: 266e 0008 moveal %fp@(8),%a3
4b51e: 262e 000c movel %fp@(12),%d3
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4b522: 4ab9 0005 c1fe tstl 5c1fe <rtems_filesystem_table>
4b528: 672a beqs 4b554 <rtems_filesystem_iterate+0x42> <== NEVER TAKEN
4b52a: 45f9 0005 c1fe lea 5c1fe <rtems_filesystem_table>,%a2
stop = (*routine)( table_entry, routine_arg );
4b530: 2f03 movel %d3,%sp@-
4b532: 2f0a movel %a2,%sp@-
++table_entry;
4b534: 508a addql #8,%a2
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
4b536: 4e93 jsr %a3@
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4b538: 508f addql #8,%sp
stop = (*routine)( table_entry, routine_arg );
4b53a: 1400 moveb %d0,%d2
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4b53c: 4a92 tstl %a2@
4b53e: 6710 beqs 4b550 <rtems_filesystem_iterate+0x3e>
4b540: 4a00 tstb %d0
4b542: 67ec beqs 4b530 <rtems_filesystem_iterate+0x1e>
}
rtems_libio_unlock();
}
return stop;
}
4b544: 1002 moveb %d2,%d0
4b546: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4b54c: 4e5e unlk %fp
4b54e: 4e75 rts
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
4b550: 4a00 tstb %d0
4b552: 66f0 bnes 4b544 <rtems_filesystem_iterate+0x32>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4b554: 42a7 clrl %sp@-
4b556: 42a7 clrl %sp@-
4b558: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b55e: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b564: 2479 0005 dd5c moveal 5dd5c <filesystem_chain>,%a2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b56a: 4fef 000c lea %sp@(12),%sp
4b56e: b5fc 0005 dd60 cmpal #384352,%a2
4b574: 6734 beqs 4b5aa <rtems_filesystem_iterate+0x98>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
4b576: 2f03 movel %d3,%sp@-
4b578: 486a 0008 pea %a2@(8)
4b57c: 4e93 jsr %a3@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b57e: 2452 moveal %a2@,%a2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b580: 508f addql #8,%sp
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
4b582: 1400 moveb %d0,%d2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b584: b5fc 0005 dd60 cmpal #384352,%a2
4b58a: 6704 beqs 4b590 <rtems_filesystem_iterate+0x7e>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
4b58c: 4a00 tstb %d0
4b58e: 67e6 beqs 4b576 <rtems_filesystem_iterate+0x64> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b590: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b596: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
4b59c: 588f addql #4,%sp
}
rtems_libio_unlock();
}
return stop;
}
4b59e: 1002 moveb %d2,%d0
4b5a0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4b5a6: 4e5e unlk %fp
4b5a8: 4e75 rts
4b5aa: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b5b0: 4202 clrb %d2
4b5b2: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
4b5b8: 588f addql #4,%sp
4b5ba: 60e2 bras 4b59e <rtems_filesystem_iterate+0x8c>
000434f0 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
434f0: 4e56 fff0 linkw %fp,#-16
434f4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
434f8: 42a7 clrl %sp@-
434fa: 266e 0008 moveal %fp@(8),%a3
434fe: 42a7 clrl %sp@-
43500: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
43506: 262e 000c movel %fp@(12),%d3
4350a: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
43510: 2479 0005 dc38 moveal 5dc38 <mount_chain>,%a2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
43516: 4fef 000c lea %sp@(12),%sp
4351a: b5fc 0005 dc3c cmpal #384060,%a2
43520: 6730 beqs 43552 <rtems_filesystem_mount_iterate+0x62><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
43522: 2f03 movel %d3,%sp@-
43524: 2f0a movel %a2,%sp@-
43526: 4e93 jsr %a3@
}
rtems_libio_unlock();
return stop;
}
43528: 2452 moveal %a2@,%a2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
4352a: 508f addql #8,%sp
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
4352c: 1400 moveb %d0,%d2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
4352e: b5fc 0005 dc3c cmpal #384060,%a2
43534: 6704 beqs 4353a <rtems_filesystem_mount_iterate+0x4a>
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
43536: 4a00 tstb %d0
43538: 67e8 beqs 43522 <rtems_filesystem_mount_iterate+0x32><== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4353a: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
43540: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
43546: 1002 moveb %d2,%d0
43548: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4354e: 4e5e unlk %fp
43550: 4e75 rts
43552: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
43558: 4202 clrb %d2 <== NOT EXECUTED
4355a: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
43560: 1002 moveb %d2,%d0 <== NOT EXECUTED
43562: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
43568: 4e5e unlk %fp <== NOT EXECUTED
00042f7a <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
42f7a: 4e56 fff0 linkw %fp,#-16
42f7e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
42f82: 246e 0008 moveal %fp@(8),%a2
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42f86: 1012 moveb %a2@,%d0
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
42f88: 262e 000c movel %fp@(12),%d3
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42f8c: 4a00 tstb %d0
42f8e: 6730 beqs 42fc0 <rtems_filesystem_prefix_separators+0x46><== NEVER TAKEN
42f90: 4a83 tstl %d3
42f92: 672c beqs 42fc0 <rtems_filesystem_prefix_separators+0x46><== NEVER TAKEN
}
return len;
}
int rtems_filesystem_prefix_separators(
42f94: 528a addql #1,%a2
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
42f96: 4282 clrl %d2
42f98: 47f9 0004 3f3c lea 43f3c <rtems_filesystem_is_separator>,%a3
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42f9e: 49c0 extbl %d0
42fa0: 2f00 movel %d0,%sp@-
42fa2: 4e93 jsr %a3@
42fa4: 588f addql #4,%sp
42fa6: 4a80 tstl %d0
42fa8: 670a beqs 42fb4 <rtems_filesystem_prefix_separators+0x3a>
{
pathname++;
pathnamelen--;
stripped++;
42faa: 5282 addql #1,%d2
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42fac: 101a moveb %a2@+,%d0
42fae: 6704 beqs 42fb4 <rtems_filesystem_prefix_separators+0x3a><== NEVER TAKEN
42fb0: b483 cmpl %d3,%d2
42fb2: 66ea bnes 42f9e <rtems_filesystem_prefix_separators+0x24><== ALWAYS TAKEN
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42fb4: 2002 movel %d2,%d0
42fb6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
42fbc: 4e5e unlk %fp
42fbe: 4e75 rts
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
42fc0: 4282 clrl %d2 <== NOT EXECUTED
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42fc2: 2002 movel %d2,%d0 <== NOT EXECUTED
42fc4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
42fca: 4e5e unlk %fp <== NOT EXECUTED
...
0004b6ca <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
4b6ca: 4e56 fff4 linkw %fp,#-12
4b6ce: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4b6d2: 242e 0008 movel %fp@(8),%d2
rtems_chain_node *node = NULL;
if ( type == NULL ) {
4b6d6: 6700 0094 beqw 4b76c <rtems_filesystem_unregister+0xa2>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4b6da: 42a7 clrl %sp@-
4b6dc: 42a7 clrl %sp@-
4b6de: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b6e4: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b6ea: 2479 0005 dd5c moveal 5dd5c <filesystem_chain>,%a2
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4b6f0: 4fef 000c lea %sp@(12),%sp
4b6f4: b5fc 0005 dd60 cmpal #384352,%a2
4b6fa: 671e beqs 4b71a <rtems_filesystem_unregister+0x50>
4b6fc: 47f9 0004 e9d8 lea 4e9d8 <strcmp>,%a3
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
4b702: 2f02 movel %d2,%sp@-
4b704: 2f2a 0008 movel %a2@(8),%sp@-
4b708: 4e93 jsr %a3@
4b70a: 508f addql #8,%sp
4b70c: 4a80 tstl %d0
4b70e: 6730 beqs 4b740 <rtems_filesystem_unregister+0x76>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b710: 2452 moveal %a2@,%a2
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4b712: b5fc 0005 dd60 cmpal #384352,%a2
4b718: 66e8 bnes 4b702 <rtems_filesystem_unregister+0x38><== NEVER TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b71a: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b720: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4b726: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4b72c: 588f addql #4,%sp
4b72e: 7202 moveq #2,%d1
4b730: 2040 moveal %d0,%a0
4b732: 70ff moveq #-1,%d0
}
4b734: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4b73a: 2081 movel %d1,%a0@
}
4b73c: 4e5e unlk %fp
4b73e: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4b740: 2f0a movel %a2,%sp@-
4b742: 4eb9 0004 71bc jsr 471bc <_Chain_Extract>
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
rtems_chain_extract( node );
free( fsn );
4b748: 2f0a movel %a2,%sp@-
4b74a: 4eb9 0004 2fe4 jsr 42fe4 <free>
4b750: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b756: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
4b75c: 4fef 000c lea %sp@(12),%sp
rtems_libio_unlock();
return 0;
4b760: 4280 clrl %d0
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b762: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4b768: 4e5e unlk %fp
4b76a: 4e75 rts
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
4b76c: 4eb9 0004 dad8 jsr 4dad8 <__errno>
4b772: 7416 moveq #22,%d2
4b774: 2040 moveal %d0,%a0
4b776: 70ff moveq #-1,%d0
4b778: 2082 movel %d2,%a0@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b77a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4b780: 4e5e unlk %fp <== NOT EXECUTED
00043b98 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
43b98: 4e56 0000 linkw %fp,#0
43b9c: 2f0a movel %a2,%sp@-
43b9e: 2f02 movel %d2,%sp@-
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
43ba0: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
43ba4: 242e 000c movel %fp@(12),%d2
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
43ba8: 4eb9 0004 3fcc jsr 43fcc <malloc>
*key = new_key;
43bae: 206e 0008 moveal %fp@(8),%a0
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
43bb2: 2440 moveal %d0,%a2
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
43bb4: 2f02 movel %d2,%sp@-
43bb6: 2f00 movel %d0,%sp@-
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
43bb8: 2080 movel %d0,%a0@
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
43bba: 42a7 clrl %sp@-
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
43bbc: 4292 clrl %a2@
new_key->dtor = dtor;
43bbe: 2542 0004 movel %d2,%a2@(4)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
43bc2: 4eb9 0004 7abc jsr 47abc <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
43bc8: 4fef 0010 lea %sp@(16),%sp
43bcc: 4a80 tstl %d0
43bce: 660e bnes 43bde <rtems_gxx_key_create+0x46> <== NEVER TAKEN
return 0;
free( new_key );
return -1;
}
43bd0: 242e fff8 movel %fp@(-8),%d2
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
43bd4: 4280 clrl %d0
free( new_key );
return -1;
}
43bd6: 246e fffc moveal %fp@(-4),%a2
43bda: 4e5e unlk %fp
43bdc: 4e75 rts
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
free( new_key );
43bde: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43be0: 4eb9 0004 3a00 jsr 43a00 <free> <== NOT EXECUTED
return -1;
}
43be6: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
free( new_key );
return -1;
43bea: 588f addql #4,%sp <== NOT EXECUTED
43bec: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43bee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
43bf2: 4e5e unlk %fp <== NOT EXECUTED
00043c06 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
43c06: 4e56 0000 linkw %fp,#0
43c0a: 2f0a movel %a2,%sp@-
43c0c: 246e 0008 moveal %fp@(8),%a2
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
43c10: 2f0a movel %a2,%sp@-
43c12: 42a7 clrl %sp@-
43c14: 4eb9 0004 7b78 jsr 47b78 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
43c1a: 508f addql #8,%sp
43c1c: 4a80 tstl %d0
43c1e: 660e bnes 43c2e <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
43c20: 4a8a tstl %a2
43c22: 670a beqs 43c2e <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
43c24: 2f12 movel %a2@,%sp@-
43c26: 4eb9 0004 3a00 jsr 43a00 <free>
43c2c: 588f addql #4,%sp
return 0;
}
key = NULL;
return 0;
}
43c2e: 246e fffc moveal %fp@(-4),%a2
43c32: 4280 clrl %d0
43c34: 4e5e unlk %fp <== NOT EXECUTED
00043b1c <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
43b1c: 4e56 fff0 linkw %fp,#-16
43b20: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
43b24: 246e 0008 moveal %fp@(8),%a2
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
43b28: 2012 movel %a2@,%d0
43b2a: 670c beqs 43b38 <rtems_gxx_once+0x1c>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
43b2c: 4280 clrl %d0
43b2e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
43b34: 4e5e unlk %fp
43b36: 4e75 rts
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
43b38: 240e movel %fp,%d2
43b3a: 5982 subql #4,%d2
43b3c: 47f9 0004 787c lea 4787c <rtems_task_mode>,%a3
43b42: 2f02 movel %d2,%sp@-
43b44: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
43b48: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
43b4c: 4e93 jsr %a3@
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
43b4e: 2012 movel %a2@,%d0
43b50: 4fef 000c lea %sp@(12),%sp
43b54: 6626 bnes 43b7c <rtems_gxx_once+0x60> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43b56: 2f02 movel %d2,%sp@-
43b58: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
43b5c: 7001 moveq #1,%d0
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43b5e: 2f2e fffc movel %fp@(-4),%sp@-
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
43b62: 2480 movel %d0,%a2@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43b64: 4e93 jsr %a3@
if ( o == 0 )
(*func)();
43b66: 206e 000c moveal %fp@(12),%a0
43b6a: 4e90 jsr %a0@
43b6c: 4fef 000c lea %sp@(12),%sp
}
return 0;
}
43b70: 4280 clrl %d0
43b72: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
43b78: 4e5e unlk %fp
43b7a: 4e75 rts
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43b7c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
43b7e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED
43b82: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
43b86: 4e93 jsr %a3@ <== NOT EXECUTED
43b88: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
43b8c: 4280 clrl %d0 <== NOT EXECUTED
43b8e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED
43b94: 4e5e unlk %fp <== NOT EXECUTED
00043daa <rtems_gxx_recursive_mutex_unlock>:
}
int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex)
{
43daa: 4e56 0000 linkw %fp,#0
return rtems_gxx_mutex_unlock(mutex);
}
43dae: 4e5e unlk %fp
return rtems_gxx_mutex_trylock(mutex);
}
int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex)
{
return rtems_gxx_mutex_unlock(mutex);
43db0: 4ef9 0004 3d6a jmp 43d6a <rtems_gxx_mutex_unlock>
...
00043c98 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
43c98: 4e56 0000 linkw %fp,#0
43c9c: 2f0a movel %a2,%sp@-
43c9e: 246e 0008 moveal %fp@(8),%a2
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
43ca2: 2f2a 0004 movel %a2@(4),%sp@-
43ca6: 2f0a movel %a2,%sp@-
43ca8: 42a7 clrl %sp@-
43caa: 4eb9 0004 7abc jsr 47abc <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
43cb0: 4fef 000c lea %sp@(12),%sp
43cb4: 4a80 tstl %d0
43cb6: 660c bnes 43cc4 <rtems_gxx_setspecific+0x2c> <== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
43cb8: 24ae 000c movel %fp@(12),%a2@
return 0;
}
return -1;
}
43cbc: 246e fffc moveal %fp@(-4),%a2
43cc0: 4e5e unlk %fp
43cc2: 4e75 rts
43cc4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL ) {
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
43cc8: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43cca: 4e5e unlk %fp <== NOT EXECUTED
00047fd8 <rtems_heap_allocate_aligned_with_boundary>:
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
if (
47fd8: 7003 moveq #3,%d0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
47fda: 4e56 0000 linkw %fp,#0
if (
47fde: b0b9 0006 59ec cmpl 659ec <_System_state_Current>,%d0
47fe4: 6726 beqs 4800c <rtems_heap_allocate_aligned_with_boundary+0x34>
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
47fe6: 4eb9 0004 6ef0 jsr 46ef0 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
47fec: 2f2e 0010 movel %fp@(16),%sp@-
47ff0: 2f2e 000c movel %fp@(12),%sp@-
47ff4: 2f2e 0008 movel %fp@(8),%sp@-
47ff8: 2f39 0006 36b0 movel 636b0 <RTEMS_Malloc_Heap>,%sp@-
47ffe: 4eb9 0004 d170 jsr 4d170 <_Protected_heap_Allocate_aligned_with_boundary>
48004: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
48008: 4e5e unlk %fp
4800a: 4e75 rts
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
4800c: 4eb9 0004 6eb0 jsr 46eb0 <malloc_is_system_state_OK>
48012: 4a00 tstb %d0
48014: 66d0 bnes 47fe6 <rtems_heap_allocate_aligned_with_boundary+0xe><== NEVER TAKEN
) {
return NULL;
48016: 4280 clrl %d0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
48018: 4e5e unlk %fp <== NOT EXECUTED
00046e26 <rtems_initialize_start_multitasking>:
46e26: 7002 moveq #2,%d0
}
void rtems_initialize_start_multitasking(void)
{
46e28: 4e56 0000 linkw %fp,#0
****** APPLICATION RUNS HERE ******
****** RETURNS WHEN SYSTEM IS SHUT DOWN ******
*******************************************************************
*******************************************************************
*******************************************************************/
}
46e2c: 4e5e unlk %fp
46e2e: 23c0 0005 f590 movel %d0,5f590 <_System_state_Current>
void rtems_initialize_start_multitasking(void)
{
_System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
_Thread_Start_multitasking();
46e34: 4ef9 0004 96e0 jmp 496e0 <_Thread_Start_multitasking>
...
00042a36 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
42a36: 4e56 ffd8 linkw %fp,#-40
42a3a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
42a3e: 262e 0008 movel %fp@(8),%d3
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(
42a42: 45f9 0004 ef30 lea 4ef30 <strlen>,%a2
42a48: 240e movel %fp,%d2
42a4a: 0682 ffff ffec addil #-20,%d2
42a50: 2f03 movel %d3,%sp@-
42a52: 4e92 jsr %a2@
42a54: 7201 moveq #1,%d1
42a56: 2e81 movel %d1,%sp@
42a58: 2f02 movel %d2,%sp@-
42a5a: 42a7 clrl %sp@-
42a5c: 2f00 movel %d0,%sp@-
42a5e: 2f03 movel %d3,%sp@-
42a60: 4eb9 0004 2eec jsr 42eec <rtems_filesystem_evaluate_path>
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
42a66: 206e fff8 moveal %fp@(-8),%a0
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(
42a6a: 2800 movel %d0,%d4
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
42a6c: 2f02 movel %d2,%sp@-
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
42a6e: 266e ffec moveal %fp@(-20),%a3
node_type = (*loc.ops->node_type_h)( &loc );
42a72: 2068 0010 moveal %a0@(16),%a0
42a76: 4e90 jsr %a0@
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
42a78: 4fef 0018 lea %sp@(24),%sp
42a7c: 4a84 tstl %d4
42a7e: 6606 bnes 42a86 <rtems_io_lookup_name+0x50> <== NEVER TAKEN
42a80: 7202 moveq #2,%d1
42a82: b280 cmpl %d0,%d1
42a84: 6716 beqs 42a9c <rtems_io_lookup_name+0x66>
rtems_filesystem_freenode( &loc );
42a86: 2f02 movel %d2,%sp@-
42a88: 4eb9 0004 2fd0 jsr 42fd0 <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
42a8e: 588f addql #4,%sp
42a90: 700d moveq #13,%d0
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
42a92: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3
42a98: 4e5e unlk %fp
42a9a: 4e75 rts
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
42a9c: 206e 000c moveal %fp@(12),%a0
42aa0: 2083 movel %d3,%a0@
device_info->device_name_length = strlen( name );
42aa2: 2f03 movel %d3,%sp@-
42aa4: 4e92 jsr %a2@
42aa6: 226e 000c moveal %fp@(12),%a1
device_info->major = the_jnode->info.device.major;
42aaa: 41eb 004c lea %a3@(76),%a0
device_info->minor = the_jnode->info.device.minor;
42aae: 47eb 0050 lea %a3@(80),%a3
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
42ab2: 2340 0004 movel %d0,%a1@(4)
device_info->major = the_jnode->info.device.major;
42ab6: 2350 0008 movel %a0@,%a1@(8)
device_info->minor = the_jnode->info.device.minor;
42aba: 2353 000c movel %a3@,%a1@(12)
rtems_filesystem_freenode( &loc );
42abe: 2e82 movel %d2,%sp@
42ac0: 4eb9 0004 2fd0 jsr 42fd0 <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
42ac6: 588f addql #4,%sp
42ac8: 4280 clrl %d0
}
42aca: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3
42ad0: 4e5e unlk %fp <== NOT EXECUTED
00048388 <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
)
{
48388: 4e56 fff4 linkw %fp,#-12
4838c: 226e 000c moveal %fp@(12),%a1
48390: 48d7 040c moveml %d2-%d3/%a2,%sp@
48394: 242e 0008 movel %fp@(8),%d2
48398: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
4839c: 2039 0006 382c movel 6382c <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
483a2: 4ab9 0006 37b8 tstl 637b8 <_Per_CPU_Information+0x8>
483a8: 6600 009c bnew 48446 <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
483ac: 4a8a tstl %a2
483ae: 6700 00ea beqw 4849a <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
483b2: 2480 movel %d0,%a2@
if ( driver_table == NULL )
483b4: 4a89 tstl %a1
483b6: 6700 00e2 beqw 4849a <rtems_io_register_driver+0x112>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483ba: 4a91 tstl %a1@
483bc: 6700 00d4 beqw 48492 <rtems_io_register_driver+0x10a>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
483c0: b480 cmpl %d0,%d2
483c2: 6476 bccs 4843a <rtems_io_register_driver+0xb2>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
483c4: 2039 0006 3620 movel 63620 <_Thread_Dispatch_disable_level>,%d0
483ca: 5280 addql #1,%d0
483cc: 23c0 0006 3620 movel %d0,63620 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
483d2: 4a82 tstl %d2
483d4: 667c bnes 48452 <rtems_io_register_driver+0xca>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
483d6: 2039 0006 382c movel 6382c <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483dc: 6700 0106 beqw 484e4 <rtems_io_register_driver+0x15c>
483e0: 2239 0006 3830 movel 63830 <_IO_Driver_address_table>,%d1
483e6: 2041 moveal %d1,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483e8: 4a90 tstl %a0@
483ea: 6700 008e beqw 4847a <rtems_io_register_driver+0xf2>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483ee: 5282 addql #1,%d2
483f0: 41e8 0018 lea %a0@(24),%a0
483f4: b480 cmpl %d0,%d2
483f6: 65f0 bcss 483e8 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
483f8: 2482 movel %d2,%a2@
if ( m != n )
483fa: b480 cmpl %d0,%d2
483fc: 6700 00e8 beqw 484e6 <rtems_io_register_driver+0x15e>
48400: 2602 movel %d2,%d3
48402: 2002 movel %d2,%d0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
48404: 2041 moveal %d1,%a0
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
48406: e78b lsll #3,%d3
48408: eb88 lsll #5,%d0
4840a: 9083 subl %d3,%d0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
4840c: d1c0 addal %d0,%a0
4840e: 20d9 movel %a1@+,%a0@+
48410: 20d9 movel %a1@+,%a0@+
48412: 20d9 movel %a1@+,%a0@+
48414: 20d9 movel %a1@+,%a0@+
48416: 20d9 movel %a1@+,%a0@+
48418: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
4841a: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
48420: 2d42 0008 movel %d2,%fp@(8)
}
48424: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
4842a: 42ae 0010 clrl %fp@(16)
4842e: 42ae 000c clrl %fp@(12)
}
48432: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48434: 4ef9 0004 ffc8 jmp 4ffc8 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
4843a: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4843c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
48442: 4e5e unlk %fp
48444: 4e75 rts
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
48446: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48448: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4844e: 4e5e unlk %fp
48450: 4e75 rts
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
48452: 2202 movel %d2,%d1
48454: 2002 movel %d2,%d0
48456: e789 lsll #3,%d1
48458: eb88 lsll #5,%d0
4845a: 2079 0006 3830 moveal 63830 <_IO_Driver_address_table>,%a0
48460: 9081 subl %d1,%d0
48462: d1c0 addal %d0,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48464: 4a90 tstl %a0@
48466: 673e beqs 484a6 <rtems_io_register_driver+0x11e>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
48468: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
4846e: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48470: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
48476: 4e5e unlk %fp
48478: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
4847a: 4aa8 0004 tstl %a0@(4)
4847e: 6700 ff78 beqw 483f8 <rtems_io_register_driver+0x70>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
48482: 5282 addql #1,%d2
48484: 41e8 0018 lea %a0@(24),%a0
48488: b480 cmpl %d0,%d2
4848a: 6500 ff5c bcsw 483e8 <rtems_io_register_driver+0x60>
4848e: 6000 ff68 braw 483f8 <rtems_io_register_driver+0x70>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48492: 4aa9 0004 tstl %a1@(4)
48496: 6600 ff28 bnew 483c0 <rtems_io_register_driver+0x38>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
4849a: 7009 moveq #9,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4849c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
484a2: 4e5e unlk %fp
484a4: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
484a6: 4aa8 0004 tstl %a0@(4)
484aa: 66bc bnes 48468 <rtems_io_register_driver+0xe0>
484ac: 2239 0006 3830 movel 63830 <_IO_Driver_address_table>,%d1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
484b2: 2041 moveal %d1,%a0
484b4: d1c0 addal %d0,%a0
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
484b6: 2482 movel %d2,%a2@
}
_IO_Driver_address_table [major] = *driver_table;
484b8: 20d9 movel %a1@+,%a0@+
484ba: 20d9 movel %a1@+,%a0@+
484bc: 20d9 movel %a1@+,%a0@+
484be: 20d9 movel %a1@+,%a0@+
484c0: 20d9 movel %a1@+,%a0@+
484c2: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
484c4: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
484ca: 2d42 0008 movel %d2,%fp@(8)
}
484ce: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484d4: 42ae 0010 clrl %fp@(16)
484d8: 42ae 000c clrl %fp@(12)
}
484dc: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484de: 4ef9 0004 ffc8 jmp 4ffc8 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
484e4: 4292 clrl %a2@ <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
484e6: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
484ec: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
484ee: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
484f4: 4e5e unlk %fp <== NOT EXECUTED
00049568 <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)
{
49568: 4e56 fff0 linkw %fp,#-16
4956c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
49570: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
49574: 4a8b tstl %a3
49576: 6742 beqs 495ba <rtems_iterate_over_all_threads+0x52><== NEVER TAKEN
49578: 49f9 0006 1f38 lea 61f38 <_Objects_Information_table+0x4>,%a4
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
4957e: 205c moveal %a4@+,%a0
49580: 4a88 tstl %a0
49582: 672e beqs 495b2 <rtems_iterate_over_all_threads+0x4a>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
49584: 2468 0004 moveal %a0@(4),%a2
if ( !information )
49588: 4a8a tstl %a2
4958a: 6726 beqs 495b2 <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4958c: 4a6a 000e tstw %a2@(14)
49590: 6720 beqs 495b2 <rtems_iterate_over_all_threads+0x4a><== NEVER TAKEN
49592: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
49594: 206a 0018 moveal %a2@(24),%a0
49598: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4959c: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
4959e: 4a80 tstl %d0
495a0: 6706 beqs 495a8 <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
continue;
(*routine)(the_thread);
495a2: 2f00 movel %d0,%sp@-
495a4: 4e93 jsr %a3@
495a6: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
495a8: 4280 clrl %d0
495aa: 302a 000e movew %a2@(14),%d0
495ae: b480 cmpl %d0,%d2
495b0: 63e2 blss 49594 <rtems_iterate_over_all_threads+0x2c>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
495b2: b9fc 0006 1f44 cmpal #401220,%a4
495b8: 66c4 bnes 4957e <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
495ba: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
495c0: 4e5e unlk %fp <== NOT EXECUTED
0004b346 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
4b346: 4e56 0000 linkw %fp,#0
4b34a: 2f0a movel %a2,%sp@-
4b34c: 246e 0008 moveal %fp@(8),%a2
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4b350: 42a7 clrl %sp@-
4b352: 42a7 clrl %sp@-
4b354: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b35a: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
4b360: 202a 002c movel %a2@(44),%d0
4b364: 4fef 000c lea %sp@(12),%sp
4b368: 6630 bnes 4b39a <rtems_libio_free+0x54> <== ALWAYS TAKEN
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4b36a: 41f9 0005 f2fc lea 5f2fc <rtems_libio_iop_freelist>,%a0 <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b370: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
4b376: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b37a: 41f9 0005 f300 lea 5f300 <rtems_libio_semaphore>,%a0 <== NOT EXECUTED
4b380: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b384: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4b388: 23ca 0005 f2fc movel %a2,5f2fc <rtems_libio_iop_freelist> <== NOT EXECUTED
rtems_libio_unlock();
}
4b38e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4b392: 4e5e unlk %fp <== NOT EXECUTED
4b394: 4ef9 0004 68a8 jmp 468a8 <rtems_semaphore_release> <== NOT EXECUTED
)
{
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
4b39a: 2f00 movel %d0,%sp@-
4b39c: 4eb9 0004 6690 jsr 46690 <rtems_semaphore_delete>
4b3a2: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4b3a4: 41f9 0005 f2fc lea 5f2fc <rtems_libio_iop_freelist>,%a0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b3aa: 203c ffff feff movel #-257,%d0
iop->data1 = rtems_libio_iop_freelist;
4b3b0: 2550 0034 movel %a0@,%a2@(52)
4b3b4: 41f9 0005 f300 lea 5f300 <rtems_libio_semaphore>,%a0
4b3ba: 2d50 0008 movel %a0@,%fp@(8)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b3be: c1aa 0014 andl %d0,%a2@(20)
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4b3c2: 23ca 0005 f2fc movel %a2,5f2fc <rtems_libio_iop_freelist>
rtems_libio_unlock();
}
4b3c8: 246e fffc moveal %fp@(-4),%a2
4b3cc: 4e5e unlk %fp
4b3ce: 4ef9 0004 68a8 jmp 468a8 <rtems_semaphore_release>
00043100 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
43100: 4e56 0000 linkw %fp,#0
43104: 2f02 movel %d2,%sp@-
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
43106: 2439 0005 db04 movel 5db04 <rtems_libio_number_iops>,%d2
4310c: 674a beqs 43158 <rtems_libio_init+0x58> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
4310e: 4878 0038 pea 38 <DBL_MANT_DIG+0x3>
43112: 2f02 movel %d2,%sp@-
43114: 4eb9 0004 2bd8 jsr 42bd8 <calloc>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
4311a: 508f addql #8,%sp
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
4311c: 2040 moveal %d0,%a0
4311e: 23c0 0005 f2f8 movel %d0,5f2f8 <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
43124: 6778 beqs 4319e <rtems_libio_init+0x9e> <== NEVER TAKEN
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
43126: 23c0 0005 f2fc movel %d0,5f2fc <rtems_libio_iop_freelist>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
4312c: 7201 moveq #1,%d1
4312e: b282 cmpl %d2,%d1
43130: 6422 bccs 43154 <rtems_libio_init+0x54> <== NEVER TAKEN
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
43132: 2040 moveal %d0,%a0
43134: 41e8 0038 lea %a0@(56),%a0
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
iop->data1 = iop + 1;
43138: 2148 fffc movel %a0,%a0@(-4)
4313c: 5281 addql #1,%d1
4313e: 41e8 0038 lea %a0@(56),%a0
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 + 1) < rtems_libio_number_iops ; i++, iop++)
43142: b481 cmpl %d1,%d2
43144: 66f2 bnes 43138 <rtems_libio_init+0x38>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
43146: 5381 subql #1,%d1
43148: 2401 movel %d1,%d2
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 + 1) < rtems_libio_number_iops ; i++, iop++)
4314a: 2040 moveal %d0,%a0
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
4314c: e78a lsll #3,%d2
4314e: ed89 lsll #6,%d1
43150: 9282 subl %d2,%d1
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 + 1) < rtems_libio_number_iops ; i++, iop++)
43152: d1c1 addal %d1,%a0
iop->data1 = iop + 1;
iop->data1 = NULL;
43154: 42a8 0034 clrl %a0@(52)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
43158: 4879 0005 f300 pea 5f300 <rtems_libio_semaphore>
4315e: 42a7 clrl %sp@-
43160: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
43164: 4878 0001 pea 1 <ADD>
43168: 2f3c 4c42 494f movel #1279412559,%sp@-
4316e: 4eb9 0004 64cc jsr 464cc <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
43174: 4fef 0014 lea %sp@(20),%sp
43178: 4a80 tstl %d0
4317a: 661a bnes 43196 <rtems_libio_init+0x96> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
4317c: 2279 0005 db00 moveal 5db00 <rtems_fs_init_helper>,%a1
43182: 4a89 tstl %a1
43184: 6708 beqs 4318e <rtems_libio_init+0x8e> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
43186: 242e fffc movel %fp@(-4),%d2
4318a: 4e5e unlk %fp
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
4318c: 4ed1 jmp %a1@
}
4318e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
43192: 4e5e unlk %fp <== NOT EXECUTED
43194: 4e75 rts <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
43196: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43198: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
4319e: 4878 001a pea 1a <OPER2+0x6>
431a2: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred>
0004b452 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
4b452: 4e56 0000 linkw %fp,#0
4b456: 2f02 movel %d2,%sp@-
4b458: 242e 0008 movel %fp@(8),%d2
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4b45c: 42a7 clrl %sp@-
4b45e: 42a7 clrl %sp@-
4b460: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b466: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b46c: 2079 0005 f2f8 moveal 5f2f8 <rtems_libio_iops>,%a0
4b472: 4fef 000c lea %sp@(12),%sp
4b476: 2279 0005 db04 moveal 5db04 <rtems_libio_number_iops>,%a1
4b47c: 4a89 tstl %a1
4b47e: 6720 beqs 4b4a0 <rtems_libio_is_file_open+0x4e> <== NEVER TAKEN
* given file refers to an active file descriptor.
*
* If the given file is open a 1 is returned, otherwise a 0 is returned.
*/
int rtems_libio_is_file_open(
4b480: 41e8 0014 lea %a0@(20),%a0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b484: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b486: 2210 movel %a0@,%d1
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b488: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b48a: 0281 0000 0100 andil #256,%d1
4b490: 6706 beqs 4b498 <rtems_libio_is_file_open+0x46>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
4b492: b4a8 0004 cmpl %a0@(4),%d2
4b496: 6720 beqs 4b4b8 <rtems_libio_is_file_open+0x66>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b498: 41e8 0038 lea %a0@(56),%a0
4b49c: b3c0 cmpal %d0,%a1
4b49e: 62e6 bhis 4b486 <rtems_libio_is_file_open+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b4a0: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
4b4a6: 4282 clrl %d2
4b4a8: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b4ae: 2002 movel %d2,%d0
4b4b0: 242e fffc movel %fp@(-4),%d2
4b4b4: 4e5e unlk %fp
4b4b6: 4e75 rts
4b4b8: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
result = 1;
4b4be: 7401 moveq #1,%d2
4b4c0: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b4c6: 2002 movel %d2,%d0
4b4c8: 242e fffc movel %fp@(-4),%d2
4b4cc: 4e5e unlk %fp <== NOT EXECUTED
0004b3d4 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
4b3d4: 4e56 0000 linkw %fp,#0
4b3d8: 2f02 movel %d2,%sp@-
4b3da: 242e 0008 movel %fp@(8),%d2
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4b3de: 42a7 clrl %sp@-
4b3e0: 42a7 clrl %sp@-
4b3e2: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
4b3e8: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b3ee: 2079 0005 f2f8 moveal 5f2f8 <rtems_libio_iops>,%a0
4b3f4: 4fef 000c lea %sp@(12),%sp
4b3f8: 2279 0005 db04 moveal 5db04 <rtems_libio_number_iops>,%a1
4b3fe: 4a89 tstl %a1
4b400: 6720 beqs 4b422 <rtems_libio_is_open_files_in_fs+0x4e><== NEVER TAKEN
*
* If there is at least one node in the file system referenced by the mount
* table entry a 1 is returned, otherwise a 0 is returned.
*/
int rtems_libio_is_open_files_in_fs(
4b402: 41e8 0014 lea %a0@(20),%a0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b406: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b408: 2210 movel %a0@,%d1
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b40a: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b40c: 0281 0000 0100 andil #256,%d1
4b412: 6706 beqs 4b41a <rtems_libio_is_open_files_in_fs+0x46>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
4b414: b4a8 0014 cmpl %a0@(20),%d2
4b418: 6720 beqs 4b43a <rtems_libio_is_open_files_in_fs+0x66>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b41a: 41e8 0038 lea %a0@(56),%a0
4b41e: b3c0 cmpal %d0,%a1
4b420: 62e6 bhis 4b408 <rtems_libio_is_open_files_in_fs+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b422: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
4b428: 4282 clrl %d2
4b42a: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b430: 2002 movel %d2,%d0
4b432: 242e fffc movel %fp@(-4),%d2
4b436: 4e5e unlk %fp
4b438: 4e75 rts
4b43a: 2f39 0005 f300 movel 5f300 <rtems_libio_semaphore>,%sp@-
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
result = 1;
4b440: 7401 moveq #1,%d2
4b442: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b448: 2002 movel %d2,%d0
4b44a: 242e fffc movel %fp@(-4),%d2
4b44e: 4e5e unlk %fp <== NOT EXECUTED
00044754 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
44754: 4e56 ffc4 linkw %fp,#-60
44758: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
4475c: 4eb9 0004 76ac jsr 476ac <rtems_task_self>
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
44762: 45ee ffec lea %fp@(-20),%a2
44766: 47f9 0004 3438 lea 43438 <rtems_filesystem_evaluate_path>,%a3
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
4476c: 2400 movel %d0,%d2
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
4476e: 42a7 clrl %sp@-
44770: 2f0a movel %a2,%sp@-
44772: 42a7 clrl %sp@-
44774: 4878 0001 pea 1 <ADD>
44778: 4879 0005 d2b2 pea 5d2b2 <IMFS_ops+0x48>
4477e: 4e93 jsr %a3@
if (rv != 0)
44780: 4fef 0014 lea %sp@(20),%sp
44784: 4a80 tstl %d0
44786: 670c beqs 44794 <rtems_libio_set_private_env+0x40><== ALWAYS TAKEN
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
44788: 701a moveq #26,%d0 <== NOT EXECUTED
}
4478a: 4cee 1c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a4 <== NOT EXECUTED
44790: 4e5e unlk %fp <== NOT EXECUTED
44792: 4e75 rts <== NOT EXECUTED
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
if (rv != 0)
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
44794: 42a7 clrl %sp@-
44796: 49ee ffd8 lea %fp@(-40),%a4
4479a: 2f0c movel %a4,%sp@-
4479c: 42a7 clrl %sp@-
4479e: 4878 0001 pea 1 <ADD>
447a2: 4879 0005 d2b2 pea 5d2b2 <IMFS_ops+0x48>
447a8: 4e93 jsr %a3@
if (rv != 0)
447aa: 4fef 0014 lea %sp@(20),%sp
447ae: 47f9 0004 351c lea 4351c <rtems_filesystem_freenode>,%a3
447b4: 4a80 tstl %d0
447b6: 6600 00b4 bnew 4486c <rtems_libio_set_private_env+0x118>
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
447ba: 2679 0005 e71c moveal 5e71c <rtems_current_user_env>,%a3
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
447c0: b7fc 0005 fd18 cmpal #392472,%a3
447c6: 6704 beqs 447cc <rtems_libio_set_private_env+0x78>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
447c8: b493 cmpl %a3@,%d2
447ca: 6734 beqs 44800 <rtems_libio_set_private_env+0xac><== NEVER TAKEN
) {
new_env = malloc(sizeof(rtems_user_env_t));
447cc: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
447d0: 4eb9 0004 3b58 jsr 43b58 <malloc>
if (new_env == NULL)
447d6: 588f addql #4,%sp
if (
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
) {
new_env = malloc(sizeof(rtems_user_env_t));
447d8: 2640 moveal %d0,%a3
if (new_env == NULL)
447da: 4a80 tstl %d0
447dc: 6700 0082 beqw 44860 <rtems_libio_set_private_env+0x10c>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
447e0: 487a ff2a pea %pc@(4470c <free_user_env>)
447e4: 4879 0005 e71c pea 5e71c <rtems_current_user_env>
447ea: 42a7 clrl %sp@-
447ec: 4eb9 0004 7780 jsr 47780 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
447f2: 4fef 000c lea %sp@(12),%sp
447f6: 4a80 tstl %d0
447f8: 665c bnes 44856 <rtems_libio_set_private_env+0x102>
goto error_3;
rtems_current_user_env = new_env;
447fa: 23cb 0005 e71c movel %a3,5e71c <rtems_current_user_env>
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
44800: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
44804: 4879 0005 fd18 pea 5fd18 <rtems_global_user_env>
4480a: 2f0b movel %a3,%sp@-
4480c: 4eb9 0004 ecf8 jsr 4ecf8 <memcpy>
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
44812: 276e fff4 0020 movel %fp@(-12),%a3@(32)
rtems_filesystem_current = current_loc;
44818: 41eb 0004 lea %a3@(4),%a0
return RTEMS_SUCCESSFUL;
4481c: 4fef 000c lea %sp@(12),%sp
44820: 4280 clrl %d0
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
44822: 276e fff8 0024 movel %fp@(-8),%a3@(36)
44828: 276e fffc 0028 movel %fp@(-4),%a3@(40)
4482e: 276e fff0 001c movel %fp@(-16),%a3@(28)
44834: 2752 0018 movel %a2@,%a3@(24)
rtems_filesystem_current = current_loc;
44838: 20d4 movel %a4@,%a0@+
4483a: 20ee ffdc movel %fp@(-36),%a0@+
4483e: 20ee ffe0 movel %fp@(-32),%a0@+
44842: 20ee ffe4 movel %fp@(-28),%a0@+
44846: 20ae ffe8 movel %fp@(-24),%a0@
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
rtems_current_user_env->task_id = task_id;
4484a: 2682 movel %d2,%a3@
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
4484c: 4cee 1c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a4
44852: 4e5e unlk %fp
44854: 4e75 rts
rtems_filesystem_current = current_loc;
return RTEMS_SUCCESSFUL;
error_3:
free(new_env);
44856: 2f0b movel %a3,%sp@-
44858: 4eb9 0004 3530 jsr 43530 <free>
4485e: 588f addql #4,%sp
error_2:
rtems_filesystem_freenode(¤t_loc);
44860: 2f0c movel %a4,%sp@-
44862: 47f9 0004 351c lea 4351c <rtems_filesystem_freenode>,%a3
44868: 4e93 jsr %a3@
4486a: 588f addql #4,%sp
error_1:
rtems_filesystem_freenode(&root_loc);
4486c: 2f0a movel %a2,%sp@-
4486e: 4e93 jsr %a3@
44870: 588f addql #4,%sp
error_0:
return RTEMS_NO_MEMORY;
44872: 701a moveq #26,%d0
}
44874: 4cee 1c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a4
4487a: 4e5e unlk %fp <== NOT EXECUTED
0004487e <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
4487e: 4e56 fff8 linkw %fp,#-8
44882: 2f03 movel %d3,%sp@-
44884: 2f02 movel %d2,%sp@-
44886: 242e 0008 movel %fp@(8),%d2
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
4488a: 4eb9 0004 76ac jsr 476ac <rtems_task_self>
44890: 2600 movel %d0,%d3
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
44892: b082 cmpl %d2,%d0
44894: 673a beqs 448d0 <rtems_libio_share_private_env+0x52><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
44896: 486e fffc pea %fp@(-4)
4489a: 4879 0005 e71c pea 5e71c <rtems_current_user_env>
448a0: 2f02 movel %d2,%sp@-
448a2: 4eb9 0004 783c jsr 4783c <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
448a8: 4fef 000c lea %sp@(12),%sp
448ac: 4a80 tstl %d0
448ae: 6614 bnes 448c4 <rtems_libio_share_private_env+0x46>
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
448b0: 2079 0005 e71c moveal 5e71c <rtems_current_user_env>,%a0
448b6: b690 cmpl %a0@,%d3
448b8: 6724 beqs 448de <rtems_libio_share_private_env+0x60>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
448ba: 41ee fffc lea %fp@(-4),%a0
448be: 23d0 0005 e71c movel %a0@,5e71c <rtems_current_user_env>
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
448c4: 242e fff0 movel %fp@(-16),%d2
448c8: 262e fff4 movel %fp@(-12),%d3
448cc: 4e5e unlk %fp
448ce: 4e75 rts
448d0: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
448d4: 4280 clrl %d0 <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
448d6: 262e fff4 movel %fp@(-12),%d3 <== NOT EXECUTED
448da: 4e5e unlk %fp <== NOT EXECUTED
448dc: 4e75 rts <== NOT EXECUTED
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
448de: 2f08 movel %a0,%sp@-
448e0: 2d40 fff8 movel %d0,%fp@(-8)
448e4: 4eba fe26 jsr %pc@(4470c <free_user_env>)
448e8: 202e fff8 movel %fp@(-8),%d0
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
448ec: 41ee fffc lea %fp@(-4),%a0
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
448f0: 588f addql #4,%sp
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
448f2: 23d0 0005 e71c movel %a0@,5e71c <rtems_current_user_env>
448f8: 60ca bras 448c4 <rtems_libio_share_private_env+0x46>
...
0004b234 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b234: 7006 moveq #6,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4b236: 4e56 0000 linkw %fp,#0
4b23a: 222e 0008 movel %fp@(8),%d1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b23e: c081 andl %d1,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4b240: 2f02 movel %d2,%sp@-
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b242: 7406 moveq #6,%d2
4b244: b480 cmpl %d0,%d2
4b246: 6736 beqs 4b27e <rtems_libio_to_fcntl_flags+0x4a><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4b248: 0801 0001 btst #1,%d1
4b24c: 6726 beqs 4b274 <rtems_libio_to_fcntl_flags+0x40><== NEVER TAKEN
fcntl_flags |= O_RDONLY;
4b24e: 4280 clrl %d0
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
4b250: 0801 0000 btst #0,%d1
4b254: 6704 beqs 4b25a <rtems_libio_to_fcntl_flags+0x26>
fcntl_flags |= O_NONBLOCK;
4b256: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4b25a: 0801 0009 btst #9,%d1
4b25e: 6704 beqs 4b264 <rtems_libio_to_fcntl_flags+0x30>
fcntl_flags |= O_APPEND;
4b260: 7408 moveq #8,%d2
4b262: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4b264: 0801 000a btst #10,%d1
4b268: 6704 beqs 4b26e <rtems_libio_to_fcntl_flags+0x3a>
fcntl_flags |= O_CREAT;
4b26a: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
4b26e: 241f movel %sp@+,%d2
4b270: 4e5e unlk %fp
4b272: 4e75 rts
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
4b274: 44c1 movew %d1,%ccr <== NOT EXECUTED
4b276: 57c0 seq %d0 <== NOT EXECUTED
4b278: 49c0 extbl %d0 <== NOT EXECUTED
4b27a: 4480 negl %d0 <== NOT EXECUTED
4b27c: 60d2 bras 4b250 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
4b27e: 7002 moveq #2,%d0 <== NOT EXECUTED
4b280: 60ce bras 4b250 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
00047250 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
47250: 4e56 fffc linkw %fp,#-4
47254: 2f03 movel %d3,%sp@-
47256: 2f02 movel %d2,%sp@-
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
47258: 486e fffc pea %fp@(-4)
4725c: 2f2e 0008 movel %fp@(8),%sp@-
47260: 2f39 0006 36b0 movel 636b0 <RTEMS_Malloc_Heap>,%sp@-
47266: 4eb9 0004 d228 jsr 4d228 <_Protected_heap_Get_block_size>
4726c: 4fef 000c lea %sp@(12),%sp
47270: 4a00 tstb %d0
47272: 671a beqs 4728e <rtems_malloc_statistics_at_free+0x3e><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
47274: 262e fffc movel %fp@(-4),%d3
47278: 4282 clrl %d2
4727a: d7b9 0006 5794 addl %d3,65794 <rtems_malloc_statistics+0x28>
47280: 2039 0006 5790 movel 65790 <rtems_malloc_statistics+0x24>,%d0
47286: d182 addxl %d2,%d0
47288: 23c0 0006 5790 movel %d0,65790 <rtems_malloc_statistics+0x24>
}
}
4728e: 242e fff4 movel %fp@(-12),%d2
47292: 262e fff8 movel %fp@(-8),%d3
47296: 4e5e unlk %fp <== NOT EXECUTED
0004729a <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
4729a: 4e56 fffc linkw %fp,#-4
4729e: 202e 0008 movel %fp@(8),%d0
472a2: 2f03 movel %d3,%sp@-
uintptr_t actual_size = 0;
472a4: 42ae fffc clrl %fp@(-4)
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
472a8: 2f02 movel %d2,%sp@-
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
472aa: 4a80 tstl %d0
472ac: 674c beqs 472fa <rtems_malloc_statistics_at_malloc+0x60><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
472ae: 486e fffc pea %fp@(-4)
MSBUMP(lifetime_allocated, actual_size);
472b2: 4282 clrl %d2
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
472b4: 2f00 movel %d0,%sp@-
472b6: 2f39 0006 36b0 movel 636b0 <RTEMS_Malloc_Heap>,%sp@-
472bc: 4eb9 0004 d228 jsr 4d228 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
472c2: 262e fffc movel %fp@(-4),%d3
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
472c6: 4fef 000c lea %sp@(12),%sp
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
472ca: 2039 0006 5788 movel 65788 <rtems_malloc_statistics+0x1c>,%d0
472d0: d6b9 0006 578c addl 6578c <rtems_malloc_statistics+0x20>,%d3
472d6: d580 addxl %d0,%d2
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
472d8: 2003 movel %d3,%d0
472da: 90b9 0006 5794 subl 65794 <rtems_malloc_statistics+0x28>,%d0
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
472e0: 23c2 0006 5788 movel %d2,65788 <rtems_malloc_statistics+0x1c>
472e6: 23c3 0006 578c movel %d3,6578c <rtems_malloc_statistics+0x20>
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
472ec: b0b9 0006 5784 cmpl 65784 <rtems_malloc_statistics+0x18>,%d0
472f2: 6306 blss 472fa <rtems_malloc_statistics_at_malloc+0x60>
s->max_depth = current_depth;
472f4: 23c0 0006 5784 movel %d0,65784 <rtems_malloc_statistics+0x18>
}
472fa: 242e fff4 movel %fp@(-12),%d2
472fe: 262e fff8 movel %fp@(-8),%d3
47302: 4e5e unlk %fp <== NOT EXECUTED
0004f8a0 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
4f8a0: 4e56 0000 linkw %fp,#0
4f8a4: 2f0a movel %a2,%sp@-
4f8a6: 246e 0008 moveal %fp@(8),%a2
4f8aa: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
4f8ac: 4a8a tstl %a2
4f8ae: 675e beqs 4f90e <rtems_memalign+0x6e>
return EINVAL;
*pointer = NULL;
4f8b0: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4f8b2: 7003 moveq #3,%d0
4f8b4: b0b9 0006 3768 cmpl 63768 <_System_state_Current>,%d0
4f8ba: 6748 beqs 4f904 <rtems_memalign+0x64> <== ALWAYS TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4f8bc: 4eb9 0004 4380 jsr 44380 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
4f8c2: 42a7 clrl %sp@-
4f8c4: 2f2e 000c movel %fp@(12),%sp@-
4f8c8: 2f2e 0010 movel %fp@(16),%sp@-
4f8cc: 2f39 0006 1c60 movel 61c60 <RTEMS_Malloc_Heap>,%sp@-
4f8d2: 4eb9 0004 9810 jsr 49810 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
4f8d8: 4fef 0010 lea %sp@(16),%sp
4f8dc: 2400 movel %d0,%d2
4f8de: 673c beqs 4f91c <rtems_memalign+0x7c>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
4f8e0: 2079 0006 2406 moveal 62406 <rtems_malloc_statistics_helpers>,%a0
4f8e6: 4a88 tstl %a0
4f8e8: 670a beqs 4f8f4 <rtems_memalign+0x54>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
4f8ea: 2f0a movel %a2,%sp@-
4f8ec: 2068 0004 moveal %a0@(4),%a0
4f8f0: 4e90 jsr %a0@
4f8f2: 588f addql #4,%sp
*pointer = return_this;
4f8f4: 2482 movel %d2,%a2@
return 0;
}
4f8f6: 242e fff8 movel %fp@(-8),%d2
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
4f8fa: 4280 clrl %d0
}
4f8fc: 246e fffc moveal %fp@(-4),%a2
4f900: 4e5e unlk %fp
4f902: 4e75 rts
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
4f904: 4eb9 0004 4340 jsr 44340 <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4f90a: 4a00 tstb %d0
4f90c: 66ae bnes 4f8bc <rtems_memalign+0x1c> <== ALWAYS TAKEN
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4f90e: 242e fff8 movel %fp@(-8),%d2
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
return EINVAL;
4f912: 7016 moveq #22,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4f914: 246e fffc moveal %fp@(-4),%a2
4f918: 4e5e unlk %fp
4f91a: 4e75 rts
4f91c: 242e fff8 movel %fp@(-8),%d2
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
4f920: 700c moveq #12,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4f922: 246e fffc moveal %fp@(-4),%a2
4f926: 4e5e unlk %fp
...
0004db8c <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
4db8c: 4e56 ff90 linkw %fp,#-112
4db90: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int success = 0;
char *dup_path = strdup(path);
4db94: 2f2e 0008 movel %fp@(8),%sp@-
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
4db98: 2a2e 000c movel %fp@(12),%d5
int success = 0;
char *dup_path = strdup(path);
4db9c: 4eb9 0005 038c jsr 5038c <strdup>
if (dup_path != NULL) {
4dba2: 588f addql #4,%sp
int
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
4dba4: 2640 moveal %d0,%a3
if (dup_path != NULL) {
4dba6: 4a80 tstl %d0
4dba8: 6700 0138 beqw 4dce2 <rtems_mkdir+0x156>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
4dbac: 742f moveq #47,%d2
4dbae: 1013 moveb %a3@,%d0
4dbb0: 1200 moveb %d0,%d1
4dbb2: 49c1 extbl %d1
4dbb4: b481 cmpl %d1,%d2
4dbb6: 6700 014a beqw 4dd02 <rtems_mkdir+0x176>
4dbba: 244b moveal %a3,%a2
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
4dbbc: 49ea 0001 lea %a2@(1),%a4
4dbc0: 4283 clrl %d3
4dbc2: 7201 moveq #1,%d1
4dbc4: 4bf9 0004 4a14 lea 44a14 <mkdir>,%a5
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
4dbca: 2e3c 0004 f3dc movel #324572,%d7
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4dbd0: 283c 0004 ddf0 movel #318960,%d4
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
4dbd6: 4a00 tstb %d0
4dbd8: 6710 beqs 4dbea <rtems_mkdir+0x5e> <== NEVER TAKEN
last = 1;
else if (p[0] != '/')
4dbda: 49c0 extbl %d0
4dbdc: 742f moveq #47,%d2
4dbde: b480 cmpl %d0,%d2
4dbe0: 6738 beqs 4dc1a <rtems_mkdir+0x8e>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
4dbe2: 528a addql #1,%a2
4dbe4: 101c moveb %a4@+,%d0
if (p[0] == '\0')
4dbe6: 4a00 tstb %d0
4dbe8: 66f0 bnes 4dbda <rtems_mkdir+0x4e>
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
4dbea: 7401 moveq #1,%d2
4dbec: 4212 clrb %a2@
if (!last && p[1] == '\0')
last = 1;
if (first) {
4dbee: 4a81 tstl %d1
4dbf0: 6650 bnes 4dc42 <rtems_mkdir+0xb6>
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4dbf2: 203c 0000 01ff movel #511,%d0
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
4dbf8: 4a82 tstl %d2
4dbfa: 662e bnes 4dc2a <rtems_mkdir+0x9e>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4dbfc: 2f00 movel %d0,%sp@-
4dbfe: 2f0b movel %a3,%sp@-
4dc00: 4e95 jsr %a5@
4dc02: 508f addql #8,%sp
4dc04: 4a80 tstl %d0
4dc06: 6d5c blts 4dc64 <rtems_mkdir+0xd8>
} else {
retval = 0;
break;
}
}
if (!last)
4dc08: 4a82 tstl %d2
4dc0a: 6600 00c0 bnew 4dccc <rtems_mkdir+0x140>
*p = '/';
4dc0e: 4281 clrl %d1
4dc10: 14bc 002f moveb #47,%a2@
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
4dc14: 528a addql #1,%a2
4dc16: 101c moveb %a4@+,%d0
4dc18: 60cc bras 4dbe6 <rtems_mkdir+0x5a>
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
4dc1a: 4212 clrb %a2@
if (!last && p[1] == '\0')
4dc1c: 4a14 tstb %a4@
4dc1e: 57c2 seq %d2
4dc20: 49c2 extbl %d2
4dc22: 4482 negl %d2
last = 1;
if (first) {
4dc24: 4a81 tstl %d1
4dc26: 67ca beqs 4dbf2 <rtems_mkdir+0x66>
4dc28: 6018 bras 4dc42 <rtems_mkdir+0xb6>
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4dc2a: 2f03 movel %d3,%sp@-
4dc2c: 2044 moveal %d4,%a0
4dc2e: 4e90 jsr %a0@
4dc30: 588f addql #4,%sp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4dc32: 2005 movel %d5,%d0
4dc34: 2f00 movel %d0,%sp@-
4dc36: 2f0b movel %a3,%sp@-
4dc38: 4e95 jsr %a5@
4dc3a: 508f addql #8,%sp
4dc3c: 4a80 tstl %d0
4dc3e: 6cc8 bges 4dc08 <rtems_mkdir+0x7c>
4dc40: 6022 bras 4dc64 <rtems_mkdir+0xd8>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
4dc42: 42a7 clrl %sp@-
4dc44: 2044 moveal %d4,%a0
4dc46: 4e90 jsr %a0@
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
4dc48: 2044 moveal %d4,%a0
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
4dc4a: 2600 movel %d0,%d3
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
4dc4c: 0280 ffff ff3f andil #-193,%d0
4dc52: 2f00 movel %d0,%sp@-
4dc54: 4e90 jsr %a0@
4dc56: 508f addql #8,%sp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4dc58: 203c 0000 01ff movel #511,%d0
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
4dc5e: 4a82 tstl %d2
4dc60: 679a beqs 4dbfc <rtems_mkdir+0x70>
4dc62: 60c6 bras 4dc2a <rtems_mkdir+0x9e>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
4dc64: 2047 moveal %d7,%a0
4dc66: 2c3c 0004 f3dc movel #324572,%d6
4dc6c: 4e90 jsr %a0@
4dc6e: 7211 moveq #17,%d1
4dc70: 2040 moveal %d0,%a0
4dc72: b290 cmpl %a0@,%d1
4dc74: 670c beqs 4dc82 <rtems_mkdir+0xf6>
4dc76: 2046 moveal %d6,%a0
4dc78: 4e90 jsr %a0@
4dc7a: 7215 moveq #21,%d1
4dc7c: 2040 moveal %d0,%a0
4dc7e: b290 cmpl %a0@,%d1
4dc80: 6664 bnes 4dce6 <rtems_mkdir+0x15a> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
4dc82: 486e ffba pea %fp@(-70)
4dc86: 2f0b movel %a3,%sp@-
4dc88: 4eb9 0004 dd3c jsr 4dd3c <stat>
4dc8e: 508f addql #8,%sp
4dc90: 4a80 tstl %d0
4dc92: 6d52 blts 4dce6 <rtems_mkdir+0x15a> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
4dc94: 202e ffc6 movel %fp@(-58),%d0
4dc98: 0280 0000 f000 andil #61440,%d0
4dc9e: 0c80 0000 4000 cmpil #16384,%d0
4dca4: 6700 ff62 beqw 4dc08 <rtems_mkdir+0x7c>
if (last)
4dca8: 4a82 tstl %d2
4dcaa: 677a beqs 4dd26 <rtems_mkdir+0x19a>
errno = EEXIST;
4dcac: 2046 moveal %d6,%a0
4dcae: 4e90 jsr %a0@
4dcb0: 7211 moveq #17,%d1
4dcb2: 2040 moveal %d0,%a0
4dcb4: 2081 movel %d1,%a0@
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4dcb6: 2f0b movel %a3,%sp@-
4dcb8: 4eb9 0004 431c jsr 4431c <free>
4dcbe: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4dcc0: 70ff moveq #-1,%d0
}
4dcc2: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5
4dcc8: 4e5e unlk %fp
4dcca: 4e75 rts
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4dccc: 2f0b movel %a3,%sp@-
4dcce: 4eb9 0004 431c jsr 4431c <free>
4dcd4: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4dcd6: 4280 clrl %d0
}
4dcd8: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5
4dcde: 4e5e unlk %fp
4dce0: 4e75 rts
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
4dce2: 70ff moveq #-1,%d0 <== NOT EXECUTED
4dce4: 60dc bras 4dcc2 <rtems_mkdir+0x136> <== NOT EXECUTED
}
}
if (!last)
*p = '/';
}
if (!first && !last)
4dce6: 4a82 tstl %d2
4dce8: 66cc bnes 4dcb6 <rtems_mkdir+0x12a> <== ALWAYS TAKEN
(void)umask(oumask);
4dcea: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4dcec: 4eb9 0004 ddf0 jsr 4ddf0 <umask> <== NOT EXECUTED
4dcf2: 588f addql #4,%sp <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4dcf4: 2f0b movel %a3,%sp@-
4dcf6: 4eb9 0004 431c jsr 4431c <free>
4dcfc: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4dcfe: 70ff moveq #-1,%d0
4dd00: 60c0 bras 4dcc2 <rtems_mkdir+0x136>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
4dd02: 45eb 0001 lea %a3@(1),%a2
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
4dd06: 49ea 0001 lea %a2@(1),%a4
4dd0a: 4283 clrl %d3
4dd0c: 7201 moveq #1,%d1
4dd0e: 4bf9 0004 4a14 lea 44a14 <mkdir>,%a5
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
4dd14: 2e3c 0004 f3dc movel #324572,%d7
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4dd1a: 283c 0004 ddf0 movel #318960,%d4
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
4dd20: 1012 moveb %a2@,%d0
4dd22: 6000 feb2 braw 4dbd6 <rtems_mkdir+0x4a>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
4dd26: 2046 moveal %d6,%a0
4dd28: 4e90 jsr %a0@
4dd2a: 2040 moveal %d0,%a0
4dd2c: 7014 moveq #20,%d0
4dd2e: 2080 movel %d0,%a0@
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
4dd30: 2f03 movel %d3,%sp@-
4dd32: 4eb9 0004 ddf0 jsr 4ddf0 <umask>
4dd38: 588f addql #4,%sp
4dd3a: 60b8 bras 4dcf4 <rtems_mkdir+0x168>
000482b0 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
482b0: 7001 moveq #1,%d0
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
482b2: 4e56 0000 linkw %fp,#0
482b6: 222e 0008 movel %fp@(8),%d1
482ba: 2f02 movel %d2,%sp@-
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
482bc: b081 cmpl %d1,%d0
482be: 673e beqs 482fe <rtems_object_get_api_class_name+0x4e>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
482c0: 7402 moveq #2,%d2
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
482c2: 203c 0005 febc movel #392892,%d0
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
482c8: b481 cmpl %d1,%d2
482ca: 6708 beqs 482d4 <rtems_object_get_api_class_name+0x24>
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
}
482cc: 242e fffc movel %fp@(-4),%d2
482d0: 4e5e unlk %fp
482d2: 4e75 rts
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
482d4: 203c 0006 0ea0 movel #396960,%d0
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
482da: 2f2e 000c movel %fp@(12),%sp@-
482de: 2f00 movel %d0,%sp@-
482e0: 4eb9 0004 d23c jsr 4d23c <rtems_assoc_ptr_by_local>
if ( class_assoc )
482e6: 508f addql #8,%sp
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
482e8: 2040 moveal %d0,%a0
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
482ea: 203c 0005 fec4 movel #392900,%d0
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
482f0: 4a88 tstl %a0
482f2: 67d8 beqs 482cc <rtems_object_get_api_class_name+0x1c>
return class_assoc->name;
return "BAD CLASS";
}
482f4: 242e fffc movel %fp@(-4),%d2
482f8: 4e5e unlk %fp
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
482fa: 2010 movel %a0@,%d0
return "BAD CLASS";
}
482fc: 4e75 rts
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
482fe: 203c 0006 0e88 movel #396936,%d0
48304: 60d4 bras 482da <rtems_object_get_api_class_name+0x2a>
...
00048370 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
48370: 4e56 0000 linkw %fp,#0
48374: 2f0a movel %a2,%sp@-
48376: 246e 0010 moveal %fp@(16),%a2
4837a: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
4837c: 4a8a tstl %a2
4837e: 6768 beqs 483e8 <rtems_object_get_class_information+0x78>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48380: 3f2e 000e movew %fp@(14),%sp@-
48384: 4267 clrw %sp@-
48386: 2f2e 0008 movel %fp@(8),%sp@-
4838a: 4eb9 0004 a04c jsr 4a04c <_Objects_Get_information>
if ( !obj_info )
48390: 508f addql #8,%sp
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48392: 2040 moveal %d0,%a0
if ( !obj_info )
48394: 4a80 tstl %d0
48396: 675e beqs 483f6 <rtems_object_get_class_information+0x86>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
48398: 24a8 0006 movel %a0@(6),%a2@
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
4839c: 4282 clrl %d2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
4839e: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
483a4: 3428 000e movew %a0@(14),%d2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
483a8: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
483ae: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
483b2: 6750 beqs 48404 <rtems_object_get_class_information+0x94><== NEVER TAKEN
483b4: 2068 0018 moveal %a0@(24),%a0
483b8: 7201 moveq #1,%d1
483ba: 7001 moveq #1,%d0
483bc: 93c9 subal %a1,%a1
483be: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
483c0: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
483c4: 6718 beqs 483de <rtems_object_get_class_information+0x6e>
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
483c6: 2200 movel %d0,%d1
483c8: b082 cmpl %d2,%d0
483ca: 63f2 blss 483be <rtems_object_get_class_information+0x4e><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
483cc: 2549 000e movel %a1,%a2@(14)
return RTEMS_SUCCESSFUL;
483d0: 4280 clrl %d0
}
483d2: 242e fff8 movel %fp@(-8),%d2
483d6: 246e fffc moveal %fp@(-4),%a2
483da: 4e5e unlk %fp
483dc: 4e75 rts
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
483de: 5289 addql #1,%a1
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
483e0: 2200 movel %d0,%d1
483e2: b082 cmpl %d2,%d0
483e4: 63d8 blss 483be <rtems_object_get_class_information+0x4e><== NEVER TAKEN
483e6: 60e4 bras 483cc <rtems_object_get_class_information+0x5c>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
483e8: 242e fff8 movel %fp@(-8),%d2
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
483ec: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
483ee: 246e fffc moveal %fp@(-4),%a2
483f2: 4e5e unlk %fp
483f4: 4e75 rts
483f6: 242e fff8 movel %fp@(-8),%d2
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
483fa: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
483fc: 246e fffc moveal %fp@(-4),%a2
48400: 4e5e unlk %fp
48402: 4e75 rts
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
48404: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
48406: 4280 clrl %d0 <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
48408: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED
4840c: 60c4 bras 483d2 <rtems_object_get_class_information+0x62><== NOT EXECUTED
...
00056b40 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
56b40: 4e56 ffe8 linkw %fp,#-24
56b44: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
56b48: 242e 0008 movel %fp@(8),%d2
56b4c: 2a2e 000c movel %fp@(12),%d5
56b50: 282e 0010 movel %fp@(16),%d4
56b54: 262e 0014 movel %fp@(20),%d3
56b58: 246e 001c moveal %fp@(28),%a2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
56b5c: 4a82 tstl %d2
56b5e: 673a beqs 56b9a <rtems_partition_create+0x5a>
return RTEMS_INVALID_NAME;
if ( !starting_address )
56b60: 4a85 tstl %d5
56b62: 671e beqs 56b82 <rtems_partition_create+0x42>
return RTEMS_INVALID_ADDRESS;
if ( !id )
56b64: 4a8a tstl %a2
56b66: 671a beqs 56b82 <rtems_partition_create+0x42> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
56b68: 4a84 tstl %d4
56b6a: 6722 beqs 56b8e <rtems_partition_create+0x4e>
56b6c: 4a83 tstl %d3
56b6e: 671e beqs 56b8e <rtems_partition_create+0x4e>
56b70: b684 cmpl %d4,%d3
56b72: 621a bhis 56b8e <rtems_partition_create+0x4e>
*/
RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned (
uint32_t buffer_size
)
{
return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0);
56b74: 7003 moveq #3,%d0
56b76: c083 andl %d3,%d0
56b78: 6614 bnes 56b8e <rtems_partition_create+0x4e>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
56b7a: 103c 0003 moveb #3,%d0
56b7e: c085 andl %d5,%d0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
56b80: 6724 beqs 56ba6 <rtems_partition_create+0x66>
return RTEMS_INVALID_ADDRESS;
56b82: 7009 moveq #9,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56b84: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56b8a: 4e5e unlk %fp
56b8c: 4e75 rts
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
56b8e: 7008 moveq #8,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56b90: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56b96: 4e5e unlk %fp
56b98: 4e75 rts
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
56b9a: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56b9c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56ba2: 4e5e unlk %fp
56ba4: 4e75 rts
56ba6: 2039 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d0
56bac: 5280 addql #1,%d0
56bae: 23c0 0007 e244 movel %d0,7e244 <_Thread_Dispatch_disable_level>
* 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 );
56bb4: 4879 0007 e0e4 pea 7e0e4 <_Partition_Information>
56bba: 4eb9 0005 b6bc jsr 5b6bc <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
56bc0: 588f addql #4,%sp
56bc2: 2640 moveal %d0,%a3
56bc4: 4a80 tstl %d0
56bc6: 6758 beqs 56c20 <rtems_partition_create+0xe0> <== NEVER TAKEN
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
56bc8: 2744 0014 movel %d4,%a3@(20)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
56bcc: 276e 0018 001c movel %fp@(24),%a3@(28)
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
56bd2: 4c43 4004 remul %d3,%d4,%d4
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
56bd6: 2745 0010 movel %d5,%a3@(16)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
56bda: 2743 0018 movel %d3,%a3@(24)
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
56bde: 42ab 0020 clrl %a3@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
56be2: 2f03 movel %d3,%sp@-
56be4: 2f04 movel %d4,%sp@-
56be6: 2f05 movel %d5,%sp@-
56be8: 486b 0024 pea %a3@(36)
56bec: 4eb9 0005 a05c jsr 5a05c <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
56bf2: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
56bf6: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
56bf8: 2079 0007 e0fc moveal 7e0fc <_Partition_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
56bfe: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
56c00: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
56c04: 2742 000c movel %d2,%a3@(12)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
56c08: 2480 movel %d0,%a2@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
56c0a: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
56c10: 4fef 0010 lea %sp@(16),%sp
56c14: 4280 clrl %d0
}
56c16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56c1c: 4e5e unlk %fp
56c1e: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
56c20: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
56c26: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56c28: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56c2e: 4e5e unlk %fp
...
00056d54 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
56d54: 4e56 fffc linkw %fp,#-4
56d58: 2f0a movel %a2,%sp@-
56d5a: 2f02 movel %d2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
56d5c: 486e fffc pea %fp@(-4)
56d60: 2f2e 0008 movel %fp@(8),%sp@-
56d64: 4879 0007 e0e4 pea 7e0e4 <_Partition_Information>
56d6a: 242e 000c movel %fp@(12),%d2
56d6e: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
56d74: 4fef 000c lea %sp@(12),%sp
56d78: 2440 moveal %d0,%a2
56d7a: 4aae fffc tstl %fp@(-4)
56d7e: 670e beqs 56d8e <rtems_partition_return_buffer+0x3a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56d80: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
56d84: 7004 moveq #4,%d0
}
56d86: 246e fff8 moveal %fp@(-8),%a2
56d8a: 4e5e unlk %fp
56d8c: 4e75 rts
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
56d8e: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
56d92: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
56d96: b082 cmpl %d2,%d0
56d98: 623c bhis 56dd6 <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
56d9a: d280 addl %d0,%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
56d9c: b282 cmpl %d2,%d1
56d9e: 6536 bcss 56dd6 <rtems_partition_return_buffer+0x82><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
56da0: 2202 movel %d2,%d1
56da2: 9280 subl %d0,%d1
56da4: 2001 movel %d1,%d0
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
56da6: 4c6a 0001 0018 remul %a2@(24),%d1,%d0
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
56dac: 4a81 tstl %d1
56dae: 6626 bnes 56dd6 <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
56db0: 2f02 movel %d2,%sp@-
56db2: 486a 0024 pea %a2@(36)
56db6: 4eb9 0005 9fc0 jsr 59fc0 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
56dbc: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
56dc0: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56dc6: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
56dca: 508f addql #8,%sp
56dcc: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56dce: 246e fff8 moveal %fp@(-8),%a2
56dd2: 4e5e unlk %fp
56dd4: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
56dd6: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56ddc: 242e fff4 movel %fp@(-12),%d2
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
56de0: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56de2: 246e fff8 moveal %fp@(-8),%a2
56de6: 4e5e unlk %fp
...
000423fc <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
423fc: 4e56 ff60 linkw %fp,#-160
42400: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42404: 2e2e 000c movel %fp@(12),%d7
int i, mod, max;
if ( !length ) return;
42408: 6700 00d2 beqw 424dc <rtems_print_buffer+0xe0>
mod = length % 16;
4240c: 2a07 movel %d7,%d5
4240e: 0285 8000 000f andil #-2147483633,%d5
42414: 6d00 01ca bltw 425e0 <rtems_print_buffer+0x1e4>
42418: 2c05 movel %d5,%d6
max = length - mod;
4241a: 9e85 subl %d5,%d7
for ( i=0 ; i<max ; i+=16 )
4241c: 4a87 tstl %d7
4241e: 6f00 00b8 blew 424d8 <rtems_print_buffer+0xdc>
42422: 262e 0008 movel %fp@(8),%d3
42426: 4284 clrl %d4
42428: 45ee ff88 lea %fp@(-120),%a2
4242c: 49f9 0004 e984 lea 4e984 <sprintf>,%a4
42432: 4bf9 0004 f0a0 lea 4f0a0 <strlen>,%a5
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
42438: 2643 moveal %d3,%a3
for( i=0 ; i<length ; i++ )
4243a: 4282 clrl %d2
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
4243c: 4201 clrb %d1
4243e: 1d41 ff88 moveb %d1,%fp@(-120)
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
42442: 4280 clrl %d0
42444: 101b moveb %a3@+,%d0
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
42446: 5282 addql #1,%d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
42448: 2f00 movel %d0,%sp@-
4244a: 2f0a movel %a2,%sp@-
4244c: 4879 0005 c99e pea 5c99e <IntUartPollCallbacks.6330+0x20>
42452: 2f0a movel %a2,%sp@-
42454: 4e94 jsr %a4@
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
42456: 4fef 0010 lea %sp@(16),%sp
4245a: 7010 moveq #16,%d0
4245c: b082 cmpl %d2,%d0
4245e: 66e2 bnes 42442 <rtems_print_buffer+0x46>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
42460: 2f0a movel %a2,%sp@-
42462: 2643 moveal %d3,%a3
for( i=0 ; i<length ; i++ )
42464: 4282 clrl %d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
42466: 4e95 jsr %a5@
42468: 588f addql #4,%sp
4246a: 323c 7c00 movew #31744,%d1
4246e: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
42472: 4280 clrl %d0
42474: 101b moveb %a3@+,%d0
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
42476: 722e moveq #46,%d1
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
42478: 2040 moveal %d0,%a0
4247a: 2279 0005 df2c moveal 5df2c <__ctype_ptr__>,%a1
42480: 1031 8801 moveb %a1@(00000001,%a0:l),%d0
42484: 49c0 extbl %d0
42486: 0280 0000 0097 andil #151,%d0
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
4248c: 6702 beqs 42490 <rtems_print_buffer+0x94>
4248e: 2208 movel %a0,%d1
42490: 2f01 movel %d1,%sp@-
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42492: 5282 addql #1,%d2
sprintf( line_buffer, "%s%c", line_buffer,
42494: 2f0a movel %a2,%sp@-
42496: 4879 0005 c9a6 pea 5c9a6 <IntUartPollCallbacks.6330+0x28>
4249c: 2f0a movel %a2,%sp@-
4249e: 4e94 jsr %a4@
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
424a0: 4fef 0010 lea %sp@(16),%sp
424a4: 7210 moveq #16,%d1
424a6: b282 cmpl %d2,%d1
424a8: 66c8 bnes 42472 <rtems_print_buffer+0x76>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
424aa: 2f0a movel %a2,%sp@-
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
424ac: 0684 0000 0010 addil #16,%d4
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
424b2: 4e95 jsr %a5@
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
424b4: 0683 0000 0010 addil #16,%d3
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
424ba: 41f2 0800 lea %a2@(00000000,%d0:l),%a0
424be: 4200 clrb %d0
424c0: 30bc 7c0a movew #31754,%a0@
424c4: 1140 0002 moveb %d0,%a0@(2)
printk( line_buffer );
424c8: 2e8a movel %a2,%sp@
424ca: 4eb9 0004 4108 jsr 44108 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
424d0: 588f addql #4,%sp
424d2: b887 cmpl %d7,%d4
424d4: 6d00 ff62 bltw 42438 <rtems_print_buffer+0x3c>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
424d8: 4a85 tstl %d5
424da: 660a bnes 424e6 <rtems_print_buffer+0xea>
Dump_Line( &buffer[ max ], mod );
}
424dc: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5
424e2: 4e5e unlk %fp
424e4: 4e75 rts
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
424e6: 266e 0008 moveal %fp@(8),%a3
424ea: d7c7 addal %d7,%a3
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
424ec: 4200 clrb %d0
424ee: 1d40 ff88 moveb %d0,%fp@(-120)
for( i=0 ; i<length ; i++ )
424f2: 4a85 tstl %d5
424f4: 6f00 0110 blew 42606 <rtems_print_buffer+0x20a>
424f8: 2a4b moveal %a3,%a5
424fa: 4282 clrl %d2
424fc: 45ee ff88 lea %fp@(-120),%a2
42500: 49f9 0004 e984 lea 4e984 <sprintf>,%a4
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
42506: 4280 clrl %d0
42508: 101d moveb %a5@+,%d0
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
4250a: 5282 addql #1,%d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
4250c: 2f00 movel %d0,%sp@-
4250e: 2f0a movel %a2,%sp@-
42510: 4879 0005 c99e pea 5c99e <IntUartPollCallbacks.6330+0x20>
42516: 2f0a movel %a2,%sp@-
42518: 4e94 jsr %a4@
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
4251a: 4fef 0010 lea %sp@(16),%sp
4251e: b485 cmpl %d5,%d2
42520: 6de4 blts 42506 <rtems_print_buffer+0x10a>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42522: 720f moveq #15,%d1
42524: b285 cmpl %d5,%d1
42526: 6d00 0108 bltw 42630 <rtems_print_buffer+0x234>
4252a: 2405 movel %d5,%d2
4252c: 4bf9 0004 f0a0 lea 4f0a0 <strlen>,%a5
strcat( line_buffer, " " );
42532: 2f0a movel %a2,%sp@-
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42534: 5282 addql #1,%d2
strcat( line_buffer, " " );
42536: 4e95 jsr %a5@
42538: 588f addql #4,%sp
4253a: 223c 2020 2000 movel #538976256,%d1
42540: 2581 0800 movel %d1,%a2@(00000000,%d0:l)
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42544: 700f moveq #15,%d0
42546: b082 cmpl %d2,%d0
42548: 6ce8 bges 42532 <rtems_print_buffer+0x136>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
4254a: 2f0a movel %a2,%sp@-
4254c: 49f9 0004 e984 lea 4e984 <sprintf>,%a4
42552: 4eb9 0004 f0a0 jsr 4f0a0 <strlen>
42558: 588f addql #4,%sp
4255a: 323c 7c00 movew #31744,%d1
4255e: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
for( i=0 ; i<length ; i++ )
42562: 4a85 tstl %d5
42564: 6f00 0086 blew 425ec <rtems_print_buffer+0x1f0>
42568: 4282 clrl %d2
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
4256a: 4283 clrl %d3
4256c: 161b moveb %a3@+,%d3
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
4256e: 722e moveq #46,%d1
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
42570: 2079 0005 df2c moveal 5df2c <__ctype_ptr__>,%a0
42576: 1030 3801 moveb %a0@(00000001,%d3:l),%d0
4257a: 49c0 extbl %d0
4257c: 0280 0000 0097 andil #151,%d0
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
42582: 6702 beqs 42586 <rtems_print_buffer+0x18a>
42584: 2203 movel %d3,%d1
42586: 2f01 movel %d1,%sp@-
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42588: 5282 addql #1,%d2
sprintf( line_buffer, "%s%c", line_buffer,
4258a: 2f0a movel %a2,%sp@-
4258c: 4879 0005 c9a6 pea 5c9a6 <IntUartPollCallbacks.6330+0x28>
42592: 2f0a movel %a2,%sp@-
42594: 4e94 jsr %a4@
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42596: 4fef 0010 lea %sp@(16),%sp
4259a: b485 cmpl %d5,%d2
4259c: 6dcc blts 4256a <rtems_print_buffer+0x16e>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
4259e: 700f moveq #15,%d0
425a0: b085 cmpl %d5,%d0
425a2: 6d16 blts 425ba <rtems_print_buffer+0x1be> <== NEVER TAKEN
strcat( line_buffer, " " );
425a4: 2f0a movel %a2,%sp@-
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
425a6: 5286 addql #1,%d6
strcat( line_buffer, " " );
425a8: 4e95 jsr %a5@
425aa: 588f addql #4,%sp
425ac: 323c 2000 movew #8192,%d1
425b0: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
425b4: 700f moveq #15,%d0
425b6: b086 cmpl %d6,%d0
425b8: 6cea bges 425a4 <rtems_print_buffer+0x1a8>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
425ba: 2f0a movel %a2,%sp@-
425bc: 4e95 jsr %a5@
425be: 4201 clrb %d1
425c0: 41f2 0800 lea %a2@(00000000,%d0:l),%a0
425c4: 30bc 7c0a movew #31754,%a0@
425c8: 1141 0002 moveb %d1,%a0@(2)
printk( line_buffer );
425cc: 2e8a movel %a2,%sp@
425ce: 4eb9 0004 4108 jsr 44108 <printk>
425d4: 588f addql #4,%sp
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
}
425d6: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5
425dc: 4e5e unlk %fp
425de: 4e75 rts
int i, mod, max;
if ( !length ) return;
mod = length % 16;
425e0: 5385 subql #1,%d5
425e2: 70f0 moveq #-16,%d0
425e4: 8a80 orl %d0,%d5
425e6: 5285 addql #1,%d5
425e8: 6000 fe2e braw 42418 <rtems_print_buffer+0x1c>
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
425ec: 2f0a movel %a2,%sp@-
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
425ee: 4286 clrl %d6
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
425f0: 5286 addql #1,%d6
strcat( line_buffer, " " );
425f2: 4e95 jsr %a5@
425f4: 588f addql #4,%sp
425f6: 323c 2000 movew #8192,%d1
425fa: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
425fe: 700f moveq #15,%d0
42600: b086 cmpl %d6,%d0
42602: 6ca0 bges 425a4 <rtems_print_buffer+0x1a8> <== ALWAYS TAKEN
42604: 60b4 bras 425ba <rtems_print_buffer+0x1be> <== NOT EXECUTED
42606: 45ee ff88 lea %fp@(-120),%a2
4260a: 4bf9 0004 f0a0 lea 4f0a0 <strlen>,%a5
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
42610: 4282 clrl %d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42612: 5282 addql #1,%d2
strcat( line_buffer, " " );
42614: 2f0a movel %a2,%sp@-
42616: 4e95 jsr %a5@
42618: 588f addql #4,%sp
4261a: 223c 2020 2000 movel #538976256,%d1
42620: 2581 0800 movel %d1,%a2@(00000000,%d0:l)
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42624: 700f moveq #15,%d0
42626: b082 cmpl %d2,%d0
42628: 6c00 ff08 bgew 42532 <rtems_print_buffer+0x136>
4262c: 6000 ff1c braw 4254a <rtems_print_buffer+0x14e> <== NOT EXECUTED
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
42630: 2f0a movel %a2,%sp@- <== NOT EXECUTED
42632: 4bf9 0004 f0a0 lea 4f0a0 <strlen>,%a5 <== NOT EXECUTED
for( i=0 ; i<length ; i++ )
42638: 4282 clrl %d2 <== NOT EXECUTED
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
4263a: 4e95 jsr %a5@ <== NOT EXECUTED
4263c: 588f addql #4,%sp <== NOT EXECUTED
4263e: 323c 7c00 movew #31744,%d1 <== NOT EXECUTED
42642: 3581 0800 movew %d1,%a2@(00000000,%d0:l) <== NOT EXECUTED
42646: 6000 ff22 braw 4256a <rtems_print_buffer+0x16e> <== NOT EXECUTED
...
00047800 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
47800: 4e56 fff8 linkw %fp,#-8
47804: 2f03 movel %d3,%sp@-
47806: 2f02 movel %d2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
47808: 486e fffc pea %fp@(-4)
4780c: 242e 0008 movel %fp@(8),%d2
47810: 2f02 movel %d2,%sp@-
47812: 4879 0006 1440 pea 61440 <_Rate_monotonic_Information>
47818: 4eb9 0004 9b68 jsr 49b68 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
4781e: 4fef 000c lea %sp@(12),%sp
47822: 4aae fffc tstl %fp@(-4)
47826: 6624 bnes 4784c <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
47828: 2279 0006 16cc moveal 616cc <_Per_CPU_Information+0xc>,%a1
4782e: 2040 moveal %d0,%a0
47830: b3e8 0040 cmpal %a0@(64),%a1
47834: 6726 beqs 4785c <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
47836: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
4783c: 7617 moveq #23,%d3
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4783e: 2003 movel %d3,%d0
47840: 242e fff0 movel %fp@(-16),%d2
47844: 262e fff4 movel %fp@(-12),%d3
47848: 4e5e unlk %fp
4784a: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4784c: 7604 moveq #4,%d3
}
4784e: 2003 movel %d3,%d0
47850: 242e fff0 movel %fp@(-16),%d2
47854: 262e fff4 movel %fp@(-12),%d3
47858: 4e5e unlk %fp
4785a: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
4785c: 4aae 000c tstl %fp@(12)
47860: 6624 bnes 47886 <rtems_rate_monotonic_period+0x86>
switch ( the_period->state ) {
47862: 2040 moveal %d0,%a0
47864: 7204 moveq #4,%d1
47866: 2028 0038 movel %a0@(56),%d0
4786a: b280 cmpl %d0,%d1
4786c: 6400 008a bccw 478f8 <rtems_rate_monotonic_period+0xf8>
47870: 4283 clrl %d3 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47872: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47878: 2003 movel %d3,%d0
4787a: 242e fff0 movel %fp@(-16),%d2
4787e: 262e fff4 movel %fp@(-12),%d3
47882: 4e5e unlk %fp
47884: 4e75 rts
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
47886: 223c 0000 0700 movel #1792,%d1
4788c: 40c3 movew %sr,%d3
4788e: 8283 orl %d3,%d1
47890: 46c1 movew %d1,%sr
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
47892: 2040 moveal %d0,%a0
47894: 2228 0038 movel %a0@(56),%d1
47898: 6772 beqs 4790c <rtems_rate_monotonic_period+0x10c>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
4789a: 7402 moveq #2,%d2
4789c: b481 cmpl %d1,%d2
4789e: 6700 00d2 beqw 47972 <rtems_rate_monotonic_period+0x172>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
478a2: 7404 moveq #4,%d2
478a4: b481 cmpl %d1,%d2
478a6: 66a4 bnes 4784c <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
478a8: 2f00 movel %d0,%sp@-
478aa: 2d40 fff8 movel %d0,%fp@(-8)
478ae: 4eb9 0004 76e6 jsr 476e6 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
478b4: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
478b6: 7202 moveq #2,%d1
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
478b8: 7606 moveq #6,%d3
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
478ba: 202e fff8 movel %fp@(-8),%d0
478be: 2040 moveal %d0,%a0
the_period->next_length = length;
478c0: 226e 000c moveal %fp@(12),%a1
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
478c4: 2141 0038 movel %d1,%a0@(56)
the_period->next_length = length;
478c8: 2149 003c movel %a1,%a0@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
478cc: 2149 001c movel %a1,%a0@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
478d0: 4868 0010 pea %a0@(16)
478d4: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
478da: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
478e0: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478e6: 242e fff0 movel %fp@(-16),%d2
478ea: 2003 movel %d3,%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
478ec: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478f0: 262e fff4 movel %fp@(-12),%d3
478f4: 4e5e unlk %fp
478f6: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
478f8: 41f9 0005 ece6 lea 5ece6 <CSWTCH.2>,%a0
478fe: 2630 0c00 movel %a0@(00000000,%d0:l:4),%d3
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47902: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
47908: 6000 ff6e braw 47878 <rtems_rate_monotonic_period+0x78>
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
4790c: 46c3 movew %d3,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
4790e: 2f00 movel %d0,%sp@-
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47910: 4283 clrl %d3
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
47912: 2d40 fff8 movel %d0,%fp@(-8)
47916: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4791c: 202e fff8 movel %fp@(-8),%d0
47920: 2240 moveal %d0,%a1
47922: 223c 0004 7c84 movel #294020,%d1
the_watchdog->id = id;
47928: 2342 0030 movel %d2,%a1@(48)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
4792c: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47930: 2341 002c movel %d1,%a1@(44)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
the_period->state = RATE_MONOTONIC_ACTIVE;
47934: 7202 moveq #2,%d1
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
47936: 2342 003c movel %d2,%a1@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4793a: 2342 001c movel %d2,%a1@(28)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
the_period->state = RATE_MONOTONIC_ACTIVE;
4793e: 2341 0038 movel %d1,%a1@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47942: 42a9 0018 clrl %a1@(24)
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
47946: 42a9 0034 clrl %a1@(52)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4794a: 4869 0010 pea %a1@(16)
4794e: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
47954: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
4795a: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47960: 242e fff0 movel %fp@(-16),%d2
47964: 2003 movel %d3,%d0
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47966: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4796a: 262e fff4 movel %fp@(-12),%d3
4796e: 4e5e unlk %fp
47970: 4e75 rts
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
47972: 2f00 movel %d0,%sp@-
47974: 2d40 fff8 movel %d0,%fp@(-8)
47978: 4eb9 0004 76e6 jsr 476e6 <_Rate_monotonic_Update_statistics>
/*
* 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;
4797e: 202e fff8 movel %fp@(-8),%d0
47982: 7201 moveq #1,%d1
47984: 2040 moveal %d0,%a0
the_period->next_length = length;
47986: 226e 000c moveal %fp@(12),%a1
/*
* 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;
4798a: 2141 0038 movel %d1,%a0@(56)
the_period->next_length = length;
4798e: 2149 003c movel %a1,%a0@(60)
_ISR_Enable( level );
47992: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
47994: 2079 0006 16cc moveal 616cc <_Per_CPU_Information+0xc>,%a0
4799a: 2240 moveal %d0,%a1
4799c: 5089 addql #8,%a1
4799e: 2151 0020 movel %a1@,%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
479a2: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
479a6: 2d40 fff8 movel %d0,%fp@(-8)
479aa: 2f08 movel %a0,%sp@-
479ac: 4eb9 0004 b0e4 jsr 4b0e4 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
479b2: 223c 0000 0700 movel #1792,%d1
479b8: 40c2 movew %sr,%d2
479ba: 8282 orl %d2,%d1
479bc: 46c1 movew %d1,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
479be: 7602 moveq #2,%d3
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
479c0: 202e fff8 movel %fp@(-8),%d0
479c4: 2040 moveal %d0,%a0
479c6: 2228 0038 movel %a0@(56),%d1
the_period->state = RATE_MONOTONIC_ACTIVE;
479ca: 2143 0038 movel %d3,%a0@(56)
_ISR_Enable( level );
479ce: 46c2 movew %d2,%sr
/*
* 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 )
479d0: 7003 moveq #3,%d0
479d2: 4fef 000c lea %sp@(12),%sp
479d6: b081 cmpl %d1,%d0
479d8: 6716 beqs 479f0 <rtems_rate_monotonic_period+0x1f0>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
479da: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
479e0: 4283 clrl %d3
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
479e2: 2003 movel %d3,%d0
479e4: 242e fff0 movel %fp@(-16),%d2
479e8: 262e fff4 movel %fp@(-12),%d3
479ec: 4e5e unlk %fp
479ee: 4e75 rts
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
479f0: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
479f4: 4283 clrl %d3
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
479f6: 2f39 0006 16cc movel 616cc <_Per_CPU_Information+0xc>,%sp@-
479fc: 4eb9 0004 a430 jsr 4a430 <_Thread_Clear_state>
47a02: 508f addql #8,%sp
_Thread_Enable_dispatch();
47a04: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
47a0a: 60d6 bras 479e2 <rtems_rate_monotonic_period+0x1e2>
00047a0c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
47a0c: 4e56 ff78 linkw %fp,#-136
47a10: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
47a14: 262e 0008 movel %fp@(8),%d3
47a18: 246e 000c moveal %fp@(12),%a2
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
47a1c: 4a8a tstl %a2
47a1e: 6700 0082 beqw 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return;
(*print)( context, "Period information by period\n" );
47a22: 4879 0005 ecfa pea 5ecfa <CSWTCH.2+0x14>
47a28: 2f03 movel %d3,%sp@-
47a2a: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
47a2c: 4879 0005 ed18 pea 5ed18 <CSWTCH.2+0x32>
47a32: 2f03 movel %d3,%sp@-
47a34: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
47a36: 4879 0005 ed3a pea 5ed3a <CSWTCH.2+0x54>
47a3c: 2f03 movel %d3,%sp@-
47a3e: 4e92 jsr %a2@
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
47a40: 4879 0005 ed5d pea 5ed5d <CSWTCH.2+0x77>
47a46: 2f03 movel %d3,%sp@-
47a48: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
47a4a: 4fef 001c lea %sp@(28),%sp
47a4e: 2ebc 0005 eda8 movel #388520,%sp@
47a54: 2f03 movel %d3,%sp@-
47a56: 4e92 jsr %a2@
/*
* 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 ;
47a58: 2439 0006 1446 movel 61446 <_Rate_monotonic_Information+0x6>,%d2
47a5e: 508f addql #8,%sp
47a60: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47a66: 623a bhis 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NEVER TAKEN
47a68: 280e movel %fp,%d4
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47a6a: 2a0e movel %fp,%d5
47a6c: 0684 ffff ffa2 addil #-94,%d4
47a72: 47f9 0004 d4e0 lea 4d4e0 <rtems_rate_monotonic_get_statistics>,%a3
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47a78: 4bf9 0004 d5a0 lea 4d5a0 <rtems_rate_monotonic_get_status>,%a5
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47a7e: 5b85 subql #5,%d5
47a80: 49f9 0004 7d64 lea 47d64 <rtems_object_get_name>,%a4
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47a86: 2e3c 0004 b34c movel #308044,%d7
* 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 );
47a8c: 2f04 movel %d4,%sp@-
47a8e: 2f02 movel %d2,%sp@-
47a90: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47a92: 508f addql #8,%sp
47a94: 4a80 tstl %d0
47a96: 6714 beqs 47aac <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
* 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++ ) {
47a98: 5282 addql #1,%d2
/*
* 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 ;
47a9a: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47aa0: 63ea blss 47a8c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47aa2: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5
47aa8: 4e5e unlk %fp
47aaa: 4e75 rts
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47aac: 486e ffda pea %fp@(-38)
47ab0: 2f02 movel %d2,%sp@-
47ab2: 4e95 jsr %a5@
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47ab4: 2f05 movel %d5,%sp@-
47ab6: 4878 0005 pea 5 <COMPARE>
47aba: 2f2e ffda movel %fp@(-38),%sp@-
47abe: 4e94 jsr %a4@
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47ac0: 2f2e ffa6 movel %fp@(-90),%sp@-
47ac4: 2f2e ffa2 movel %fp@(-94),%sp@-
47ac8: 2f05 movel %d5,%sp@-
47aca: 2f02 movel %d2,%sp@-
47acc: 4879 0005 edf4 pea 5edf4 <CSWTCH.2+0x10e>
47ad2: 2f03 movel %d3,%sp@-
47ad4: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47ad6: 202e ffa2 movel %fp@(-94),%d0
47ada: 4fef 002c lea %sp@(44),%sp
47ade: 6618 bnes 47af8 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
47ae0: 4879 0005 e3b6 pea 5e3b6 <rtems_filesystem_mount_table_size+0x542>
* 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++ ) {
47ae6: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
47ae8: 2f03 movel %d3,%sp@-
47aea: 4e92 jsr %a2@
continue;
47aec: 508f addql #8,%sp
/*
* 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 ;
47aee: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47af4: 6396 blss 47a8c <rtems_rate_monotonic_report_statistics_with_plugin+0x80><== ALWAYS TAKEN
47af6: 60aa bras 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47af8: 486e fff2 pea %fp@(-14)
47afc: 2047 moveal %d7,%a0
* 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++ ) {
47afe: 5282 addql #1,%d2
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47b00: 2f00 movel %d0,%sp@-
47b02: 486e ffba pea %fp@(-70)
47b06: 4e90 jsr %a0@
(*print)( context,
47b08: 202e fff6 movel %fp@(-10),%d0
47b0c: 223c 0000 03e8 movel #1000,%d1
47b12: 4c41 0800 remsl %d1,%d0,%d0
47b16: 2c2e ffb6 movel %fp@(-74),%d6
47b1a: 2f00 movel %d0,%sp@-
47b1c: 2001 movel %d1,%d0
47b1e: 2f2e fff2 movel %fp@(-14),%sp@-
47b22: 4c40 6806 remsl %d0,%d6,%d6
47b26: 202e ffae movel %fp@(-82),%d0
47b2a: 2246 moveal %d6,%a1
47b2c: 223c 0000 03e8 movel #1000,%d1
47b32: 2f09 movel %a1,%sp@-
47b34: 2f2e ffb2 movel %fp@(-78),%sp@-
47b38: 4c41 0800 remsl %d1,%d0,%d0
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
47b3c: 2c3c 0000 03e8 movel #1000,%d6
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
47b42: 2f00 movel %d0,%sp@-
47b44: 2f2e ffaa movel %fp@(-86),%sp@-
47b48: 4879 0005 ee0b pea 5ee0b <CSWTCH.2+0x125>
47b4e: 2f03 movel %d3,%sp@-
47b50: 4e92 jsr %a2@
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
47b52: 4fef 002c lea %sp@(44),%sp
47b56: 2047 moveal %d7,%a0
47b58: 486e fff2 pea %fp@(-14)
47b5c: 2f2e ffa2 movel %fp@(-94),%sp@-
47b60: 486e ffd2 pea %fp@(-46)
47b64: 4e90 jsr %a0@
(*print)( context,
47b66: 202e fff6 movel %fp@(-10),%d0
47b6a: 4c46 0800 remsl %d6,%d0,%d0
47b6e: 222e ffce movel %fp@(-50),%d1
47b72: 2f00 movel %d0,%sp@-
47b74: 2f2e fff2 movel %fp@(-14),%sp@-
47b78: 4c46 1801 remsl %d6,%d1,%d1
47b7c: 202e ffc6 movel %fp@(-58),%d0
47b80: 2241 moveal %d1,%a1
47b82: 2f09 movel %a1,%sp@-
47b84: 2f2e ffca movel %fp@(-54),%sp@-
47b88: 4c46 0800 remsl %d6,%d0,%d0
47b8c: 2f00 movel %d0,%sp@-
47b8e: 2f2e ffc2 movel %fp@(-62),%sp@-
47b92: 4879 0005 ee2a pea 5ee2a <CSWTCH.2+0x144>
47b98: 2f03 movel %d3,%sp@-
47b9a: 4e92 jsr %a2@
47b9c: 4fef 002c lea %sp@(44),%sp
/*
* 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 ;
47ba0: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47ba6: 6300 fee4 blsw 47a8c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
47baa: 6000 fef6 braw 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
00047bc8 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47bc8: 4e56 0000 linkw %fp,#0
47bcc: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47bd2: 5280 addql #1,%d0
47bd4: 2f0a movel %a2,%sp@-
47bd6: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
47bdc: 2f02 movel %d2,%sp@-
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47bde: 2439 0006 1446 movel 61446 <_Rate_monotonic_Information+0x6>,%d2
47be4: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47bea: 6216 bhis 47c02 <rtems_rate_monotonic_reset_all_statistics+0x3a><== NEVER TAKEN
47bec: 45f9 0004 7c14 lea 47c14 <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
47bf2: 2f02 movel %d2,%sp@-
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47bf4: 5282 addql #1,%d2
(void) rtems_rate_monotonic_reset_statistics( id );
47bf6: 4e92 jsr %a2@
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47bf8: 588f addql #4,%sp
47bfa: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47c00: 63f0 blss 47bf2 <rtems_rate_monotonic_reset_all_statistics+0x2a>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
47c02: 242e fff8 movel %fp@(-8),%d2
47c06: 246e fffc moveal %fp@(-4),%a2
47c0a: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
47c0c: 4ef9 0004 a7fe jmp 4a7fe <_Thread_Enable_dispatch>
...
000576a4 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
576a4: 4e56 ffe4 linkw %fp,#-28
576a8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
576ac: 262e 0008 movel %fp@(8),%d3
576b0: 242e 000c movel %fp@(12),%d2
576b4: 2a2e 0010 movel %fp@(16),%d5
576b8: 282e 0014 movel %fp@(20),%d4
576bc: 2c2e 0018 movel %fp@(24),%d6
576c0: 266e 001c moveal %fp@(28),%a3
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
576c4: 4a83 tstl %d3
576c6: 6774 beqs 5773c <rtems_region_create+0x98>
return RTEMS_INVALID_NAME;
if ( !starting_address )
576c8: 4a82 tstl %d2
576ca: 6700 00dc beqw 577a8 <rtems_region_create+0x104>
return RTEMS_INVALID_ADDRESS;
if ( !id )
576ce: 4a8b tstl %a3
576d0: 6700 00d6 beqw 577a8 <rtems_region_create+0x104>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
576d4: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
576da: 4eb9 0005 9f2c jsr 59f2c <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
576e0: 4879 0007 e154 pea 7e154 <_Region_Information>
576e6: 4eb9 0005 b6bc jsr 5b6bc <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
576ec: 508f addql #8,%sp
576ee: 2440 moveal %d0,%a2
576f0: 4a80 tstl %d0
576f2: 6700 00c2 beqw 577b6 <rtems_region_create+0x112>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
576f6: 2f04 movel %d4,%sp@-
576f8: 2f05 movel %d5,%sp@-
576fa: 2f02 movel %d2,%sp@-
576fc: 486a 0068 pea %a2@(104)
57700: 4eb9 0005 b246 jsr 5b246 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57706: 4fef 0010 lea %sp@(16),%sp
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
5770a: 2540 005c movel %d0,%a2@(92)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
5770e: 663a bnes 5774a <rtems_region_create+0xa6>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
57710: 2f0a movel %a2,%sp@-
57712: 4879 0007 e154 pea 7e154 <_Region_Information>
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
57718: 7408 moveq #8,%d2
5771a: 4eb9 0005 ba08 jsr 5ba08 <_Objects_Free>
57720: 508f addql #8,%sp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57722: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
57728: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
5772e: 588f addql #4,%sp
}
57730: 2002 movel %d2,%d0
57732: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
57738: 4e5e unlk %fp
5773a: 4e75 rts
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
5773c: 7403 moveq #3,%d2
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
5773e: 2002 movel %d2,%d0
57740: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
57746: 4e5e unlk %fp
57748: 4e75 rts
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
5774a: 2542 0050 movel %d2,%a2@(80)
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
5774e: 4282 clrl %d2
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57750: 2545 0054 movel %d5,%a2@(84)
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57754: 44c6 movew %d6,%ccr
57756: 57c0 seq %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57758: 2544 0058 movel %d4,%a2@(88)
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
5775c: 49c0 extbl %d0
5775e: 4480 negl %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
57760: 2546 0060 movel %d6,%a2@(96)
the_region->number_of_used_blocks = 0;
57764: 42aa 0064 clrl %a2@(100)
_Thread_queue_Initialize(
57768: 4878 0006 pea 6 <EXTENDSFDF>
5776c: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
57770: 2f00 movel %d0,%sp@-
57772: 486a 0010 pea %a2@(16)
57776: 4eb9 0005 cfd0 jsr 5cfd0 <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
5777c: 202a 0008 movel %a2@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
57780: 4281 clrl %d1
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57782: 4fef 0010 lea %sp@(16),%sp
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57786: 2079 0007 e16c moveal 7e16c <_Region_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
5778c: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5778e: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
57792: 2543 000c movel %d3,%a2@(12)
57796: 2680 movel %d0,%a3@
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57798: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
5779e: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
577a4: 588f addql #4,%sp
577a6: 6088 bras 57730 <rtems_region_create+0x8c>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
577a8: 7409 moveq #9,%d2
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
577aa: 2002 movel %d2,%d0
577ac: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
577b2: 4e5e unlk %fp
577b4: 4e75 rts
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
577b6: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
return_status = RTEMS_TOO_MANY;
577bc: 7405 moveq #5,%d2
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
577be: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
577c4: 588f addql #4,%sp
577c6: 6000 ff68 braw 57730 <rtems_region_create+0x8c>
...
0005787c <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
5787c: 4e56 fff8 linkw %fp,#-8
57880: 2f0a movel %a2,%sp@-
57882: 2f02 movel %d2,%sp@-
57884: 242e 000c movel %fp@(12),%d2
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
57888: 6700 0086 beqw 57910 <rtems_region_extend+0x94>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
5788c: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
57892: 4eb9 0005 9f2c jsr 59f2c <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
57898: 486e fff8 pea %fp@(-8)
5789c: 2f2e 0008 movel %fp@(8),%sp@-
578a0: 4879 0007 e154 pea 7e154 <_Region_Information>
578a6: 4eb9 0005 bb74 jsr 5bb74 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
578ac: 4fef 0010 lea %sp@(16),%sp
578b0: 2440 moveal %d0,%a2
578b2: 4aae fff8 tstl %fp@(-8)
578b6: 6646 bnes 578fe <rtems_region_extend+0x82>
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
578b8: 486e fffc pea %fp@(-4)
578bc: 2f2e 0010 movel %fp@(16),%sp@-
578c0: 2f02 movel %d2,%sp@-
578c2: 486a 0068 pea %a2@(104)
578c6: 4eb9 0005 ac44 jsr 5ac44 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
578cc: 4fef 0010 lea %sp@(16),%sp
578d0: 4a00 tstb %d0
578d2: 674c beqs 57920 <rtems_region_extend+0xa4>
the_region->length += amount_extended;
578d4: 202e fffc movel %fp@(-4),%d0
578d8: d1aa 0054 addl %d0,%a2@(84)
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
578dc: 4282 clrl %d2
&amount_extended
);
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
578de: d1aa 005c addl %d0,%a2@(92)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
578e2: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
578e8: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
578ee: 588f addql #4,%sp
}
578f0: 2002 movel %d2,%d0
578f2: 242e fff0 movel %fp@(-16),%d2
578f6: 246e fff4 moveal %fp@(-12),%a2
578fa: 4e5e unlk %fp
578fc: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
578fe: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
57904: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
57906: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
5790c: 588f addql #4,%sp
5790e: 60e0 bras 578f0 <rtems_region_extend+0x74>
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
57910: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57912: 2002 movel %d2,%d0
57914: 242e fff0 movel %fp@(-16),%d2
57918: 246e fff4 moveal %fp@(-12),%a2
5791c: 4e5e unlk %fp
5791e: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57920: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
57926: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57928: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
5792e: 588f addql #4,%sp
57930: 60be bras 578f0 <rtems_region_extend+0x74>
...
00057bb8 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
57bb8: 4e56 fffc linkw %fp,#-4
57bbc: 2f03 movel %d3,%sp@-
57bbe: 262e 0010 movel %fp@(16),%d3
57bc2: 2f02 movel %d2,%sp@-
57bc4: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
57bc8: 6700 0092 beqw 57c5c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !size )
57bcc: 4a83 tstl %d3
57bce: 6700 008c beqw 57c5c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
57bd2: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
57bd8: 4eb9 0005 9f2c jsr 59f2c <_API_Mutex_Lock>
57bde: 486e fffc pea %fp@(-4)
57be2: 2f2e 0008 movel %fp@(8),%sp@-
57be6: 4879 0007 e154 pea 7e154 <_Region_Information>
57bec: 4eb9 0005 bb74 jsr 5bb74 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
57bf2: 222e fffc movel %fp@(-4),%d1
57bf6: 4fef 0010 lea %sp@(16),%sp
57bfa: 6636 bnes 57c32 <rtems_region_get_segment_size+0x7a><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
57bfc: 2f03 movel %d3,%sp@-
57bfe: 2040 moveal %d0,%a0
57c00: 2f02 movel %d2,%sp@-
57c02: 4868 0068 pea %a0@(104)
57c06: 4eb9 0005 b594 jsr 5b594 <_Heap_Size_of_alloc_area>
57c0c: 4fef 000c lea %sp@(12),%sp
57c10: 4a00 tstb %d0
57c12: 6624 bnes 57c38 <rtems_region_get_segment_size+0x80><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c14: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
return_status = RTEMS_INVALID_ADDRESS;
57c1a: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c1c: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
57c22: 588f addql #4,%sp <== NOT EXECUTED
}
57c24: 2002 movel %d2,%d0
57c26: 242e fff4 movel %fp@(-12),%d2
57c2a: 262e fff8 movel %fp@(-8),%d3
57c2e: 4e5e unlk %fp
57c30: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
57c32: 7001 moveq #1,%d0
57c34: b081 cmpl %d1,%d0
57c36: 6712 beqs 57c4a <rtems_region_get_segment_size+0x92><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c38: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
57c3e: 4282 clrl %d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c40: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
57c46: 588f addql #4,%sp
57c48: 60da bras 57c24 <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c4a: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
case OBJECTS_REMOTE: /* this error cannot be returned */
break;
#endif
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
57c50: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
57c52: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
57c58: 588f addql #4,%sp
57c5a: 60c8 bras 57c24 <rtems_region_get_segment_size+0x6c>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
57c5c: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57c5e: 2002 movel %d2,%d0
57c60: 242e fff4 movel %fp@(-12),%d2
57c64: 262e fff8 movel %fp@(-8),%d3
57c68: 4e5e unlk %fp <== NOT EXECUTED
00046690 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
46690: 4e56 fffc linkw %fp,#-4
46694: 2f0a movel %a2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
46696: 486e fffc pea %fp@(-4)
4669a: 2f2e 0008 movel %fp@(8),%sp@-
4669e: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
466a4: 4eb9 0004 8040 jsr 48040 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
466aa: 4fef 000c lea %sp@(12),%sp
466ae: 2440 moveal %d0,%a2
466b0: 4aae fffc tstl %fp@(-4)
466b4: 670a beqs 466c0 <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466b6: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
466ba: 7004 moveq #4,%d0
}
466bc: 4e5e unlk %fp
466be: 4e75 rts
466c0: 7030 moveq #48,%d0
466c2: c0aa 0010 andl %a2@(16),%d0
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
466c6: 6760 beqs 46728 <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
466c8: 4aaa 0062 tstl %a2@(98)
466cc: 6616 bnes 466e4 <rtems_semaphore_delete+0x54>
466ce: 7220 moveq #32,%d1
466d0: b280 cmpl %d0,%d1
466d2: 6710 beqs 466e4 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
466d4: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466da: 246e fff8 moveal %fp@(-8),%a2
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
466de: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466e0: 4e5e unlk %fp
466e2: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
466e4: 4878 0003 pea 3 <DIVIDE>
466e8: 42a7 clrl %sp@-
466ea: 486a 0014 pea %a2@(20)
466ee: 4eb9 0004 7220 jsr 47220 <_CORE_mutex_Flush>
466f4: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
466f8: 2f0a movel %a2,%sp@-
466fa: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46700: 4eb9 0004 7c18 jsr 47c18 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
46706: 2f0a movel %a2,%sp@-
46708: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
4670e: 4eb9 0004 7ed4 jsr 47ed4 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
46714: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4671a: 4fef 0010 lea %sp@(16),%sp
4671e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46720: 246e fff8 moveal %fp@(-8),%a2
46724: 4e5e unlk %fp
46726: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
46728: 4878 0002 pea 2 <DOUBLE_FLOAT>
4672c: 42a7 clrl %sp@-
4672e: 486a 0014 pea %a2@(20)
46732: 4eb9 0004 7558 jsr 47558 <_CORE_semaphore_Flush>
46738: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
4673c: 2f0a movel %a2,%sp@-
4673e: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46744: 4eb9 0004 7c18 jsr 47c18 <_Objects_Close>
4674a: 2f0a movel %a2,%sp@-
4674c: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46752: 4eb9 0004 7ed4 jsr 47ed4 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
46758: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4675e: 4fef 0010 lea %sp@(16),%sp
46762: 4280 clrl %d0
46764: 60ba bras 46720 <rtems_semaphore_delete+0x90>
...
0004fae8 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
4fae8: 4e56 fffc linkw %fp,#-4
4faec: 486e fffc pea %fp@(-4)
4faf0: 2f2e 0008 movel %fp@(8),%sp@-
4faf4: 4879 0006 3568 pea 63568 <_Semaphore_Information>
4fafa: 4eb9 0004 95f8 jsr 495f8 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
4fb00: 4fef 000c lea %sp@(12),%sp
4fb04: 4aae fffc tstl %fp@(-4)
4fb08: 6706 beqs 4fb10 <rtems_semaphore_flush+0x28>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4fb0a: 7004 moveq #4,%d0
}
4fb0c: 4e5e unlk %fp
4fb0e: 4e75 rts
4fb10: 7230 moveq #48,%d1
4fb12: 2040 moveal %d0,%a0
4fb14: c2a8 0010 andl %a0@(16),%d1
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
4fb18: 6720 beqs 4fb3a <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
4fb1a: 4878 0001 pea 1 <ADD>
4fb1e: 42a7 clrl %sp@-
4fb20: 4868 0014 pea %a0@(20)
4fb24: 4eb9 0004 87d8 jsr 487d8 <_CORE_mutex_Flush>
4fb2a: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
4fb2e: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4fb34: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4fb36: 4e5e unlk %fp
4fb38: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
4fb3a: 4878 0001 pea 1 <ADD>
4fb3e: 2040 moveal %d0,%a0
4fb40: 42a7 clrl %sp@-
4fb42: 4868 0014 pea %a0@(20)
4fb46: 4eb9 0004 8b10 jsr 48b10 <_CORE_semaphore_Flush>
4fb4c: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
4fb50: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4fb56: 4280 clrl %d0
4fb58: 60dc bras 4fb36 <rtems_semaphore_flush+0x4e>
...
00046768 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
46768: 4e56 ffec linkw %fp,#-20
4676c: 48d7 001c moveml %d2-%d4,%sp@
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
46770: 486e fff8 pea %fp@(-8)
46774: 486e fffc pea %fp@(-4)
46778: 242e 0008 movel %fp@(8),%d2
4677c: 2f02 movel %d2,%sp@-
4677e: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46784: 262e 000c movel %fp@(12),%d3
46788: 282e 0010 movel %fp@(16),%d4
4678c: 4eb9 0004 7fe0 jsr 47fe0 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
46792: 4fef 0010 lea %sp@(16),%sp
46796: 4aae fffc tstl %fp@(-4)
4679a: 670c beqs 467a8 <rtems_semaphore_obtain+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4679c: 7004 moveq #4,%d0
}
4679e: 4cee 001c ffec moveml %fp@(-20),%d2-%d4
467a4: 4e5e unlk %fp
467a6: 4e75 rts
467a8: 7230 moveq #48,%d1
467aa: 2040 moveal %d0,%a0
467ac: c2a8 0010 andl %a0@(16),%d1
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
467b0: 6738 beqs 467ea <rtems_semaphore_obtain+0x82>
_CORE_mutex_Seize(
467b2: 2f2e fff8 movel %fp@(-8),%sp@-
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
467b6: 7201 moveq #1,%d1
467b8: c681 andl %d1,%d3
467ba: 2f04 movel %d4,%sp@-
467bc: b781 eorl %d3,%d1
467be: 2f01 movel %d1,%sp@-
467c0: 2f02 movel %d2,%sp@-
467c2: 4868 0014 pea %a0@(20)
467c6: 4eb9 0004 73a8 jsr 473a8 <_CORE_mutex_Seize>
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
_Thread_Executing->Wait.return_code );
467cc: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
467d2: 2f28 0034 movel %a0@(52),%sp@-
467d6: 4eb9 0004 6938 jsr 46938 <_Semaphore_Translate_core_mutex_return_code>
467dc: 4fef 0018 lea %sp@(24),%sp
break;
}
return RTEMS_INVALID_ID;
}
467e0: 4cee 001c ffec moveml %fp@(-20),%d2-%d4
467e6: 4e5e unlk %fp
467e8: 4e75 rts
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
467ea: 2240 moveal %d0,%a1
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
467ec: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
467f2: 2229 005c movel %a1@(92),%d1
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
467f6: 42a8 0034 clrl %a0@(52)
if ( the_semaphore->count != 0 ) {
467fa: 4a81 tstl %d1
467fc: 662e bnes 4682c <rtems_semaphore_obtain+0xc4>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
467fe: 0803 0000 btst #0,%d3
46802: 6748 beqs 4684c <rtems_semaphore_obtain+0xe4>
_ISR_Enable( *level_p );
46804: 202e fff8 movel %fp@(-8),%d0
46808: 46c0 movew %d0,%sr
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
4680a: 7001 moveq #1,%d0
4680c: 2140 0034 movel %d0,%a0@(52)
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
46810: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
46816: 2f28 0034 movel %a0@(52),%sp@-
4681a: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code>
46820: 588f addql #4,%sp
break;
}
return RTEMS_INVALID_ID;
}
46822: 4cee 001c ffec moveml %fp@(-20),%d2-%d4
46828: 4e5e unlk %fp
4682a: 4e75 rts
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
4682c: 5381 subql #1,%d1
4682e: 2341 005c movel %d1,%a1@(92)
_ISR_Enable( *level_p );
46832: 202e fff8 movel %fp@(-8),%d0
46836: 46c0 movew %d0,%sr
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
46838: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
4683e: 2f28 0034 movel %a0@(52),%sp@-
46842: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code>
46848: 588f addql #4,%sp
4684a: 60d6 bras 46822 <rtems_semaphore_obtain+0xba>
4684c: 2239 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d1
46852: 5281 addql #1,%d1
46854: 23c1 0005 f448 movel %d1,5f448 <_Thread_Dispatch_disable_level>
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;
4685a: 7201 moveq #1,%d1
4685c: 2240 moveal %d0,%a1
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
4685e: 0680 0000 0014 addil #20,%d0
46864: 2341 0044 movel %d1,%a1@(68)
executing->Wait.id = id;
46868: 2142 0020 movel %d2,%a0@(32)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
4686c: 2140 0044 movel %d0,%a0@(68)
executing->Wait.id = id;
_ISR_Enable( *level_p );
46870: 222e fff8 movel %fp@(-8),%d1
46874: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
46876: 4879 0004 956c pea 4956c <_Thread_queue_Timeout>
4687c: 2f04 movel %d4,%sp@-
4687e: 2f00 movel %d0,%sp@-
46880: 4eb9 0004 91a8 jsr 491a8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
46886: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
_Thread_Executing->Wait.return_code );
4688c: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
46892: 4fef 000c lea %sp@(12),%sp
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
46896: 2f28 0034 movel %a0@(52),%sp@-
4689a: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code>
468a0: 588f addql #4,%sp
468a2: 6000 ff7e braw 46822 <rtems_semaphore_obtain+0xba>
...
00046e3c <rtems_shutdown_executive>:
void rtems_shutdown_executive(
uint32_t result
)
{
if ( _System_state_Is_up( _System_state_Get() ) ) {
46e3c: 7003 moveq #3,%d0
*/
void rtems_shutdown_executive(
uint32_t result
)
{
46e3e: 4e56 0000 linkw %fp,#0
if ( _System_state_Is_up( _System_state_Get() ) ) {
46e42: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
46e48: 6710 beqs 46e5a <rtems_shutdown_executive+0x1e>
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
_Internal_error_Occurred(
46e4a: 4878 0014 pea 14 <OPER2>
46e4e: 4878 0001 pea 1 <ADD>
46e52: 42a7 clrl %sp@-
46e54: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
* if we were running within the same context, it would work.
*
* And we will not return to this thread, so there is no point of
* saving the context.
*/
_Context_Restart_self( &_Thread_BSP_context );
46e5a: 4879 0005 f414 pea 5f414 <_Thread_BSP_context>
46e60: 103c 0004 moveb #4,%d0
46e64: 23c0 0005 f590 movel %d0,5f590 <_System_state_Current>
46e6a: 4eb9 0004 9e82 jsr 49e82 <_CPU_Context_Restart_self>
46e70: 588f addql #4,%sp <== NOT EXECUTED
46e72: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
46e76: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
46e7a: 42a7 clrl %sp@- <== NOT EXECUTED
46e7c: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred> <== NOT EXECUTED
...
00058338 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
58338: 4e56 fffc linkw %fp,#-4
5833c: 2f03 movel %d3,%sp@-
5833e: 2f02 movel %d2,%sp@-
58340: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58344: 660e bnes 58354 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58346: 242e fff4 movel %fp@(-12),%d2
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
5834a: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5834c: 262e fff8 movel %fp@(-8),%d3
58350: 4e5e unlk %fp
58352: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
58354: 486e fffc pea %fp@(-4)
58358: 2f2e 0008 movel %fp@(8),%sp@-
5835c: 4eb9 0005 c86c jsr 5c86c <_Thread_Get>
switch ( location ) {
58362: 508f addql #8,%sp
58364: 4aae fffc tstl %fp@(-4)
58368: 670e beqs 58378 <rtems_signal_send+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5836a: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5836e: 7004 moveq #4,%d0
}
58370: 262e fff8 movel %fp@(-8),%d3
58374: 4e5e unlk %fp
58376: 4e75 rts
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
58378: 2240 moveal %d0,%a1
5837a: 2069 00fc moveal %a1@(252),%a0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
5837e: 4aa8 000a tstl %a0@(10)
58382: 676a beqs 583ee <rtems_signal_send+0xb6>
if ( asr->is_enabled ) {
58384: 4a28 0008 tstb %a0@(8)
58388: 6736 beqs 583c0 <rtems_signal_send+0x88>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
5838a: 223c 0000 0700 movel #1792,%d1
58390: 40c3 movew %sr,%d3
58392: 8283 orl %d3,%d1
58394: 46c1 movew %d1,%sr
*signal_set |= signals;
58396: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
5839a: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5839c: 4ab9 0007 e3e4 tstl 7e3e4 <_Per_CPU_Information+0x8>
583a2: 6708 beqs 583ac <rtems_signal_send+0x74>
583a4: b0b9 0007 e3e8 cmpl 7e3e8 <_Per_CPU_Information+0xc>,%d0
583aa: 6730 beqs 583dc <rtems_signal_send+0xa4> <== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
583ac: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
583b2: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
583b4: 242e fff4 movel %fp@(-12),%d2
583b8: 262e fff8 movel %fp@(-8),%d3
583bc: 4e5e unlk %fp
583be: 4e75 rts
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
583c0: 203c 0000 0700 movel #1792,%d0
583c6: 40c1 movew %sr,%d1
583c8: 8081 orl %d1,%d0
583ca: 46c0 movew %d0,%sr
*signal_set |= signals;
583cc: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
583d0: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
583d2: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
583d8: 4280 clrl %d0
583da: 60d8 bras 583b4 <rtems_signal_send+0x7c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
583dc: 7001 moveq #1,%d0
583de: 13c0 0007 e3f4 moveb %d0,7e3f4 <_Per_CPU_Information+0x18>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
583e4: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
583ea: 4280 clrl %d0
583ec: 60c6 bras 583b4 <rtems_signal_send+0x7c>
}
_Thread_Enable_dispatch();
583ee: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
583f4: 242e fff4 movel %fp@(-12),%d2
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
583f8: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
583fa: 262e fff8 movel %fp@(-8),%d3
583fe: 4e5e unlk %fp
...
0004260e <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
4260e: 4e56 0000 linkw %fp,#0
42612: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
42616: 4aa8 0008 tstl %a0@(8)
4261a: 672c beqs 42648 <rtems_stack_checker_begin_extension+0x3a><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
4261c: 2068 00b4 moveal %a0@(180),%a0
42620: 43f9 0005 f960 lea 5f960 <Stack_check_Pattern>,%a1
42626: 2151 0008 movel %a1@,%a0@(8)
4262a: 43f9 0005 f964 lea 5f964 <Stack_check_Pattern+0x4>,%a1
42630: 2151 000c movel %a1@,%a0@(12)
42634: 43f9 0005 f968 lea 5f968 <Stack_check_Pattern+0x8>,%a1
4263a: 2151 0010 movel %a1@,%a0@(16)
4263e: 43f9 0005 f96c lea 5f96c <Stack_check_Pattern+0xc>,%a1
42644: 2151 0014 movel %a1@,%a0@(20)
}
42648: 4e5e unlk %fp <== NOT EXECUTED
000425da <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
425da: 4e56 0000 linkw %fp,#0
425de: 2f0a movel %a2,%sp@-
425e0: 246e 000c moveal %fp@(12),%a2
Stack_check_Initialize();
425e4: 4eb9 0004 2560 jsr 42560 <Stack_check_Initialize>
if (the_thread)
425ea: 4a8a tstl %a2
425ec: 6716 beqs 42604 <rtems_stack_checker_create_extension+0x2a><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
425ee: 2f2a 00b0 movel %a2@(176),%sp@-
425f2: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
425f6: 2f2a 00b4 movel %a2@(180),%sp@-
425fa: 4eb9 0004 e990 jsr 4e990 <memset>
42600: 4fef 000c lea %sp@(12),%sp
return true;
}
42604: 246e fffc moveal %fp@(-4),%a2
42608: 4e5e unlk %fp
4260a: 7001 moveq #1,%d0 <== NOT EXECUTED
0004277c <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
4277c: 4e56 0000 linkw %fp,#0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
42780: 2279 0005 fc68 moveal 5fc68 <_Per_CPU_Information+0xc>,%a1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
42786: 2069 00b4 moveal %a1@(180),%a0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
4278a: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
4278c: b1ce cmpal %fp,%a0
4278e: 6248 bhis 427d8 <rtems_stack_checker_is_blown+0x5c><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
42790: 2008 movel %a0,%d0
42792: d0a9 00b0 addl %a1@(176),%d0
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
42796: b08e cmpl %fp,%d0
42798: 54c2 scc %d2
4279a: 4482 negl %d2
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
4279c: 4ab9 0005 f160 tstl 5f160 <Stack_check_Initialized>
427a2: 6730 beqs 427d4 <rtems_stack_checker_is_blown+0x58><== NEVER TAKEN
pattern_ok = (!memcmp(
427a4: 4878 0010 pea 10 <INVALID_OPERATION>
427a8: 4879 0005 f960 pea 5f960 <Stack_check_Pattern>
427ae: 4868 0008 pea %a0@(8)
427b2: 4eb9 0004 e8a0 jsr 4e8a0 <memcmp>
427b8: 4fef 000c lea %sp@(12),%sp
427bc: 4a80 tstl %d0
427be: 57c0 seq %d0
427c0: 4480 negl %d0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
427c2: 4a02 tstb %d2
427c4: 6716 beqs 427dc <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
427c6: 4a00 tstb %d0
427c8: 6712 beqs 427dc <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
427ca: 242e fffc movel %fp@(-4),%d2
427ce: 4e5e unlk %fp
427d0: 4200 clrb %d0
427d2: 4e75 rts
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
427d4: 7001 moveq #1,%d0 <== NOT EXECUTED
427d6: 60ea bras 427c2 <rtems_stack_checker_is_blown+0x46><== NOT EXECUTED
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
427d8: 4202 clrb %d2 <== NOT EXECUTED
427da: 60c0 bras 4279c <rtems_stack_checker_is_blown+0x20><== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
427dc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
427e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
427e4: 2f39 0005 fc68 movel 5fc68 <_Per_CPU_Information+0xc>,%sp@-<== NOT EXECUTED
427ea: 4eb9 0004 264c jsr 4264c <Stack_check_report_blown_task> <== NOT EXECUTED
00042856 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
42856: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
4285a: 4879 0004 4344 pea 44344 <printk_plugin> <== NOT EXECUTED
42860: 42a7 clrl %sp@- <== NOT EXECUTED
42862: 4eb9 0004 27f0 jsr 427f0 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
42868: 508f addql #8,%sp <== NOT EXECUTED
}
4286a: 4e5e unlk %fp <== NOT EXECUTED
...
000427f0 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
427f0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
427f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
427f6: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
427fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
427fc: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
if ( !print )
42800: 4a8a tstl %a2 <== NOT EXECUTED
42802: 6746 beqs 4284a <rtems_stack_checker_report_usage_with_plugin+0x5a><== NOT EXECUTED
return;
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
42804: 4879 0005 ce76 pea 5ce76 <IntUartPollCallbacks.6330+0x13c> <== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
4280a: 23c2 0005 f158 movel %d2,5f158 <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
42810: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
if ( !print )
return;
print_context = context;
print_handler = print;
42812: 23ca 0005 f15c movel %a2,5f15c <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
42818: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
4281a: 4879 0005 ce8d pea 5ce8d <IntUartPollCallbacks.6330+0x153> <== NOT EXECUTED
42820: 2f02 movel %d2,%sp@- <== NOT EXECUTED
42822: 4e92 jsr %a2@ <== 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 );
42824: 4879 0004 23d0 pea 423d0 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
4282a: 4eb9 0004 7fd8 jsr 47fd8 <rtems_iterate_over_all_threads> <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
42830: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
42834: 4eb9 0004 23d0 jsr 423d0 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
#endif
print_context = NULL;
print_handler = NULL;
4283a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
4283e: 42b9 0005 f158 clrl 5f158 <print_context> <== NOT EXECUTED
print_handler = NULL;
42844: 42b9 0005 f15c clrl 5f15c <print_handler> <== NOT EXECUTED
}
4284a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
4284e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
42852: 4e5e unlk %fp <== NOT EXECUTED
000426fc <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
426fc: 4e56 0000 linkw %fp,#0
42700: 2f0a movel %a2,%sp@-
42702: 246e 0008 moveal %fp@(8),%a2
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
42706: 222a 00b4 movel %a2@(180),%d1
4270a: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
4270c: 202a 00b4 movel %a2@(180),%d0
42710: b08e cmpl %fp,%d0
42712: 622a bhis 4273e <rtems_stack_checker_switch_extension+0x42><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
42714: d0aa 00b0 addl %a2@(176),%d0
42718: b08e cmpl %fp,%d0
4271a: 6522 bcss 4273e <rtems_stack_checker_switch_extension+0x42><== NEVER TAKEN
/*
* 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,
4271c: 4878 0010 pea 10 <INVALID_OPERATION>
42720: 4879 0005 f960 pea 5f960 <Stack_check_Pattern>
42726: 2f01 movel %d1,%sp@-
42728: 4eb9 0004 e8a0 jsr 4e8a0 <memcmp>
4272e: 4fef 000c lea %sp@(12),%sp
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
42732: 4a80 tstl %d0
42734: 6634 bnes 4276a <rtems_stack_checker_switch_extension+0x6e><== NEVER TAKEN
Stack_check_report_blown_task( running, pattern_ok );
}
}
42736: 246e fffc moveal %fp@(-4),%a2
4273a: 4e5e unlk %fp
4273c: 4e75 rts
/*
* 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,
4273e: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
42742: 4879 0005 f960 pea 5f960 <Stack_check_Pattern> <== NOT EXECUTED
42748: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4274a: 4eb9 0004 e8a0 jsr 4e8a0 <memcmp> <== NOT EXECUTED
42750: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
42754: 4a80 tstl %d0 <== NOT EXECUTED
42756: 57c0 seq %d0 <== NOT EXECUTED
42758: 4480 negl %d0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
4275a: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
42760: 2f00 movel %d0,%sp@- <== NOT EXECUTED
42762: 2f0a movel %a2,%sp@- <== NOT EXECUTED
42764: 4eb9 0004 264c jsr 4264c <Stack_check_report_blown_task> <== NOT EXECUTED
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
4276a: 4200 clrb %d0 <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
4276c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
42772: 2f00 movel %d0,%sp@- <== NOT EXECUTED
42774: 2f0a movel %a2,%sp@- <== NOT EXECUTED
42776: 4eb9 0004 264c jsr 4264c <Stack_check_report_blown_task> <== NOT EXECUTED
0004d8e4 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
4d8e4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
4d8e8: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
4d8ec: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
4d8f0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4d8f4: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
double result;
char *end;
if ( !n )
4d8f8: 4a8a tstl %a2 <== NOT EXECUTED
4d8fa: 6700 00bc beqw 4d9b8 <rtems_string_to_double+0xd4> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d8fe: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4 <== NOT EXECUTED
4d904: 4e94 jsr %a4@ <== NOT EXECUTED
*n = 0;
4d906: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d908: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4d90a: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d90c: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
result = strtod( s, &end );
4d90e: 486e fffc pea %fp@(-4) <== NOT EXECUTED
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d912: 2480 movel %d0,%a2@ <== NOT EXECUTED
4d914: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
result = strtod( s, &end );
4d918: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4d91a: 4eb9 0005 2786 jsr 52786 <strtod> <== NOT EXECUTED
if ( endptr )
4d920: 508f addql #8,%sp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
4d922: 2600 movel %d0,%d3 <== NOT EXECUTED
4d924: 2801 movel %d1,%d4 <== NOT EXECUTED
if ( endptr )
4d926: 4a8b tstl %a3 <== NOT EXECUTED
4d928: 6700 009a beqw 4d9c4 <rtems_string_to_double+0xe0> <== NOT EXECUTED
*endptr = end;
4d92c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
4d930: 2680 movel %d0,%a3@ <== NOT EXECUTED
if ( end == s )
4d932: b082 cmpl %d2,%d0 <== NOT EXECUTED
4d934: 6776 beqs 4d9ac <rtems_string_to_double+0xc8> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d936: 4e94 jsr %a4@ <== NOT EXECUTED
4d938: 7222 moveq #34,%d1 <== NOT EXECUTED
4d93a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4d93c: b290 cmpl %a0@,%d1 <== NOT EXECUTED
4d93e: 6712 beqs 4d952 <rtems_string_to_double+0x6e> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
4d940: 2483 movel %d3,%a2@ <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
4d942: 4280 clrl %d0 <== NOT EXECUTED
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
4d944: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
4d948: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED
4d94e: 4e5e unlk %fp <== NOT EXECUTED
4d950: 4e75 rts <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d952: 42a7 clrl %sp@- <== NOT EXECUTED
4d954: 42a7 clrl %sp@- <== NOT EXECUTED
4d956: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4d958: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4d95a: 4eb9 0004 3128 jsr 43128 <__eqdf2> <== NOT EXECUTED
4d960: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4d964: 4a80 tstl %d0 <== NOT EXECUTED
4d966: 6738 beqs 4d9a0 <rtems_string_to_double+0xbc> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
4d968: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4d96c: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED
4d972: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4d974: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4d976: 4eb9 0005 e2b8 jsr 5e2b8 <__gtdf2> <== NOT EXECUTED
4d97c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4d980: 4a80 tstl %d0 <== NOT EXECUTED
4d982: 6e1c bgts 4d9a0 <rtems_string_to_double+0xbc> <== NOT EXECUTED
4d984: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4d988: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED
4d98e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4d990: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4d992: 4eb9 0005 e300 jsr 5e300 <__ltdf2> <== NOT EXECUTED
4d998: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4d99c: 4a80 tstl %d0 <== NOT EXECUTED
4d99e: 6ca0 bges 4d940 <rtems_string_to_double+0x5c> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4d9a0: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4d9a2: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED
4d9a8: 4e5e unlk %fp <== NOT EXECUTED
4d9aa: 4e75 rts <== NOT EXECUTED
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4d9ac: 700b moveq #11,%d0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d9ae: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED
4d9b4: 4e5e unlk %fp <== NOT EXECUTED
4d9b6: 4e75 rts <== NOT EXECUTED
{
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4d9b8: 7009 moveq #9,%d0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d9ba: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED
4d9c0: 4e5e unlk %fp <== NOT EXECUTED
4d9c2: 4e75 rts <== NOT EXECUTED
errno = 0;
*n = 0;
result = strtod( s, &end );
if ( endptr )
4d9c4: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
4d9c8: 6000 ff68 braw 4d932 <rtems_string_to_double+0x4e> <== NOT EXECUTED
0004d9cc <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
4d9cc: 4e56 ffe8 linkw %fp,#-24
4d9d0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4d9d4: 242e 0008 movel %fp@(8),%d2
4d9d8: 246e 000c moveal %fp@(12),%a2
4d9dc: 266e 0010 moveal %fp@(16),%a3
float result;
char *end;
if ( !n )
4d9e0: 4a8a tstl %a2
4d9e2: 6700 00a0 beqw 4da84 <rtems_string_to_float+0xb8>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d9e6: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4
4d9ec: 4e94 jsr %a4@
4d9ee: 2040 moveal %d0,%a0
4d9f0: 4290 clrl %a0@
*n = 0;
result = strtof( s, &end );
4d9f2: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d9f6: 24bc 0000 0000 movel #0,%a2@
result = strtof( s, &end );
4d9fc: 2f02 movel %d2,%sp@-
4d9fe: 4eb9 0005 27a6 jsr 527a6 <strtof>
if ( endptr )
4da04: 508f addql #8,%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
4da06: 2600 movel %d0,%d3
if ( endptr )
4da08: 4a8b tstl %a3
4da0a: 6700 0084 beqw 4da90 <rtems_string_to_float+0xc4>
*endptr = end;
4da0e: 202e fffc movel %fp@(-4),%d0
4da12: 2680 movel %d0,%a3@
if ( end == s )
4da14: b082 cmpl %d2,%d0
4da16: 6760 beqs 4da78 <rtems_string_to_float+0xac>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4da18: 4e94 jsr %a4@
4da1a: 7222 moveq #34,%d1
4da1c: 2040 moveal %d0,%a0
4da1e: b290 cmpl %a0@,%d1
4da20: 670e beqs 4da30 <rtems_string_to_float+0x64>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
4da22: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4da24: 4280 clrl %d0
}
4da26: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4da2c: 4e5e unlk %fp
4da2e: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4da30: 2f3c 0000 0000 movel #0,%sp@-
4da36: 2f03 movel %d3,%sp@-
4da38: 4eb9 0004 314c jsr 4314c <__eqsf2>
4da3e: 508f addql #8,%sp
4da40: 4a80 tstl %d0
4da42: 6728 beqs 4da6c <rtems_string_to_float+0xa0> <== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
4da44: 2f3c 7f7f ffff movel #2139095039,%sp@-
4da4a: 2f03 movel %d3,%sp@-
4da4c: 4eb9 0005 e348 jsr 5e348 <__gtsf2>
4da52: 508f addql #8,%sp
4da54: 4a80 tstl %d0
4da56: 6e14 bgts 4da6c <rtems_string_to_float+0xa0> <== NEVER TAKEN
4da58: 2f3c ff7f ffff movel #-8388609,%sp@-
4da5e: 2f03 movel %d3,%sp@-
4da60: 4eb9 0005 e364 jsr 5e364 <__ltsf2>
4da66: 508f addql #8,%sp
4da68: 4a80 tstl %d0
4da6a: 6cb6 bges 4da22 <rtems_string_to_float+0x56> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
4da6c: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4da6e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED
4da74: 4e5e unlk %fp <== NOT EXECUTED
4da76: 4e75 rts <== NOT EXECUTED
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4da78: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4da7a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4da80: 4e5e unlk %fp
4da82: 4e75 rts
{
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4da84: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4da86: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4da8c: 4e5e unlk %fp
4da8e: 4e75 rts
errno = 0;
*n = 0;
result = strtof( s, &end );
if ( endptr )
4da90: 202e fffc movel %fp@(-4),%d0
4da94: 6000 ff7e braw 4da14 <rtems_string_to_float+0x48>
0004da98 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
4da98: 4e56 ffe8 linkw %fp,#-24
4da9c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4daa0: 242e 0008 movel %fp@(8),%d2
4daa4: 246e 000c moveal %fp@(12),%a2
4daa8: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4daac: 4a8a tstl %a2
4daae: 6776 beqs 4db26 <rtems_string_to_int+0x8e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4dab0: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4
4dab6: 4e94 jsr %a4@
4dab8: 2040 moveal %d0,%a0
4daba: 4290 clrl %a0@
*n = 0;
result = strtol( s, &end, base );
4dabc: 2f2e 0014 movel %fp@(20),%sp@-
4dac0: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4dac4: 4292 clrl %a2@
result = strtol( s, &end, base );
4dac6: 2f02 movel %d2,%sp@-
4dac8: 4eb9 0005 2962 jsr 52962 <strtol>
if ( endptr )
4dace: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4dad2: 2600 movel %d0,%d3
if ( endptr )
4dad4: 4a8b tstl %a3
4dad6: 675a beqs 4db32 <rtems_string_to_int+0x9a>
*endptr = end;
4dad8: 202e fffc movel %fp@(-4),%d0
4dadc: 2680 movel %d0,%a3@
if ( end == s )
4dade: b082 cmpl %d2,%d0
4dae0: 6738 beqs 4db1a <rtems_string_to_int+0x82>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dae2: 4e94 jsr %a4@
4dae4: 7222 moveq #34,%d1
4dae6: 2040 moveal %d0,%a0
4dae8: b290 cmpl %a0@,%d1
4daea: 670e beqs 4dafa <rtems_string_to_int+0x62>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4daec: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4daee: 4280 clrl %d0
}
4daf0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4daf6: 4e5e unlk %fp
4daf8: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dafa: 4a83 tstl %d3
4dafc: 6710 beqs 4db0e <rtems_string_to_int+0x76> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
4dafe: 0c83 7fff ffff cmpil #2147483647,%d3
4db04: 6708 beqs 4db0e <rtems_string_to_int+0x76> <== ALWAYS TAKEN
4db06: 0c83 8000 0000 cmpil #-2147483648,%d3 <== NOT EXECUTED
4db0c: 66de bnes 4daec <rtems_string_to_int+0x54> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4db0e: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4db10: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4db16: 4e5e unlk %fp
4db18: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4db1a: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4db1c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4db22: 4e5e unlk %fp
4db24: 4e75 rts
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4db26: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4db28: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4db2e: 4e5e unlk %fp
4db30: 4e75 rts
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
4db32: 202e fffc movel %fp@(-4),%d0
4db36: 60a6 bras 4dade <rtems_string_to_int+0x46>
0004dbf8 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
4dbf8: 4e56 ffe8 linkw %fp,#-24
4dbfc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4dc00: 242e 0008 movel %fp@(8),%d2
4dc04: 246e 000c moveal %fp@(12),%a2
4dc08: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4dc0c: 4a8a tstl %a2
4dc0e: 6776 beqs 4dc86 <rtems_string_to_long+0x8e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4dc10: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4
4dc16: 4e94 jsr %a4@
4dc18: 2040 moveal %d0,%a0
4dc1a: 4290 clrl %a0@
*n = 0;
result = strtol( s, &end, base );
4dc1c: 2f2e 0014 movel %fp@(20),%sp@-
4dc20: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4dc24: 4292 clrl %a2@
result = strtol( s, &end, base );
4dc26: 2f02 movel %d2,%sp@-
4dc28: 4eb9 0005 2962 jsr 52962 <strtol>
if ( endptr )
4dc2e: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4dc32: 2600 movel %d0,%d3
if ( endptr )
4dc34: 4a8b tstl %a3
4dc36: 675a beqs 4dc92 <rtems_string_to_long+0x9a>
*endptr = end;
4dc38: 202e fffc movel %fp@(-4),%d0
4dc3c: 2680 movel %d0,%a3@
if ( end == s )
4dc3e: b082 cmpl %d2,%d0
4dc40: 6738 beqs 4dc7a <rtems_string_to_long+0x82>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dc42: 4e94 jsr %a4@
4dc44: 7222 moveq #34,%d1
4dc46: 2040 moveal %d0,%a0
4dc48: b290 cmpl %a0@,%d1
4dc4a: 670e beqs 4dc5a <rtems_string_to_long+0x62>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4dc4c: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4dc4e: 4280 clrl %d0
}
4dc50: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dc56: 4e5e unlk %fp
4dc58: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dc5a: 4a83 tstl %d3
4dc5c: 6710 beqs 4dc6e <rtems_string_to_long+0x76> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
4dc5e: 0c83 7fff ffff cmpil #2147483647,%d3
4dc64: 6708 beqs 4dc6e <rtems_string_to_long+0x76>
4dc66: 0c83 8000 0000 cmpil #-2147483648,%d3
4dc6c: 66de bnes 4dc4c <rtems_string_to_long+0x54> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4dc6e: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4dc70: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dc76: 4e5e unlk %fp
4dc78: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4dc7a: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dc7c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dc82: 4e5e unlk %fp
4dc84: 4e75 rts
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4dc86: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dc88: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dc8e: 4e5e unlk %fp
4dc90: 4e75 rts
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
4dc92: 202e fffc movel %fp@(-4),%d0
4dc96: 60a6 bras 4dc3e <rtems_string_to_long+0x46>
0004db38 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
4db38: 4e56 ffe4 linkw %fp,#-28
4db3c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
4db40: 242e 0008 movel %fp@(8),%d2
4db44: 246e 000c moveal %fp@(12),%a2
4db48: 266e 0010 moveal %fp@(16),%a3
long long result;
char *end;
if ( !n )
4db4c: 4a8a tstl %a2
4db4e: 6700 0094 beqw 4dbe4 <rtems_string_to_long_long+0xac>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4db52: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4
4db58: 4e94 jsr %a4@
4db5a: 2040 moveal %d0,%a0
*n = 0;
4db5c: 4280 clrl %d0
4db5e: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4db60: 4290 clrl %a0@
*n = 0;
4db62: 2480 movel %d0,%a2@
4db64: 2541 0004 movel %d1,%a2@(4)
result = strtoll( s, &end, base );
4db68: 2f2e 0014 movel %fp@(20),%sp@-
4db6c: 486e fffc pea %fp@(-4)
4db70: 2f02 movel %d2,%sp@-
4db72: 4eb9 0005 2984 jsr 52984 <strtoll>
if ( endptr )
4db78: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
4db7c: 2600 movel %d0,%d3
4db7e: 2801 movel %d1,%d4
if ( endptr )
4db80: 4a8b tstl %a3
4db82: 676c beqs 4dbf0 <rtems_string_to_long_long+0xb8>
*endptr = end;
4db84: 202e fffc movel %fp@(-4),%d0
4db88: 2680 movel %d0,%a3@
if ( end == s )
4db8a: b082 cmpl %d2,%d0
4db8c: 674a beqs 4dbd8 <rtems_string_to_long_long+0xa0>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4db8e: 4e94 jsr %a4@
4db90: 7222 moveq #34,%d1
4db92: 2040 moveal %d0,%a0
4db94: b290 cmpl %a0@,%d1
4db96: 6712 beqs 4dbaa <rtems_string_to_long_long+0x72>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4db98: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4db9a: 2483 movel %d3,%a2@
4db9c: 2544 0004 movel %d4,%a2@(4)
return RTEMS_SUCCESSFUL;
}
4dba0: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
4dba6: 4e5e unlk %fp
4dba8: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dbaa: 2003 movel %d3,%d0
4dbac: 8084 orl %d4,%d0
4dbae: 671c beqs 4dbcc <rtems_string_to_long_long+0x94> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
4dbb0: 203c 7fff ffff movel #2147483647,%d0
4dbb6: 72ff moveq #-1,%d1
4dbb8: 9284 subl %d4,%d1
4dbba: 9183 subxl %d3,%d0
4dbbc: 670e beqs 4dbcc <rtems_string_to_long_long+0x94>
4dbbe: 203c 8000 0000 movel #-2147483648,%d0
4dbc4: 4281 clrl %d1
4dbc6: 9284 subl %d4,%d1
4dbc8: 9183 subxl %d3,%d0
4dbca: 66cc bnes 4db98 <rtems_string_to_long_long+0x60> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4dbcc: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4dbce: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
4dbd4: 4e5e unlk %fp
4dbd6: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4dbd8: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dbda: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
4dbe0: 4e5e unlk %fp
4dbe2: 4e75 rts
{
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4dbe4: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dbe6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
4dbec: 4e5e unlk %fp
4dbee: 4e75 rts
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
if ( endptr )
4dbf0: 202e fffc movel %fp@(-4),%d0
4dbf4: 6094 bras 4db8a <rtems_string_to_long_long+0x52>
...
0004dcb4 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
4dcb4: 4e56 ffe8 linkw %fp,#-24
4dcb8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4dcbc: 242e 0008 movel %fp@(8),%d2
4dcc0: 246e 000c moveal %fp@(12),%a2
4dcc4: 286e 0010 moveal %fp@(16),%a4
unsigned long result;
char *end;
if ( !n )
4dcc8: 4a8a tstl %a2
4dcca: 6700 008a beqw 4dd56 <rtems_string_to_unsigned_char+0xa2>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4dcce: 47f9 0004 fe64 lea 4fe64 <__errno>,%a3
4dcd4: 4e93 jsr %a3@
4dcd6: 2040 moveal %d0,%a0
4dcd8: 4290 clrl %a0@
*n = 0;
4dcda: 4212 clrb %a2@
result = strtoul( s, &end, base );
4dcdc: 2f2e 0014 movel %fp@(20),%sp@-
4dce0: 486e fffc pea %fp@(-4)
4dce4: 2f02 movel %d2,%sp@-
4dce6: 4eb9 0005 2da6 jsr 52da6 <strtoul>
if ( endptr )
4dcec: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4dcf0: 2600 movel %d0,%d3
if ( endptr )
4dcf2: 4a8c tstl %a4
4dcf4: 676c beqs 4dd62 <rtems_string_to_unsigned_char+0xae>
*endptr = end;
4dcf6: 202e fffc movel %fp@(-4),%d0
4dcfa: 2880 movel %d0,%a4@
if ( end == s )
4dcfc: b082 cmpl %d2,%d0
4dcfe: 674a beqs 4dd4a <rtems_string_to_unsigned_char+0x96>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dd00: 4e93 jsr %a3@
4dd02: 7222 moveq #34,%d1
4dd04: 2040 moveal %d0,%a0
4dd06: b290 cmpl %a0@,%d1
4dd08: 6716 beqs 4dd20 <rtems_string_to_unsigned_char+0x6c><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
4dd0a: 0c83 0000 00ff cmpil #255,%d3
4dd10: 6224 bhis 4dd36 <rtems_string_to_unsigned_char+0x82><== NEVER TAKEN
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
4dd12: 4280 clrl %d0
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4dd14: 1483 moveb %d3,%a2@
return RTEMS_SUCCESSFUL;
}
4dd16: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dd1c: 4e5e unlk %fp
4dd1e: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
4dd20: 2003 movel %d3,%d0 <== NOT EXECUTED
4dd22: 5380 subql #1,%d0 <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dd24: 72fd moveq #-3,%d1 <== NOT EXECUTED
4dd26: b280 cmpl %d0,%d1 <== NOT EXECUTED
4dd28: 64e0 bccs 4dd0a <rtems_string_to_unsigned_char+0x56><== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4dd2a: 700a moveq #10,%d0 <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4dd2c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED
4dd32: 4e5e unlk %fp <== NOT EXECUTED
4dd34: 4e75 rts <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
4dd36: 4e93 jsr %a3@ <== NOT EXECUTED
4dd38: 7222 moveq #34,%d1 <== NOT EXECUTED
4dd3a: 2040 moveal %d0,%a0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4dd3c: 700a moveq #10,%d0 <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4dd3e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
4dd44: 2081 movel %d1,%a0@ <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4dd46: 4e5e unlk %fp <== NOT EXECUTED
4dd48: 4e75 rts <== NOT EXECUTED
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4dd4a: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4dd4c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dd52: 4e5e unlk %fp
4dd54: 4e75 rts
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4dd56: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4dd58: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dd5e: 4e5e unlk %fp
4dd60: 4e75 rts
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
4dd62: 202e fffc movel %fp@(-4),%d0
4dd66: 6094 bras 4dcfc <rtems_string_to_unsigned_char+0x48>
0004dd68 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
4dd68: 4e56 ffe8 linkw %fp,#-24
4dd6c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4dd70: 242e 0008 movel %fp@(8),%d2
4dd74: 246e 000c moveal %fp@(12),%a2
4dd78: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4dd7c: 4a8a tstl %a2
4dd7e: 676c beqs 4ddec <rtems_string_to_unsigned_int+0x84>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4dd80: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4
4dd86: 4e94 jsr %a4@
4dd88: 2040 moveal %d0,%a0
4dd8a: 4290 clrl %a0@
*n = 0;
result = strtoul( s, &end, base );
4dd8c: 2f2e 0014 movel %fp@(20),%sp@-
4dd90: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4dd94: 4292 clrl %a2@
result = strtoul( s, &end, base );
4dd96: 2f02 movel %d2,%sp@-
4dd98: 4eb9 0005 2da6 jsr 52da6 <strtoul>
if ( endptr )
4dd9e: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4dda2: 2600 movel %d0,%d3
if ( endptr )
4dda4: 4a8b tstl %a3
4dda6: 6750 beqs 4ddf8 <rtems_string_to_unsigned_int+0x90>
*endptr = end;
4dda8: 202e fffc movel %fp@(-4),%d0
4ddac: 2680 movel %d0,%a3@
if ( end == s )
4ddae: b082 cmpl %d2,%d0
4ddb0: 672e beqs 4dde0 <rtems_string_to_unsigned_int+0x78>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4ddb2: 4e94 jsr %a4@
4ddb4: 7222 moveq #34,%d1
4ddb6: 2040 moveal %d0,%a0
4ddb8: b290 cmpl %a0@,%d1
4ddba: 670e beqs 4ddca <rtems_string_to_unsigned_int+0x62>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4ddbc: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4ddbe: 4280 clrl %d0
}
4ddc0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4ddc6: 4e5e unlk %fp
4ddc8: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
4ddca: 2003 movel %d3,%d0
4ddcc: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4ddce: 72fd moveq #-3,%d1
4ddd0: b280 cmpl %d0,%d1
4ddd2: 64e8 bccs 4ddbc <rtems_string_to_unsigned_int+0x54><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4ddd4: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4ddd6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dddc: 4e5e unlk %fp
4ddde: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4dde0: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4dde2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dde8: 4e5e unlk %fp
4ddea: 4e75 rts
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4ddec: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4ddee: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4ddf4: 4e5e unlk %fp
4ddf6: 4e75 rts
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
4ddf8: 202e fffc movel %fp@(-4),%d0
4ddfc: 60b0 bras 4ddae <rtems_string_to_unsigned_int+0x46>
...
0004deb0 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
4deb0: 4e56 ffe8 linkw %fp,#-24
4deb4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4deb8: 242e 0008 movel %fp@(8),%d2
4debc: 246e 000c moveal %fp@(12),%a2
4dec0: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4dec4: 4a8a tstl %a2
4dec6: 676c beqs 4df34 <rtems_string_to_unsigned_long+0x84>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4dec8: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4
4dece: 4e94 jsr %a4@
4ded0: 2040 moveal %d0,%a0
4ded2: 4290 clrl %a0@
*n = 0;
result = strtoul( s, &end, base );
4ded4: 2f2e 0014 movel %fp@(20),%sp@-
4ded8: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4dedc: 4292 clrl %a2@
result = strtoul( s, &end, base );
4dede: 2f02 movel %d2,%sp@-
4dee0: 4eb9 0005 2da6 jsr 52da6 <strtoul>
if ( endptr )
4dee6: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4deea: 2600 movel %d0,%d3
if ( endptr )
4deec: 4a8b tstl %a3
4deee: 6750 beqs 4df40 <rtems_string_to_unsigned_long+0x90>
*endptr = end;
4def0: 202e fffc movel %fp@(-4),%d0
4def4: 2680 movel %d0,%a3@
if ( end == s )
4def6: b082 cmpl %d2,%d0
4def8: 672e beqs 4df28 <rtems_string_to_unsigned_long+0x78>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4defa: 4e94 jsr %a4@
4defc: 7222 moveq #34,%d1
4defe: 2040 moveal %d0,%a0
4df00: b290 cmpl %a0@,%d1
4df02: 670e beqs 4df12 <rtems_string_to_unsigned_long+0x62>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4df04: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4df06: 4280 clrl %d0
}
4df08: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4df0e: 4e5e unlk %fp
4df10: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
4df12: 2003 movel %d3,%d0
4df14: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4df16: 72fd moveq #-3,%d1
4df18: b280 cmpl %d0,%d1
4df1a: 64e8 bccs 4df04 <rtems_string_to_unsigned_long+0x54><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4df1c: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4df1e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4df24: 4e5e unlk %fp
4df26: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4df28: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4df2a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4df30: 4e5e unlk %fp
4df32: 4e75 rts
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4df34: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4df36: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4df3c: 4e5e unlk %fp
4df3e: 4e75 rts
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
4df40: 202e fffc movel %fp@(-4),%d0
4df44: 60b0 bras 4def6 <rtems_string_to_unsigned_long+0x46>
...
0004de00 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
4de00: 4e56 ffdc linkw %fp,#-36
4de04: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
4de08: 242e 0008 movel %fp@(8),%d2
4de0c: 246e 000c moveal %fp@(12),%a2
4de10: 266e 0010 moveal %fp@(16),%a3
unsigned long long result;
char *end;
if ( !n )
4de14: 4a8a tstl %a2
4de16: 6700 0084 beqw 4de9c <rtems_string_to_unsigned_long_long+0x9c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4de1a: 49f9 0004 fe64 lea 4fe64 <__errno>,%a4
4de20: 4e94 jsr %a4@
4de22: 2040 moveal %d0,%a0
*n = 0;
4de24: 4280 clrl %d0
4de26: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4de28: 4290 clrl %a0@
*n = 0;
4de2a: 2480 movel %d0,%a2@
4de2c: 2541 0004 movel %d1,%a2@(4)
result = strtoull( s, &end, base );
4de30: 2f2e 0014 movel %fp@(20),%sp@-
4de34: 486e fffc pea %fp@(-4)
4de38: 2f02 movel %d2,%sp@-
4de3a: 4eb9 0005 2dc8 jsr 52dc8 <strtoull>
if ( endptr )
4de40: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
4de44: 2600 movel %d0,%d3
4de46: 2801 movel %d1,%d4
if ( endptr )
4de48: 4a8b tstl %a3
4de4a: 675c beqs 4dea8 <rtems_string_to_unsigned_long_long+0xa8>
*endptr = end;
4de4c: 202e fffc movel %fp@(-4),%d0
4de50: 2680 movel %d0,%a3@
if ( end == s )
4de52: b082 cmpl %d2,%d0
4de54: 673a beqs 4de90 <rtems_string_to_unsigned_long_long+0x90>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4de56: 4e94 jsr %a4@
4de58: 7222 moveq #34,%d1
4de5a: 2040 moveal %d0,%a0
4de5c: b290 cmpl %a0@,%d1
4de5e: 6712 beqs 4de72 <rtems_string_to_unsigned_long_long+0x72>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4de60: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4de62: 2483 movel %d3,%a2@
4de64: 2544 0004 movel %d4,%a2@(4)
return RTEMS_SUCCESSFUL;
}
4de68: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4
4de6e: 4e5e unlk %fp
4de70: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4de72: 70ff moveq #-1,%d0
4de74: 72ff moveq #-1,%d1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4de76: 7aff moveq #-1,%d5
4de78: 7cfd moveq #-3,%d6
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4de7a: d284 addl %d4,%d1
4de7c: d183 addxl %d3,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4de7e: 9c81 subl %d1,%d6
4de80: 9b80 subxl %d0,%d5
4de82: 64dc bccs 4de60 <rtems_string_to_unsigned_long_long+0x60><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
4de84: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4de86: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4
4de8c: 4e5e unlk %fp
4de8e: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4de90: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4de92: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4
4de98: 4e5e unlk %fp
4de9a: 4e75 rts
{
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4de9c: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4de9e: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4
4dea4: 4e5e unlk %fp
4dea6: 4e75 rts
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
if ( endptr )
4dea8: 202e fffc movel %fp@(-4),%d0
4deac: 60a4 bras 4de52 <rtems_string_to_unsigned_long_long+0x52>
...
00042b8c <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
42b8c: 4e56 fe44 linkw %fp,#-444
42b90: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42b94: 2f2e 0008 movel %fp@(8),%sp@-
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
42b98: 2a2e 000c movel %fp@(12),%d5
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42b9c: 4eb9 0005 21ac jsr 521ac <strlen>
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
42ba2: 2c2e 0010 movel %fp@(16),%d6
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42ba6: 4297 clrl %sp@
42ba8: 486e ffe8 pea %fp@(-24)
42bac: 42a7 clrl %sp@-
42bae: 2f00 movel %d0,%sp@-
42bb0: 2f2e 0008 movel %fp@(8),%sp@-
42bb4: 4eb9 0004 36e4 jsr 436e4 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
42bba: 4fef 0014 lea %sp@(20),%sp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42bbe: 2d40 fe6c movel %d0,%fp@(-404)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
42bc2: 6600 0168 bnew 42d2c <rtems_tarfs_load+0x1a0>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42bc6: 202e fff4 movel %fp@(-12),%d0
42bca: 0c80 0006 1c00 cmpil #400384,%d0
42bd0: 6600 01b8 bnew 42d8a <rtems_tarfs_load+0x1fe>
42bd4: 95ca subal %a2,%a2
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42bd6: 280e movel %fp,%d4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
42bd8: 240a movel %a2,%d2
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42bda: 0684 ffff ff70 addil #-144,%d4
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
42be0: 4bee fe70 lea %fp@(-400),%a5
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
42be4: 0682 0000 0200 addil #512,%d2
42bea: bc82 cmpl %d2,%d6
42bec: 6500 0098 bcsw 42c86 <rtems_tarfs_load+0xfa>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
42bf0: 4878 0005 pea 5 <COMPARE>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
42bf4: 45f2 5800 lea %a2@(00000000,%d5:l),%a2
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
42bf8: 4879 0006 1c48 pea 61c48 <IMFS_ops+0x48>
42bfe: 486a 0101 pea %a2@(257)
42c02: 4eb9 0005 21c4 jsr 521c4 <strncmp>
42c08: 4fef 000c lea %sp@(12),%sp
42c0c: 4a80 tstl %d0
42c0e: 6676 bnes 42c86 <rtems_tarfs_load+0xfa>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42c10: 4878 0063 pea 63 <DBL_MANT_DIG+0x2e>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42c14: 47f9 0004 ac68 lea 4ac68 <_rtems_octal2ulong>,%a3
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42c1a: 2f0a movel %a2,%sp@-
42c1c: 2f04 movel %d4,%sp@-
42c1e: 4eb9 0005 22b4 jsr 522b4 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42c24: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
42c28: 486a 0064 pea %a2@(100)
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
42c2c: 4200 clrb %d0
42c2e: 1d40 ffd3 moveb %d0,%fp@(-45)
linkflag = hdr_ptr[156];
42c32: 162a 009c moveb %a2@(156),%d3
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42c36: 4e93 jsr %a3@
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42c38: 4878 000c pea c <OPER1>
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42c3c: 2840 moveal %d0,%a4
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42c3e: 486a 007c pea %a2@(124)
42c42: 4e93 jsr %a3@
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42c44: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42c48: 2e00 movel %d0,%d7
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42c4a: 486a 0094 pea %a2@(148)
42c4e: 4e93 jsr %a3@
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
42c50: 4fef 0020 lea %sp@(32),%sp
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42c54: 2640 moveal %d0,%a3
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
42c56: 2e8a movel %a2,%sp@
42c58: 4eb9 0004 b116 jsr 4b116 <_rtems_tar_header_checksum>
42c5e: 588f addql #4,%sp
42c60: b7c0 cmpal %d0,%a3
42c62: 6622 bnes 42c86 <rtems_tarfs_load+0xfa> <== NEVER TAKEN
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
42c64: 7235 moveq #53,%d1
42c66: 0283 0000 00ff andil #255,%d3
42c6c: b283 cmpl %d3,%d1
42c6e: 676c beqs 42cdc <rtems_tarfs_load+0x150>
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
42c70: 7030 moveq #48,%d0
42c72: b083 cmpl %d3,%d0
42c74: 671e beqs 42c94 <rtems_tarfs_load+0x108>
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42c76: 2442 moveal %d2,%a2
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
42c78: 240a movel %a2,%d2
42c7a: 0682 0000 0200 addil #512,%d2
42c80: bc82 cmpl %d2,%d6
42c82: 6400 ff6c bccw 42bf0 <rtems_tarfs_load+0x64>
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
42c86: 202e fe6c movel %fp@(-404),%d0
42c8a: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5
42c90: 4e5e unlk %fp
42c92: 4e75 rts
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
42c94: 486e fffc pea %fp@(-4)
42c98: 486e ffd4 pea %fp@(-44)
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
42c9c: 2d6e ffe8 ffd4 movel %fp@(-24),%fp@(-44)
42ca2: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40)
42ca8: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36)
42cae: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32)
42cb4: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
42cba: 2f04 movel %d4,%sp@-
42cbc: 4eb9 0004 ba02 jsr 4ba02 <IMFS_evaluate_for_make>
42cc2: 4fef 000c lea %sp@(12),%sp
42cc6: 4a80 tstl %d0
42cc8: 6776 beqs 42d40 <rtems_tarfs_load+0x1b4> <== ALWAYS TAKEN
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
42cca: 0687 0000 01ff addil #511,%d7 <== NOT EXECUTED
offset += 512 * nblocks;
42cd0: 0287 ffff fe00 andil #-512,%d7 <== NOT EXECUTED
42cd6: d487 addl %d7,%d2 <== NOT EXECUTED
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42cd8: 2442 moveal %d2,%a2
42cda: 609c bras 42c78 <rtems_tarfs_load+0xec>
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
42cdc: 2f2e 0008 movel %fp@(8),%sp@-
if (full_filename[strlen(full_filename)-1] != '/')
42ce0: 762f moveq #47,%d3
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
42ce2: 2f0d movel %a5,%sp@-
42ce4: 4eb9 0005 1d00 jsr 51d00 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
42cea: 2f0d movel %a5,%sp@-
42cec: 4eb9 0005 21ac jsr 521ac <strlen>
42cf2: 4fef 000c lea %sp@(12),%sp
42cf6: 41f6 0800 lea %fp@(00000000,%d0:l),%a0
42cfa: 1228 fe6f moveb %a0@(-401),%d1
42cfe: 49c1 extbl %d1
42d00: b681 cmpl %d1,%d3
42d02: 6708 beqs 42d0c <rtems_tarfs_load+0x180> <== ALWAYS TAKEN
strcat(full_filename, "/");
42d04: 323c 2f00 movew #12032,%d1 <== NOT EXECUTED
42d08: 3b81 0800 movew %d1,%a5@(00000000,%d0:l) <== NOT EXECUTED
strcat(full_filename, filename);
42d0c: 2f04 movel %d4,%sp@-
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42d0e: 2442 moveal %d2,%a2
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
if (full_filename[strlen(full_filename)-1] != '/')
strcat(full_filename, "/");
strcat(full_filename, filename);
42d10: 2f0d movel %a5,%sp@-
42d12: 4eb9 0005 1be8 jsr 51be8 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
42d18: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
42d1c: 2f0d movel %a5,%sp@-
42d1e: 4eb9 0004 4040 jsr 44040 <mkdir>
42d24: 4fef 0010 lea %sp@(16),%sp
42d28: 6000 ff4e braw 42c78 <rtems_tarfs_load+0xec>
0,
&root_loc,
0
);
if (status != 0)
return -1;
42d2c: 76ff moveq #-1,%d3
42d2e: 2d43 fe6c movel %d3,%fp@(-404)
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
42d32: 202e fe6c movel %fp@(-404),%d0
42d36: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5
42d3c: 4e5e unlk %fp
42d3e: 4e75 rts
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
42d40: 200c movel %a4,%d0
42d42: 0280 0000 01ff andil #511,%d0
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
42d48: 42a7 clrl %sp@-
42d4a: 08c0 000f bset #15,%d0
42d4e: 2f00 movel %d0,%sp@-
42d50: 2f2e fffc movel %fp@(-4),%sp@-
42d54: 4878 0006 pea 6 <EXTENDSFDF>
42d58: 486e ffd4 pea %fp@(-44)
42d5c: 4eb9 0004 b2e8 jsr 4b2e8 <IMFS_create_node>
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
42d62: 4fef 0014 lea %sp@(20),%sp
42d66: 2205 movel %d5,%d1
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
42d68: 2040 moveal %d0,%a0
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
42d6a: d282 addl %d2,%d1
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
42d6c: 2147 0050 movel %d7,%a0@(80)
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
42d70: 0687 0000 01ff addil #511,%d7
offset += 512 * nblocks;
42d76: 0287 ffff fe00 andil #-512,%d7
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
42d7c: 2141 0054 movel %d1,%a0@(84)
}
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
42d80: d487 addl %d7,%d2
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
42d82: 42a8 004c clrl %a0@(76)
42d86: 6000 ff50 braw 42cd8 <rtems_tarfs_load+0x14c>
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42d8a: 0c80 0006 2450 cmpil #402512,%d0
42d90: 6700 fe42 beqw 42bd4 <rtems_tarfs_load+0x48>
return -1;
42d94: 70ff moveq #-1,%d0
42d96: 2d40 fe6c movel %d0,%fp@(-404)
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
42d9a: 202e fe6c movel %fp@(-404),%d0
42d9e: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5
42da4: 4e5e unlk %fp <== NOT EXECUTED
0004d628 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4d628: 4e56 ffe4 linkw %fp,#-28
4d62c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4d630: 2a2e 0008 movel %fp@(8),%d5
4d634: 242e 000c movel %fp@(12),%d2
4d638: 286e 0010 moveal %fp@(16),%a4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4d63c: 4a8c tstl %a4
4d63e: 6700 015a beqw 4d79a <rtems_task_mode+0x172>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4d642: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4d648: 4a2a 0074 tstb %a2@(116)
4d64c: 57c3 seq %d3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4d64e: 266a 00fc moveal %a2@(252),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4d652: 49c3 extbl %d3
4d654: 0283 0000 0100 andil #256,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4d65a: 4aaa 007a tstl %a2@(122)
4d65e: 6600 00cc bnew 4d72c <rtems_task_mode+0x104>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4d662: 4a2b 0008 tstb %a3@(8)
4d666: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4d668: 4eb9 0004 9f28 jsr 49f28 <_CPU_ISR_Get_level>
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;
4d66e: 49c4 extbl %d4
4d670: 0284 0000 0400 andil #1024,%d4
4d676: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4d678: 8083 orl %d3,%d0
4d67a: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4d67c: 0802 0008 btst #8,%d2
4d680: 670c beqs 4d68e <rtems_task_mode+0x66>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4d682: 0805 0008 btst #8,%d5
4d686: 57c0 seq %d0
4d688: 4480 negl %d0
4d68a: 1540 0074 moveb %d0,%a2@(116)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4d68e: 0802 0009 btst #9,%d2
4d692: 6718 beqs 4d6ac <rtems_task_mode+0x84>
if ( _Modes_Is_timeslice(mode_set) ) {
4d694: 0805 0009 btst #9,%d5
4d698: 6700 00ee beqw 4d788 <rtems_task_mode+0x160>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4d69c: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4d69e: 41f9 0005 f400 lea 5f400 <_Thread_Ticks_per_timeslice>,%a0
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;
4d6a4: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4d6a8: 2550 0076 movel %a0@,%a2@(118)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4d6ac: 7007 moveq #7,%d0
4d6ae: c082 andl %d2,%d0
4d6b0: 6712 beqs 4d6c4 <rtems_task_mode+0x9c>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4d6b2: 40c0 movew %sr,%d0
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4d6b4: 7207 moveq #7,%d1
4d6b6: c285 andl %d5,%d1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4d6b8: 0280 0000 f8ff andil #63743,%d0
4d6be: e189 lsll #8,%d1
4d6c0: 8081 orl %d1,%d0
4d6c2: 46c0 movew %d0,%sr
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4d6c4: 0802 000a btst #10,%d2
4d6c8: 6754 beqs 4d71e <rtems_task_mode+0xf6>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4d6ca: 4282 clrl %d2
4d6cc: 142b 0008 moveb %a3@(8),%d2
4d6d0: 4280 clrl %d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4d6d2: 0805 000a btst #10,%d5
4d6d6: 57c1 seq %d1
4d6d8: 4481 negl %d1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4d6da: 1001 moveb %d1,%d0
4d6dc: b082 cmpl %d2,%d0
4d6de: 673e beqs 4d71e <rtems_task_mode+0xf6>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4d6e0: 203c 0000 0700 movel #1792,%d0
asr->is_enabled = is_asr_enabled;
4d6e6: 1741 0008 moveb %d1,%a3@(8)
4d6ea: 40c1 movew %sr,%d1
4d6ec: 8081 orl %d1,%d0
4d6ee: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4d6f0: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
4d6f4: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
4d6fa: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
4d6fe: 46c1 movew %d1,%sr
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4d700: 4aab 0012 tstl %a3@(18)
4d704: 56c0 sne %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d706: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4d708: 4480 negl %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d70a: b2b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d1
4d710: 6744 beqs 4d756 <rtems_task_mode+0x12e> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
4d712: 4280 clrl %d0
}
4d714: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4d71a: 4e5e unlk %fp
4d71c: 4e75 rts
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d71e: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4d720: 4200 clrb %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d722: b2b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d1
4d728: 66e8 bnes 4d712 <rtems_task_mode+0xea>
4d72a: 602a bras 4d756 <rtems_task_mode+0x12e>
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;
4d72c: 4a2b 0008 tstb %a3@(8)
4d730: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4d732: 4eb9 0004 9f28 jsr 49f28 <_CPU_ISR_Get_level>
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;
4d738: 49c4 extbl %d4
4d73a: 0284 0000 0400 andil #1024,%d4
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4d740: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4d744: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4d746: 8083 orl %d3,%d0
4d748: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4d74a: 0802 0008 btst #8,%d2
4d74e: 6700 ff3e beqw 4d68e <rtems_task_mode+0x66>
4d752: 6000 ff2e braw 4d682 <rtems_task_mode+0x5a>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4d756: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
if ( are_signals_pending ||
4d75c: 4a00 tstb %d0
4d75e: 660e bnes 4d76e <rtems_task_mode+0x146>
4d760: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
4d766: 67aa beqs 4d712 <rtems_task_mode+0xea>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
4d768: 4a28 0074 tstb %a0@(116)
4d76c: 67a4 beqs 4d712 <rtems_task_mode+0xea> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
4d76e: 7001 moveq #1,%d0
4d770: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
4d776: 4eb9 0004 8b6c jsr 48b6c <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
}
4d77c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
4d782: 4280 clrl %d0
}
4d784: 4e5e unlk %fp
4d786: 4e75 rts
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4d788: 7007 moveq #7,%d0
4d78a: c082 andl %d2,%d0
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4d78c: 42aa 007a clrl %a2@(122)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4d790: 4a80 tstl %d0
4d792: 6700 ff30 beqw 4d6c4 <rtems_task_mode+0x9c>
4d796: 6000 ff1a braw 4d6b2 <rtems_task_mode+0x8a>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
4d79a: 7009 moveq #9,%d0
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
4d79c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4d7a2: 4e5e unlk %fp
...
0004b00c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4b00c: 4e56 fffc linkw %fp,#-4
4b010: 2f0a movel %a2,%sp@-
4b012: 246e 0010 moveal %fp@(16),%a2
4b016: 2f02 movel %d2,%sp@-
4b018: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4b01c: 670c beqs 4b02a <rtems_task_set_priority+0x1e>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
4b01e: 4280 clrl %d0
4b020: 1039 0006 1f72 moveb 61f72 <rtems_maximum_priority>,%d0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4b026: b082 cmpl %d2,%d0
4b028: 6566 bcss 4b090 <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4b02a: 4a8a tstl %a2
4b02c: 6770 beqs 4b09e <rtems_task_set_priority+0x92>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4b02e: 486e fffc pea %fp@(-4)
4b032: 2f2e 0008 movel %fp@(8),%sp@-
4b036: 4eb9 0004 d33c jsr 4d33c <_Thread_Get>
switch ( location ) {
4b03c: 508f addql #8,%sp
4b03e: 4aae fffc tstl %fp@(-4)
4b042: 663e bnes 4b082 <rtems_task_set_priority+0x76>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4b044: 2040 moveal %d0,%a0
4b046: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4b04a: 4a82 tstl %d2
4b04c: 6720 beqs 4b06e <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4b04e: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4b052: 4aa8 001c tstl %a0@(28)
4b056: 6706 beqs 4b05e <rtems_task_set_priority+0x52>
4b058: b4a8 0014 cmpl %a0@(20),%d2
4b05c: 6410 bccs 4b06e <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
4b05e: 42a7 clrl %sp@-
4b060: 2f02 movel %d2,%sp@-
4b062: 2f00 movel %d0,%sp@-
4b064: 4eb9 0004 ce64 jsr 4ce64 <_Thread_Change_priority>
4b06a: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4b06e: 4eb9 0004 d316 jsr 4d316 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b074: 242e fff4 movel %fp@(-12),%d2
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
4b078: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b07a: 246e fff8 moveal %fp@(-8),%a2
4b07e: 4e5e unlk %fp
4b080: 4e75 rts
4b082: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4b086: 7004 moveq #4,%d0
}
4b088: 246e fff8 moveal %fp@(-8),%a2
4b08c: 4e5e unlk %fp
4b08e: 4e75 rts
4b090: 242e fff4 movel %fp@(-12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
4b094: 7013 moveq #19,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b096: 246e fff8 moveal %fp@(-8),%a2
4b09a: 4e5e unlk %fp
4b09c: 4e75 rts
4b09e: 242e fff4 movel %fp@(-12),%d2
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
4b0a2: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b0a4: 246e fff8 moveal %fp@(-8),%a2
4b0a8: 4e5e unlk %fp <== NOT EXECUTED
00047b78 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
47b78: 4e56 fffc linkw %fp,#-4
47b7c: 2f02 movel %d2,%sp@-
47b7e: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47b82: 6772 beqs 47bf6 <rtems_task_variable_delete+0x7e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47b84: 486e fffc pea %fp@(-4)
47b88: 2f2e 0008 movel %fp@(8),%sp@-
47b8c: 4eb9 0004 9c98 jsr 49c98 <_Thread_Get>
switch (location) {
47b92: 508f addql #8,%sp
47b94: 4aae fffc tstl %fp@(-4)
47b98: 6634 bnes 47bce <rtems_task_variable_delete+0x56>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
47b9a: 2040 moveal %d0,%a0
47b9c: 2268 0108 moveal %a0@(264),%a1
while (tvp) {
47ba0: 4a89 tstl %a1
47ba2: 671a beqs 47bbe <rtems_task_variable_delete+0x46>
if (tvp->ptr == ptr) {
47ba4: b4a9 0004 cmpl %a1@(4),%d2
47ba8: 6756 beqs 47c00 <rtems_task_variable_delete+0x88>
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
47baa: 2051 moveal %a1@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
47bac: 4a88 tstl %a0
47bae: 670e beqs 47bbe <rtems_task_variable_delete+0x46><== NEVER TAKEN
if (tvp->ptr == ptr) {
47bb0: b4a8 0004 cmpl %a0@(4),%d2
47bb4: 6722 beqs 47bd8 <rtems_task_variable_delete+0x60>
47bb6: 2248 moveal %a0,%a1
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
47bb8: 2051 moveal %a1@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
47bba: 4a88 tstl %a0
47bbc: 66f2 bnes 47bb0 <rtems_task_variable_delete+0x38><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47bbe: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bc4: 242e fff8 movel %fp@(-8),%d2
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47bc8: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bca: 4e5e unlk %fp
47bcc: 4e75 rts
47bce: 242e fff8 movel %fp@(-8),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
47bd2: 7004 moveq #4,%d0
}
47bd4: 4e5e unlk %fp
47bd6: 4e75 rts
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
47bd8: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47bda: 2f08 movel %a0,%sp@-
47bdc: 2f00 movel %d0,%sp@-
47bde: 4eb9 0004 7cac jsr 47cac <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47be4: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47bea: 508f addql #8,%sp
47bec: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bee: 242e fff8 movel %fp@(-8),%d2
47bf2: 4e5e unlk %fp
47bf4: 4e75 rts
47bf6: 242e fff8 movel %fp@(-8),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
47bfa: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bfc: 4e5e unlk %fp
47bfe: 4e75 rts
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
47c00: 2040 moveal %d0,%a0
47c02: 2151 0108 movel %a1@,%a0@(264)
47c06: 2049 moveal %a1,%a0
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47c08: 2f08 movel %a0,%sp@-
47c0a: 2f00 movel %d0,%sp@-
47c0c: 4eb9 0004 7cac jsr 47cac <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47c12: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47c18: 508f addql #8,%sp
47c1a: 4280 clrl %d0
47c1c: 60d0 bras 47bee <rtems_task_variable_delete+0x76>
...
00047c20 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
47c20: 4e56 fffc linkw %fp,#-4
47c24: 2f0a movel %a2,%sp@-
47c26: 246e 0010 moveal %fp@(16),%a2
47c2a: 2f02 movel %d2,%sp@-
47c2c: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
47c30: 6752 beqs 47c84 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
47c32: 4a8a tstl %a2
47c34: 674e beqs 47c84 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
47c36: 486e fffc pea %fp@(-4)
47c3a: 2f2e 0008 movel %fp@(8),%sp@-
47c3e: 4eb9 0004 9c98 jsr 49c98 <_Thread_Get>
switch (location) {
47c44: 508f addql #8,%sp
47c46: 4aae fffc tstl %fp@(-4)
47c4a: 662a bnes 47c76 <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
47c4c: 2240 moveal %d0,%a1
47c4e: 2069 0108 moveal %a1@(264),%a0
while (tvp) {
47c52: 4a88 tstl %a0
47c54: 670c beqs 47c62 <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
47c56: b4a8 0004 cmpl %a0@(4),%d2
47c5a: 6736 beqs 47c92 <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
47c5c: 2050 moveal %a0@,%a0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
47c5e: 4a88 tstl %a0
47c60: 66f4 bnes 47c56 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47c62: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c68: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47c6c: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c6e: 246e fff8 moveal %fp@(-8),%a2
47c72: 4e5e unlk %fp
47c74: 4e75 rts
47c76: 242e fff4 movel %fp@(-12),%d2
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
47c7a: 7004 moveq #4,%d0
}
47c7c: 246e fff8 moveal %fp@(-8),%a2
47c80: 4e5e unlk %fp
47c82: 4e75 rts
47c84: 242e fff4 movel %fp@(-12),%d2
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
47c88: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c8a: 246e fff8 moveal %fp@(-8),%a2
47c8e: 4e5e unlk %fp
47c90: 4e75 rts
if (tvp->ptr == ptr) {
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
47c92: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
47c96: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c9c: 242e fff4 movel %fp@(-12),%d2
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47ca0: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47ca2: 246e fff8 moveal %fp@(-8),%a2
47ca6: 4e5e unlk %fp
...
00045ad4 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45ad4: 7209 moveq #9,%d1
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
45ad6: 4e56 0000 linkw %fp,#0
45ada: 202e 0008 movel %fp@(8),%d0
int baud_index;
switch (termios_baud) {
45ade: b280 cmpl %d0,%d1
45ae0: 6700 010a beqw 45bec <rtems_termios_baud_to_index+0x118>
45ae4: 6c32 bges 45b18 <rtems_termios_baud_to_index+0x44>
45ae6: 720e moveq #14,%d1
45ae8: b280 cmpl %d0,%d1
45aea: 6700 00d6 beqw 45bc2 <rtems_termios_baud_to_index+0xee>
45aee: 6c56 bges 45b46 <rtems_termios_baud_to_index+0x72>
45af0: 0c80 0000 1002 cmpil #4098,%d0
45af6: 6700 00e2 beqw 45bda <rtems_termios_baud_to_index+0x106>
45afa: 6f00 0098 blew 45b94 <rtems_termios_baud_to_index+0xc0>
45afe: 0c80 0000 1003 cmpil #4099,%d0
45b04: 6700 00b6 beqw 45bbc <rtems_termios_baud_to_index+0xe8>
45b08: 0c80 0000 1004 cmpil #4100,%d0
45b0e: 6700 009a beqw 45baa <rtems_termios_baud_to_index+0xd6>
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
45b12: 70ff moveq #-1,%d0
}
return baud_index;
}
45b14: 4e5e unlk %fp
45b16: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b18: 123c 0004 moveb #4,%d1
45b1c: b280 cmpl %d0,%d1
45b1e: 6700 00d2 beqw 45bf2 <rtems_termios_baud_to_index+0x11e>
45b22: 6d46 blts 45b6a <rtems_termios_baud_to_index+0x96>
45b24: 123c 0001 moveb #1,%d1
45b28: b280 cmpl %d0,%d1
45b2a: 6700 00a2 beqw 45bce <rtems_termios_baud_to_index+0xfa>
45b2e: 6c00 00c8 bgew 45bf8 <rtems_termios_baud_to_index+0x124>
45b32: 7202 moveq #2,%d1
45b34: b280 cmpl %d0,%d1
45b36: 677e beqs 45bb6 <rtems_termios_baud_to_index+0xe2>
45b38: 123c 0003 moveb #3,%d1
45b3c: b280 cmpl %d0,%d1
45b3e: 66d2 bnes 45b12 <rtems_termios_baud_to_index+0x3e><== NEVER TAKEN
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
45b40: 7003 moveq #3,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b42: 4e5e unlk %fp
45b44: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b46: 123c 000b moveb #11,%d1
45b4a: b280 cmpl %d0,%d1
45b4c: 6700 0086 beqw 45bd4 <rtems_termios_baud_to_index+0x100>
45b50: 6e3c bgts 45b8e <rtems_termios_baud_to_index+0xba>
45b52: 123c 000c moveb #12,%d1
45b56: b280 cmpl %d0,%d1
45b58: 6700 008c beqw 45be6 <rtems_termios_baud_to_index+0x112>
45b5c: 123c 000d moveb #13,%d1
45b60: b280 cmpl %d0,%d1
45b62: 66ae bnes 45b12 <rtems_termios_baud_to_index+0x3e><== NEVER TAKEN
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
45b64: 700d moveq #13,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b66: 4e5e unlk %fp
45b68: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b6a: 7206 moveq #6,%d1
45b6c: b280 cmpl %d0,%d1
45b6e: 6758 beqs 45bc8 <rtems_termios_baud_to_index+0xf4>
45b70: 6e16 bgts 45b88 <rtems_termios_baud_to_index+0xb4>
45b72: 123c 0007 moveb #7,%d1
45b76: b280 cmpl %d0,%d1
45b78: 6766 beqs 45be0 <rtems_termios_baud_to_index+0x10c>
45b7a: 123c 0008 moveb #8,%d1
45b7e: b280 cmpl %d0,%d1
45b80: 6690 bnes 45b12 <rtems_termios_baud_to_index+0x3e><== NEVER TAKEN
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
45b82: 7008 moveq #8,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b84: 4e5e unlk %fp
45b86: 4e75 rts
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
45b88: 7005 moveq #5,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b8a: 4e5e unlk %fp
45b8c: 4e75 rts
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
45b8e: 700a moveq #10,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b90: 4e5e unlk %fp
45b92: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b94: 720f moveq #15,%d1
45b96: b280 cmpl %d0,%d1
45b98: 6716 beqs 45bb0 <rtems_termios_baud_to_index+0xdc>
45b9a: 0c80 0000 1001 cmpil #4097,%d0
45ba0: 6600 ff70 bnew 45b12 <rtems_termios_baud_to_index+0x3e>
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
45ba4: 7010 moveq #16,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45ba6: 4e5e unlk %fp
45ba8: 4e75 rts
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
45baa: 7013 moveq #19,%d0
default: baud_index = -1; break;
}
return baud_index;
}
45bac: 4e5e unlk %fp
45bae: 4e75 rts
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
45bb0: 700f moveq #15,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bb2: 4e5e unlk %fp
45bb4: 4e75 rts
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
45bb6: 7002 moveq #2,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bb8: 4e5e unlk %fp
45bba: 4e75 rts
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
45bbc: 7012 moveq #18,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bbe: 4e5e unlk %fp
45bc0: 4e75 rts
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
45bc2: 700e moveq #14,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bc4: 4e5e unlk %fp
45bc6: 4e75 rts
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
45bc8: 7006 moveq #6,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bca: 4e5e unlk %fp
45bcc: 4e75 rts
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
45bce: 7001 moveq #1,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bd0: 4e5e unlk %fp
45bd2: 4e75 rts
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
45bd4: 700b moveq #11,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bd6: 4e5e unlk %fp
45bd8: 4e75 rts
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
45bda: 7011 moveq #17,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bdc: 4e5e unlk %fp
45bde: 4e75 rts
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
45be0: 7007 moveq #7,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45be2: 4e5e unlk %fp
45be4: 4e75 rts
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
45be6: 700c moveq #12,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45be8: 4e5e unlk %fp
45bea: 4e75 rts
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
45bec: 7009 moveq #9,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bee: 4e5e unlk %fp
45bf0: 4e75 rts
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
45bf2: 7004 moveq #4,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bf4: 4e5e unlk %fp
45bf6: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45bf8: 4a80 tstl %d0
45bfa: 6600 ff16 bnew 45b12 <rtems_termios_baud_to_index+0x3e>
case B0: baud_index = 0; break;
45bfe: 4280 clrl %d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45c00: 4e5e unlk %fp <== NOT EXECUTED
00044496 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
44496: 4e56 fff4 linkw %fp,#-12
4449a: 48d7 1c00 moveml %a2-%a4,%sp@
4449e: 266e 0008 moveal %fp@(8),%a3
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
444a2: 49f9 0004 6768 lea 46768 <rtems_semaphore_obtain>,%a4
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
444a8: 2053 moveal %a3@,%a0
444aa: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain(
444ae: 42a7 clrl %sp@-
444b0: 42a7 clrl %sp@-
444b2: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
444b8: 4e94 jsr %a4@
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
444ba: 4fef 000c lea %sp@(12),%sp
444be: 4a80 tstl %d0
444c0: 6600 011c bnew 445de <rtems_termios_close+0x148>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
444c4: 202a 0008 movel %a2@(8),%d0
444c8: 5380 subql #1,%d0
444ca: 2540 0008 movel %d0,%a2@(8)
444ce: 6600 00a4 bnew 44574 <rtems_termios_close+0xde>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
444d2: 202a 00cc movel %a2@(204),%d0
444d6: eb88 lsll #5,%d0
444d8: 0680 0005 eb04 addil #387844,%d0
444de: 2240 moveal %d0,%a1
444e0: 2051 moveal %a1@,%a0
444e2: 4a88 tstl %a0
444e4: 6700 0128 beqw 4460e <rtems_termios_close+0x178>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
444e8: 2f0a movel %a2,%sp@-
444ea: 4e90 jsr %a0@
444ec: 588f addql #4,%sp
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
444ee: 7002 moveq #2,%d0
444f0: b0aa 00b4 cmpl %a2@(180),%d0
444f4: 6700 00c0 beqw 445b6 <rtems_termios_close+0x120>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
444f8: 206a 009c moveal %a2@(156),%a0
444fc: 4a88 tstl %a0
444fe: 6710 beqs 44510 <rtems_termios_close+0x7a>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
44500: 2f0b movel %a3,%sp@-
44502: 2f2a 0010 movel %a2@(16),%sp@-
44506: 2f2a 000c movel %a2@(12),%sp@-
4450a: 4e90 jsr %a0@
4450c: 4fef 000c lea %sp@(12),%sp
if (tty->forw == NULL) {
44510: 2052 moveal %a2@,%a0
44512: 4a88 tstl %a0
44514: 6700 00e2 beqw 445f8 <rtems_termios_close+0x162>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
44518: 216a 0004 0004 movel %a2@(4),%a0@(4)
4451e: 226a 0004 moveal %a2@(4),%a1
}
if (tty->back == NULL) {
44522: 4a89 tstl %a1
44524: 6700 00c0 beqw 445e6 <rtems_termios_close+0x150>
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
44528: 2288 movel %a0,%a1@ <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
4452a: 2f2a 0014 movel %a2@(20),%sp@-
4452e: 47f9 0004 6690 lea 46690 <rtems_semaphore_delete>,%a3
44534: 4e93 jsr %a3@
rtems_semaphore_delete (tty->osem);
44536: 2f2a 0018 movel %a2@(24),%sp@-
4453a: 4e93 jsr %a3@
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
4453c: 2f2a 008c movel %a2@(140),%sp@-
44540: 4e93 jsr %a3@
if ((tty->device.pollRead == NULL) ||
44542: 4fef 000c lea %sp@(12),%sp
44546: 4aaa 00a0 tstl %a2@(160)
4454a: 6740 beqs 4458c <rtems_termios_close+0xf6>
4454c: 7002 moveq #2,%d0
4454e: b0aa 00b4 cmpl %a2@(180),%d0
44552: 6738 beqs 4458c <rtems_termios_close+0xf6>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
44554: 2f2a 0058 movel %a2@(88),%sp@-
44558: 47f9 0004 2fe4 lea 42fe4 <free>,%a3
4455e: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
44560: 2f2a 007c movel %a2@(124),%sp@-
44564: 4e93 jsr %a3@
free (tty->cbuf);
44566: 2f2a 001c movel %a2@(28),%sp@-
4456a: 4e93 jsr %a3@
free (tty);
4456c: 2f0a movel %a2,%sp@-
4456e: 4e93 jsr %a3@
44570: 4fef 0010 lea %sp@(16),%sp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
44574: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
4457a: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
44580: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
44586: 4280 clrl %d0
44588: 4e5e unlk %fp
4458a: 4e75 rts
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
4458c: 2f2a 0068 movel %a2@(104),%sp@-
44590: 4e93 jsr %a3@
44592: 588f addql #4,%sp
free (tty->rawInBuf.theBuf);
44594: 47f9 0004 2fe4 lea 42fe4 <free>,%a3
4459a: 2f2a 0058 movel %a2@(88),%sp@-
4459e: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
445a0: 2f2a 007c movel %a2@(124),%sp@-
445a4: 4e93 jsr %a3@
free (tty->cbuf);
445a6: 2f2a 001c movel %a2@(28),%sp@-
445aa: 4e93 jsr %a3@
free (tty);
445ac: 2f0a movel %a2,%sp@-
445ae: 4e93 jsr %a3@
445b0: 4fef 0010 lea %sp@(16),%sp
445b4: 60be bras 44574 <rtems_termios_close+0xde>
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
445b6: 4878 0001 pea 1 <ADD>
445ba: 49f9 0004 6258 lea 46258 <rtems_event_send>,%a4
445c0: 2f2a 00c4 movel %a2@(196),%sp@-
445c4: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
445c6: 508f addql #8,%sp
445c8: 4a80 tstl %d0
445ca: 6612 bnes 445de <rtems_termios_close+0x148> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
445cc: 4878 0001 pea 1 <ADD>
445d0: 2f2a 00c8 movel %a2@(200),%sp@-
445d4: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
445d6: 508f addql #8,%sp
445d8: 4a80 tstl %d0
445da: 6700 ff1c beqw 444f8 <rtems_termios_close+0x62>
rtems_fatal_error_occurred (sc);
445de: 2f00 movel %d0,%sp@- <== NOT EXECUTED
445e0: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
445e6: 23c8 0005 f344 movel %a0,5f344 <rtems_termios_ttyHead>
if ( rtems_termios_ttyHead != NULL ) {
445ec: 6700 ff3c beqw 4452a <rtems_termios_close+0x94>
rtems_termios_ttyHead->back = NULL;
445f0: 42a8 0004 clrl %a0@(4)
445f4: 6000 ff34 braw 4452a <rtems_termios_close+0x94>
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
445f8: 226a 0004 moveal %a2@(4),%a1
445fc: 23c9 0005 f340 movel %a1,5f340 <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
44602: 67e2 beqs 445e6 <rtems_termios_close+0x150>
rtems_termios_ttyTail->forw = NULL;
44604: 4291 clrl %a1@
44606: 2052 moveal %a2@,%a0
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
44608: 2288 movel %a0,%a1@
4460a: 6000 ff1e braw 4452a <rtems_termios_close+0x94>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4460e: 42a7 clrl %sp@-
44610: 42a7 clrl %sp@-
44612: 2f2a 0018 movel %a2@(24),%sp@-
44616: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
44618: 4fef 000c lea %sp@(12),%sp
4461c: 4a80 tstl %d0
4461e: 66be bnes 445de <rtems_termios_close+0x148> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
44620: 2f0a movel %a2,%sp@-
44622: 4eba f9bc jsr %pc@(43fe0 <drainOutput>)
rtems_semaphore_release (tty->osem);
44626: 2f2a 0018 movel %a2@(24),%sp@-
4462a: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
44630: 508f addql #8,%sp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44632: 7002 moveq #2,%d0
44634: b0aa 00b4 cmpl %a2@(180),%d0
44638: 6600 febe bnew 444f8 <rtems_termios_close+0x62>
4463c: 6000 ff78 braw 445b6 <rtems_termios_close+0x120>
00045c6e <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)
{
45c6e: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
45c72: 202e 000c movel %fp@(12),%d0
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
45c76: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
45c7a: d1a8 0090 addl %d0,%a0@(144)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
45c7e: 7002 moveq #2,%d0
45c80: b0a8 00b4 cmpl %a0@(180),%d0
45c84: 672a beqs 45cb0 <rtems_termios_dequeue_characters+0x42>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
45c86: 7005 moveq #5,%d0
45c88: b0a8 00cc cmpl %a0@(204),%d0
45c8c: 670c beqs 45c9a <rtems_termios_dequeue_characters+0x2c>
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
45c8e: 2d48 0008 movel %a0,%fp@(8)
}
45c92: 4e5e unlk %fp
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
45c94: 4ef9 0004 59ba jmp 459ba <rtems_termios_refill_transmitter>
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
45c9a: 2279 0005 ebb4 moveal 5ebb4 <rtems_termios_linesw+0xb4>,%a1
45ca0: 4a89 tstl %a1
45ca2: 6706 beqs 45caa <rtems_termios_dequeue_characters+0x3c><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
45ca4: 2f08 movel %a0,%sp@-
45ca6: 4e91 jsr %a1@
45ca8: 588f addql #4,%sp
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
45caa: 4280 clrl %d0
45cac: 4e5e unlk %fp
45cae: 4e75 rts
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
45cb0: 4878 0002 pea 2 <DOUBLE_FLOAT>
45cb4: 2f28 00c8 movel %a0@(200),%sp@-
45cb8: 4eb9 0004 6258 jsr 46258 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
45cbe: 508f addql #8,%sp
45cc0: 4a80 tstl %d0
45cc2: 67e6 beqs 45caa <rtems_termios_dequeue_characters+0x3c><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
45cc4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
45cc6: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004566c <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)
{
4566c: 4e56 ffcc linkw %fp,#-52
45670: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
45674: 246e 0008 moveal %fp@(8),%a2
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) {
45678: 202a 00cc movel %a2@(204),%d0
4567c: eb88 lsll #5,%d0
* 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)
{
4567e: 266e 000c moveal %fp@(12),%a3
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) {
45682: 0680 0005 eb10 addil #387856,%d0
45688: 2240 moveal %d0,%a1
* 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)
{
4568a: 242e 0010 movel %fp@(16),%d2
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) {
4568e: 2051 moveal %a1@,%a0
45690: 4a88 tstl %a0
45692: 6774 beqs 45708 <rtems_termios_enqueue_raw_characters+0x9c>
while (len--) {
45694: 4a82 tstl %d2
45696: 6734 beqs 456cc <rtems_termios_enqueue_raw_characters+0x60><== NEVER TAKEN
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
45698: 2f0a movel %a2,%sp@-
4569a: 5382 subql #1,%d2
4569c: 121b moveb %a3@+,%d1
4569e: 49c1 extbl %d1
456a0: 2f01 movel %d1,%sp@-
456a2: 4e90 jsr %a0@
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--) {
456a4: 508f addql #8,%sp
456a6: 4a82 tstl %d2
456a8: 6722 beqs 456cc <rtems_termios_enqueue_raw_characters+0x60><== NEVER TAKEN
456aa: 202a 00cc movel %a2@(204),%d0
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
456ae: 5382 subql #1,%d2
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--) {
456b0: eb88 lsll #5,%d0
456b2: 0680 0005 eb10 addil #387856,%d0
456b8: 2240 moveal %d0,%a1
456ba: 2051 moveal %a1@,%a0
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
456bc: 2f0a movel %a2,%sp@-
456be: 121b moveb %a3@+,%d1
456c0: 49c1 extbl %d1
456c2: 2f01 movel %d1,%sp@-
456c4: 4e90 jsr %a0@
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--) {
456c6: 508f addql #8,%sp
456c8: 4a82 tstl %d2
456ca: 66de bnes 456aa <rtems_termios_enqueue_raw_characters+0x3e>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
456cc: 4aaa 00e4 tstl %a2@(228)
456d0: 6628 bnes 456fa <rtems_termios_enqueue_raw_characters+0x8e><== NEVER TAKEN
456d2: 206a 00dc moveal %a2@(220),%a0
456d6: 4a88 tstl %a0
456d8: 6720 beqs 456fa <rtems_termios_enqueue_raw_characters+0x8e><== NEVER TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
456da: 2f2a 00e0 movel %a2@(224),%sp@-
tty->tty_rcvwakeup = 1;
}
return 0;
456de: 4285 clrl %d5
/*
* 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);
456e0: 486a 0030 pea %a2@(48)
456e4: 4e90 jsr %a0@
tty->tty_rcvwakeup = 1;
456e6: 508f addql #8,%sp
456e8: 7001 moveq #1,%d0
456ea: 2540 00e4 movel %d0,%a2@(228)
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
456ee: 2005 movel %d5,%d0
456f0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
456f6: 4e5e unlk %fp
456f8: 4e75 rts
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
456fa: 4285 clrl %d5 <== NOT EXECUTED
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
456fc: 2005 movel %d5,%d0 <== NOT EXECUTED
456fe: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
45704: 4e5e unlk %fp <== NOT EXECUTED
45706: 4e75 rts <== 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,
45708: 41ea 004a lea %a2@(74),%a0
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) {
4570c: 4285 clrl %d5
}
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);
4570e: 387c 0700 moveaw #1792,%a4
/*
* 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);
45712: 4bea 0030 lea %a2@(48),%a5
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) {
45716: 4200 clrb %d0
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,
45718: 2d48 fffc movel %a0,%fp@(-4)
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) {
4571c: 1d40 fff7 moveb %d0,%fp@(-9)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
45720: 4a82 tstl %d2
45722: 6700 00e6 beqw 4580a <rtems_termios_enqueue_raw_characters+0x19e>
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
45726: 202a 00b8 movel %a2@(184),%d0
}
return 0;
}
while (len--) {
c = *buf++;
4572a: 181b moveb %a3@+,%d4
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
4572c: 0800 0009 btst #9,%d0
45730: 671c beqs 4574e <rtems_termios_enqueue_raw_characters+0xe2>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
45732: 4281 clrl %d1
45734: 122a 004a moveb %a2@(74),%d1
45738: 1004 moveb %d4,%d0
4573a: 49c0 extbl %d0
4573c: b280 cmpl %d0,%d1
4573e: 6700 0146 beqw 45886 <rtems_termios_enqueue_raw_characters+0x21a>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
45742: 4281 clrl %d1
45744: 122a 0049 moveb %a2@(73),%d1
45748: b280 cmpl %d0,%d1
4574a: 6700 00da beqw 45826 <rtems_termios_enqueue_raw_characters+0x1ba>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
4574e: 4a2e fff7 tstb %fp@(-9)
45752: 6600 00e4 bnew 45838 <rtems_termios_enqueue_raw_characters+0x1cc>
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
45756: 2e2a 0060 movel %a2@(96),%d7
4575a: 5287 addql #1,%d7
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
4575c: 200c movel %a4,%d0
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
4575e: 222a 0064 movel %a2@(100),%d1
45762: 4c41 7003 remul %d1,%d3,%d7
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
45766: 40c7 movew %sr,%d7
45768: 8087 orl %d7,%d0
4576a: 46c0 movew %d0,%sr
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
4576c: 222a 005c movel %a2@(92),%d1
45770: 202a 0064 movel %a2@(100),%d0
45774: 9081 subl %d1,%d0
45776: 2240 moveal %d0,%a1
45778: d3c3 addal %d3,%a1
% tty->rawInBuf.Size) > tty->highwater) &&
4577a: 2209 movel %a1,%d1
4577c: 202a 0064 movel %a2@(100),%d0
45780: 4c40 1006 remul %d0,%d6,%d1
45784: 2d40 fff8 movel %d0,%fp@(-8)
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
45788: bcaa 00c0 cmpl %a2@(192),%d6
4578c: 633e blss 457cc <rtems_termios_enqueue_raw_characters+0x160><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
4578e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
45792: 0800 0000 btst #0,%d0 <== NOT EXECUTED
45796: 6634 bnes 457cc <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
45798: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4579c: 7201 moveq #1,%d1 <== NOT EXECUTED
4579e: 8081 orl %d1,%d0 <== NOT EXECUTED
457a0: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
457a4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
457a8: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED
457ae: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED
457b4: 6700 010c beqw 458c2 <rtems_termios_enqueue_raw_characters+0x256><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
457b8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
457bc: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED
457c2: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED
457c8: 6700 0130 beqw 458fa <rtems_termios_enqueue_raw_characters+0x28e><== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
457cc: 46c7 movew %d7,%sr
if (newTail == tty->rawInBuf.Head) {
457ce: 202a 005c movel %a2@(92),%d0
457d2: b680 cmpl %d0,%d3
457d4: 6700 00ce beqw 458a4 <rtems_termios_enqueue_raw_characters+0x238>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
457d8: 206a 0058 moveal %a2@(88),%a0
457dc: 1184 3800 moveb %d4,%a0@(00000000,%d3:l)
tty->rawInBuf.Tail = newTail;
457e0: 2543 0060 movel %d3,%a2@(96)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
457e4: 4aaa 00e4 tstl %a2@(228)
457e8: 6618 bnes 45802 <rtems_termios_enqueue_raw_characters+0x196><== NEVER TAKEN
457ea: 206a 00dc moveal %a2@(220),%a0
457ee: 4a88 tstl %a0
457f0: 6710 beqs 45802 <rtems_termios_enqueue_raw_characters+0x196><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
457f2: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED
457f6: 2f0d movel %a5,%sp@- <== NOT EXECUTED
457f8: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
457fa: 508f addql #8,%sp <== NOT EXECUTED
457fc: 7201 moveq #1,%d1 <== NOT EXECUTED
457fe: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED
45802: 5382 subql #1,%d2
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
45804: 4a82 tstl %d2
45806: 6600 ff1e bnew 45726 <rtems_termios_enqueue_raw_characters+0xba>
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
4580a: 2f2a 0068 movel %a2@(104),%sp@-
}
}
}
}
tty->rawInBufDropped += dropped;
4580e: dbaa 0078 addl %d5,%a2@(120)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
45812: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return dropped;
45818: 588f addql #4,%sp
}
4581a: 2005 movel %d5,%d0
4581c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
45822: 4e5e unlk %fp
45824: 4e75 rts
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
45826: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4582a: 72ef moveq #-17,%d1 <== NOT EXECUTED
4582c: c081 andl %d1,%d0 <== NOT EXECUTED
* 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)
{
4582e: 7c01 moveq #1,%d6 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
45830: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
* 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)
{
45834: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
45838: 202a 00b8 movel %a2@(184),%d0
4583c: 7c30 moveq #48,%d6
4583e: 7220 moveq #32,%d1
45840: c086 andl %d6,%d0
45842: b280 cmpl %d0,%d1
45844: 66bc bnes 45802 <rtems_termios_enqueue_raw_characters+0x196><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
45846: 200c movel %a4,%d0 <== NOT EXECUTED
45848: 40c3 movew %sr,%d3 <== NOT EXECUTED
4584a: 8083 orl %d3,%d0 <== NOT EXECUTED
4584c: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
4584e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45852: 7cdf moveq #-33,%d6 <== NOT EXECUTED
45854: c086 andl %d6,%d0 <== NOT EXECUTED
45856: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
4585a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
4585e: 6606 bnes 45866 <rtems_termios_enqueue_raw_characters+0x1fa><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
45860: 46c3 movew %d3,%sr <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
45862: 5382 subql #1,%d2 <== NOT EXECUTED
45864: 609e bras 45804 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
45866: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
4586a: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
4586e: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED
45872: 2f00 movel %d0,%sp@- <== NOT EXECUTED
45874: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45878: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
4587c: 4e90 jsr %a0@ <== NOT EXECUTED
4587e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
45882: 46c3 movew %d3,%sr <== NOT EXECUTED
45884: 60dc bras 45862 <rtems_termios_enqueue_raw_characters+0x1f6><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
45886: 4281 clrl %d1
45888: 122a 0049 moveb %a2@(73),%d1
4588c: b280 cmpl %d0,%d1
4588e: 671c beqs 458ac <rtems_termios_enqueue_raw_characters+0x240><== NEVER TAKEN
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
45890: 202a 00b8 movel %a2@(184),%d0
45894: 7c10 moveq #16,%d6
45896: 8086 orl %d6,%d0
* 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)
{
45898: 7c01 moveq #1,%d6
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
4589a: 2540 00b8 movel %d0,%a2@(184)
* 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)
{
4589e: 1d46 fff7 moveb %d6,%fp@(-9)
458a2: 6094 bras 45838 <rtems_termios_enqueue_raw_characters+0x1cc>
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
458a4: 5285 addql #1,%d5 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
458a6: 5382 subql #1,%d2 <== NOT EXECUTED
458a8: 6000 ff5a braw 45804 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
458ac: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
458b0: 7210 moveq #16,%d1 <== NOT EXECUTED
458b2: b380 eorl %d1,%d0 <== NOT EXECUTED
* 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)
{
458b4: 7c01 moveq #1,%d6 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
458b6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
* 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)
{
458ba: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED
458be: 6000 ff78 braw 45838 <rtems_termios_enqueue_raw_characters+0x1cc><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
458c2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
458c6: 0800 0005 btst #5,%d0 <== NOT EXECUTED
458ca: 6608 bnes 458d4 <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED
458cc: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
458d0: 6600 fefa bnew 457cc <rtems_termios_enqueue_raw_characters+0x160><== 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;
(*tty->device.write)(tty->minor,
458d4: 4878 0001 pea 1 <ADD> <== 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;
458d8: 7c02 moveq #2,%d6 <== NOT EXECUTED
458da: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
458de: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
458e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
458e6: 206a 00a4 moveal %a2@(164),%a0 <== 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;
458ea: 8286 orl %d6,%d1 <== NOT EXECUTED
458ec: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
458f0: 4e90 jsr %a0@ <== NOT EXECUTED
458f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
458f6: 6000 fed4 braw 457cc <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
458fa: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED
458fe: 303c 0004 movew #4,%d0 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
45902: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
45906: 8280 orl %d0,%d1 <== NOT EXECUTED
45908: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
4590c: 4a88 tstl %a0 <== NOT EXECUTED
4590e: 6700 febc beqw 457cc <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
45912: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45916: 4e90 jsr %a0@ <== NOT EXECUTED
45918: 588f addql #4,%sp <== NOT EXECUTED
4591a: 6000 feb0 braw 457cc <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
00044668 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
44668: 4e56 ffec linkw %fp,#-20
4466c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
44670: 266e 0008 moveal %fp@(8),%a3
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
44674: 2053 moveal %a3@,%a0
44676: 2468 0034 moveal %a0@(52),%a2
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);
4467a: 42a7 clrl %sp@-
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
4467c: 286b 0008 moveal %a3@(8),%a4
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44680: 42a7 clrl %sp@-
44682: 2f2a 0018 movel %a2@(24),%sp@-
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
44686: 42ab 000c clrl %a3@(12)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4468a: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
44690: 4fef 000c lea %sp@(12),%sp
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);
44694: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
44696: 662c bnes 446c4 <rtems_termios_ioctl+0x5c> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
44698: 202b 0004 movel %a3@(4),%d0
4469c: 7204 moveq #4,%d1
4469e: b280 cmpl %d0,%d1
446a0: 6774 beqs 44716 <rtems_termios_ioctl+0xae>
446a2: 6530 bcss 446d4 <rtems_termios_ioctl+0x6c>
446a4: 7602 moveq #2,%d3
446a6: b680 cmpl %d0,%d3
446a8: 6700 00b6 beqw 44760 <rtems_termios_ioctl+0xf8>
446ac: 6400 0228 bccw 448d6 <rtems_termios_ioctl+0x26e>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
446b0: 2f0a movel %a2,%sp@-
446b2: 4eba f92c jsr %pc@(43fe0 <drainOutput>)
break;
446b6: 588f addql #4,%sp
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
446b8: 2f2a 0018 movel %a2@(24),%sp@-
446bc: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
446c2: 588f addql #4,%sp
}
446c4: 2002 movel %d2,%d0
}
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
446c6: 2742 000c movel %d2,%a3@(12)
return sc;
}
446ca: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
446d0: 4e5e unlk %fp
446d2: 4e75 rts
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
446d4: 0c80 4004 667f cmpil #1074030207,%d0
446da: 6756 beqs 44732 <rtems_termios_ioctl+0xca> <== NEVER TAKEN
446dc: 6200 023a bhiw 44918 <rtems_termios_ioctl+0x2b0>
446e0: 7605 moveq #5,%d3
446e2: b680 cmpl %d0,%d3
446e4: 6700 01d2 beqw 448b8 <rtems_termios_ioctl+0x250>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
446e8: 202a 00cc movel %a2@(204),%d0
446ec: eb88 lsll #5,%d0
446ee: 0680 0005 eb18 addil #387864,%d0
446f4: 2240 moveal %d0,%a1
446f6: 2051 moveal %a1@,%a0
446f8: 4a88 tstl %a0
446fa: 6700 02a6 beqw 449a2 <rtems_termios_ioctl+0x33a>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
446fe: 2f0b movel %a3,%sp@-
44700: 2f0a movel %a2,%sp@-
44702: 4e90 jsr %a0@
44704: 508f addql #8,%sp
44706: 2400 movel %d0,%d2
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44708: 2f2a 0018 movel %a2@(24),%sp@-
4470c: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
44712: 588f addql #4,%sp
44714: 60ae bras 446c4 <rtems_termios_ioctl+0x5c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
44716: 2014 movel %a4@,%d0
44718: 222c 0004 movel %a4@(4),%d1
4471c: 2540 00dc movel %d0,%a2@(220)
44720: 2541 00e0 movel %d1,%a2@(224)
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44724: 2f2a 0018 movel %a2@(24),%sp@-
44728: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
4472e: 588f addql #4,%sp
44730: 6092 bras 446c4 <rtems_termios_ioctl+0x5c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
44732: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED
44736: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED
4473a: 9081 subl %d1,%d0 <== NOT EXECUTED
if ( rawnc < 0 )
4473c: 6b00 02ae bmiw 449ec <rtems_termios_ioctl+0x384> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
44740: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
44744: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED
44748: d280 addl %d0,%d1 <== NOT EXECUTED
4474a: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED
4474e: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
44750: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
44754: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
4475a: 588f addql #4,%sp <== NOT EXECUTED
4475c: 6000 ff66 braw 446c4 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
44760: 206b 0008 moveal %a3@(8),%a0
44764: 49ea 0030 lea %a2@(48),%a4
44768: 2898 movel %a0@+,%a4@
4476a: 2558 0034 movel %a0@+,%a2@(52)
4476e: 2558 0038 movel %a0@+,%a2@(56)
44772: 2558 003c movel %a0@+,%a2@(60)
44776: 2558 0040 movel %a0@+,%a2@(64)
4477a: 2558 0044 movel %a0@+,%a2@(68)
4477e: 2558 0048 movel %a0@+,%a2@(72)
44782: 2558 004c movel %a0@+,%a2@(76)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
44786: 202a 00b8 movel %a2@(184),%d0
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
4478a: 2550 0050 movel %a0@,%a2@(80)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
4478e: 0800 0009 btst #9,%d0
44792: 6746 beqs 447da <rtems_termios_ioctl+0x172>
!(tty->termios.c_iflag & IXON)) {
44794: 202a 0030 movel %a2@(48),%d0
44798: 0280 0000 0400 andil #1024,%d0
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
4479e: 663a bnes 447da <rtems_termios_ioctl+0x172>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
447a0: 202a 00b8 movel %a2@(184),%d0
447a4: 0280 ffff fdef andil #-529,%d0
447aa: 2540 00b8 movel %d0,%a2@(184)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
447ae: 202a 00b8 movel %a2@(184),%d0
447b2: 0800 0005 btst #5,%d0
447b6: 6722 beqs 447da <rtems_termios_ioctl+0x172> <== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
447b8: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
447be: 40c3 movew %sr,%d3 <== NOT EXECUTED
447c0: 8083 orl %d3,%d0 <== NOT EXECUTED
447c2: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
447c4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
447c8: 72df moveq #-33,%d1 <== NOT EXECUTED
447ca: c081 andl %d1,%d0 <== NOT EXECUTED
447cc: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
447d0: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
447d4: 6600 0240 bnew 44a16 <rtems_termios_ioctl+0x3ae> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
447d8: 46c3 movew %d3,%sr <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
447da: 202a 00b8 movel %a2@(184),%d0
447de: 0800 000a btst #10,%d0
447e2: 6724 beqs 44808 <rtems_termios_ioctl+0x1a0>
447e4: 202a 0030 movel %a2@(48),%d0
447e8: 0280 0000 1000 andil #4096,%d0
447ee: 6618 bnes 44808 <rtems_termios_ioctl+0x1a0> <== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
447f0: 202a 00b8 movel %a2@(184),%d0
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
447f4: 76fd moveq #-3,%d3
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
447f6: 0880 000a bclr #10,%d0
447fa: 2540 00b8 movel %d0,%a2@(184)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
447fe: 202a 00b8 movel %a2@(184),%d0
44802: c083 andl %d3,%d0
44804: 2540 00b8 movel %d0,%a2@(184)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
44808: 202a 00b8 movel %a2@(184),%d0
4480c: 0800 0008 btst #8,%d0
44810: 6700 0186 beqw 44998 <rtems_termios_ioctl+0x330>
44814: 222a 0038 movel %a2@(56),%d1 <== NOT EXECUTED
44818: 6d00 01ec bltw 44a06 <rtems_termios_ioctl+0x39e> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
4481c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44820: 0880 0008 bclr #8,%d0 <== NOT EXECUTED
44824: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
44828: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4482c: 44c0 movew %d0,%ccr <== NOT EXECUTED
4482e: 6614 bnes 44844 <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED
44830: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
44834: 4a88 tstl %a0 <== NOT EXECUTED
44836: 670c beqs 44844 <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
44838: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
4483c: 4e90 jsr %a0@ <== NOT EXECUTED
4483e: 222a 0038 movel %a2@(56),%d1 <== NOT EXECUTED
44842: 588f addql #4,%sp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
44844: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44848: 76fb moveq #-5,%d3 <== NOT EXECUTED
4484a: c083 andl %d3,%d0 <== NOT EXECUTED
4484c: 2540 00b8 movel %d0,%a2@(184) <== 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) {
44850: 4a81 tstl %d1 <== NOT EXECUTED
44852: 6d00 01b2 bltw 44a06 <rtems_termios_ioctl+0x39e> <== NOT EXECUTED
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
44856: 202a 0030 movel %a2@(48),%d0
4485a: 0800 000c btst #12,%d0
4485e: 670c beqs 4486c <rtems_termios_ioctl+0x204>
tty->flow_ctrl |= FL_MDXOF;
44860: 222a 00b8 movel %a2@(184),%d1
44864: 08c1 000a bset #10,%d1
44868: 2541 00b8 movel %d1,%a2@(184)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
4486c: 0800 000a btst #10,%d0
44870: 670c beqs 4487e <rtems_termios_ioctl+0x216>
tty->flow_ctrl |= FL_MDXON;
44872: 202a 00b8 movel %a2@(184),%d0
44876: 08c0 0009 bset #9,%d0
4487a: 2540 00b8 movel %d0,%a2@(184)
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) {
4487e: 7002 moveq #2,%d0
44880: c0aa 003c andl %a2@(60),%d0
44884: 6700 012e beqw 449b4 <rtems_termios_ioctl+0x34c>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44888: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
4488c: 42aa 0070 clrl %a2@(112)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
44890: 42aa 0074 clrl %a2@(116)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44894: 206a 00a8 moveal %a2@(168),%a0
44898: 4a88 tstl %a0
4489a: 6700 fe1c beqw 446b8 <rtems_termios_ioctl+0x50>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
4489e: 2f0c movel %a4,%sp@-
448a0: 2f2a 0010 movel %a2@(16),%sp@-
448a4: 4e90 jsr %a0@
448a6: 508f addql #8,%sp
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
448a8: 2f2a 0018 movel %a2@(24),%sp@-
448ac: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
448b2: 588f addql #4,%sp
448b4: 6000 fe0e braw 446c4 <rtems_termios_ioctl+0x5c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
448b8: 2014 movel %a4@,%d0
448ba: 222c 0004 movel %a4@(4),%d1
448be: 2540 00d4 movel %d0,%a2@(212)
448c2: 2541 00d8 movel %d1,%a2@(216)
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
448c6: 2f2a 0018 movel %a2@(24),%sp@-
448ca: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
448d0: 588f addql #4,%sp
448d2: 6000 fdf0 braw 446c4 <rtems_termios_ioctl+0x5c>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
448d6: 123c 0001 moveb #1,%d1
448da: b280 cmpl %d0,%d1
448dc: 6600 fe0a bnew 446e8 <rtems_termios_ioctl+0x80>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
448e0: 206b 0008 moveal %a3@(8),%a0
448e4: 20ea 0030 movel %a2@(48),%a0@+
448e8: 20ea 0034 movel %a2@(52),%a0@+
448ec: 20ea 0038 movel %a2@(56),%a0@+
448f0: 20ea 003c movel %a2@(60),%a0@+
448f4: 20ea 0040 movel %a2@(64),%a0@+
448f8: 20ea 0044 movel %a2@(68),%a0@+
448fc: 20ea 0048 movel %a2@(72),%a0@+
44900: 20ea 004c movel %a2@(76),%a0@+
44904: 20aa 0050 movel %a2@(80),%a0@
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44908: 2f2a 0018 movel %a2@(24),%sp@-
4490c: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
44912: 588f addql #4,%sp
44914: 6000 fdae braw 446c4 <rtems_termios_ioctl+0x5c>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
44918: 0c80 4004 741a cmpil #1074033690,%d0
4491e: 6760 beqs 44980 <rtems_termios_ioctl+0x318>
44920: 0c80 8004 741b cmpil #-2147191781,%d0
44926: 6600 fdc0 bnew 446e8 <rtems_termios_ioctl+0x80>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
4492a: 202a 00cc movel %a2@(204),%d0
4492e: eb88 lsll #5,%d0
44930: 0680 0005 eb04 addil #387844,%d0
44936: 2240 moveal %d0,%a1
44938: 2051 moveal %a1@,%a0
4493a: 4a88 tstl %a0
4493c: 6708 beqs 44946 <rtems_termios_ioctl+0x2de>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
4493e: 2f0a movel %a2,%sp@-
44940: 4e90 jsr %a0@
44942: 588f addql #4,%sp
44944: 2400 movel %d0,%d2
}
tty->t_line=*(int*)(args->buffer);
44946: 206b 0008 moveal %a3@(8),%a0
4494a: 2010 movel %a0@,%d0
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
4494c: 2200 movel %d0,%d1
4494e: 41f9 0005 eb00 lea 5eb00 <rtems_termios_linesw>,%a0
44954: eb89 lsll #5,%d1
* 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);
44956: 2540 00cc movel %d0,%a2@(204)
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
4495a: 2070 1800 moveal %a0@(00000000,%d1:l),%a0
*/
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);
tty->t_sc = NULL; /* ensure that no more valid data */
4495e: 42aa 00d0 clrl %a2@(208)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
44962: 4a88 tstl %a0
44964: 6700 fd52 beqw 446b8 <rtems_termios_ioctl+0x50>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
44968: 2f0a movel %a2,%sp@-
4496a: 4e90 jsr %a0@
4496c: 588f addql #4,%sp
4496e: 2400 movel %d0,%d2
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44970: 2f2a 0018 movel %a2@(24),%sp@-
44974: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
4497a: 588f addql #4,%sp
4497c: 6000 fd46 braw 446c4 <rtems_termios_ioctl+0x5c>
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
44980: 206b 0008 moveal %a3@(8),%a0
44984: 20aa 00cc movel %a2@(204),%a0@
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44988: 2f2a 0018 movel %a2@(24),%sp@-
4498c: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
44992: 588f addql #4,%sp
44994: 6000 fd2e braw 446c4 <rtems_termios_ioctl+0x5c>
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
44998: 222a 0038 movel %a2@(56),%d1
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
4499c: 6c00 feb8 bgew 44856 <rtems_termios_ioctl+0x1ee>
449a0: 6064 bras 44a06 <rtems_termios_ioctl+0x39e> <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
449a2: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
449a6: 740a moveq #10,%d2 <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
449a8: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
449ae: 588f addql #4,%sp <== NOT EXECUTED
449b0: 6000 fd12 braw 446c4 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
449b4: 4283 clrl %d3
449b6: 162a 0046 moveb %a2@(70),%d3
rtems_clock_get_ticks_per_second() / 10;
449ba: 4eb9 0004 602c jsr 4602c <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
449c0: 4c03 0800 mulsl %d3,%d0
rtems_clock_get_ticks_per_second() / 10;
449c4: 760a moveq #10,%d3
449c6: 4c43 0000 remul %d3,%d0,%d0
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
449ca: 2540 0054 movel %d0,%a2@(84)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
449ce: 4a2a 0046 tstb %a2@(70)
449d2: 6764 beqs 44a38 <rtems_termios_ioctl+0x3d0>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
449d4: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
449d8: 2540 0070 movel %d0,%a2@(112)
if (tty->termios.c_cc[VMIN])
449dc: 4a2a 0047 tstb %a2@(71)
449e0: 6600 feae bnew 44890 <rtems_termios_ioctl+0x228>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
449e4: 2540 0074 movel %d0,%a2@(116)
449e8: 6000 feaa braw 44894 <rtems_termios_ioctl+0x22c>
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
449ec: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED
449f0: d081 addl %d1,%d0 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
449f2: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
449f6: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED
449fa: d280 addl %d0,%d1 <== NOT EXECUTED
449fc: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED
44a00: 2081 movel %d1,%a0@ <== NOT EXECUTED
44a02: 6000 fd4c braw 44750 <rtems_termios_ioctl+0xe8> <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
44a06: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44a0a: 08c0 0008 bset #8,%d0 <== NOT EXECUTED
44a0e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
44a12: 6000 fe42 braw 44856 <rtems_termios_ioctl+0x1ee> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44a16: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
44a1a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44a1e: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED
44a22: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44a24: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44a28: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
44a2c: 4e90 jsr %a0@ <== NOT EXECUTED
44a2e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
44a32: 46c3 movew %d3,%sr <== NOT EXECUTED
44a34: 6000 fda4 braw 447da <rtems_termios_ioctl+0x172> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
44a38: 4a2a 0047 tstb %a2@(71)
44a3c: 6600 fe4a bnew 44888 <rtems_termios_ioctl+0x220>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
44a40: 7001 moveq #1,%d0
44a42: 2540 006c movel %d0,%a2@(108)
44a46: 6000 fe4c braw 44894 <rtems_termios_ioctl+0x22c>
00044054 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
44054: 4e56 ffd8 linkw %fp,#-40
44058: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
4405c: 42a7 clrl %sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4405e: 242e 0008 movel %fp@(8),%d2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
44062: 42a7 clrl %sp@-
44064: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4406a: 262e 000c movel %fp@(12),%d3
4406e: 266e 0010 moveal %fp@(16),%a3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
44072: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44078: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
4407c: 2800 movel %d0,%d4
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4407e: 6600 027e bnew 442fe <rtems_termios_open+0x2aa>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
44082: 2879 0005 f344 moveal 5f344 <rtems_termios_ttyHead>,%a4
44088: 4a8c tstl %a4
4408a: 6710 beqs 4409c <rtems_termios_open+0x48>
4408c: 244c moveal %a4,%a2
if ((tty->major == major) && (tty->minor == minor))
4408e: b4aa 000c cmpl %a2@(12),%d2
44092: 6700 0276 beqw 4430a <rtems_termios_open+0x2b6>
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) {
44096: 2452 moveal %a2@,%a2
44098: 4a8a tstl %a2
4409a: 66f2 bnes 4408e <rtems_termios_open+0x3a> <== NEVER TAKEN
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
4409c: 4878 00e8 pea e8 <DBL_MANT_DIG+0xb3>
440a0: 4878 0001 pea 1 <ADD>
440a4: 4eb9 0004 2bd8 jsr 42bd8 <calloc>
if (tty == NULL) {
440aa: 508f addql #8,%sp
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
440ac: 2a40 moveal %d0,%a5
440ae: 2440 moveal %d0,%a2
if (tty == NULL) {
440b0: 4a80 tstl %d0
440b2: 6700 0346 beqw 443fa <rtems_termios_open+0x3a6>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
440b6: 41f9 0005 dd48 lea 5dd48 <rtems_termios_raw_input_size>,%a0
440bc: 2b50 0064 movel %a0@,%a5@(100)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
440c0: 2e3c 0004 3314 movel #275220,%d7
440c6: 2047 moveal %d7,%a0
440c8: 202d 0064 movel %a5@(100),%d0
440cc: 2f00 movel %d0,%sp@-
440ce: 4e90 jsr %a0@
if (tty->rawInBuf.theBuf == NULL) {
440d0: 588f addql #4,%sp
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
440d2: 2a00 movel %d0,%d5
440d4: 2b40 0058 movel %d0,%a5@(88)
if (tty->rawInBuf.theBuf == NULL) {
440d8: 6700 033c beqw 44416 <rtems_termios_open+0x3c2>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
440dc: 41f9 0005 dd4c lea 5dd4c <rtems_termios_raw_output_size>,%a0
440e2: 2b50 0088 movel %a0@,%a5@(136)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
440e6: 2047 moveal %d7,%a0
440e8: 202d 0088 movel %a5@(136),%d0
440ec: 2f00 movel %d0,%sp@-
440ee: 4e90 jsr %a0@
if (tty->rawOutBuf.theBuf == NULL) {
440f0: 588f addql #4,%sp
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
440f2: 2c00 movel %d0,%d6
440f4: 2b40 007c movel %d0,%a5@(124)
if (tty->rawOutBuf.theBuf == NULL) {
440f8: 6700 0340 beqw 4443a <rtems_termios_open+0x3e6>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
440fc: 2f39 0005 dd44 movel 5dd44 <rtems_termios_cbufsize>,%sp@-
44102: 2047 moveal %d7,%a0
44104: 4e90 jsr %a0@
if (tty->cbuf == NULL) {
44106: 588f addql #4,%sp
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
44108: 2b40 001c movel %d0,%a5@(28)
if (tty->cbuf == NULL) {
4410c: 6700 0358 beqw 44466 <rtems_termios_open+0x412>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
44110: 42ad 00d4 clrl %a5@(212)
tty->tty_snd.sw_arg = NULL;
44114: 42ad 00d8 clrl %a5@(216)
tty->tty_rcv.sw_pfn = NULL;
44118: 42ad 00dc clrl %a5@(220)
tty->tty_rcv.sw_arg = NULL;
4411c: 42ad 00e0 clrl %a5@(224)
tty->tty_rcvwakeup = 0;
44120: 42ad 00e4 clrl %a5@(228)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
44124: 2a8c movel %a4,%a5@
tty->back = NULL;
44126: 42ad 0004 clrl %a5@(4)
if (rtems_termios_ttyHead != NULL)
4412a: 4a8c tstl %a4
4412c: 6704 beqs 44132 <rtems_termios_open+0xde>
rtems_termios_ttyHead->back = tty;
4412e: 294d 0004 movel %a5,%a4@(4)
rtems_termios_ttyHead = tty;
44132: 23cd 0005 f344 movel %a5,5f344 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
44138: 4ab9 0005 f340 tstl 5f340 <rtems_termios_ttyTail>
4413e: 6700 02b0 beqw 443f0 <rtems_termios_open+0x39c>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44142: 486d 0014 pea %a5@(20)
44146: 49f9 0004 64cc lea 464cc <rtems_semaphore_create>,%a4
rtems_build_name ('T', 'R', 'i', c),
4414c: 1039 0005 dd50 moveb 5dd50 <c.6318>,%d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44152: 42a7 clrl %sp@-
44154: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'i', c),
44158: 49c0 extbl %d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4415a: 4878 0001 pea 1 <ADD>
4415e: 0080 5452 6900 oril #1414686976,%d0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
44164: 2b43 0010 movel %d3,%a5@(16)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44168: 2f00 movel %d0,%sp@-
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
4416a: 2b42 000c movel %d2,%a5@(12)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4416e: 4e94 jsr %a4@
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)
44170: 4fef 0014 lea %sp@(20),%sp
44174: 4a80 tstl %d0
44176: 6600 020a bnew 44382 <rtems_termios_open+0x32e>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4417a: 486d 0018 pea %a5@(24)
rtems_build_name ('T', 'R', 'o', c),
4417e: 1039 0005 dd50 moveb 5dd50 <c.6318>,%d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44184: 42a7 clrl %sp@-
44186: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'o', c),
4418a: 49c0 extbl %d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4418c: 4878 0001 pea 1 <ADD>
44190: 0080 5452 6f00 oril #1414688512,%d0
44196: 2f00 movel %d0,%sp@-
44198: 4e94 jsr %a4@
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)
4419a: 4fef 0014 lea %sp@(20),%sp
4419e: 4a80 tstl %d0
441a0: 6600 01e0 bnew 44382 <rtems_termios_open+0x32e>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
441a4: 486d 008c pea %a5@(140)
rtems_build_name ('T', 'R', 'x', c),
441a8: 1039 0005 dd50 moveb 5dd50 <c.6318>,%d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
441ae: 42a7 clrl %sp@-
441b0: 4878 0020 pea 20 <OPER2+0xc>
rtems_build_name ('T', 'R', 'x', c),
441b4: 49c0 extbl %d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
441b6: 0080 5452 7800 oril #1414690816,%d0
441bc: 42a7 clrl %sp@-
441be: 2f00 movel %d0,%sp@-
441c0: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
441c2: 4fef 0014 lea %sp@(20),%sp
441c6: 4a80 tstl %d0
441c8: 6600 01b8 bnew 44382 <rtems_termios_open+0x32e>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
441cc: 226e 0014 moveal %fp@(20),%a1
441d0: 41ed 0098 lea %a5@(152),%a0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
441d4: 7002 moveq #2,%d0
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
441d6: 20d9 movel %a1@+,%a0@+
441d8: 20d9 movel %a1@+,%a0@+
441da: 20d9 movel %a1@+,%a0@+
441dc: 20d9 movel %a1@+,%a0@+
441de: 20d9 movel %a1@+,%a0@+
441e0: 20d9 movel %a1@+,%a0@+
441e2: 20d9 movel %a1@+,%a0@+
441e4: 2091 movel %a1@,%a0@
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
441e6: 42ad 0094 clrl %a5@(148)
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
441ea: b0ad 00b4 cmpl %a5@(180),%d0
441ee: 6700 019a beqw 4438a <rtems_termios_open+0x336>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
441f2: 4aad 00a0 tstl %a5@(160)
441f6: 6700 0162 beqw 4435a <rtems_termios_open+0x306>
441fa: 7002 moveq #2,%d0
441fc: b0ad 00b4 cmpl %a5@(180),%d0
44200: 6700 0158 beqw 4435a <rtems_termios_open+0x306>
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;
44204: 42ad 00b8 clrl %a5@(184)
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
44208: 222d 0064 movel %a5@(100),%d1
tty->highwater = tty->rawInBuf.Size * 3/4;
4420c: 206d 0064 moveal %a5@(100),%a0
/* 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;
44210: e289 lsrl #1,%d1
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';
44212: 7c03 moveq #3,%d6
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
44214: 1039 0005 dd50 moveb 5dd50 <c.6318>,%d0
/* 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;
4421a: 2b41 00bc movel %d1,%a5@(188)
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
4421e: 49c0 extbl %d0
44220: 2a00 movel %d0,%d5
44222: 2240 moveal %d0,%a1
44224: 5285 addql #1,%d5
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';
44226: 1b46 0041 moveb %d6,%a5@(65)
tty->termios.c_cc[VQUIT] = '\034';
4422a: 7c1c moveq #28,%d6
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;
4422c: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0
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';
44230: 4201 clrb %d1
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
44232: 1b46 0042 moveb %d6,%a5@(66)
tty->termios.c_cc[VERASE] = '\177';
44236: 7c7f moveq #127,%d6
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;
44238: 2008 movel %a0,%d0
4423a: e488 lsrl #2,%d0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
4423c: 307c 2502 moveaw #9474,%a0
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
44240: 1b46 0043 moveb %d6,%a5@(67)
tty->termios.c_cc[VKILL] = '\025';
44244: 7c15 moveq #21,%d6
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;
44246: 2b40 00c0 movel %d0,%a5@(192)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
4424a: 1b46 0044 moveb %d6,%a5@(68)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
4424e: 2b48 0030 movel %a0,%a5@(48)
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';
44252: 7c04 moveq #4,%d6
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
44254: 7013 moveq #19,%d0
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';
44256: 1b46 0045 moveb %d6,%a5@(69)
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
4425a: 7c11 moveq #17,%d6
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';
4425c: 1b41 004c moveb %d1,%a5@(76)
tty->termios.c_cc[VEOL2] = '\000';
44260: 1b41 0051 moveb %d1,%a5@(81)
tty->termios.c_cc[VSTART] = '\021';
44264: 1b46 0049 moveb %d6,%a5@(73)
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
44268: 721a moveq #26,%d1
tty->termios.c_cc[VREPRINT] = '\022';
4426a: 7c12 moveq #18,%d6
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
4426c: 1b40 004a moveb %d0,%a5@(74)
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
44270: 700f moveq #15,%d0
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
44272: 1b41 004b moveb %d1,%a5@(75)
tty->termios.c_cc[VREPRINT] = '\022';
44276: 1b46 004d moveb %d6,%a5@(77)
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
4427a: 7217 moveq #23,%d1
tty->termios.c_cc[VLNEXT] = '\026';
4427c: 7c16 moveq #22,%d6
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
4427e: 1b40 004e moveb %d0,%a5@(78)
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44282: 203c 0000 1805 movel #6149,%d0
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
44288: 1b41 004f moveb %d1,%a5@(79)
tty->termios.c_cc[VLNEXT] = '\026';
4428c: 1b46 0050 moveb %d6,%a5@(80)
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44290: 2b40 0034 movel %d0,%a5@(52)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
44294: 223c 0000 08bd movel #2237,%d1
4429a: 2b41 0038 movel %d1,%a5@(56)
tty->termios.c_lflag =
4429e: 2c3c 0000 823b movel #33339,%d6
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
442a4: 303c 007a movew #122,%d0
442a8: 13c5 0005 dd50 moveb %d5,5dd50 <c.6318>
* 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 =
442ae: 2b46 003c movel %d6,%a5@(60)
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
442b2: b089 cmpl %a1,%d0
442b4: 6608 bnes 442be <rtems_termios_open+0x26a>
c = 'a';
442b6: 7261 moveq #97,%d1
442b8: 13c1 0005 dd50 moveb %d1,5dd50 <c.6318>
}
args->iop->data1 = tty;
if (!tty->refcount++) {
442be: 202a 0008 movel %a2@(8),%d0
442c2: 2c00 movel %d0,%d6
442c4: 5286 addql #1,%d6
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
442c6: 2053 moveal %a3@,%a0
442c8: 214a 0034 movel %a2,%a0@(52)
if (!tty->refcount++) {
442cc: 2546 0008 movel %d6,%a2@(8)
442d0: 4a80 tstl %d0
442d2: 661c bnes 442f0 <rtems_termios_open+0x29c>
if (tty->device.firstOpen)
442d4: 206a 0098 moveal %a2@(152),%a0
442d8: 4a88 tstl %a0
442da: 670c beqs 442e8 <rtems_termios_open+0x294>
(*tty->device.firstOpen)(major, minor, arg);
442dc: 2f0b movel %a3,%sp@-
442de: 2f03 movel %d3,%sp@-
442e0: 2f02 movel %d2,%sp@-
442e2: 4e90 jsr %a0@
442e4: 4fef 000c lea %sp@(12),%sp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
442e8: 7002 moveq #2,%d0
442ea: b0aa 00b4 cmpl %a2@(180),%d0
442ee: 672c beqs 4431c <rtems_termios_open+0x2c8>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
442f0: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
442f6: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
442fc: 588f addql #4,%sp
}
442fe: 2004 movel %d4,%d0
44300: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
44306: 4e5e unlk %fp
44308: 4e75 rts
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
if ((tty->major == major) && (tty->minor == minor))
4430a: b6aa 0010 cmpl %a2@(16),%d3
4430e: 67ae beqs 442be <rtems_termios_open+0x26a> <== ALWAYS TAKEN
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) {
44310: 2452 moveal %a2@,%a2 <== NOT EXECUTED
44312: 4a8a tstl %a2 <== NOT EXECUTED
44314: 6600 fd78 bnew 4408e <rtems_termios_open+0x3a> <== NOT EXECUTED
44318: 6000 fd82 braw 4409c <rtems_termios_open+0x48> <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
4431c: 2f0a movel %a2,%sp@-
4431e: 487a 15fe pea %pc@(4591e <rtems_termios_rxdaemon>)
44322: 47f9 0004 6c14 lea 46c14 <rtems_task_start>,%a3
44328: 2f2a 00c4 movel %a2@(196),%sp@-
4432c: 4e93 jsr %a3@
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
4432e: 4fef 000c lea %sp@(12),%sp
44332: 4a80 tstl %d0
44334: 664c bnes 44382 <rtems_termios_open+0x32e> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
44336: 2f0a movel %a2,%sp@-
44338: 487a 18b2 pea %pc@(45bec <rtems_termios_txdaemon>)
4433c: 2f2a 00c8 movel %a2@(200),%sp@-
44340: 4e93 jsr %a3@
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
44342: 4fef 000c lea %sp@(12),%sp
44346: 4a80 tstl %d0
44348: 6638 bnes 44382 <rtems_termios_open+0x32e> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
4434a: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
44350: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
44356: 588f addql #4,%sp
44358: 60a4 bras 442fe <rtems_termios_open+0x2aa>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
4435a: 486d 0068 pea %a5@(104)
rtems_build_name ('T', 'R', 'r', c),
4435e: 1039 0005 dd50 moveb 5dd50 <c.6318>,%d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44364: 42a7 clrl %sp@-
44366: 4878 0024 pea 24 <OPER2+0x10>
rtems_build_name ('T', 'R', 'r', c),
4436a: 49c0 extbl %d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
4436c: 0080 5452 7200 oril #1414689280,%d0
44372: 42a7 clrl %sp@-
44374: 2f00 movel %d0,%sp@-
44376: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
44378: 4fef 0014 lea %sp@(20),%sp
4437c: 4a80 tstl %d0
4437e: 6700 fe84 beqw 44204 <rtems_termios_open+0x1b0>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
44382: 2f00 movel %d0,%sp@-
44384: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
4438a: 486d 00c8 pea %a5@(200)
4438e: 2a3c 0004 6964 movel #289124,%d5
44394: 2045 moveal %d5,%a0
44396: 42a7 clrl %sp@-
44398: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
4439c: 4878 0400 pea 400 <D_BIAS+0x2>
443a0: 4878 000a pea a <LASTO>
rtems_build_name ('T', 'x', 'T', c),
443a4: 1039 0005 dd50 moveb 5dd50 <c.6318>,%d0
443aa: 49c0 extbl %d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
443ac: 0080 5478 5400 oril #1417171968,%d0
443b2: 2f00 movel %d0,%sp@-
443b4: 4e90 jsr %a0@
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
443b6: 4fef 0018 lea %sp@(24),%sp
443ba: 4a80 tstl %d0
443bc: 66c4 bnes 44382 <rtems_termios_open+0x32e> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
443be: 486d 00c4 pea %a5@(196)
443c2: 2045 moveal %d5,%a0
rtems_build_name ('R', 'x', 'T', c),
443c4: 1039 0005 dd50 moveb 5dd50 <c.6318>,%d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
443ca: 42a7 clrl %sp@-
443cc: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('R', 'x', 'T', c),
443d0: 49c0 extbl %d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
443d2: 4878 0400 pea 400 <D_BIAS+0x2>
443d6: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1>
443da: 0080 5278 5400 oril #1383617536,%d0
443e0: 2f00 movel %d0,%sp@-
443e2: 4e90 jsr %a0@
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
443e4: 4fef 0018 lea %sp@(24),%sp
443e8: 4a80 tstl %d0
443ea: 6700 fe06 beqw 441f2 <rtems_termios_open+0x19e>
443ee: 6092 bras 44382 <rtems_termios_open+0x32e> <== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
443f0: 23cd 0005 f340 movel %a5,5f340 <rtems_termios_ttyTail>
443f6: 6000 fd4a braw 44142 <rtems_termios_open+0xee>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
443fa: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
return RTEMS_NO_MEMORY;
44400: 781a moveq #26,%d4
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
44402: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
44408: 588f addql #4,%sp
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
4440a: 2004 movel %d4,%d0
4440c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
44412: 4e5e unlk %fp
44414: 4e75 rts
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
44416: 2f0d movel %a5,%sp@-
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
44418: 781a moveq #26,%d4
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
4441a: 4eb9 0004 2fe4 jsr 42fe4 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
44420: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
44426: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
4442c: 508f addql #8,%sp
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
4442e: 2004 movel %d4,%d0
44430: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
44436: 4e5e unlk %fp
44438: 4e75 rts
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
4443a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4443c: 45f9 0004 2fe4 lea 42fe4 <free>,%a2 <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
44442: 781a moveq #26,%d4 <== NOT EXECUTED
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
44444: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
44446: 2f0d movel %a5,%sp@- <== NOT EXECUTED
44448: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4444a: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED
44450: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
44456: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
4445a: 2004 movel %d4,%d0 <== NOT EXECUTED
4445c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED
44462: 4e5e unlk %fp <== NOT EXECUTED
44464: 4e75 rts <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
44466: 2f06 movel %d6,%sp@-
44468: 45f9 0004 2fe4 lea 42fe4 <free>,%a2
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
4446e: 781a moveq #26,%d4
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
44470: 4e92 jsr %a2@
free((void *)(tty->rawInBuf.theBuf));
44472: 2f05 movel %d5,%sp@-
44474: 4e92 jsr %a2@
free(tty);
44476: 2f0d movel %a5,%sp@-
44478: 4e92 jsr %a2@
rtems_semaphore_release (rtems_termios_ttyMutex);
4447a: 2f39 0005 f33c movel 5f33c <rtems_termios_ttyMutex>,%sp@-
44480: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
44486: 4fef 0010 lea %sp@(16),%sp
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
4448a: 2004 movel %d4,%d0
4448c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
44492: 4e5e unlk %fp <== NOT EXECUTED
00044a4a <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
44a4a: 4e56 ffdc linkw %fp,#-36
44a4e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
44a52: 286e 0008 moveal %fp@(8),%a4
44a56: 242e 000c movel %fp@(12),%d2
44a5a: 246e 0010 moveal %fp@(16),%a2
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
44a5e: 4aaa 00b4 tstl %a2@(180)
44a62: 6700 00c6 beqw 44b2a <rtems_termios_puts+0xe0>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
44a66: 2c2a 0080 movel %a2@(128),%d6
while (len) {
44a6a: 4a82 tstl %d2
44a6c: 6700 008e beqw 44afc <rtems_termios_puts+0xb2>
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
44a70: 2a3c 0000 0700 movel #1792,%d5
44a76: 47f9 0004 6768 lea 46768 <rtems_semaphore_obtain>,%a3
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
44a7c: 222a 0088 movel %a2@(136),%d1
44a80: 5286 addql #1,%d6
rtems_interrupt_disable (level);
44a82: 2005 movel %d5,%d0
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
44a84: 4c41 6007 remul %d1,%d7,%d6
44a88: 2c07 movel %d7,%d6
rtems_interrupt_disable (level);
44a8a: 40c3 movew %sr,%d3
44a8c: 8083 orl %d3,%d0
44a8e: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
44a90: 282a 0084 movel %a2@(132),%d4
44a94: be84 cmpl %d4,%d7
44a96: 662c bnes 44ac4 <rtems_termios_puts+0x7a>
tty->rawOutBufState = rob_wait;
44a98: 7002 moveq #2,%d0
44a9a: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
44a9e: 46c3 movew %d3,%sr
sc = rtems_semaphore_obtain(
44aa0: 42a7 clrl %sp@-
44aa2: 42a7 clrl %sp@-
44aa4: 2f2a 008c movel %a2@(140),%sp@-
44aa8: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44aaa: 4fef 000c lea %sp@(12),%sp
44aae: 4a80 tstl %d0
44ab0: 6600 0094 bnew 44b46 <rtems_termios_puts+0xfc>
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
44ab4: 2005 movel %d5,%d0
44ab6: 40c3 movew %sr,%d3
44ab8: 8083 orl %d3,%d0
44aba: 46c0 movew %d0,%sr
* 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) {
44abc: 202a 0084 movel %a2@(132),%d0
44ac0: b880 cmpl %d0,%d4
44ac2: 67d4 beqs 44a98 <rtems_termios_puts+0x4e> <== NEVER TAKEN
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
44ac4: 202a 0080 movel %a2@(128),%d0
44ac8: 206a 007c moveal %a2@(124),%a0
44acc: 119c 0800 moveb %a4@+,%a0@(00000000,%d0:l)
tty->rawOutBuf.Head = newHead;
44ad0: 2547 0080 movel %d7,%a2@(128)
if (tty->rawOutBufState == rob_idle) {
44ad4: 4aaa 0094 tstl %a2@(148)
44ad8: 661c bnes 44af6 <rtems_termios_puts+0xac>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
44ada: 202a 00b8 movel %a2@(184),%d0
44ade: 0800 0004 btst #4,%d0
44ae2: 6722 beqs 44b06 <rtems_termios_puts+0xbc> <== ALWAYS TAKEN
(*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;
44ae4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44ae8: 7220 moveq #32,%d1 <== NOT EXECUTED
44aea: 8081 orl %d1,%d0 <== NOT EXECUTED
44aec: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
44af0: 7001 moveq #1,%d0 <== NOT EXECUTED
44af2: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED
}
rtems_interrupt_enable (level);
44af6: 46c3 movew %d3,%sr
len--;
44af8: 5382 subql #1,%d2
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
44afa: 6680 bnes 44a7c <rtems_termios_puts+0x32>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
44afc: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
44b02: 4e5e unlk %fp
44b04: 4e75 rts
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
44b06: 4878 0001 pea 1 <ADD>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44b0a: 202a 0084 movel %a2@(132),%d0
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
44b0e: d0aa 007c addl %a2@(124),%d0
44b12: 2f00 movel %d0,%sp@-
44b14: 2f2a 0010 movel %a2@(16),%sp@-
44b18: 206a 00a4 moveal %a2@(164),%a0
44b1c: 4e90 jsr %a0@
44b1e: 4fef 000c lea %sp@(12),%sp
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
44b22: 7001 moveq #1,%d0
44b24: 2540 0094 movel %d0,%a2@(148)
44b28: 60cc bras 44af6 <rtems_termios_puts+0xac>
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
44b2a: 226a 00a4 moveal %a2@(164),%a1
44b2e: 2d6a 0010 0008 movel %a2@(16),%fp@(8)
44b34: 2d42 0010 movel %d2,%fp@(16)
44b38: 2d4c 000c movel %a4,%fp@(12)
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
44b3c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
44b42: 4e5e unlk %fp
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
44b44: 4ed1 jmp %a1@
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
44b46: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44b48: 4eb9 0004 6eb4 jsr 46eb4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004530a <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
4530a: 4e56 ffd4 linkw %fp,#-44
4530e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
45312: 2a6e 0008 moveal %fp@(8),%a5
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);
45316: 2c3c 0004 6768 movel #288616,%d6
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4531c: 2055 moveal %a5@,%a0
4531e: 2468 0034 moveal %a0@(52),%a2
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45322: 2046 moveal %d6,%a0
45324: 42a7 clrl %sp@-
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
45326: 282d 0010 movel %a5@(16),%d4
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4532a: 42a7 clrl %sp@-
4532c: 2f2a 0014 movel %a2@(20),%sp@-
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
45330: 286d 000c moveal %a5@(12),%a4
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45334: 4e90 jsr %a0@
if (sc != RTEMS_SUCCESSFUL)
45336: 4fef 000c lea %sp@(12),%sp
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);
4533a: 2a00 movel %d0,%d5
if (sc != RTEMS_SUCCESSFUL)
4533c: 662e bnes 4536c <rtems_termios_read+0x62> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
4533e: 202a 00cc movel %a2@(204),%d0
45342: eb88 lsll #5,%d0
45344: 0680 0005 eb08 addil #387848,%d0
4534a: 2240 moveal %d0,%a1
4534c: 2051 moveal %a1@,%a0
4534e: 4a88 tstl %a0
45350: 6726 beqs 45378 <rtems_termios_read+0x6e>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
45352: 2f0d movel %a5,%sp@-
45354: 2f0a movel %a2,%sp@-
45356: 4e90 jsr %a0@
45358: 2a00 movel %d0,%d5
tty->tty_rcvwakeup = 0;
4535a: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
4535e: 2f2a 0014 movel %a2@(20),%sp@-
45362: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return sc;
45368: 4fef 000c lea %sp@(12),%sp
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
4536c: 2005 movel %d5,%d0
4536e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
45374: 4e5e unlk %fp
45376: 4e75 rts
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
45378: 202a 0020 movel %a2@(32),%d0
4537c: b0aa 0024 cmpl %a2@(36),%d0
45380: 674e beqs 453d0 <rtems_termios_read+0xc6> <== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
45382: 4a84 tstl %d4
45384: 6724 beqs 453aa <rtems_termios_read+0xa0> <== NEVER TAKEN
45386: 202a 0024 movel %a2@(36),%d0
4538a: b0aa 0020 cmpl %a2@(32),%d0
4538e: 6c1a bges 453aa <rtems_termios_read+0xa0> <== NEVER TAKEN
*buffer++ = tty->cbuf[tty->cindex++];
45390: 206a 001c moveal %a2@(28),%a0
count--;
45394: 5384 subql #1,%d4
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
45396: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+
4539a: 5280 addql #1,%d0
4539c: 2540 0024 movel %d0,%a2@(36)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
453a0: 4a84 tstl %d4
453a2: 6706 beqs 453aa <rtems_termios_read+0xa0>
453a4: b0aa 0020 cmpl %a2@(32),%d0
453a8: 6de6 blts 45390 <rtems_termios_read+0x86>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
453aa: 202d 0010 movel %a5@(16),%d0
453ae: 9084 subl %d4,%d0
453b0: 2b40 0018 movel %d0,%a5@(24)
tty->tty_rcvwakeup = 0;
453b4: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
453b8: 2f2a 0014 movel %a2@(20),%sp@-
453bc: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return sc;
453c2: 588f addql #4,%sp
}
453c4: 2005 movel %d5,%d0
453c6: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
453cc: 4e5e unlk %fp
453ce: 4e75 rts
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
453d0: 206a 00a0 moveal %a2@(160),%a0
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
453d4: 256a 0028 002c movel %a2@(40),%a2@(44)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
453da: 42aa 0020 clrl %a2@(32)
453de: 42aa 0024 clrl %a2@(36)
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
453e2: 4a88 tstl %a0
453e4: 6708 beqs 453ee <rtems_termios_read+0xe4>
453e6: 4aaa 00b4 tstl %a2@(180)
453ea: 6700 0162 beqw 4554e <rtems_termios_read+0x244>
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)(
453ee: 41ea 0049 lea %a2@(73),%a0
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
453f2: 7401 moveq #1,%d2
453f4: 47fa fdca lea %pc@(451c0 <siproc>),%a3
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
453f8: 262a 0074 movel %a2@(116),%d3
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)(
453fc: 2d48 fffc movel %a0,%fp@(-4)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45400: 222a 005c movel %a2@(92),%d1
45404: 202a 0060 movel %a2@(96),%d0
45408: b081 cmpl %d1,%d0
4540a: 6700 00cc beqw 454d8 <rtems_termios_read+0x1ce>
(tty->ccount < (CBUFSIZE-1))) {
4540e: 2039 0005 dd44 movel 5dd44 <rtems_termios_cbufsize>,%d0
45414: 5380 subql #1,%d0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45416: b0aa 0020 cmpl %a2@(32),%d0
4541a: 6f00 00bc blew 454d8 <rtems_termios_read+0x1ce>
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
4541e: 262a 005c movel %a2@(92),%d3
45422: 5283 addql #1,%d3
45424: 202a 0064 movel %a2@(100),%d0
c = tty->rawInBuf.theBuf[newHead];
45428: 206a 0058 moveal %a2@(88),%a0
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;
4542c: 4c40 3001 remul %d0,%d1,%d3
c = tty->rawInBuf.theBuf[newHead];
45430: 1630 1800 moveb %a0@(00000000,%d1:l),%d3
tty->rawInBuf.Head = newHead;
45434: 2541 005c movel %d1,%a2@(92)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
45438: 202a 0060 movel %a2@(96),%d0
4543c: 206a 0064 moveal %a2@(100),%a0
45440: d088 addl %a0,%d0
45442: 9081 subl %d1,%d0
% tty->rawInBuf.Size)
45444: 222a 0064 movel %a2@(100),%d1
45448: 4c41 0007 remul %d1,%d7,%d0
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
4544c: beaa 00bc cmpl %a2@(188),%d7
45450: 6446 bccs 45498 <rtems_termios_read+0x18e> <== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
45452: 202a 00b8 movel %a2@(184),%d0
45456: 72fe moveq #-2,%d1
45458: c081 andl %d1,%d0
4545a: 2540 00b8 movel %d0,%a2@(184)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
4545e: 202a 00b8 movel %a2@(184),%d0
45462: 0280 0000 0202 andil #514,%d0
45468: 0c80 0000 0202 cmpil #514,%d0
4546e: 6700 008a beqw 454fa <rtems_termios_read+0x1f0>
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
45472: 202a 00b8 movel %a2@(184),%d0
45476: 0800 0008 btst #8,%d0
4547a: 671c beqs 45498 <rtems_termios_read+0x18e> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
4547c: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED
45480: 7efb moveq #-5,%d7 <== NOT EXECUTED
45482: c287 andl %d7,%d1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
45484: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
45488: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
4548c: 4a88 tstl %a0 <== NOT EXECUTED
4548e: 6708 beqs 45498 <rtems_termios_read+0x18e> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
45490: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45494: 4e90 jsr %a0@ <== NOT EXECUTED
45496: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
45498: 7002 moveq #2,%d0
4549a: c0aa 003c andl %a2@(60),%d0
4549e: 6700 008c beqw 4552c <rtems_termios_read+0x222>
if (siproc (c, tty))
454a2: 2f0a movel %a2,%sp@-
454a4: 0283 0000 00ff andil #255,%d3
454aa: 2f03 movel %d3,%sp@-
454ac: 4e93 jsr %a3@
454ae: 508f addql #8,%sp
wait = 0;
454b0: 4a80 tstl %d0
454b2: 57c0 seq %d0
454b4: 49c0 extbl %d0
454b6: c480 andl %d0,%d2
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
454b8: 222a 005c movel %a2@(92),%d1
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
454bc: 262a 0070 movel %a2@(112),%d3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
454c0: 202a 0060 movel %a2@(96),%d0
454c4: b081 cmpl %d1,%d0
454c6: 6710 beqs 454d8 <rtems_termios_read+0x1ce>
(tty->ccount < (CBUFSIZE-1))) {
454c8: 2039 0005 dd44 movel 5dd44 <rtems_termios_cbufsize>,%d0
454ce: 5380 subql #1,%d0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
454d0: b0aa 0020 cmpl %a2@(32),%d0
454d4: 6e00 ff48 bgtw 4541e <rtems_termios_read+0x114>
}
/*
* Wait for characters
*/
if ( wait ) {
454d8: 4a82 tstl %d2
454da: 6700 fea6 beqw 45382 <rtems_termios_read+0x78>
sc = rtems_semaphore_obtain(
454de: 2f03 movel %d3,%sp@-
454e0: 2f2a 006c movel %a2@(108),%sp@-
454e4: 2046 moveal %d6,%a0
454e6: 2f2a 0068 movel %a2@(104),%sp@-
454ea: 4e90 jsr %a0@
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
454ec: 4fef 000c lea %sp@(12),%sp
454f0: 4a80 tstl %d0
454f2: 6700 ff0c beqw 45400 <rtems_termios_read+0xf6>
454f6: 6000 fe8a braw 45382 <rtems_termios_read+0x78> <== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
454fa: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
454fe: 670c beqs 4550c <rtems_termios_read+0x202> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
45500: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45504: 0800 0005 btst #5,%d0 <== NOT EXECUTED
45508: 6700 ff68 beqw 45472 <rtems_termios_read+0x168> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
4550c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
45510: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
45514: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45518: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
4551c: 4e90 jsr %a0@ <== NOT EXECUTED
4551e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
45522: 7002 moveq #2,%d0 <== NOT EXECUTED
45524: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED
45528: 6600 ff78 bnew 454a2 <rtems_termios_read+0x198> <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
4552c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4552e: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED
45534: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45536: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
45538: 508f addql #8,%sp <== NOT EXECUTED
4553a: 4280 clrl %d0 <== NOT EXECUTED
4553c: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED
wait = 0;
45540: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED
45544: 5ec0 sgt %d0 <== NOT EXECUTED
45546: 49c0 extbl %d0 <== NOT EXECUTED
45548: c480 andl %d0,%d2 <== NOT EXECUTED
4554a: 6000 ff6c braw 454b8 <rtems_termios_read+0x1ae> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4554e: 7002 moveq #2,%d0
45550: c0aa 003c andl %a2@(60),%d0
45554: 6740 beqs 45596 <rtems_termios_read+0x28c>
45556: 47fa fc68 lea %pc@(451c0 <siproc>),%a3
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4555a: 243c 0004 6cd4 movel #290004,%d2
{
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
45560: 2f2a 0010 movel %a2@(16),%sp@-
45564: 4e90 jsr %a0@
if (n < 0) {
45566: 588f addql #4,%sp
45568: 4a80 tstl %d0
4556a: 6d1a blts 45586 <rtems_termios_read+0x27c>
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
4556c: 2f0a movel %a2,%sp@-
4556e: 0280 0000 00ff andil #255,%d0
45574: 2f00 movel %d0,%sp@-
45576: 4e93 jsr %a3@
45578: 508f addql #8,%sp
4557a: 4a80 tstl %d0
4557c: 6600 fe04 bnew 45382 <rtems_termios_read+0x78>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45580: 206a 00a0 moveal %a2@(160),%a0
45584: 60da bras 45560 <rtems_termios_read+0x256>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
45586: 4878 0001 pea 1 <ADD>
4558a: 2042 moveal %d2,%a0
4558c: 4e90 jsr %a0@
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4558e: 206a 00a0 moveal %a2@(160),%a0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
45592: 588f addql #4,%sp
45594: 60ca bras 45560 <rtems_termios_read+0x256>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
45596: 47fa fc28 lea %pc@(451c0 <siproc>),%a3
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
4559a: 263c 0004 6044 movel #286788,%d3
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
455a0: 243c 0004 6cd4 movel #290004,%d2
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
455a6: 2243 moveal %d3,%a1
455a8: 4e91 jsr %a1@
455aa: 2c00 movel %d0,%d6
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
455ac: 2f2a 0010 movel %a2@(16),%sp@-
455b0: 206a 00a0 moveal %a2@(160),%a0
455b4: 4e90 jsr %a0@
if (n < 0) {
455b6: 588f addql #4,%sp
455b8: 4a80 tstl %d0
455ba: 6d38 blts 455f4 <rtems_termios_read+0x2ea>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
455bc: 2f0a movel %a2,%sp@-
455be: 0280 0000 00ff andil #255,%d0
455c4: 2f00 movel %d0,%sp@-
455c6: 4e93 jsr %a3@
if (tty->ccount >= tty->termios.c_cc[VMIN])
455c8: 508f addql #8,%sp
455ca: 4281 clrl %d1
455cc: 102a 0047 moveb %a2@(71),%d0
455d0: 1200 moveb %d0,%d1
455d2: b2aa 0020 cmpl %a2@(32),%d1
455d6: 6f00 fdaa blew 45382 <rtems_termios_read+0x78>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
455da: 4a00 tstb %d0
455dc: 67ce beqs 455ac <rtems_termios_read+0x2a2> <== NEVER TAKEN
455de: 4a2a 0046 tstb %a2@(70)
455e2: 66c2 bnes 455a6 <rtems_termios_read+0x29c> <== ALWAYS TAKEN
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
455e4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
455e8: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED
455ec: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
455ee: 588f addql #4,%sp <== NOT EXECUTED
455f0: 4a80 tstl %d0 <== NOT EXECUTED
455f2: 6cc8 bges 455bc <rtems_termios_read+0x2b2> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
455f4: 4a2a 0047 tstb %a2@(71)
455f8: 6732 beqs 4562c <rtems_termios_read+0x322> <== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
455fa: 4a2a 0046 tstb %a2@(70)
455fe: 6706 beqs 45606 <rtems_termios_read+0x2fc> <== NEVER TAKEN
45600: 4aaa 0020 tstl %a2@(32)
45604: 660c bnes 45612 <rtems_termios_read+0x308>
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
45606: 4878 0001 pea 1 <ADD>
4560a: 2042 moveal %d2,%a0
4560c: 4e90 jsr %a0@
4560e: 588f addql #4,%sp
45610: 609a bras 455ac <rtems_termios_read+0x2a2>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
if (tty->termios.c_cc[VTIME] && tty->ccount) {
now = rtems_clock_get_ticks_since_boot();
45612: 2043 moveal %d3,%a0
45614: 4e90 jsr %a0@
if ((now - then) > tty->vtimeTicks) {
45616: 9086 subl %d6,%d0
45618: b0aa 0054 cmpl %a2@(84),%d0
4561c: 6200 fd64 bhiw 45382 <rtems_termios_read+0x78>
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
45620: 4878 0001 pea 1 <ADD>
45624: 2042 moveal %d2,%a0
45626: 4e90 jsr %a0@
45628: 588f addql #4,%sp
4562a: 6080 bras 455ac <rtems_termios_read+0x2a2>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
4562c: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED
45630: 6700 fd50 beqw 45382 <rtems_termios_read+0x78> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
45634: 2243 moveal %d3,%a1 <== NOT EXECUTED
45636: 4e91 jsr %a1@ <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
45638: 9086 subl %d6,%d0 <== NOT EXECUTED
4563a: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED
4563e: 6200 fd42 bhiw 45382 <rtems_termios_read+0x78> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
45642: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
45646: 2042 moveal %d2,%a0 <== NOT EXECUTED
45648: 4e90 jsr %a0@ <== NOT EXECUTED
4564a: 588f addql #4,%sp <== NOT EXECUTED
4564c: 6000 ff5e braw 455ac <rtems_termios_read+0x2a2> <== NOT EXECUTED
000459ba <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)
{
459ba: 4e56 fff4 linkw %fp,#-12
459be: 48d7 040c moveml %d2-%d3/%a2,%sp@
459c2: 246e 0008 moveal %fp@(8),%a2
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
459c6: 202a 00b8 movel %a2@(184),%d0
459ca: 0280 0000 0403 andil #1027,%d0
459d0: 0c80 0000 0401 cmpil #1025,%d0
459d6: 6700 0140 beqw 45b18 <rtems_termios_refill_transmitter+0x15e>
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
459da: 202a 00b8 movel %a2@(184),%d0
459de: 7603 moveq #3,%d3
459e0: 7202 moveq #2,%d1
459e2: c083 andl %d3,%d0
459e4: b280 cmpl %d0,%d1
459e6: 6700 0172 beqw 45b5a <rtems_termios_refill_transmitter+0x1a0>
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
459ea: 222a 0080 movel %a2@(128),%d1
459ee: 202a 0084 movel %a2@(132),%d0
459f2: b081 cmpl %d1,%d0
459f4: 6700 009a beqw 45a90 <rtems_termios_refill_transmitter+0xd6>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
459f8: 203c 0000 0700 movel #1792,%d0
459fe: 40c2 movew %sr,%d2
45a00: 8082 orl %d2,%d0
45a02: 46c0 movew %d0,%sr
len = tty->t_dqlen;
45a04: 222a 0090 movel %a2@(144),%d1
tty->t_dqlen = 0;
45a08: 42aa 0090 clrl %a2@(144)
rtems_interrupt_enable(level);
45a0c: 46c2 movew %d2,%sr
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
45a0e: 202a 0084 movel %a2@(132),%d0
45a12: d280 addl %d0,%d1
45a14: 202a 0088 movel %a2@(136),%d0
45a18: 4c40 1002 remul %d0,%d2,%d1
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
45a1c: 7002 moveq #2,%d0
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
45a1e: 2542 0084 movel %d2,%a2@(132)
if (tty->rawOutBufState == rob_wait) {
45a22: b0aa 0094 cmpl %a2@(148),%d0
45a26: 6700 00d8 beqw 45b00 <rtems_termios_refill_transmitter+0x146>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
45a2a: 202a 0080 movel %a2@(128),%d0
45a2e: b480 cmpl %d0,%d2
45a30: 6776 beqs 45aa8 <rtems_termios_refill_transmitter+0xee>
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))
45a32: 202a 00b8 movel %a2@(184),%d0
45a36: 0280 0000 0210 andil #528,%d0
45a3c: 0c80 0000 0210 cmpil #528,%d0
45a42: 6700 015a beqw 45b9e <rtems_termios_refill_transmitter+0x1e4>
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
45a46: 202a 0080 movel %a2@(128),%d0
45a4a: b082 cmpl %d2,%d0
45a4c: 647c bccs 45aca <rtems_termios_refill_transmitter+0x110>
nToSend = tty->rawOutBuf.Size - newTail;
45a4e: 262a 0088 movel %a2@(136),%d3
45a52: 9682 subl %d2,%d3
else
nToSend = tty->rawOutBuf.Head - newTail;
/* 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)) {
45a54: 202a 00b8 movel %a2@(184),%d0
45a58: 0280 0000 0600 andil #1536,%d0
45a5e: 667c bnes 45adc <rtems_termios_refill_transmitter+0x122><== NEVER TAKEN
45a60: 2003 movel %d3,%d0
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
45a62: 7201 moveq #1,%d1
(*tty->device.write)(
45a64: 2f00 movel %d0,%sp@-
45a66: 202a 007c movel %a2@(124),%d0
45a6a: d082 addl %d2,%d0
45a6c: 2f00 movel %d0,%sp@-
45a6e: 2f2a 0010 movel %a2@(16),%sp@-
45a72: 206a 00a4 moveal %a2@(164),%a0
/* 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*/
45a76: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
45a7a: 4e90 jsr %a0@
45a7c: 4fef 000c lea %sp@(12),%sp
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45a80: 2542 0084 movel %d2,%a2@(132)
}
return nToSend;
}
45a84: 2003 movel %d3,%d0
45a86: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
45a8c: 4e5e unlk %fp
45a8e: 4e75 rts
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
45a90: 7602 moveq #2,%d3
45a92: b6aa 0094 cmpl %a2@(148),%d3
45a96: 6700 0130 beqw 45bc8 <rtems_termios_refill_transmitter+0x20e>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
45a9a: 4283 clrl %d3
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45a9c: 2003 movel %d3,%d0
45a9e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
45aa4: 4e5e unlk %fp
45aa6: 4e75 rts
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
45aa8: 206a 00d4 moveal %a2@(212),%a0
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
45aac: 42aa 0094 clrl %a2@(148)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
45ab0: 4a88 tstl %a0
45ab2: 6700 012e beqw 45be2 <rtems_termios_refill_transmitter+0x228>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
45ab6: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
45aba: 4283 clrl %d3 <== NOT EXECUTED
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
45abc: 486a 0030 pea %a2@(48) <== NOT EXECUTED
45ac0: 4e90 jsr %a0@ <== NOT EXECUTED
45ac2: 508f addql #8,%sp <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45ac4: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED
45ac8: 60ba bras 45a84 <rtems_termios_refill_transmitter+0xca><== NOT EXECUTED
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
45aca: 262a 0080 movel %a2@(128),%d3
45ace: 9682 subl %d2,%d3
/* 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)) {
45ad0: 202a 00b8 movel %a2@(184),%d0
45ad4: 0280 0000 0600 andil #1536,%d0
45ada: 6784 beqs 45a60 <rtems_termios_refill_transmitter+0xa6>
45adc: 7001 moveq #1,%d0
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
45ade: 7201 moveq #1,%d1
nToSend = tty->rawOutBuf.Head - newTail;
/* 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)) {
nToSend = 1;
45ae0: 7601 moveq #1,%d3
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
45ae2: 2f00 movel %d0,%sp@-
45ae4: 202a 007c movel %a2@(124),%d0
45ae8: d082 addl %d2,%d0
45aea: 2f00 movel %d0,%sp@-
45aec: 2f2a 0010 movel %a2@(16),%sp@-
45af0: 206a 00a4 moveal %a2@(164),%a0
/* 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*/
45af4: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
45af8: 4e90 jsr %a0@
45afa: 4fef 000c lea %sp@(12),%sp
45afe: 6080 bras 45a80 <rtems_termios_refill_transmitter+0xc6>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45b00: 2f2a 008c movel %a2@(140),%sp@-
45b04: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
45b0a: 202a 0080 movel %a2@(128),%d0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45b0e: 588f addql #4,%sp
}
if (newTail == tty->rawOutBuf.Head) {
45b10: b480 cmpl %d0,%d2
45b12: 6600 ff1e bnew 45a32 <rtems_termios_refill_transmitter+0x78>
45b16: 6090 bras 45aa8 <rtems_termios_refill_transmitter+0xee>
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
45b18: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
45b1c: 486a 004a pea %a2@(74) <== NOT EXECUTED
45b20: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45b24: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
45b28: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
45b2a: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
45b30: 40c1 movew %sr,%d1 <== NOT EXECUTED
45b32: 8081 orl %d1,%d0 <== NOT EXECUTED
45b34: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
45b36: 7402 moveq #2,%d2 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
45b38: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
45b3c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45b40: 8082 orl %d2,%d0 <== NOT EXECUTED
45b42: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
45b46: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
45b48: 7601 moveq #1,%d3 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45b4a: 2003 movel %d3,%d0 <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
45b4c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45b50: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
45b56: 4e5e unlk %fp <== NOT EXECUTED
45b58: 4e75 rts <== 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, (void *)&(tty->termios.c_cc[VSTART]), 1);
45b5a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
45b5e: 486a 0049 pea %a2@(73) <== NOT EXECUTED
45b62: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45b66: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
45b6a: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
45b6c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
45b72: 40c1 movew %sr,%d1 <== NOT EXECUTED
45b74: 8081 orl %d1,%d0 <== NOT EXECUTED
45b76: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
45b78: 74fd moveq #-3,%d2 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
45b7a: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
45b7e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45b82: c082 andl %d2,%d0 <== NOT EXECUTED
45b84: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
45b88: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
45b8a: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45b8e: 2003 movel %d3,%d0 <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
45b90: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45b94: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
45b9a: 4e5e unlk %fp <== NOT EXECUTED
45b9c: 4e75 rts <== NOT EXECUTED
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
45b9e: 303c 0700 movew #1792,%d0 <== NOT EXECUTED
45ba2: 40c1 movew %sr,%d1 <== NOT EXECUTED
45ba4: 8081 orl %d1,%d0 <== NOT EXECUTED
45ba6: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
45ba8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45bac: 7620 moveq #32,%d3 <== NOT EXECUTED
45bae: 8083 orl %d3,%d0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
45bb0: 163c 0001 moveb #1,%d3 <== 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;
45bb4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
45bb8: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED
rtems_interrupt_enable(level);
45bbc: 46c1 movew %d1,%sr <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45bbe: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED
/* 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);
nToSend = 0;
45bc2: 4203 clrb %d3 <== NOT EXECUTED
45bc4: 6000 febe braw 45a84 <rtems_termios_refill_transmitter+0xca><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45bc8: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED
}
return 0;
45bcc: 4203 clrb %d3 <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45bce: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release> <== NOT EXECUTED
45bd4: 588f addql #4,%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45bd6: 2003 movel %d3,%d0 <== NOT EXECUTED
45bd8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
45bde: 4e5e unlk %fp <== NOT EXECUTED
45be0: 4e75 rts <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45be2: 2542 0084 movel %d2,%a2@(132)
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
45be6: 4283 clrl %d3
45be8: 6000 fe9a braw 45a84 <rtems_termios_refill_transmitter+0xca>
0004591e <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
4591e: 4e56 ffe0 linkw %fp,#-32
45922: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
45926: 240e movel %fp,%d2
45928: 260e movel %fp,%d3
4592a: 5d82 subql #6,%d2
4592c: 47f9 0004 60b0 lea 460b0 <rtems_event_receive>,%a3
45932: 49f9 0004 6aa8 lea 46aa8 <rtems_task_delete>,%a4
45938: 5383 subql #1,%d3
4593a: 4bf9 0004 566c lea 4566c <rtems_termios_enqueue_raw_characters>,%a5
45940: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45944: 2f02 movel %d2,%sp@-
45946: 42a7 clrl %sp@-
45948: 4878 0002 pea 2 <DOUBLE_FLOAT>
4594c: 4878 0003 pea 3 <DIVIDE>
45950: 4e93 jsr %a3@
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
45952: 4fef 0010 lea %sp@(16),%sp
45956: 7001 moveq #1,%d0
45958: c0ae fffa andl %fp@(-6),%d0
4595c: 663e bnes 4599c <rtems_termios_rxdaemon+0x7e> <== NEVER TAKEN
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4595e: 2f2a 0010 movel %a2@(16),%sp@-
45962: 206a 00a0 moveal %a2@(160),%a0
45966: 4e90 jsr %a0@
if (c != EOF) {
45968: 588f addql #4,%sp
4596a: 72ff moveq #-1,%d1
4596c: b280 cmpl %d0,%d1
4596e: 67d4 beqs 45944 <rtems_termios_rxdaemon+0x26>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
45970: 4878 0001 pea 1 <ADD>
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
45974: 1d40 ffff moveb %d0,%fp@(-1)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
45978: 2f03 movel %d3,%sp@-
4597a: 2f0a movel %a2,%sp@-
4597c: 4e95 jsr %a5@
4597e: 4fef 000c lea %sp@(12),%sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45982: 2f02 movel %d2,%sp@-
45984: 42a7 clrl %sp@-
45986: 4878 0002 pea 2 <DOUBLE_FLOAT>
4598a: 4878 0003 pea 3 <DIVIDE>
4598e: 4e93 jsr %a3@
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
45990: 4fef 0010 lea %sp@(16),%sp
45994: 7001 moveq #1,%d0
45996: c0ae fffa andl %fp@(-6),%d0
4599a: 67c2 beqs 4595e <rtems_termios_rxdaemon+0x40> <== ALWAYS TAKEN
tty->rxTaskId = 0;
4599c: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
459a0: 42a7 clrl %sp@- <== NOT EXECUTED
459a2: 4e94 jsr %a4@ <== NOT EXECUTED
459a4: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
459a6: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
459aa: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED
459ae: 4e90 jsr %a0@ <== NOT EXECUTED
if (c != EOF) {
459b0: 588f addql #4,%sp <== NOT EXECUTED
459b2: 72ff moveq #-1,%d1 <== NOT EXECUTED
459b4: b280 cmpl %d0,%d1 <== NOT EXECUTED
459b6: 678c beqs 45944 <rtems_termios_rxdaemon+0x26> <== NOT EXECUTED
459b8: 60b6 bras 45970 <rtems_termios_rxdaemon+0x52> <== NOT EXECUTED
00045bec <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
45bec: 4e56 ffe8 linkw %fp,#-24
45bf0: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
45bf4: 240e movel %fp,%d2
45bf6: 5982 subql #4,%d2
45bf8: 49f9 0004 60b0 lea 460b0 <rtems_event_receive>,%a4
45bfe: 4bf9 0004 6aa8 lea 46aa8 <rtems_task_delete>,%a5
45c04: 47f9 0004 59ba lea 459ba <rtems_termios_refill_transmitter>,%a3
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45c0a: 2f02 movel %d2,%sp@-
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
45c0c: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45c10: 42a7 clrl %sp@-
45c12: 4878 0002 pea 2 <DOUBLE_FLOAT>
45c16: 4878 0003 pea 3 <DIVIDE>
45c1a: 4e94 jsr %a4@
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
45c1c: 4fef 0010 lea %sp@(16),%sp
45c20: 7001 moveq #1,%d0
45c22: c0ae fffc andl %fp@(-4),%d0
45c26: 663a bnes 45c62 <rtems_termios_txdaemon+0x76> <== NEVER TAKEN
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
45c28: 202a 00cc movel %a2@(204),%d0
45c2c: eb88 lsll #5,%d0
45c2e: 0680 0005 eb14 addil #387860,%d0
45c34: 2240 moveal %d0,%a1
45c36: 2051 moveal %a1@,%a0
45c38: 4a88 tstl %a0
45c3a: 6706 beqs 45c42 <rtems_termios_txdaemon+0x56> <== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
45c3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45c3e: 4e90 jsr %a0@ <== NOT EXECUTED
45c40: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
45c42: 2f0a movel %a2,%sp@-
45c44: 4e93 jsr %a3@
}
45c46: 588f addql #4,%sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45c48: 2f02 movel %d2,%sp@-
45c4a: 42a7 clrl %sp@-
45c4c: 4878 0002 pea 2 <DOUBLE_FLOAT>
45c50: 4878 0003 pea 3 <DIVIDE>
45c54: 4e94 jsr %a4@
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
45c56: 4fef 0010 lea %sp@(16),%sp
45c5a: 7001 moveq #1,%d0
45c5c: c0ae fffc andl %fp@(-4),%d0
45c60: 67c6 beqs 45c28 <rtems_termios_txdaemon+0x3c> <== ALWAYS TAKEN
tty->txTaskId = 0;
45c62: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45c66: 42a7 clrl %sp@- <== NOT EXECUTED
45c68: 4e95 jsr %a5@ <== NOT EXECUTED
45c6a: 588f addql #4,%sp <== NOT EXECUTED
45c6c: 60ba bras 45c28 <rtems_termios_txdaemon+0x3c> <== NOT EXECUTED
00045234 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
45234: 4e56 ffe8 linkw %fp,#-24
45238: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
4523c: 266e 0008 moveal %fp@(8),%a3
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
45240: 2053 moveal %a3@,%a0
45242: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45246: 42a7 clrl %sp@-
45248: 42a7 clrl %sp@-
4524a: 2f2a 0018 movel %a2@(24),%sp@-
4524e: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
45254: 4fef 000c lea %sp@(12),%sp
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45258: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
4525a: 662a bnes 45286 <rtems_termios_write+0x52> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
4525c: 202a 00cc movel %a2@(204),%d0
45260: eb88 lsll #5,%d0
45262: 0680 0005 eb0c addil #387852,%d0
45268: 2240 moveal %d0,%a1
4526a: 2051 moveal %a1@,%a0
4526c: 4a88 tstl %a0
4526e: 6722 beqs 45292 <rtems_termios_write+0x5e>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
45270: 2f0b movel %a3,%sp@-
45272: 2f0a movel %a2,%sp@-
45274: 4e90 jsr %a0@
rtems_semaphore_release (tty->osem);
45276: 2f2a 0018 movel %a2@(24),%sp@-
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
4527a: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
4527c: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return sc;
45282: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
45286: 2002 movel %d2,%d0
45288: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4528e: 4e5e unlk %fp
45290: 4e75 rts
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
45292: 7001 moveq #1,%d0
45294: c0aa 0034 andl %a2@(52),%d0
45298: 6740 beqs 452da <rtems_termios_write+0xa6> <== NEVER TAKEN
uint32_t count = args->count;
4529a: 262b 0010 movel %a3@(16),%d3
char *buffer = args->buffer;
4529e: 286b 000c moveal %a3@(12),%a4
while (count--)
452a2: 675e beqs 45302 <rtems_termios_write+0xce> <== NEVER TAKEN
452a4: 4bfa f8a8 lea %pc@(44b4e <oproc>),%a5
oproc (*buffer++, tty);
452a8: 4280 clrl %d0
452aa: 101c moveb %a4@+,%d0
452ac: 5383 subql #1,%d3
452ae: 2f0a movel %a2,%sp@-
452b0: 2f00 movel %d0,%sp@-
452b2: 4e95 jsr %a5@
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
452b4: 508f addql #8,%sp
452b6: 4a83 tstl %d3
452b8: 66ee bnes 452a8 <rtems_termios_write+0x74>
452ba: 202b 0010 movel %a3@(16),%d0
oproc (*buffer++, tty);
args->bytes_moved = args->count;
452be: 2740 0018 movel %d0,%a3@(24)
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
452c2: 2f2a 0018 movel %a2@(24),%sp@-
452c6: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
return sc;
452cc: 588f addql #4,%sp
}
452ce: 2002 movel %d2,%d0
452d0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
452d6: 4e5e unlk %fp
452d8: 4e75 rts
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
452da: 2f0a movel %a2,%sp@- <== NOT EXECUTED
452dc: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED
452e0: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
452e4: 4eb9 0004 4a4a jsr 44a4a <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
452ea: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED
452f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
452f4: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
452f8: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
452fe: 588f addql #4,%sp <== NOT EXECUTED
45300: 60cc bras 452ce <rtems_termios_write+0x9a> <== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
45302: 4280 clrl %d0 <== NOT EXECUTED
oproc (*buffer++, tty);
args->bytes_moved = args->count;
45304: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED
45308: 60b8 bras 452c2 <rtems_termios_write+0x8e> <== NOT EXECUTED
00058d2c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
58d2c: 4e56 fffc linkw %fp,#-4
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
58d30: 486e fffc pea %fp@(-4)
58d34: 2f2e 0008 movel %fp@(8),%sp@-
58d38: 4879 0007 e458 pea 7e458 <_Timer_Information>
58d3e: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58d44: 4fef 000c lea %sp@(12),%sp
58d48: 4aae fffc tstl %fp@(-4)
58d4c: 6706 beqs 58d54 <rtems_timer_cancel+0x28>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
58d4e: 7004 moveq #4,%d0
}
58d50: 4e5e unlk %fp
58d52: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
58d54: 7204 moveq #4,%d1
58d56: 2040 moveal %d0,%a0
58d58: b2a8 0038 cmpl %a0@(56),%d1
58d5c: 670c beqs 58d6a <rtems_timer_cancel+0x3e> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
58d5e: 4868 0010 pea %a0@(16)
58d62: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
58d68: 588f addql #4,%sp
_Thread_Enable_dispatch();
58d6a: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
58d70: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58d72: 4e5e unlk %fp
...
00058f60 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
58f60: 4e56 ffec linkw %fp,#-20
58f64: 48d7 041c moveml %d2-%d4/%a2,%sp@
58f68: 242e 000c movel %fp@(12),%d2
58f6c: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
58f70: 4a39 0007 e254 tstb 7e254 <_TOD_Is_set>
58f76: 660c bnes 58f84 <rtems_timer_fire_when+0x24>
return RTEMS_NOT_DEFINED;
58f78: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58f7a: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
58f80: 4e5e unlk %fp
58f82: 4e75 rts
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
58f84: 2f02 movel %d2,%sp@-
58f86: 4eb9 0005 5fac jsr 55fac <_TOD_Validate>
58f8c: 588f addql #4,%sp
58f8e: 4a00 tstb %d0
58f90: 671a beqs 58fac <rtems_timer_fire_when+0x4c>
return RTEMS_INVALID_CLOCK;
if ( !routine )
58f92: 4a83 tstl %d3
58f94: 6700 00a8 beqw 5903e <rtems_timer_fire_when+0xde>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
58f98: 2f02 movel %d2,%sp@-
58f9a: 4eb9 0005 5ea4 jsr 55ea4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
58fa0: 588f addql #4,%sp
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
58fa2: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
58fa4: b0b9 0007 e2ce cmpl 7e2ce <_TOD_Now>,%d0
58faa: 620c bhis 58fb8 <rtems_timer_fire_when+0x58>
return RTEMS_INVALID_CLOCK;
58fac: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58fae: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
58fb4: 4e5e unlk %fp
58fb6: 4e75 rts
58fb8: 486e fffc pea %fp@(-4)
58fbc: 2f2e 0008 movel %fp@(8),%sp@-
58fc0: 4879 0007 e458 pea 7e458 <_Timer_Information>
58fc6: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58fcc: 4fef 000c lea %sp@(12),%sp
58fd0: 2440 moveal %d0,%a2
58fd2: 4aae fffc tstl %fp@(-4)
58fd6: 665a bnes 59032 <rtems_timer_fire_when+0xd2> <== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
58fd8: 2800 movel %d0,%d4
58fda: 0684 0000 0010 addil #16,%d4
58fe0: 2f04 movel %d4,%sp@-
58fe2: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
58fe8: 256e 0014 0034 movel %fp@(20),%a2@(52)
the_timer->the_class = TIMER_TIME_OF_DAY;
58fee: 7002 moveq #2,%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
58ff0: 94b9 0007 e2ce subl 7e2ce <_TOD_Now>,%d2
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;
58ff6: 2540 0038 movel %d0,%a2@(56)
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
58ffa: 202e 0008 movel %fp@(8),%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
58ffe: 2542 001c movel %d2,%a2@(28)
59002: 2540 0030 movel %d0,%a2@(48)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59006: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine;
5900a: 2543 002c movel %d3,%a2@(44)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
5900e: 2f04 movel %d4,%sp@-
59010: 4879 0007 e2f8 pea 7e2f8 <_Watchdog_Seconds_chain>
59016: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
5901c: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59022: 4fef 000c lea %sp@(12),%sp
59026: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59028: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
5902e: 4e5e unlk %fp
59030: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
59032: 7004 moveq #4,%d0
}
59034: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
5903a: 4e5e unlk %fp
5903c: 4e75 rts
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
5903e: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59040: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
59046: 4e5e unlk %fp
...
000597e2 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
597e2: 4e56 fffc linkw %fp,#-4
597e6: 202e 0008 movel %fp@(8),%d0
597ea: 2f03 movel %d3,%sp@-
597ec: 2f02 movel %d2,%sp@-
597ee: 4a80 tstl %d0
597f0: 6748 beqs 5983a <rtems_timer_initiate_server+0x58><== NEVER TAKEN
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
597f2: 4281 clrl %d1
597f4: 1239 0007 8632 moveb 78632 <rtems_maximum_priority>,%d1
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
597fa: b280 cmpl %d0,%d1
597fc: 644a bccs 59848 <rtems_timer_initiate_server+0x66>
* 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 ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
597fe: 72ff moveq #-1,%d1
59800: b280 cmpl %d0,%d1
59802: 6636 bnes 5983a <rtems_timer_initiate_server+0x58>
59804: 2239 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d1
5980a: 5281 addql #1,%d1
return RTEMS_INVALID_PRIORITY;
_priority = 0;
5980c: 4283 clrl %d3
5980e: 23c1 0007 e244 movel %d1,7e244 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59814: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59816: 1439 0007 972e moveb 7972e <initialized.3657>,%d2
initialized = true;
5981c: 13c0 0007 972e moveb %d0,7972e <initialized.3657>
_Thread_Enable_dispatch();
59822: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59828: 4a02 tstb %d2
5982a: 6744 beqs 59870 <rtems_timer_initiate_server+0x8e>
initialized = false;
}
#endif
return status;
}
5982c: 242e fff4 movel %fp@(-12),%d2
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
return RTEMS_INCORRECT_STATE;
59830: 700e moveq #14,%d0
initialized = false;
}
#endif
return status;
}
59832: 262e fff8 movel %fp@(-8),%d3
59836: 4e5e unlk %fp
59838: 4e75 rts
5983a: 242e fff4 movel %fp@(-12),%d2
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
5983e: 7013 moveq #19,%d0
initialized = false;
}
#endif
return status;
}
59840: 262e fff8 movel %fp@(-8),%d3
59844: 4e5e unlk %fp
59846: 4e75 rts
59848: 2239 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d1
5984e: 5281 addql #1,%d1
59850: 2600 movel %d0,%d3
59852: 23c1 0007 e244 movel %d1,7e244 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59858: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
5985a: 1439 0007 972e moveb 7972e <initialized.3657>,%d2
initialized = true;
59860: 13c0 0007 972e moveb %d0,7972e <initialized.3657>
_Thread_Enable_dispatch();
59866: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
if ( tmpInitialized )
5986c: 4a02 tstb %d2
5986e: 66bc bnes 5982c <rtems_timer_initiate_server+0x4a><== NEVER TAKEN
* 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(
59870: 222e 0010 movel %fp@(16),%d1
59874: 486e fffc pea %fp@(-4)
59878: 08c1 000f bset #15,%d1
5987c: 2f01 movel %d1,%sp@-
5987e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
59882: 2f2e 000c movel %fp@(12),%sp@-
59886: 2f03 movel %d3,%sp@-
59888: 2f3c 5449 4d45 movel #1414090053,%sp@-
5988e: 4eb9 0005 8404 jsr 58404 <rtems_task_create>
/* 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) {
59894: 4fef 0018 lea %sp@(24),%sp
59898: 4a80 tstl %d0
5989a: 6714 beqs 598b0 <rtems_timer_initiate_server+0xce>
initialized = false;
}
#endif
return status;
}
5989c: 242e fff4 movel %fp@(-12),%d2
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
598a0: 4201 clrb %d1
initialized = false;
}
#endif
return status;
}
598a2: 262e fff8 movel %fp@(-8),%d3
598a6: 4e5e unlk %fp
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
598a8: 13c1 0007 972e moveb %d1,7972e <initialized.3657>
initialized = false;
}
#endif
return status;
}
598ae: 4e75 rts
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
598b0: 202e fffc movel %fp@(-4),%d0
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
598b4: 4282 clrl %d2
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
598b6: 2079 0007 e1dc moveal 7e1dc <_RTEMS_tasks_Information+0x18>,%a0
598bc: 3400 movew %d0,%d2
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
598be: 2239 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d1
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
598c4: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0
598c8: 23d0 0007 96b0 movel %a0@,796b0 <_Timer_server_Default>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
598ce: 41f9 0007 96e4 lea 796e4 <_Timer_server_Default+0x34>,%a0
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
598d4: 4879 0007 96b0 pea 796b0 <_Timer_server_Default>
598da: 487a fb6c pea %pc@(59448 <_Timer_server_Body>)
598de: 23c8 0007 96e0 movel %a0,796e0 <_Timer_server_Default+0x30>
head->previous = NULL;
tail->previous = head;
598e4: 41f9 0007 96e0 lea 796e0 <_Timer_server_Default+0x30>,%a0
598ea: 23c8 0007 96e8 movel %a0,796e8 <_Timer_server_Default+0x38>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
598f0: 41f9 0007 971c lea 7971c <_Timer_server_Default+0x6c>,%a0
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
598f6: 23c1 0007 96ec movel %d1,796ec <_Timer_server_Default+0x3c>
head->previous = NULL;
tail->previous = head;
598fc: 223c 0007 9718 movel #497432,%d1
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
59902: 23c8 0007 9718 movel %a0,79718 <_Timer_server_Default+0x68>
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59908: 41f9 0007 e2ce lea 7e2ce <_TOD_Now>,%a0
head->previous = NULL;
tail->previous = head;
5990e: 23c1 0007 9720 movel %d1,79720 <_Timer_server_Default+0x70>
59914: 23d0 0007 9724 movel %a0@,79724 <_Timer_server_Default+0x74>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
5991a: 223c 0005 c6a0 movel #378528,%d1
59920: 41f9 0005 c6a0 lea 5c6a0 <_Thread_Delay_ended>,%a0
59926: 23c1 0007 96d4 movel %d1,796d4 <_Timer_server_Default+0x24>
ts->insert_chain = NULL;
ts->active = false;
5992c: 4201 clrb %d1
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
5992e: 42b9 0007 9728 clrl 79728 <_Timer_server_Default+0x78>
ts->active = false;
59934: 13c1 0007 972c moveb %d1,7972c <_Timer_server_Default+0x7c>
5993a: 23c8 0007 970c movel %a0,7970c <_Timer_server_Default+0x5c>
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59940: 41f9 0007 96b0 lea 796b0 <_Timer_server_Default>,%a0
/*
* Start the timer server
*/
status = rtems_task_start(
59946: 2f00 movel %d0,%sp@-
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
59948: 223c 0005 9686 movel #366214,%d1
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5994e: 42b9 0007 96e4 clrl 796e4 <_Timer_server_Default+0x34>
59954: 42b9 0007 971c clrl 7971c <_Timer_server_Default+0x6c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5995a: 42b9 0007 96c0 clrl 796c0 <_Timer_server_Default+0x10>
59960: 23c1 0007 96b4 movel %d1,796b4 <_Timer_server_Default+0x4>
the_watchdog->routine = routine;
the_watchdog->id = id;
59966: 23c0 0007 96d8 movel %d0,796d8 <_Timer_server_Default+0x28>
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
5996c: 23c8 0007 e490 movel %a0,7e490 <_Timer_server>
the_watchdog->user_data = user_data;
59972: 42b9 0007 96dc clrl 796dc <_Timer_server_Default+0x2c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59978: 42b9 0007 96f8 clrl 796f8 <_Timer_server_Default+0x48>
the_watchdog->routine = routine;
the_watchdog->id = id;
5997e: 23c0 0007 9710 movel %d0,79710 <_Timer_server_Default+0x60>
the_watchdog->user_data = user_data;
59984: 42b9 0007 9714 clrl 79714 <_Timer_server_Default+0x64>
/*
* Start the timer server
*/
status = rtems_task_start(
5998a: 4eb9 0005 8b10 jsr 58b10 <rtems_task_start>
initialized = false;
}
#endif
return status;
}
59990: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59994: 4fef 000c lea %sp@(12),%sp
}
59998: 262e fff8 movel %fp@(-8),%d3
5999c: 4e5e unlk %fp <== NOT EXECUTED
000590e4 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
590e4: 4e56 fff0 linkw %fp,#-16
590e8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
590ec: 486e fffc pea %fp@(-4)
590f0: 2f2e 0008 movel %fp@(8),%sp@-
590f4: 4879 0007 e458 pea 7e458 <_Timer_Information>
590fa: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59100: 4fef 000c lea %sp@(12),%sp
59104: 2440 moveal %d0,%a2
59106: 4aae fffc tstl %fp@(-4)
5910a: 670e beqs 5911a <rtems_timer_reset+0x36>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5910c: 7404 moveq #4,%d2
}
5910e: 2002 movel %d2,%d0
59110: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
59116: 4e5e unlk %fp
59118: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
5911a: 202a 0038 movel %a2@(56),%d0
5911e: 671a beqs 5913a <rtems_timer_reset+0x56>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59120: 7201 moveq #1,%d1
59122: b280 cmpl %d0,%d1
59124: 673c beqs 59162 <rtems_timer_reset+0x7e>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
59126: 740b moveq #11,%d2
}
_Thread_Enable_dispatch();
59128: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5912e: 2002 movel %d2,%d0
59130: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
59136: 4e5e unlk %fp
59138: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
5913a: 45ea 0010 lea %a2@(16),%a2
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
5913e: 4282 clrl %d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
59140: 2f0a movel %a2,%sp@-
59142: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
59148: 2f0a movel %a2,%sp@-
5914a: 4879 0007 e304 pea 7e304 <_Watchdog_Ticks_chain>
59150: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
59156: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
5915a: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
59160: 60cc bras 5912e <rtems_timer_reset+0x4a>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59162: 486a 0010 pea %a2@(16)
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
59166: 4282 clrl %d2
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
59168: 2679 0007 e490 moveal 7e490 <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
5916e: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
59174: 2f0a movel %a2,%sp@-
59176: 2f0b movel %a3,%sp@-
59178: 206b 0004 moveal %a3@(4),%a0
5917c: 4e90 jsr %a0@
5917e: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
59182: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
59188: 60a4 bras 5912e <rtems_timer_reset+0x4a>
...
0005918c <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
5918c: 4e56 ffe8 linkw %fp,#-24
59190: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
59194: 282e 0008 movel %fp@(8),%d4
59198: 262e 000c movel %fp@(12),%d3
5919c: 242e 0010 movel %fp@(16),%d2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
591a0: 2479 0007 e490 moveal 7e490 <_Timer_server>,%a2
if ( !timer_server )
591a6: 4a8a tstl %a2
591a8: 6700 009c beqw 59246 <rtems_timer_server_fire_after+0xba>
return RTEMS_INCORRECT_STATE;
if ( !routine )
591ac: 4a82 tstl %d2
591ae: 6700 00a2 beqw 59252 <rtems_timer_server_fire_after+0xc6>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
591b2: 4a83 tstl %d3
591b4: 660c bnes 591c2 <rtems_timer_server_fire_after+0x36>
return RTEMS_INVALID_NUMBER;
591b6: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
591b8: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
591be: 4e5e unlk %fp
591c0: 4e75 rts
591c2: 486e fffc pea %fp@(-4)
591c6: 2f04 movel %d4,%sp@-
591c8: 4879 0007 e458 pea 7e458 <_Timer_Information>
591ce: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
591d4: 4fef 000c lea %sp@(12),%sp
591d8: 2640 moveal %d0,%a3
591da: 4aae fffc tstl %fp@(-4)
591de: 665a bnes 5923a <rtems_timer_server_fire_after+0xae>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
591e0: 486b 0010 pea %a3@(16)
591e4: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
_ISR_Disable( level );
591ea: 203c 0000 0700 movel #1792,%d0
591f0: 40c1 movew %sr,%d1
591f2: 8081 orl %d1,%d0
591f4: 46c0 movew %d0,%sr
/*
* 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 ) {
591f6: 588f addql #4,%sp
591f8: 4aab 0018 tstl %a3@(24)
591fc: 6660 bnes 5925e <rtems_timer_server_fire_after+0xd2><== NEVER TAKEN
/*
* 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;
591fe: 7001 moveq #1,%d0
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
59200: 276e 0014 0034 movel %fp@(20),%a3@(52)
59206: 2740 0038 movel %d0,%a3@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5920a: 42ab 0018 clrl %a3@(24)
the_watchdog->routine = routine;
5920e: 2742 002c movel %d2,%a3@(44)
the_watchdog->id = id;
59212: 2744 0030 movel %d4,%a3@(48)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
59216: 2743 001c movel %d3,%a3@(28)
_ISR_Enable( level );
5921a: 46c1 movew %d1,%sr
(*timer_server->schedule_operation)( timer_server, the_timer );
5921c: 2f0b movel %a3,%sp@-
5921e: 2f0a movel %a2,%sp@-
59220: 206a 0004 moveal %a2@(4),%a0
59224: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59226: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5922c: 508f addql #8,%sp
5922e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59230: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
59236: 4e5e unlk %fp
59238: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5923a: 7004 moveq #4,%d0
}
5923c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
59242: 4e5e unlk %fp
59244: 4e75 rts
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
59246: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59248: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
5924e: 4e5e unlk %fp
59250: 4e75 rts
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
59252: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59254: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
5925a: 4e5e unlk %fp
5925c: 4e75 rts
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
5925e: 46c1 movew %d1,%sr
_Thread_Enable_dispatch();
59260: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59266: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59268: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
5926e: 4e5e unlk %fp
...
00059274 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59274: 4e56 ffec linkw %fp,#-20
59278: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
5927c: 242e 000c movel %fp@(12),%d2
59280: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
59284: 2479 0007 e490 moveal 7e490 <_Timer_server>,%a2
if ( !timer_server )
5928a: 4a8a tstl %a2
5928c: 6700 00c8 beqw 59356 <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59290: 4a39 0007 e254 tstb 7e254 <_TOD_Is_set>
59296: 6700 00a6 beqw 5933e <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED;
if ( !routine )
5929a: 4a83 tstl %d3
5929c: 6700 00ac beqw 5934a <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
592a0: 2f02 movel %d2,%sp@-
592a2: 4eb9 0005 5fac jsr 55fac <_TOD_Validate>
592a8: 588f addql #4,%sp
592aa: 4a00 tstb %d0
592ac: 660c bnes 592ba <rtems_timer_server_fire_when+0x46>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
592ae: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
592b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
592b6: 4e5e unlk %fp
592b8: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
592ba: 2f02 movel %d2,%sp@-
592bc: 4eb9 0005 5ea4 jsr 55ea4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
592c2: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
592c4: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
592c6: b0b9 0007 e2ce cmpl 7e2ce <_TOD_Now>,%d0
592cc: 63e0 blss 592ae <rtems_timer_server_fire_when+0x3a>
592ce: 486e fffc pea %fp@(-4)
592d2: 2f2e 0008 movel %fp@(8),%sp@-
592d6: 4879 0007 e458 pea 7e458 <_Timer_Information>
592dc: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
592e2: 4fef 000c lea %sp@(12),%sp
592e6: 2640 moveal %d0,%a3
592e8: 4aae fffc tstl %fp@(-4)
592ec: 6674 bnes 59362 <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
592ee: 486b 0010 pea %a3@(16)
592f2: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
the_watchdog->user_data = user_data;
592f8: 276e 0014 0034 movel %fp@(20),%a3@(52)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
592fe: 7003 moveq #3,%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59300: 94b9 0007 e2ce subl 7e2ce <_TOD_Now>,%d2
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;
59306: 2740 0038 movel %d0,%a3@(56)
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
5930a: 202e 0008 movel %fp@(8),%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
5930e: 2742 001c movel %d2,%a3@(28)
59312: 2740 0030 movel %d0,%a3@(48)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59316: 42ab 0018 clrl %a3@(24)
the_watchdog->routine = routine;
5931a: 2743 002c movel %d3,%a3@(44)
(*timer_server->schedule_operation)( timer_server, the_timer );
5931e: 2f0b movel %a3,%sp@-
59320: 2f0a movel %a2,%sp@-
59322: 206a 0004 moveal %a2@(4),%a0
59326: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59328: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5932e: 4fef 000c lea %sp@(12),%sp
59332: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59334: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
5933a: 4e5e unlk %fp
5933c: 4e75 rts
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
5933e: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59340: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED
59346: 4e5e unlk %fp <== NOT EXECUTED
59348: 4e75 rts <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
5934a: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5934c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
59352: 4e5e unlk %fp
59354: 4e75 rts
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
59356: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59358: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
5935e: 4e5e unlk %fp
59360: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
59362: 7004 moveq #4,%d0
}
59364: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
5936a: 4e5e unlk %fp
...
00042c3c <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
42c3c: 4e56 ffe8 linkw %fp,#-24
42c40: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
42c44: 242e 0008 movel %fp@(8),%d2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
42c48: 0802 001d btst #29,%d2
42c4c: 6730 beqs 42c7e <rtems_verror+0x42>
if (rtems_panic_in_progress++)
42c4e: 2239 0005 f2f4 movel 5f2f4 <rtems_panic_in_progress>,%d1
42c54: 2001 movel %d1,%d0
42c56: 5280 addql #1,%d0
42c58: 23c0 0005 f2f4 movel %d0,5f2f4 <rtems_panic_in_progress>
42c5e: 4a81 tstl %d1
42c60: 6714 beqs 42c76 <rtems_verror+0x3a> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
42c62: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED
42c68: 5280 addql #1,%d0 <== NOT EXECUTED
42c6a: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level><== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
42c70: 2039 0005 f2f4 movel 5f2f4 <rtems_panic_in_progress>,%d0 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
42c76: 7202 moveq #2,%d1
42c78: b280 cmpl %d0,%d1
42c7a: 6d00 00b6 bltw 42d32 <rtems_verror+0xf6>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42c7e: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42c84: 45f9 0004 de42 lea 4de42 <fflush>,%a2
status = error_flag & ~RTEMS_ERROR_MASK;
42c8a: 2802 movel %d2,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42c8c: 2f28 0008 movel %a0@(8),%sp@-
status = error_flag & ~RTEMS_ERROR_MASK;
42c90: 0284 8fff ffff andil #-1879048193,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42c96: 4e92 jsr %a2@
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
42c98: 588f addql #4,%sp
42c9a: 0802 001e btst #30,%d2
42c9e: 6600 00ca bnew 42d6a <rtems_verror+0x12e>
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42ca2: 2f2e 0010 movel %fp@(16),%sp@-
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
42ca6: 4283 clrl %d3
42ca8: 47f9 0004 e26a lea 4e26a <fprintf>,%a3
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42cae: 2f2e 000c movel %fp@(12),%sp@-
42cb2: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42cb8: 2f28 000c movel %a0@(12),%sp@-
42cbc: 4eb9 0005 4ee2 jsr 54ee2 <vfprintf>
if (status)
42cc2: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42cc6: 2400 movel %d0,%d2
if (status)
42cc8: 4a84 tstl %d4
42cca: 6674 bnes 42d40 <rtems_verror+0x104>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
42ccc: 4a83 tstl %d3
42cce: 6732 beqs 42d02 <rtems_verror+0xc6>
if ((local_errno > 0) && *strerror(local_errno))
42cd0: 4a83 tstl %d3
42cd2: 6f14 bles 42ce8 <rtems_verror+0xac>
42cd4: 2f03 movel %d3,%sp@-
42cd6: 49f9 0004 eb00 lea 4eb00 <strerror>,%a4
42cdc: 4e94 jsr %a4@
42cde: 588f addql #4,%sp
42ce0: 2040 moveal %d0,%a0
42ce2: 4a10 tstb %a0@
42ce4: 6600 00ba bnew 42da0 <rtems_verror+0x164>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
42ce8: 2f03 movel %d3,%sp@-
42cea: 4879 0005 c8f0 pea 5c8f0 <IMFS_ops+0x6a>
42cf0: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42cf6: 2f28 000c movel %a0@(12),%sp@-
42cfa: 4e93 jsr %a3@
42cfc: 4fef 000c lea %sp@(12),%sp
42d00: d480 addl %d0,%d2
}
chars_written += fprintf(stderr, "\n");
42d02: 4879 0005 c517 pea 5c517 <rtems_filesystem_mount_table_size+0x2f9>
42d08: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42d0e: 2f28 000c movel %a0@(12),%sp@-
42d12: 4e93 jsr %a3@
(void) fflush(stderr);
42d14: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42d1a: d480 addl %d0,%d2
(void) fflush(stderr);
42d1c: 2f28 000c movel %a0@(12),%sp@-
42d20: 4e92 jsr %a2@
return chars_written;
42d22: 4fef 000c lea %sp@(12),%sp
}
42d26: 2002 movel %d2,%d0
42d28: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
42d2e: 4e5e unlk %fp
42d30: 4e75 rts
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
42d32: 4282 clrl %d2 <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
42d34: 2002 movel %d2,%d0 <== NOT EXECUTED
42d36: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED
42d3c: 4e5e unlk %fp <== NOT EXECUTED
42d3e: 4e75 rts <== NOT EXECUTED
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
42d40: 2f04 movel %d4,%sp@-
42d42: 4eb9 0004 2c24 jsr 42c24 <rtems_status_text>
42d48: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42d4e: 2f00 movel %d0,%sp@-
42d50: 4879 0005 c8d5 pea 5c8d5 <IMFS_ops+0x4f>
42d56: 2f28 000c movel %a0@(12),%sp@-
42d5a: 4e93 jsr %a3@
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
42d5c: 4fef 0010 lea %sp@(16),%sp
42d60: d480 addl %d0,%d2
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
42d62: 4a83 tstl %d3
42d64: 679c beqs 42d02 <rtems_verror+0xc6>
42d66: 6000 ff68 braw 42cd0 <rtems_verror+0x94>
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
42d6a: 4eb9 0004 dad8 jsr 4dad8 <__errno>
42d70: 47f9 0004 e26a lea 4e26a <fprintf>,%a3
42d76: 2040 moveal %d0,%a0
42d78: 2610 movel %a0@,%d3
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42d7a: 2f2e 0010 movel %fp@(16),%sp@-
42d7e: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42d84: 2f2e 000c movel %fp@(12),%sp@-
42d88: 2f28 000c movel %a0@(12),%sp@-
42d8c: 4eb9 0005 4ee2 jsr 54ee2 <vfprintf>
if (status)
42d92: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42d96: 2400 movel %d0,%d2
if (status)
42d98: 4a84 tstl %d4
42d9a: 6700 ff30 beqw 42ccc <rtems_verror+0x90>
42d9e: 60a0 bras 42d40 <rtems_verror+0x104>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
42da0: 2f03 movel %d3,%sp@-
42da2: 4e94 jsr %a4@
42da4: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42daa: 2f00 movel %d0,%sp@-
42dac: 4879 0005 c8e3 pea 5c8e3 <IMFS_ops+0x5d>
42db2: 2f28 000c movel %a0@(12),%sp@-
42db6: 4e93 jsr %a3@
42db8: 4fef 0010 lea %sp@(16),%sp
42dbc: d480 addl %d0,%d2
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42dbe: 4879 0005 c517 pea 5c517 <rtems_filesystem_mount_table_size+0x2f9>
42dc4: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
42dca: 2f28 000c movel %a0@(12),%sp@-
42dce: 4e93 jsr %a3@
(void) fflush(stderr);
42dd0: 2079 0005 ddd8 moveal 5ddd8 <_impure_ptr>,%a0
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42dd6: d480 addl %d0,%d2
(void) fflush(stderr);
42dd8: 2f28 000c movel %a0@(12),%sp@-
42ddc: 4e92 jsr %a2@
return chars_written;
42dde: 4fef 000c lea %sp@(12),%sp
42de2: 6000 ff42 braw 42d26 <rtems_verror+0xea>
0004371c <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
4371c: 4e56 ffe4 linkw %fp,#-28
43720: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
43724: 246e 0008 moveal %fp@(8),%a2
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
43728: 4284 clrl %d4
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
4372a: 263c 7fff ffff movel #2147483647,%d3
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
43730: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43732: 47f9 0005 0048 lea 50048 <__srget_r>,%a3
43738: 202a 0004 movel %a2@(4),%d0
4373c: 5380 subql #1,%d0
4373e: 2540 0004 movel %d0,%a2@(4)
43742: 6d62 blts 437a6 <scanInt+0x8a> <== NEVER TAKEN
43744: 2052 moveal %a2@,%a0
43746: 4280 clrl %d0
43748: 1010 moveb %a0@,%d0
4374a: 5288 addql #1,%a0
if (c == ':')
4374c: 723a moveq #58,%d1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
4374e: 2488 movel %a0,%a2@
if (c == ':')
43750: b280 cmpl %d0,%d1
43752: 6764 beqs 437b8 <scanInt+0x9c>
break;
if (sign == 0) {
43754: 4a84 tstl %d4
43756: 660a bnes 43762 <scanInt+0x46>
if (c == '-') {
43758: 7c2d moveq #45,%d6
4375a: bc80 cmpl %d0,%d6
4375c: 6700 0084 beqw 437e2 <scanInt+0xc6>
sign = -1;
limit++;
continue;
}
sign = 1;
43760: 7801 moveq #1,%d4
}
if (!isdigit(c))
43762: 2079 0005 f8a4 moveal 5f8a4 <__ctype_ptr__>,%a0
43768: 1230 0801 moveb %a0@(00000001,%d0:l),%d1
4376c: 49c1 extbl %d1
4376e: 44c1 movew %d1,%ccr
43770: 6664 bnes 437d6 <scanInt+0xba>
return 0;
d = c - '0';
if ((i > (limit / 10))
43772: 2203 movel %d3,%d1
43774: 7c0a moveq #10,%d6
43776: 4c46 1005 remul %d6,%d5,%d1
4377a: 4c46 1001 remul %d6,%d1,%d1
4377e: b282 cmpl %d2,%d1
43780: 6554 bcss 437d6 <scanInt+0xba>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
43782: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
43788: b282 cmpl %d2,%d1
4378a: 6746 beqs 437d2 <scanInt+0xb6>
return 0;
i = i * 10 + d;
4378c: 2202 movel %d2,%d1
4378e: e789 lsll #3,%d1
43790: 2241 moveal %d1,%a1
43792: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0
43796: 2400 movel %d0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43798: 202a 0004 movel %a2@(4),%d0
4379c: 5380 subql #1,%d0
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
4379e: d488 addl %a0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
437a0: 2540 0004 movel %d0,%a2@(4)
437a4: 6c9e bges 43744 <scanInt+0x28> <== ALWAYS TAKEN
437a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
437a8: 2f39 0005 f8a8 movel 5f8a8 <_impure_ptr>,%sp@- <== NOT EXECUTED
437ae: 4e93 jsr %a3@ <== NOT EXECUTED
437b0: 508f addql #8,%sp <== NOT EXECUTED
if (c == ':')
437b2: 723a moveq #58,%d1 <== NOT EXECUTED
437b4: b280 cmpl %d0,%d1 <== NOT EXECUTED
437b6: 669c bnes 43754 <scanInt+0x38> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
437b8: 4a84 tstl %d4
437ba: 671a beqs 437d6 <scanInt+0xba> <== NEVER TAKEN
return 0;
*val = i * sign;
437bc: 4c02 4800 mulsl %d2,%d4
return 1;
437c0: 7001 moveq #1,%d0
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
437c2: 206e 000c moveal %fp@(12),%a0
437c6: 2084 movel %d4,%a0@
return 1;
}
437c8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
437ce: 4e5e unlk %fp
437d0: 4e75 rts
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
437d2: ba80 cmpl %d0,%d5
437d4: 64b6 bccs 4378c <scanInt+0x70> <== NEVER TAKEN
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
437d6: 4280 clrl %d0
*val = i * sign;
return 1;
}
437d8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
437de: 4e5e unlk %fp
437e0: 4e75 rts
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
437e2: 5283 addql #1,%d3
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
437e4: 78ff moveq #-1,%d4
limit++;
continue;
437e6: 6000 ff50 braw 43738 <scanInt+0x1c>
000437ea <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
437ea: 4e56 ffec linkw %fp,#-20
int c;
*name = *bufp;
437ee: 206e 000c moveal %fp@(12),%a0
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
437f2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
437f6: 246e 0008 moveal %fp@(8),%a2
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
437fa: 4bf9 0005 0048 lea 50048 <__srget_r>,%a5
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
43800: 266e 0010 moveal %fp@(16),%a3
43804: 286e 0014 moveal %fp@(20),%a4
43808: 242e 0018 movel %fp@(24),%d2
int c;
*name = *bufp;
4380c: 2093 movel %a3@,%a0@
for (;;) {
c = getc(fp);
4380e: 202a 0004 movel %a2@(4),%d0
43812: 5380 subql #1,%d0
43814: 2540 0004 movel %d0,%a2@(4)
43818: 6d36 blts 43850 <scanString+0x66>
4381a: 2052 moveal %a2@,%a0
4381c: 4280 clrl %d0
4381e: 1010 moveb %a0@,%d0
43820: 5288 addql #1,%a0
if (c == ':') {
43822: 723a moveq #58,%d1
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43824: 2488 movel %a0,%a2@
if (c == ':') {
43826: b280 cmpl %d0,%d1
43828: 6738 beqs 43862 <scanString+0x78>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
4382a: 720a moveq #10,%d1
4382c: b280 cmpl %d0,%d1
4382e: 674a beqs 4387a <scanString+0x90>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
43830: 72ff moveq #-1,%d1
43832: b280 cmpl %d0,%d1
43834: 6748 beqs 4387e <scanString+0x94>
return 0;
if (*nleft < 2)
43836: 7201 moveq #1,%d1
43838: b294 cmpl %a4@,%d1
4383a: 6442 bccs 4387e <scanString+0x94> <== NEVER TAKEN
return 0;
**bufp = c;
4383c: 2053 moveal %a3@,%a0
4383e: 1080 moveb %d0,%a0@
++(*bufp);
43840: 5293 addql #1,%a3@
--(*nleft);
43842: 5394 subql #1,%a4@
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43844: 202a 0004 movel %a2@(4),%d0
43848: 5380 subql #1,%d0
4384a: 2540 0004 movel %d0,%a2@(4)
4384e: 6cca bges 4381a <scanString+0x30> <== ALWAYS TAKEN
43850: 2f0a movel %a2,%sp@-
43852: 2f39 0005 f8a8 movel 5f8a8 <_impure_ptr>,%sp@-
43858: 4e95 jsr %a5@
4385a: 508f addql #8,%sp
if (c == ':') {
4385c: 723a moveq #58,%d1
4385e: b280 cmpl %d0,%d1
43860: 66c8 bnes 4382a <scanString+0x40> <== ALWAYS TAKEN
if (nlFlag)
43862: 4a82 tstl %d2
43864: 6618 bnes 4387e <scanString+0x94>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
43866: 2053 moveal %a3@,%a0
++(*bufp);
--(*nleft);
return 1;
43868: 7001 moveq #1,%d0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
4386a: 4210 clrb %a0@
++(*bufp);
4386c: 5293 addql #1,%a3@
--(*nleft);
4386e: 5394 subql #1,%a4@
return 1;
}
43870: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
43876: 4e5e unlk %fp
43878: 4e75 rts
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
4387a: 4a82 tstl %d2
4387c: 66e8 bnes 43866 <scanString+0x7c>
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
4387e: 4280 clrl %d0
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
43880: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
43886: 4e5e unlk %fp <== NOT EXECUTED
0004388a <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
4388a: 4e56 ffe4 linkw %fp,#-28
4388e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
43892: 42a7 clrl %sp@-
43894: 280e movel %fp,%d4
43896: 0684 0000 0014 addil #20,%d4
4389c: 260e movel %fp,%d3
4389e: 0683 0000 0010 addil #16,%d3
438a4: 47fa ff44 lea %pc@(437ea <scanString>),%a3
438a8: 2f04 movel %d4,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
438aa: 246e 000c moveal %fp@(12),%a2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
438ae: 2f03 movel %d3,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
438b0: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
438b4: 2f0a movel %a2,%sp@-
438b6: 2f02 movel %d2,%sp@-
438b8: 4e93 jsr %a3@
438ba: 4fef 0014 lea %sp@(20),%sp
438be: 4a80 tstl %d0
438c0: 660c bnes 438ce <scangr+0x44>
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
438c2: 4280 clrl %d0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
438c4: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3
438ca: 4e5e unlk %fp
438cc: 4e75 rts
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
438ce: 42a7 clrl %sp@-
438d0: 2f04 movel %d4,%sp@-
438d2: 2f03 movel %d3,%sp@-
438d4: 486a 0004 pea %a2@(4)
438d8: 2f02 movel %d2,%sp@-
438da: 4e93 jsr %a3@
438dc: 4fef 0014 lea %sp@(20),%sp
438e0: 4a80 tstl %d0
438e2: 67de beqs 438c2 <scangr+0x38> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
438e4: 486e fffc pea %fp@(-4)
438e8: 2f02 movel %d2,%sp@-
438ea: 4eba fe30 jsr %pc@(4371c <scanInt>)
438ee: 508f addql #8,%sp
438f0: 4a80 tstl %d0
438f2: 67ce beqs 438c2 <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
438f4: 4878 0001 pea 1 <ADD>
438f8: 2f04 movel %d4,%sp@-
438fa: 2f03 movel %d3,%sp@-
438fc: 486e fff8 pea %fp@(-8)
43900: 2f02 movel %d2,%sp@-
43902: 4e93 jsr %a3@
43904: 4fef 0014 lea %sp@(20),%sp
43908: 4a80 tstl %d0
4390a: 67b6 beqs 438c2 <scangr+0x38> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4390c: 266e fff8 moveal %fp@(-8),%a3
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
43910: 356e fffe 0008 movew %fp@(-2),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43916: 1013 moveb %a3@,%d0
43918: 677a beqs 43994 <scangr+0x10a> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
4391a: 41eb 0001 lea %a3@(1),%a0
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4391e: 7201 moveq #1,%d1
if(*cp == ',')
43920: 49c0 extbl %d0
43922: 742c moveq #44,%d2
43924: b480 cmpl %d0,%d2
43926: 6756 beqs 4397e <scangr+0xf4>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43928: 1018 moveb %a0@+,%d0
4392a: 66f4 bnes 43920 <scangr+0x96>
4392c: e589 lsll #2,%d1
4392e: 0681 0000 0013 addil #19,%d1
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
43934: b2ae 0014 cmpl %fp@(20),%d1
43938: 6288 bhis 438c2 <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
4393a: 226e 0010 moveal %fp@(16),%a1
4393e: 43e9 000f lea %a1@(15),%a1
43942: 2009 movel %a1,%d0
43944: 72f0 moveq #-16,%d1
43946: c081 andl %d1,%d0
43948: 2540 000a movel %d0,%a2@(10)
4394c: 2240 moveal %d0,%a1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
4394e: 228b movel %a3,%a1@
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43950: 206e fff8 moveal %fp@(-8),%a0
43954: 1010 moveb %a0@,%d0
43956: 6740 beqs 43998 <scangr+0x10e> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
43958: 5288 addql #1,%a0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4395a: 7201 moveq #1,%d1
if(*cp == ',') {
4395c: 49c0 extbl %d0
4395e: 742c moveq #44,%d2
43960: b480 cmpl %d0,%d2
43962: 671e beqs 43982 <scangr+0xf8>
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43964: 1018 moveb %a0@+,%d0
43966: 66f4 bnes 4395c <scangr+0xd2>
43968: 226a 000a moveal %a2@(10),%a1
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
4396c: 7001 moveq #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4396e: e589 lsll #2,%d1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43970: 42b1 1800 clrl %a1@(00000000,%d1:l)
return 1;
}
43974: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3
4397a: 4e5e unlk %fp
4397c: 4e75 rts
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',')
memcount++;
4397e: 5281 addql #1,%d1
43980: 60a6 bras 43928 <scangr+0x9e>
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
43982: 4200 clrb %d0
43984: 1140 ffff moveb %d0,%a0@(-1)
grp->gr_mem[memcount++] = cp + 1;
43988: 226a 000a moveal %a2@(10),%a1
4398c: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4)
43990: 5281 addql #1,%d1
43992: 60d0 bras 43964 <scangr+0xda>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43994: 7217 moveq #23,%d1 <== NOT EXECUTED
43996: 609c bras 43934 <scangr+0xaa> <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43998: 7204 moveq #4,%d1 <== NOT EXECUTED
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
4399a: 7001 moveq #1,%d0 <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
4399c: 42b1 1800 clrl %a1@(00000000,%d1:l) <== NOT EXECUTED
439a0: 60d2 bras 43974 <scangr+0xea> <== NOT EXECUTED
000439a2 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
439a2: 4e56 ffe0 linkw %fp,#-32
439a6: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
439aa: 42a7 clrl %sp@-
439ac: 280e movel %fp,%d4
439ae: 0684 0000 0014 addil #20,%d4
439b4: 260e movel %fp,%d3
439b6: 0683 0000 0010 addil #16,%d3
439bc: 47fa fe2c lea %pc@(437ea <scanString>),%a3
439c0: 2f04 movel %d4,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
439c2: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
439c6: 2f03 movel %d3,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
439c8: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
439cc: 2f0a movel %a2,%sp@-
439ce: 2f02 movel %d2,%sp@-
439d0: 4e93 jsr %a3@
439d2: 4fef 0014 lea %sp@(20),%sp
439d6: 4a80 tstl %d0
439d8: 660c bnes 439e6 <scanpw+0x44>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
439da: 4280 clrl %d0
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
439dc: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
439e2: 4e5e unlk %fp
439e4: 4e75 rts
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
439e6: 42a7 clrl %sp@-
439e8: 2f04 movel %d4,%sp@-
439ea: 2f03 movel %d3,%sp@-
439ec: 486a 0004 pea %a2@(4)
439f0: 2f02 movel %d2,%sp@-
439f2: 4e93 jsr %a3@
439f4: 4fef 0014 lea %sp@(20),%sp
439f8: 4a80 tstl %d0
439fa: 67de beqs 439da <scanpw+0x38> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
439fc: 486e fffc pea %fp@(-4)
43a00: 49fa fd1a lea %pc@(4371c <scanInt>),%a4
43a04: 2f02 movel %d2,%sp@-
43a06: 4e94 jsr %a4@
43a08: 508f addql #8,%sp
43a0a: 4a80 tstl %d0
43a0c: 67cc beqs 439da <scanpw+0x38>
|| !scanInt(fp, &pwgid)
43a0e: 486e fff8 pea %fp@(-8)
43a12: 2f02 movel %d2,%sp@-
43a14: 4e94 jsr %a4@
43a16: 508f addql #8,%sp
43a18: 4a80 tstl %d0
43a1a: 67be beqs 439da <scanpw+0x38>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
43a1c: 42a7 clrl %sp@-
43a1e: 2f04 movel %d4,%sp@-
43a20: 2f03 movel %d3,%sp@-
43a22: 486a 000c pea %a2@(12)
43a26: 2f02 movel %d2,%sp@-
43a28: 4e93 jsr %a3@
43a2a: 4fef 0014 lea %sp@(20),%sp
43a2e: 4a80 tstl %d0
43a30: 67a8 beqs 439da <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
43a32: 42a7 clrl %sp@-
43a34: 2f04 movel %d4,%sp@-
43a36: 2f03 movel %d3,%sp@-
43a38: 486a 0010 pea %a2@(16)
43a3c: 2f02 movel %d2,%sp@-
43a3e: 4e93 jsr %a3@
43a40: 4fef 0014 lea %sp@(20),%sp
43a44: 4a80 tstl %d0
43a46: 6792 beqs 439da <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
43a48: 42a7 clrl %sp@-
43a4a: 2f04 movel %d4,%sp@-
43a4c: 2f03 movel %d3,%sp@-
43a4e: 486a 0014 pea %a2@(20)
43a52: 2f02 movel %d2,%sp@-
43a54: 4e93 jsr %a3@
43a56: 4fef 0014 lea %sp@(20),%sp
43a5a: 4a80 tstl %d0
43a5c: 6700 ff7c beqw 439da <scanpw+0x38>
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
43a60: 4878 0001 pea 1 <ADD>
43a64: 2f04 movel %d4,%sp@-
43a66: 2f03 movel %d3,%sp@-
43a68: 486a 0018 pea %a2@(24)
43a6c: 2f02 movel %d2,%sp@-
43a6e: 4e93 jsr %a3@
43a70: 4fef 0014 lea %sp@(20),%sp
43a74: 4a80 tstl %d0
43a76: 6700 ff62 beqw 439da <scanpw+0x38>
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
43a7a: 7001 moveq #1,%d0
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
43a7c: 356e fffe 0008 movew %fp@(-2),%a2@(8)
pwd->pw_gid = pwgid;
43a82: 356e fffa 000a movew %fp@(-6),%a2@(10)
return 1;
}
43a88: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
43a8e: 4e5e unlk %fp <== NOT EXECUTED
000451c0 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
451c0: 4e56 0000 linkw %fp,#0
451c4: 2f0a movel %a2,%sp@-
451c6: 246e 000c moveal %fp@(12),%a2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
451ca: 202a 003c movel %a2@(60),%d0
451ce: 0280 0000 0e78 andil #3704,%d0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
451d4: 2f02 movel %d2,%sp@-
451d6: 142e 000b moveb %fp@(11),%d2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
451da: 4a80 tstl %d0
451dc: 661c bnes 451fa <siproc+0x3a> <== ALWAYS TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
451de: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
}
return i;
}
451e2: 246e fffc moveal %fp@(-4),%a2 <== 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);
451e6: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED
451ec: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
return i;
}
451f0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
451f4: 4e5e unlk %fp <== 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);
451f6: 6000 fdd0 braw 44fc8 <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
451fa: 42a7 clrl %sp@-
i = iproc (c, tty);
451fc: 0282 0000 00ff andil #255,%d2
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45202: 42a7 clrl %sp@-
45204: 2f2a 0018 movel %a2@(24),%sp@-
45208: 4eb9 0004 6768 jsr 46768 <rtems_semaphore_obtain>
i = iproc (c, tty);
4520e: 2f0a movel %a2,%sp@-
45210: 2f02 movel %d2,%sp@-
45212: 4eba fdb4 jsr %pc@(44fc8 <iproc>)
rtems_semaphore_release (tty->osem);
45216: 2f2a 0018 movel %a2@(24),%sp@-
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
4521a: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
4521c: 4eb9 0004 68a8 jsr 468a8 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
45222: 246e fffc moveal %fp@(-4),%a2
45226: 2002 movel %d2,%d0
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
45228: 4fef 0018 lea %sp@(24),%sp
}
else {
i = iproc (c, tty);
}
return i;
}
4522c: 242e fff8 movel %fp@(-8),%d2
45230: 4e5e unlk %fp <== NOT EXECUTED
00046b8c <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
46b8c: 4e56 ffdc linkw %fp,#-36
46b90: 48d7 001c moveml %d2-%d4,%sp@
46b94: 242e 0008 movel %fp@(8),%d2
* 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, strlen( path ), 0x0, &loc, true ) )
46b98: 260e movel %fp,%d3
46b9a: 0683 ffff ffec addil #-20,%d3
46ba0: 2f02 movel %d2,%sp@-
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
46ba2: 282e 000c movel %fp@(12),%d4
* 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, strlen( path ), 0x0, &loc, true ) )
46ba6: 4eb9 0005 29e0 jsr 529e0 <strlen>
46bac: 7201 moveq #1,%d1
46bae: 2e81 movel %d1,%sp@
46bb0: 2f03 movel %d3,%sp@-
46bb2: 42a7 clrl %sp@-
46bb4: 2f00 movel %d0,%sp@-
46bb6: 2f02 movel %d2,%sp@-
46bb8: 4eb9 0004 55fc jsr 455fc <rtems_filesystem_evaluate_path>
46bbe: 4fef 0014 lea %sp@(20),%sp
46bc2: 4a80 tstl %d0
46bc4: 670c beqs 46bd2 <statvfs+0x46> <== ALWAYS TAKEN
return -1;
46bc6: 70ff moveq #-1,%d0 <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
rtems_filesystem_freenode( &loc );
return result;
}
46bc8: 4cee 001c ffdc moveml %fp@(-36),%d2-%d4 <== NOT EXECUTED
46bce: 4e5e unlk %fp <== NOT EXECUTED
46bd0: 4e75 rts <== NOT EXECUTED
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
46bd2: 2044 moveal %d4,%a0
46bd4: 4298 clrl %a0@+
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
46bd6: 226e fffc moveal %fp@(-4),%a1
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
46bda: 4298 clrl %a0@+
46bdc: 4298 clrl %a0@+
46bde: 4298 clrl %a0@+
46be0: 4298 clrl %a0@+
46be2: 4298 clrl %a0@+
46be4: 4298 clrl %a0@+
46be6: 4298 clrl %a0@+
46be8: 4298 clrl %a0@+
46bea: 4298 clrl %a0@+
46bec: 4298 clrl %a0@+
46bee: 4298 clrl %a0@+
46bf0: 4298 clrl %a0@+
46bf2: 4290 clrl %a0@
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
46bf4: 2069 0028 moveal %a1@(40),%a0
46bf8: 2f04 movel %d4,%sp@-
46bfa: 4869 001c pea %a1@(28)
46bfe: 2068 0044 moveal %a0@(68),%a0
46c02: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
46c04: 2f03 movel %d3,%sp@-
46c06: 2d40 ffe8 movel %d0,%fp@(-24)
46c0a: 4eb9 0004 56e0 jsr 456e0 <rtems_filesystem_freenode>
return result;
46c10: 202e ffe8 movel %fp@(-24),%d0
46c14: 4fef 000c lea %sp@(12),%sp
}
46c18: 4cee 001c ffdc moveml %fp@(-36),%d2-%d4
46c1e: 4e5e unlk %fp
...
00045494 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45494: 4e56 0000 linkw %fp,#0
45498: 206e 0008 moveal %fp@(8),%a0
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
4549c: 2028 00f8 movel %a0@(248),%d0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
454a0: 2f02 movel %d2,%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;
if ( this_reent ) {
454a2: 4a80 tstl %d0
454a4: 6728 beqs 454ce <sync_per_thread+0x3a> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
454a6: 2279 0006 1324 moveal 61324 <_Per_CPU_Information+0xc>,%a1
454ac: 2429 00f8 movel %a1@(248),%d2
_Thread_Executing->libc_reent = this_reent;
454b0: 2340 00f8 movel %d0,%a1@(248)
_fwalk (t->libc_reent, sync_wrapper);
454b4: 487a 0020 pea %pc@(454d6 <sync_wrapper>)
454b8: 2f28 00f8 movel %a0@(248),%sp@-
454bc: 4eb9 0004 fcd4 jsr 4fcd4 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
454c2: 2079 0006 1324 moveal 61324 <_Per_CPU_Information+0xc>,%a0
454c8: 508f addql #8,%sp
454ca: 2142 00f8 movel %d2,%a0@(248)
}
}
454ce: 242e fffc movel %fp@(-4),%d2
454d2: 4e5e unlk %fp <== NOT EXECUTED
0004c7a0 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
4c7a0: 4e56 0000 linkw %fp,#0
4c7a4: 202e 000c movel %fp@(12),%d0
4c7a8: 2f03 movel %d3,%sp@-
4c7aa: 262e 0010 movel %fp@(16),%d3
4c7ae: 2f02 movel %d2,%sp@-
4c7b0: 242e 0008 movel %fp@(8),%d2
switch (opt) {
4c7b4: 4a80 tstl %d0
4c7b6: 6738 beqs 4c7f0 <tcsetattr+0x50>
4c7b8: 7201 moveq #1,%d1
4c7ba: b280 cmpl %d0,%d1
4c7bc: 671c beqs 4c7da <tcsetattr+0x3a>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4c7be: 4eb9 0004 f6d4 jsr 4f6d4 <__errno>
4c7c4: 2040 moveal %d0,%a0
4c7c6: 20bc 0000 0086 movel #134,%a0@
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
4c7cc: 242e fff8 movel %fp@(-8),%d2
4c7d0: 70ff moveq #-1,%d0
4c7d2: 262e fffc movel %fp@(-4),%d3
4c7d6: 4e5e unlk %fp
4c7d8: 4e75 rts
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
4c7da: 42a7 clrl %sp@-
4c7dc: 4878 0003 pea 3 <DIVIDE>
4c7e0: 2f02 movel %d2,%sp@-
4c7e2: 4eb9 0004 c408 jsr 4c408 <ioctl>
4c7e8: 4fef 000c lea %sp@(12),%sp
4c7ec: 4a80 tstl %d0
4c7ee: 6ddc blts 4c7cc <tcsetattr+0x2c> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4c7f0: 2d43 0010 movel %d3,%fp@(16)
4c7f4: 7002 moveq #2,%d0
4c7f6: 2d42 0008 movel %d2,%fp@(8)
}
}
4c7fa: 242e fff8 movel %fp@(-8),%d2
4c7fe: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4c802: 2d40 000c movel %d0,%fp@(12)
}
}
4c806: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4c808: 4ef9 0004 c408 jmp 4c408 <ioctl>
...
00046f80 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
46f80: 4e56 ffc0 linkw %fp,#-64
46f84: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
46f88: 242e 0008 movel %fp@(8),%d2
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
46f8c: 2f02 movel %d2,%sp@-
46f8e: 4eb9 0004 40d0 jsr 440d0 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
46f94: 588f addql #4,%sp
46f96: 4a80 tstl %d0
46f98: 6600 00f4 bnew 4708e <unlink+0x10e>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
46f9c: 45ee ffe8 lea %fp@(-24),%a2
46fa0: 4283 clrl %d3
46fa2: 2f0a movel %a2,%sp@-
46fa4: 486e fffc pea %fp@(-4)
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
46fa8: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
46faa: 2f02 movel %d2,%sp@-
46fac: 4eb9 0004 517c jsr 4517c <rtems_filesystem_get_start_loc>
46fb2: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
46fb6: 2d52 ffd4 movel %a2@,%fp@(-44)
name = path + parentpathlen;
46fba: d682 addl %d2,%d3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46fbc: 47f9 0005 322c lea 5322c <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46fc2: 240e movel %fp,%d2
46fc4: 0682 ffff ffd4 addil #-44,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
46fca: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40)
46fd0: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36)
46fd6: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32)
46fdc: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46fe2: 2f03 movel %d3,%sp@-
46fe4: 4e93 jsr %a3@
46fe6: 2e80 movel %d0,%sp@
46fe8: 2f03 movel %d3,%sp@-
46fea: 4eb9 0004 4112 jsr 44112 <rtems_filesystem_prefix_separators>
46ff0: d680 addl %d0,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46ff2: 2f03 movel %d3,%sp@-
46ff4: 4e93 jsr %a3@
46ff6: 4297 clrl %sp@
46ff8: 2f02 movel %d2,%sp@-
46ffa: 42a7 clrl %sp@-
46ffc: 2f00 movel %d0,%sp@-
46ffe: 2f03 movel %d3,%sp@-
47000: 4eb9 0004 4014 jsr 44014 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
47006: 4fef 001c lea %sp@(28),%sp
4700a: 4a80 tstl %d0
4700c: 6656 bnes 47064 <unlink+0xe4>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
4700e: 206e ffe0 moveal %fp@(-32),%a0
47012: 2f02 movel %d2,%sp@-
47014: 2068 0010 moveal %a0@(16),%a0
47018: 4e90 jsr %a0@
4701a: 588f addql #4,%sp
4701c: 7201 moveq #1,%d1
4701e: b280 cmpl %d0,%d1
47020: 6700 0092 beqw 470b4 <unlink+0x134>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
47024: 2f02 movel %d2,%sp@-
47026: 206e ffe0 moveal %fp@(-32),%a0
4702a: 2f0a movel %a2,%sp@-
4702c: 2068 000c moveal %a0@(12),%a0
rtems_filesystem_freenode( &loc );
47030: 47f9 0004 4168 lea 44168 <rtems_filesystem_freenode>,%a3
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
47036: 4e90 jsr %a0@
47038: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
4703a: 2f02 movel %d2,%sp@-
4703c: 4e93 jsr %a3@
if ( free_parentloc )
4703e: 4fef 000c lea %sp@(12),%sp
47042: 4a04 tstb %d4
47044: 660c bnes 47052 <unlink+0xd2>
rtems_filesystem_freenode( &parentloc );
return result;
}
47046: 2003 movel %d3,%d0
47048: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
4704e: 4e5e unlk %fp
47050: 4e75 rts
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
47052: 2f0a movel %a2,%sp@-
47054: 4e93 jsr %a3@
47056: 588f addql #4,%sp
return result;
}
47058: 2003 movel %d3,%d0
4705a: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
47060: 4e5e unlk %fp
47062: 4e75 rts
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
47064: 4a04 tstb %d4
47066: 660e bnes 47076 <unlink+0xf6> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
return -1;
47068: 76ff moveq #-1,%d3 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4706a: 2003 movel %d3,%d0 <== NOT EXECUTED
4706c: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED
47072: 4e5e unlk %fp <== NOT EXECUTED
47074: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
47076: 2f0a movel %a2,%sp@-
return -1;
47078: 76ff moveq #-1,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4707a: 4eb9 0004 4168 jsr 44168 <rtems_filesystem_freenode>
47080: 588f addql #4,%sp
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
47082: 2003 movel %d3,%d0
47084: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
4708a: 4e5e unlk %fp
4708c: 4e75 rts
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
4708e: 42a7 clrl %sp@-
47090: 45ee ffe8 lea %fp@(-24),%a2
47094: 2600 movel %d0,%d3
47096: 2f0a movel %a2,%sp@-
47098: 4878 0002 pea 2 <DOUBLE_FLOAT>
4709c: 2f00 movel %d0,%sp@-
4709e: 2f02 movel %d2,%sp@-
470a0: 4eb9 0004 4084 jsr 44084 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
470a6: 4fef 0014 lea %sp@(20),%sp
470aa: 4a80 tstl %d0
470ac: 66ba bnes 47068 <unlink+0xe8> <== NEVER TAKEN
return -1;
free_parentloc = true;
470ae: 7801 moveq #1,%d4
470b0: 6000 ff04 braw 46fb6 <unlink+0x36>
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
470b4: 2f02 movel %d2,%sp@-
470b6: 47f9 0004 4168 lea 44168 <rtems_filesystem_freenode>,%a3
470bc: 4e93 jsr %a3@
if ( free_parentloc )
470be: 588f addql #4,%sp
470c0: 4a04 tstb %d4
470c2: 661a bnes 470de <unlink+0x15e> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
470c4: 4eb9 0005 1e88 jsr 51e88 <__errno>
470ca: 76ff moveq #-1,%d3
470cc: 2040 moveal %d0,%a0
470ce: 7015 moveq #21,%d0
470d0: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
470d2: 2003 movel %d3,%d0
470d4: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
470da: 4e5e unlk %fp
470dc: 4e75 rts
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
470de: 2f0a movel %a2,%sp@-
rtems_set_errno_and_return_minus_one( EISDIR );
470e0: 76ff moveq #-1,%d3
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
470e2: 4e93 jsr %a3@
470e4: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EISDIR );
470e6: 4eb9 0005 1e88 jsr 51e88 <__errno>
470ec: 2040 moveal %d0,%a0
470ee: 7015 moveq #21,%d0
470f0: 2080 movel %d0,%a0@
470f2: 60de bras 470d2 <unlink+0x152>
00047300 <unmount>:
*/
int unmount(
const char *path
)
{
47300: 4e56 ffe0 linkw %fp,#-32
47304: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
47308: 246e 0008 moveal %fp@(8),%a2
* 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, strlen( path ), 0x0, &loc, true ) )
4730c: 240e movel %fp,%d2
4730e: 0682 ffff ffec addil #-20,%d2
47314: 2f0a movel %a2,%sp@-
47316: 4eb9 0005 0378 jsr 50378 <strlen>
4731c: 7201 moveq #1,%d1
4731e: 2e81 movel %d1,%sp@
47320: 2f02 movel %d2,%sp@-
47322: 42a7 clrl %sp@-
47324: 2f00 movel %d0,%sp@-
47326: 2f0a movel %a2,%sp@-
47328: 4eb9 0004 3fe0 jsr 43fe0 <rtems_filesystem_evaluate_path>
4732e: 4fef 0014 lea %sp@(20),%sp
47332: 4a80 tstl %d0
47334: 6664 bnes 4739a <unmount+0x9a>
return -1;
mt_entry = loc.mt_entry;
47336: 246e fffc moveal %fp@(-4),%a2
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
4733a: 202e ffec movel %fp@(-20),%d0
4733e: b0aa 001c cmpl %a2@(28),%d0
47342: 6600 00b6 bnew 473fa <unmount+0xfa>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
47346: 2f02 movel %d2,%sp@-
47348: 47f9 0004 40c4 lea 440c4 <rtems_filesystem_freenode>,%a3
4734e: 4e93 jsr %a3@
* 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 )
47350: 2079 0006 02a8 moveal 602a8 <rtems_current_user_env>,%a0
47356: 588f addql #4,%sp
47358: b5e8 0014 cmpal %a0@(20),%a2
4735c: 6700 00be beqw 4741c <unmount+0x11c>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
47360: 2f2a 002c movel %a2@(44),%sp@-
47364: 487a ff82 pea %pc@(472e8 <is_fs_below_mount_point>)
47368: 4eb9 0004 49d4 jsr 449d4 <rtems_filesystem_mount_iterate>
4736e: 508f addql #8,%sp
47370: 4a00 tstb %d0
47372: 6600 00a8 bnew 4741c <unmount+0x11c>
* 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 )
47376: 2f0a movel %a2,%sp@-
47378: 4eb9 0004 447c jsr 4447c <rtems_libio_is_open_files_in_fs>
4737e: 588f addql #4,%sp
47380: 7201 moveq #1,%d1
47382: b280 cmpl %d0,%d1
47384: 6700 0096 beqw 4741c <unmount+0x11c>
* 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 )
47388: 206a 0014 moveal %a2@(20),%a0
4738c: 2f0a movel %a2,%sp@-
4738e: 2068 0028 moveal %a0@(40),%a0
47392: 4e90 jsr %a0@
47394: 588f addql #4,%sp
47396: 4a80 tstl %d0
47398: 670c beqs 473a6 <unmount+0xa6> <== ALWAYS TAKEN
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
return -1;
4739a: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4739c: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
473a2: 4e5e unlk %fp
473a4: 4e75 rts
* 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){
473a6: 206a 0028 moveal %a2@(40),%a0
473aa: 2f0a movel %a2,%sp@-
473ac: 2068 002c moveal %a0@(44),%a0
473b0: 4e90 jsr %a0@
473b2: 588f addql #4,%sp
473b4: 4a80 tstl %d0
473b6: 667c bnes 47434 <unmount+0x134> <== NEVER TAKEN
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
473b8: 42a7 clrl %sp@-
473ba: 42a7 clrl %sp@-
473bc: 2f39 0006 18f0 movel 618f0 <rtems_libio_semaphore>,%sp@-
473c2: 4eb9 0004 7eec jsr 47eec <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
473c8: 2f0a movel %a2,%sp@-
473ca: 4eb9 0004 88f0 jsr 488f0 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
473d0: 2f39 0006 18f0 movel 618f0 <rtems_libio_semaphore>,%sp@-
473d6: 4eb9 0004 802c jsr 4802c <rtems_semaphore_release>
/*
* 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 );
473dc: 486a 0008 pea %a2@(8)
473e0: 4e93 jsr %a3@
free( mt_entry );
473e2: 2f0a movel %a2,%sp@-
473e4: 4eb9 0004 40d8 jsr 440d8 <free>
return 0;
473ea: 4fef 001c lea %sp@(28),%sp
473ee: 4280 clrl %d0
}
473f0: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
473f6: 4e5e unlk %fp
473f8: 4e75 rts
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
473fa: 2f02 movel %d2,%sp@-
rtems_set_errno_and_return_minus_one( EACCES );
473fc: 740d moveq #13,%d2
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
473fe: 4eb9 0004 40c4 jsr 440c4 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
47404: 4eb9 0004 ee84 jsr 4ee84 <__errno>
4740a: 588f addql #4,%sp
4740c: 2040 moveal %d0,%a0
4740e: 70ff moveq #-1,%d0
47410: 2082 movel %d2,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
47412: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
47418: 4e5e unlk %fp
4741a: 4e75 rts
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
4741c: 4eb9 0004 ee84 jsr 4ee84 <__errno>
47422: 7210 moveq #16,%d1
47424: 2040 moveal %d0,%a0
47426: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
47428: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
4742e: 2081 movel %d1,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
47430: 4e5e unlk %fp
47432: 4e75 rts
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
47434: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED
47438: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4743a: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED
4743e: 4e90 jsr %a0@ <== NOT EXECUTED
47440: 588f addql #4,%sp <== NOT EXECUTED
47442: 4a80 tstl %d0 <== NOT EXECUTED
47444: 6700 ff54 beqw 4739a <unmount+0x9a> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
47448: 42a7 clrl %sp@- <== NOT EXECUTED
4744a: 4eb9 0004 85e8 jsr 485e8 <rtems_fatal_error_occurred> <== NOT EXECUTED
00045ccc <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45ccc: 4e56 ffc0 linkw %fp,#-64
45cd0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
45cd4: 246e 0008 moveal %fp@(8),%a2
for (; *fmt != '\0'; fmt++) {
45cd8: 1012 moveb %a2@,%d0
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45cda: 2a6e 000c moveal %fp@(12),%a5
for (; *fmt != '\0'; fmt++) {
45cde: 6700 01ae beqw 45e8e <vprintk+0x1c2>
45ce2: 47f9 0005 ce37 lea 5ce37 <rtems_filesystem_default_pathconf+0xb5>,%a3
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
45ce8: 49c0 extbl %d0
45cea: 7225 moveq #37,%d1
45cec: b280 cmpl %d0,%d1
45cee: 6600 01dc bnew 45ecc <vprintk+0x200>
BSP_output_char(*fmt);
continue;
}
fmt++;
45cf2: 528a addql #1,%a2
if (*fmt == '0' ) {
45cf4: 7430 moveq #48,%d2
45cf6: 1012 moveb %a2@,%d0
45cf8: 1200 moveb %d0,%d1
45cfa: 49c1 extbl %d1
45cfc: b481 cmpl %d1,%d2
45cfe: 6700 0218 beqw 45f18 <vprintk+0x24c>
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
45d02: 7c20 moveq #32,%d6
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
45d04: 762d moveq #45,%d3
45d06: b681 cmpl %d1,%d3
45d08: 6700 01e2 beqw 45eec <vprintk+0x220>
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45d0c: 2400 movel %d0,%d2
45d0e: 0682 ffff ffd0 addil #-48,%d2
45d14: 7a09 moveq #9,%d5
45d16: 0282 0000 00ff andil #255,%d2
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
45d1c: 4204 clrb %d4
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45d1e: ba82 cmpl %d2,%d5
45d20: 6500 01ea bcsw 45f0c <vprintk+0x240>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
45d24: 41ea 0001 lea %a2@(1),%a0
45d28: 4282 clrl %d2
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
45d2a: 2602 movel %d2,%d3
width += ((unsigned) *fmt - '0');
45d2c: 2448 moveal %a0,%a2
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45d2e: 5288 addql #1,%a0
45d30: 7a09 moveq #9,%d5
width *= 10;
45d32: e78b lsll #3,%d3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45d34: 1012 moveb %a2@,%d0
width *= 10;
45d36: 2243 moveal %d3,%a1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45d38: 2600 movel %d0,%d3
45d3a: 0683 ffff ffd0 addil #-48,%d3
width *= 10;
45d40: 43f1 2a00 lea %a1@(00000000,%d2:l:2),%a1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45d44: 0283 0000 00ff andil #255,%d3
width *= 10;
width += ((unsigned) *fmt - '0');
45d4a: 43f1 18d0 lea %a1@(ffffffd0,%d1:l),%a1
45d4e: 1200 moveb %d0,%d1
45d50: 2409 movel %a1,%d2
45d52: 49c1 extbl %d1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45d54: ba83 cmpl %d3,%d5
45d56: 64d2 bccs 45d2a <vprintk+0x5e>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
45d58: 766c moveq #108,%d3
45d5a: 1200 moveb %d0,%d1
45d5c: 49c1 extbl %d1
45d5e: b681 cmpl %d1,%d3
45d60: 6700 0136 beqw 45e98 <vprintk+0x1cc>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
45d64: 49c0 extbl %d0
45d66: 7a63 moveq #99,%d5
45d68: ba80 cmpl %d0,%d5
45d6a: 6700 013a beqw 45ea6 <vprintk+0x1da>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
45d6e: 7673 moveq #115,%d3
45d70: b680 cmpl %d0,%d3
45d72: 6700 01b2 beqw 45f26 <vprintk+0x25a>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
45d76: 7a6f moveq #111,%d5
45d78: ba80 cmpl %d0,%d5
45d7a: 6700 0166 beqw 45ee2 <vprintk+0x216>
45d7e: 764f moveq #79,%d3
45d80: b680 cmpl %d0,%d3
45d82: 6700 015e beqw 45ee2 <vprintk+0x216>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
45d86: 1a3c 0069 moveb #105,%d5
45d8a: ba80 cmpl %d0,%d5
45d8c: 6700 0134 beqw 45ec2 <vprintk+0x1f6>
45d90: 163c 0049 moveb #73,%d3
45d94: b680 cmpl %d0,%d3
45d96: 6700 012a beqw 45ec2 <vprintk+0x1f6>
45d9a: 1a3c 0064 moveb #100,%d5
45d9e: ba80 cmpl %d0,%d5
45da0: 6700 0120 beqw 45ec2 <vprintk+0x1f6>
c == 'd' || c == 'D' ) {
45da4: 163c 0044 moveb #68,%d3
45da8: b680 cmpl %d0,%d3
45daa: 6700 0116 beqw 45ec2 <vprintk+0x1f6>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
45dae: 1a3c 0075 moveb #117,%d5
45db2: ba80 cmpl %d0,%d5
45db4: 6700 024e beqw 46004 <vprintk+0x338>
45db8: 163c 0055 moveb #85,%d3
45dbc: b680 cmpl %d0,%d3
45dbe: 6700 0244 beqw 46004 <vprintk+0x338>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
45dc2: 1a3c 0078 moveb #120,%d5
45dc6: ba80 cmpl %d0,%d5
45dc8: 6700 0256 beqw 46020 <vprintk+0x354>
45dcc: 163c 0058 moveb #88,%d3
45dd0: b680 cmpl %d0,%d3
45dd2: 6700 024c beqw 46020 <vprintk+0x354>
base = 16; sign = false;
} else if ( c == 'p' ) {
45dd6: 1a3c 0070 moveb #112,%d5
45dda: ba80 cmpl %d0,%d5
45ddc: 6600 00ee bnew 45ecc <vprintk+0x200>
} else {
BSP_output_char(c);
continue;
}
printNum(
45de0: 49c6 extbl %d6
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
45de2: 7610 moveq #16,%d3
45de4: 4200 clrb %d0
} else {
BSP_output_char(c);
continue;
}
printNum(
45de6: 2815 movel %a5@,%d4
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
45de8: 588d addql #4,%a5
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
45dea: 4a00 tstb %d0
45dec: 6706 beqs 45df4 <vprintk+0x128>
45dee: 4a84 tstl %d4
45df0: 6d00 01dc bltw 45fce <vprintk+0x302>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45df4: 2004 movel %d4,%d0
45df6: 4c43 0000 remul %d3,%d0,%d0
45dfa: 6700 01f4 beqw 45ff0 <vprintk+0x324>
45dfe: 2200 movel %d0,%d1
45e00: 43ee ffec lea %fp@(-20),%a1
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
45e04: 91c8 subal %a0,%a0
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
45e06: 5288 addql #1,%a0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45e08: 1e03 moveb %d3,%d7
toPrint[count++] = (char) (unsigned_num - (n * base));
45e0a: 3a00 movew %d0,%d5
45e0c: 2d42 ffe8 movel %d2,%fp@(-24)
45e10: cbc7 mulsw %d7,%d5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45e12: 4c43 1001 remul %d3,%d1,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
45e16: 9885 subl %d5,%d4
45e18: 2a04 movel %d4,%d5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45e1a: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
45e1c: 12c5 moveb %d5,%a1@+
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45e1e: 4a81 tstl %d1
45e20: 671a beqs 45e3c <vprintk+0x170>
45e22: 2001 movel %d1,%d0
45e24: 2200 movel %d0,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
45e26: 5288 addql #1,%a0
45e28: 3a00 movew %d0,%d5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45e2a: 4c43 1001 remul %d3,%d1,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
45e2e: cbc7 mulsw %d7,%d5
45e30: 9885 subl %d5,%d4
45e32: 2a04 movel %d4,%d5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45e34: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
45e36: 12c5 moveb %d5,%a1@+
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45e38: 4a81 tstl %d1
45e3a: 66e6 bnes 45e22 <vprintk+0x156>
45e3c: 2608 movel %a0,%d3
45e3e: 5283 addql #1,%d3
45e40: 242e ffe8 movel %fp@(-24),%d2
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45e44: 1d80 88ec moveb %d0,%fp@(ffffffec,%a0:l)
for (n=maxwidth ; n > count; n-- )
45e48: b682 cmpl %d2,%d3
45e4a: 6412 bccs 45e5e <vprintk+0x192>
BSP_output_char(lead);
45e4c: 2f06 movel %d6,%sp@-
45e4e: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45e54: 5382 subql #1,%d2
BSP_output_char(lead);
45e56: 4e90 jsr %a0@
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45e58: 588f addql #4,%sp
45e5a: b682 cmpl %d2,%d3
45e5c: 65ee bcss 45e4c <vprintk+0x180>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e5e: 4a83 tstl %d3
45e60: 6724 beqs 45e86 <vprintk+0x1ba> <== NEVER TAKEN
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
45e62: 49ee ffec lea %fp@(-20),%a4
45e66: d9c3 addal %d3,%a4
45e68: 4282 clrl %d2
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)])]);
45e6a: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e70: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45e72: 1024 moveb %a4@-,%d0
45e74: 49c0 extbl %d0
45e76: 1033 0800 moveb %a3@(00000000,%d0:l),%d0
45e7a: 49c0 extbl %d0
45e7c: 2f00 movel %d0,%sp@-
45e7e: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e80: 588f addql #4,%sp
45e82: b682 cmpl %d2,%d3
45e84: 62e4 bhis 45e6a <vprintk+0x19e>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45e86: 528a addql #1,%a2
45e88: 1012 moveb %a2@,%d0
45e8a: 6600 fe5c bnew 45ce8 <vprintk+0x1c>
sign,
width,
lead
);
}
}
45e8e: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5
45e94: 4e5e unlk %fp
45e96: 4e75 rts
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
45e98: 528a addql #1,%a2
}
if ( c == 'c' ) {
45e9a: 7a63 moveq #99,%d5
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
45e9c: 1012 moveb %a2@,%d0
}
if ( c == 'c' ) {
45e9e: 49c0 extbl %d0
45ea0: ba80 cmpl %d0,%d5
45ea2: 6600 feca bnew 45d6e <vprintk+0xa2>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
45ea6: 2015 movel %a5@,%d0
BSP_output_char(chr);
45ea8: 49c0 extbl %d0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45eaa: 528a addql #1,%a2
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
45eac: 588d addql #4,%a5
BSP_output_char(chr);
45eae: 2f00 movel %d0,%sp@-
45eb0: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
45eb6: 4e90 jsr %a0@
continue;
45eb8: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45eba: 1012 moveb %a2@,%d0
45ebc: 6600 fe2a bnew 45ce8 <vprintk+0x1c>
45ec0: 60cc bras 45e8e <vprintk+0x1c2> <== NOT EXECUTED
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
45ec2: 760a moveq #10,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
45ec4: 49c6 extbl %d6
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
45ec6: 7001 moveq #1,%d0
45ec8: 6000 ff1c braw 45de6 <vprintk+0x11a>
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
45ecc: 2f00 movel %d0,%sp@-
45ece: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45ed4: 528a addql #1,%a2
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
45ed6: 4e90 jsr %a0@
continue;
45ed8: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45eda: 1012 moveb %a2@,%d0
45edc: 6600 fe0a bnew 45ce8 <vprintk+0x1c>
45ee0: 60ac bras 45e8e <vprintk+0x1c2>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
45ee2: 7608 moveq #8,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
45ee4: 49c6 extbl %d6
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
45ee6: 4200 clrb %d0
45ee8: 6000 fefc braw 45de6 <vprintk+0x11a>
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
45eec: 528a addql #1,%a2
}
while (*fmt >= '0' && *fmt <= '9' ) {
45eee: 7a09 moveq #9,%d5
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
45ef0: 1012 moveb %a2@,%d0
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
45ef2: 7801 moveq #1,%d4
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45ef4: 2400 movel %d0,%d2
45ef6: 0682 ffff ffd0 addil #-48,%d2
45efc: 1200 moveb %d0,%d1
45efe: 0282 0000 00ff andil #255,%d2
45f04: 49c1 extbl %d1
45f06: ba82 cmpl %d2,%d5
45f08: 6400 fe1a bccw 45d24 <vprintk+0x58>
45f0c: 4282 clrl %d2
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
45f0e: 766c moveq #108,%d3
45f10: b681 cmpl %d1,%d3
45f12: 6600 fe50 bnew 45d64 <vprintk+0x98>
45f16: 6080 bras 45e98 <vprintk+0x1cc>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
45f18: 528a addql #1,%a2
45f1a: 1012 moveb %a2@,%d0
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
45f1c: 7c30 moveq #48,%d6
45f1e: 1200 moveb %d0,%d1
45f20: 49c1 extbl %d1
45f22: 6000 fde0 braw 45d04 <vprintk+0x38>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
45f26: 2855 moveal %a5@,%a4
45f28: 588d addql #4,%a5
if ( str == NULL ) {
45f2a: 4a8c tstl %a4
45f2c: 6700 00e0 beqw 4600e <vprintk+0x342>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45f30: 4a14 tstb %a4@
45f32: 6700 00e6 beqw 4601a <vprintk+0x34e>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
45f36: 41ec 0001 lea %a4@(1),%a0
if ( str == NULL ) {
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45f3a: 4283 clrl %d3
45f3c: 5283 addql #1,%d3
45f3e: 4a18 tstb %a0@+
45f40: 66fa bnes 45f3c <vprintk+0x270>
;
/* leading spaces */
if ( !minus )
45f42: 4a04 tstb %d4
45f44: 661a bnes 45f60 <vprintk+0x294>
for ( i=len ; i<width ; i++ )
45f46: b483 cmpl %d3,%d2
45f48: 6316 blss 45f60 <vprintk+0x294>
45f4a: 2a03 movel %d3,%d5
BSP_output_char(' ');
45f4c: 4878 0020 pea 20 <OPER2+0xc>
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
45f50: 5285 addql #1,%d5
BSP_output_char(' ');
45f52: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
45f58: 4e90 jsr %a0@
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
45f5a: 588f addql #4,%sp
45f5c: b485 cmpl %d5,%d2
45f5e: 62ec bhis 45f4c <vprintk+0x280>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
45f60: 4a82 tstl %d2
45f62: 6606 bnes 45f6a <vprintk+0x29e>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45f64: 4a83 tstl %d3
45f66: 672c beqs 45f94 <vprintk+0x2c8>
45f68: 2403 movel %d3,%d2
45f6a: 1014 moveb %a4@,%d0
45f6c: 6726 beqs 45f94 <vprintk+0x2c8> <== NEVER TAKEN
BSP_output_char(*str);
45f6e: 49c0 extbl %d0
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45f70: 528c addql #1,%a4
BSP_output_char(*str);
45f72: 2f00 movel %d0,%sp@-
45f74: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
45f7a: 4e90 jsr %a0@
45f7c: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45f7e: 101c moveb %a4@+,%d0
45f80: 6712 beqs 45f94 <vprintk+0x2c8>
BSP_output_char(*str);
45f82: 49c0 extbl %d0
45f84: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
45f8a: 2f00 movel %d0,%sp@-
45f8c: 4e90 jsr %a0@
45f8e: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45f90: 101c moveb %a4@+,%d0
45f92: 66ee bnes 45f82 <vprintk+0x2b6>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
45f94: 4a04 tstb %d4
45f96: 6700 feee beqw 45e86 <vprintk+0x1ba>
for ( i=len ; i<width ; i++ )
45f9a: b483 cmpl %d3,%d2
45f9c: 6300 fee8 blsw 45e86 <vprintk+0x1ba>
BSP_output_char(' ');
45fa0: 4878 0020 pea 20 <OPER2+0xc>
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45fa4: 5283 addql #1,%d3
BSP_output_char(' ');
45fa6: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
45fac: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45fae: 588f addql #4,%sp
45fb0: b483 cmpl %d3,%d2
45fb2: 6300 fed2 blsw 45e86 <vprintk+0x1ba>
BSP_output_char(' ');
45fb6: 4878 0020 pea 20 <OPER2+0xc>
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45fba: 5283 addql #1,%d3
BSP_output_char(' ');
45fbc: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
45fc2: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45fc4: 588f addql #4,%sp
45fc6: b483 cmpl %d3,%d2
45fc8: 62d6 bhis 45fa0 <vprintk+0x2d4>
45fca: 6000 feba braw 45e86 <vprintk+0x1ba>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
45fce: 4878 002d pea 2d <OPER2+0x19>
unsigned_num = (unsigned long) -num;
45fd2: 4484 negl %d4
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
45fd4: 2079 0005 dc34 moveal 5dc34 <BSP_output_char>,%a0
45fda: 4e90 jsr %a0@
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45fdc: 588f addql #4,%sp
45fde: 4a82 tstl %d2
45fe0: 6700 fe12 beqw 45df4 <vprintk+0x128>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45fe4: 2004 movel %d4,%d0
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45fe6: 5382 subql #1,%d2
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45fe8: 4c43 0000 remul %d3,%d0,%d0
45fec: 6600 fe10 bnew 45dfe <vprintk+0x132>
45ff0: 2004 movel %d4,%d0
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
45ff2: 91c8 subal %a0,%a0
while ((n = unsigned_num / base) > 0) {
45ff4: 7601 moveq #1,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45ff6: 1d80 88ec moveb %d0,%fp@(ffffffec,%a0:l)
for (n=maxwidth ; n > count; n-- )
45ffa: b682 cmpl %d2,%d3
45ffc: 6500 fe4e bcsw 45e4c <vprintk+0x180>
46000: 6000 fe5c braw 45e5e <vprintk+0x192>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
46004: 760a moveq #10,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
46006: 49c6 extbl %d6
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
46008: 4200 clrb %d0
4600a: 6000 fdda braw 45de6 <vprintk+0x11a>
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
4600e: 49f9 0005 ce36 lea 5ce36 <rtems_filesystem_default_pathconf+0xb4>,%a4
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
46014: 4a14 tstb %a4@
46016: 6600 ff1e bnew 45f36 <vprintk+0x26a>
4601a: 4283 clrl %d3
4601c: 6000 ff24 braw 45f42 <vprintk+0x276>
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
46020: 7610 moveq #16,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
46022: 49c6 extbl %d6
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
46024: 4200 clrb %d0
46026: 6000 fdbe braw 45de6 <vprintk+0x11a>
...
0005bc40 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
5bc40: 4e56 fff4 linkw %fp,#-12
5bc44: 202e 0008 movel %fp@(8),%d0
5bc48: 222e 000c movel %fp@(12),%d1
5bc4c: 206e 0010 moveal %fp@(16),%a0
5bc50: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5bc54: b0b9 0005 db04 cmpl 5db04 <rtems_libio_number_iops>,%d0
5bc5a: 6468 bccs 5bcc4 <write+0x84> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
5bc5c: 2400 movel %d0,%d2
5bc5e: ed88 lsll #6,%d0
5bc60: e78a lsll #3,%d2
5bc62: 2479 0005 f2f8 moveal 5f2f8 <rtems_libio_iops>,%a2
5bc68: 9082 subl %d2,%d0
5bc6a: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5bc6c: 202a 0014 movel %a2@(20),%d0
5bc70: 0800 0008 btst #8,%d0
5bc74: 674e beqs 5bcc4 <write+0x84>
rtems_libio_check_buffer( buffer );
5bc76: 4a81 tstl %d1
5bc78: 6762 beqs 5bcdc <write+0x9c> <== NEVER TAKEN
rtems_libio_check_count( count );
5bc7a: 4a88 tstl %a0
5bc7c: 673a beqs 5bcb8 <write+0x78> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5bc7e: 44c0 movew %d0,%ccr
5bc80: 665a bnes 5bcdc <write+0x9c> <== NEVER TAKEN
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5bc82: 226a 0020 moveal %a2@(32),%a1
5bc86: 2f08 movel %a0,%sp@-
5bc88: 2f01 movel %d1,%sp@-
5bc8a: 2f0a movel %a2,%sp@-
5bc8c: 2069 000c moveal %a1@(12),%a0
5bc90: 4e90 jsr %a0@
if ( rc > 0 )
5bc92: 4fef 000c lea %sp@(12),%sp
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5bc96: 2200 movel %d0,%d1
if ( rc > 0 )
5bc98: 6f14 bles 5bcae <write+0x6e>
iop->offset += rc;
5bc9a: 2401 movel %d1,%d2
5bc9c: 5bc1 smi %d1
5bc9e: 49c1 extbl %d1
5bca0: d5aa 0010 addl %d2,%a2@(16)
5bca4: 262a 000c movel %a2@(12),%d3
5bca8: d781 addxl %d1,%d3
5bcaa: 2543 000c movel %d3,%a2@(12)
return rc;
}
5bcae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5bcb4: 4e5e unlk %fp
5bcb6: 4e75 rts
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
5bcb8: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5bcba: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5bcc0: 4e5e unlk %fp
5bcc2: 4e75 rts
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
5bcc4: 4eb9 0004 dad8 jsr 4dad8 <__errno>
5bcca: 7409 moveq #9,%d2
5bccc: 2040 moveal %d0,%a0
5bcce: 70ff moveq #-1,%d0
5bcd0: 2082 movel %d2,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5bcd2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5bcd8: 4e5e unlk %fp
5bcda: 4e75 rts
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5bcdc: 4eb9 0004 dad8 jsr 4dad8 <__errno>
5bce2: 7216 moveq #22,%d1
5bce4: 2040 moveal %d0,%a0
5bce6: 70ff moveq #-1,%d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5bce8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5bcee: 2081 movel %d1,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5bcf0: 4e5e unlk %fp <== NOT EXECUTED
0004748c <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
4748c: 4e56 ffe4 linkw %fp,#-28
47490: 202e 0008 movel %fp@(8),%d0
47494: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
47498: 246e 000c moveal %fp@(12),%a2
4749c: 242e 0010 movel %fp@(16),%d2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
474a0: b0b9 0005 e8d4 cmpl 5e8d4 <rtems_libio_number_iops>,%d0
474a6: 6400 00e8 bccw 47590 <writev+0x104>
iop = rtems_libio_iop( fd );
474aa: 2200 movel %d0,%d1
474ac: ed88 lsll #6,%d0
474ae: e789 lsll #3,%d1
474b0: 2679 0006 00c8 moveal 600c8 <rtems_libio_iops>,%a3
474b6: 9081 subl %d1,%d0
474b8: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
474ba: 202b 0014 movel %a3@(20),%d0
474be: 0800 0008 btst #8,%d0
474c2: 6700 00cc beqw 47590 <writev+0x104>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
474c6: 44c0 movew %d0,%ccr
474c8: 6640 bnes 4750a <writev+0x7e> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
474ca: 4a8a tstl %a2
474cc: 673c beqs 4750a <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
474ce: 4a82 tstl %d2
474d0: 6f38 bles 4750a <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
474d2: 0c82 0000 0400 cmpil #1024,%d2
474d8: 6e30 bgts 4750a <writev+0x7e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
474da: 204a moveal %a2,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
474dc: 4281 clrl %d1
474de: 93c9 subal %a1,%a1
474e0: 7601 moveq #1,%d3
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
474e2: 4a90 tstl %a0@
474e4: 6724 beqs 4750a <writev+0x7e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
474e6: 2028 0004 movel %a0@(4),%d0
all_zeros = false;
474ea: 57c4 seq %d4
/* check for wrap */
old = total;
total += iov[v].iov_len;
474ec: d089 addl %a1,%d0
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
474ee: 5281 addql #1,%d1
474f0: 5088 addql #8,%a0
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
474f2: c684 andl %d4,%d3
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
474f4: b3c0 cmpal %d0,%a1
474f6: 6e12 bgts 4750a <writev+0x7e>
474f8: 0c80 0000 7fff cmpil #32767,%d0
474fe: 6e0a bgts 4750a <writev+0x7e> <== NEVER TAKEN
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
47500: b282 cmpl %d2,%d1
47502: 6c20 bges 47524 <writev+0x98>
47504: 2240 moveal %d0,%a1
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
47506: 4a90 tstl %a0@
47508: 66dc bnes 474e6 <writev+0x5a>
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
4750a: 4eb9 0004 eb64 jsr 4eb64 <__errno>
47510: 78ff moveq #-1,%d4
47512: 2040 moveal %d0,%a0
47514: 7016 moveq #22,%d0
47516: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47518: 2004 movel %d4,%d0
4751a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
47520: 4e5e unlk %fp
47522: 4e75 rts
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
47524: 4a03 tstb %d3
47526: 661c bnes 47544 <writev+0xb8> <== NEVER TAKEN
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
47528: 588a addql #4,%a2
4752a: 4283 clrl %d3
4752c: 4284 clrl %d4
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
4752e: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
47530: 2012 movel %a2@,%d0
47532: 661e bnes 47552 <writev+0xc6> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47534: 508a addql #8,%a2 <== NOT EXECUTED
47536: b682 cmpl %d2,%d3 <== NOT EXECUTED
47538: 6cde bges 47518 <writev+0x8c> <== NOT EXECUTED
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
4753a: 2012 movel %a2@,%d0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
4753c: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
4753e: 4a80 tstl %d0
47540: 67f2 beqs 47534 <writev+0xa8> <== NEVER TAKEN
47542: 600e bras 47552 <writev+0xc6>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
47544: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47546: 2004 movel %d4,%d0
47548: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4754e: 4e5e unlk %fp
47550: 4e75 rts
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
47552: 206b 0020 moveal %a3@(32),%a0
47556: 2f00 movel %d0,%sp@-
47558: 2f2a fffc movel %a2@(-4),%sp@-
4755c: 2f0b movel %a3,%sp@-
4755e: 2068 000c moveal %a0@(12),%a0
47562: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
47564: 4fef 000c lea %sp@(12),%sp
47568: 4a80 tstl %d0
4756a: 6d3e blts 475aa <writev+0x11e> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
4756c: 6716 beqs 47584 <writev+0xf8> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
4756e: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
47570: 2c00 movel %d0,%d6
47572: 5bc5 smi %d5
47574: 49c5 extbl %d5
47576: ddab 0010 addl %d6,%a3@(16)
4757a: 222b 000c movel %a3@(12),%d1
4757e: d385 addxl %d5,%d1
47580: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
47584: b092 cmpl %a2@,%d0
47586: 6690 bnes 47518 <writev+0x8c> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47588: 508a addql #8,%a2
4758a: b682 cmpl %d2,%d3
4758c: 6dac blts 4753a <writev+0xae>
4758e: 6088 bras 47518 <writev+0x8c>
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
47590: 4eb9 0004 eb64 jsr 4eb64 <__errno>
47596: 78ff moveq #-1,%d4
47598: 7209 moveq #9,%d1
4759a: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4759c: 2004 movel %d4,%d0
4759e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
475a4: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
475a6: 4e5e unlk %fp
475a8: 4e75 rts
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
475aa: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
475ac: 2004 movel %d4,%d0 <== NOT EXECUTED
475ae: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
475b4: 4e5e unlk %fp <== NOT EXECUTED