RTEMS 4.11Annotated Report
Sat Nov 27 15:09:15 2010
30008a94 <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 ) {
30008a94: e5902000 ldr r2, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
30008a98: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
30008a9c: e592204c ldr r2, [r2, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
30008aa0: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
30008aa4: e2422001 sub r2, r2, #1
30008aa8: e3520006 cmp r2, #6
30008aac: 979ff102 ldrls pc, [pc, r2, lsl #2]
30008ab0: ea000010 b 30008af8 <IMFS_Set_handlers+0x64> <== NOT EXECUTED
30008ab4: 30008ad0 .word 0x30008ad0 <== NOT EXECUTED
30008ab8: 30008ad8 .word 0x30008ad8 <== NOT EXECUTED
30008abc: 30008ae0 .word 0x30008ae0 <== NOT EXECUTED
30008ac0: 30008ae0 .word 0x30008ae0 <== NOT EXECUTED
30008ac4: 30008ae8 .word 0x30008ae8 <== NOT EXECUTED
30008ac8: 30008ae8 .word 0x30008ae8 <== NOT EXECUTED
30008acc: 30008af0 .word 0x30008af0 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
30008ad0: e593300c ldr r3, [r3, #12]
30008ad4: ea000006 b 30008af4 <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
30008ad8: e59f3020 ldr r3, [pc, #32] ; 30008b00 <IMFS_Set_handlers+0x6c>
30008adc: ea000004 b 30008af4 <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
30008ae0: e59f301c ldr r3, [pc, #28] ; 30008b04 <IMFS_Set_handlers+0x70>
30008ae4: ea000002 b 30008af4 <IMFS_Set_handlers+0x60>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
30008ae8: e5933008 ldr r3, [r3, #8]
30008aec: ea000000 b 30008af4 <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
30008af0: e5933010 ldr r3, [r3, #16]
30008af4: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
30008af8: e3a00000 mov r0, #0
30008afc: e12fff1e bx lr
30008bbc <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30008bbc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
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 ) ) {
30008bc0: e3d27007 bics r7, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30008bc4: e24dd040 sub sp, sp, #64 ; 0x40
30008bc8: e58d0000 str r0, [sp]
30008bcc: e1a06001 mov r6, r1
30008bd0: e1a08002 mov r8, r2
30008bd4: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30008bd8: 05935000 ldreq r5, [r3]
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
30008bdc: 03a09001 moveq r9, #1
* 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 );
30008be0: 028da004 addeq sl, sp, #4
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 ) ) {
30008be4: 0a000057 beq 30008d48 <IMFS_eval_path+0x18c>
rtems_set_errno_and_return_minus_one( EIO );
30008be8: eb001015 bl 3000cc44 <__errno> <== NOT EXECUTED
30008bec: e3a03005 mov r3, #5 <== NOT EXECUTED
30008bf0: ea00007e b 30008df0 <IMFS_eval_path+0x234> <== NOT EXECUTED
* 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 );
30008bf4: e59d2000 ldr r2, [sp]
30008bf8: e28d303c add r3, sp, #60 ; 0x3c
30008bfc: e0820007 add r0, r2, r7
30008c00: e1a01006 mov r1, r6
30008c04: e1a0200a mov r2, sl
30008c08: eb0001ae bl 300092c8 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30008c0c: e5943000 ldr r3, [r4]
* 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 );
30008c10: e1a09000 mov r9, r0
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30008c14: e3530000 cmp r3, #0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30008c18: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
30008c1c: 0a000041 beq 30008d28 <IMFS_eval_path+0x16c>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30008c20: e3500000 cmp r0, #0
30008c24: 0a000006 beq 30008c44 <IMFS_eval_path+0x88>
if ( node->type == IMFS_DIRECTORY )
30008c28: e595104c ldr r1, [r5, #76] ; 0x4c
30008c2c: e3510001 cmp r1, #1
30008c30: 1a000003 bne 30008c44 <IMFS_eval_path+0x88>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30008c34: e1a00004 mov r0, r4
30008c38: ebffffb2 bl 30008b08 <IMFS_evaluate_permission>
30008c3c: e3500000 cmp r0, #0
30008c40: 0a000068 beq 30008de8 <IMFS_eval_path+0x22c>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
30008c44: e3590003 cmp r9, #3
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30008c48: e06b6006 rsb r6, fp, r6
i += len;
30008c4c: e087700b add r7, r7, fp
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;
30008c50: e5945000 ldr r5, [r4]
switch( type ) {
30008c54: 0a000014 beq 30008cac <IMFS_eval_path+0xf0>
30008c58: e3590004 cmp r9, #4
30008c5c: 0a000036 beq 30008d3c <IMFS_eval_path+0x180>
30008c60: e3590002 cmp r9, #2
30008c64: 1a000037 bne 30008d48 <IMFS_eval_path+0x18c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30008c68: e59fc194 ldr ip, [pc, #404] ; 30008e04 <IMFS_eval_path+0x248>
30008c6c: e59c3000 ldr r3, [ip]
30008c70: e5933018 ldr r3, [r3, #24]
30008c74: e1550003 cmp r5, r3
30008c78: 0a000032 beq 30008d48 <IMFS_eval_path+0x18c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
30008c7c: e594e010 ldr lr, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
30008c80: e59e301c ldr r3, [lr, #28]
30008c84: e1550003 cmp r5, r3
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
30008c88: 028dc028 addeq ip, sp, #40 ; 0x28
30008c8c: 028ee008 addeq lr, lr, #8
30008c90: 0a000037 beq 30008d74 <IMFS_eval_path+0x1b8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
30008c94: e5955008 ldr r5, [r5, #8]
30008c98: e3550000 cmp r5, #0
30008c9c: 1a000024 bne 30008d34 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
30008ca0: eb000fe7 bl 3000cc44 <__errno>
30008ca4: e5809000 str r9, [r0]
30008ca8: ea000051 b 30008df4 <IMFS_eval_path+0x238>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
30008cac: e595304c ldr r3, [r5, #76] ; 0x4c
30008cb0: e3530003 cmp r3, #3
30008cb4: 1a000004 bne 30008ccc <IMFS_eval_path+0x110>
IMFS_evaluate_hard_link( pathloc, 0 );
30008cb8: e1a00004 mov r0, r4
30008cbc: e3a01000 mov r1, #0
30008cc0: ebffffaa bl 30008b70 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
30008cc4: e5945000 ldr r5, [r4]
30008cc8: ea000008 b 30008cf0 <IMFS_eval_path+0x134>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
30008ccc: e3530004 cmp r3, #4
30008cd0: 1a000006 bne 30008cf0 <IMFS_eval_path+0x134>
result = IMFS_evaluate_sym_link( pathloc, 0 );
30008cd4: e1a00004 mov r0, r4
30008cd8: e3a01000 mov r1, #0
30008cdc: eb000049 bl 30008e08 <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
30008ce0: e3700001 cmn r0, #1
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
30008ce4: e1a0b000 mov fp, r0
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
30008ce8: e5945000 ldr r5, [r4]
if ( result == -1 )
30008cec: 0a000041 beq 30008df8 <IMFS_eval_path+0x23c>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30008cf0: e595304c ldr r3, [r5, #76] ; 0x4c
30008cf4: e3530001 cmp r3, #1
30008cf8: 0a000002 beq 30008d08 <IMFS_eval_path+0x14c>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30008cfc: eb000fd0 bl 3000cc44 <__errno>
30008d00: e3a03014 mov r3, #20
30008d04: ea000039 b 30008df0 <IMFS_eval_path+0x234>
/*
* 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 ) {
30008d08: e595e05c ldr lr, [r5, #92] ; 0x5c
30008d0c: e35e0000 cmp lr, #0
30008d10: 1a000015 bne 30008d6c <IMFS_eval_path+0x1b0>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
30008d14: e1a00005 mov r0, r5
30008d18: e1a0100a mov r1, sl
30008d1c: eb000149 bl 30009248 <IMFS_find_match_in_dir>
if ( !node )
30008d20: e2505000 subs r5, r0, #0
30008d24: 1a000002 bne 30008d34 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
30008d28: eb000fc5 bl 3000cc44 <__errno>
30008d2c: e3a03002 mov r3, #2
30008d30: ea00002e b 30008df0 <IMFS_eval_path+0x234>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
30008d34: e5845000 str r5, [r4]
30008d38: ea000002 b 30008d48 <IMFS_eval_path+0x18c>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30008d3c: eb000fc0 bl 3000cc44 <__errno>
30008d40: e3a0305b mov r3, #91 ; 0x5b
30008d44: ea000029 b 30008df0 <IMFS_eval_path+0x234>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
30008d48: e3590004 cmp r9, #4
30008d4c: 13590000 cmpne r9, #0
30008d50: 1affffa7 bne 30008bf4 <IMFS_eval_path+0x38>
* 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 ) {
30008d54: e595304c ldr r3, [r5, #76] ; 0x4c
30008d58: e3530001 cmp r3, #1
30008d5c: 1a000019 bne 30008dc8 <IMFS_eval_path+0x20c>
if ( node->info.directory.mt_fs != NULL ) {
30008d60: e595e05c ldr lr, [r5, #92] ; 0x5c
30008d64: e35e0000 cmp lr, #0
30008d68: 0a000016 beq 30008dc8 <IMFS_eval_path+0x20c>
newloc = node->info.directory.mt_fs->mt_fs_root;
30008d6c: e28dc028 add ip, sp, #40 ; 0x28
30008d70: e28ee01c add lr, lr, #28
30008d74: e8be000f ldm lr!, {r0, r1, r2, r3}
30008d78: e8ac000f stmia ip!, {r0, r1, r2, r3}
30008d7c: e59ee000 ldr lr, [lr]
30008d80: e58ce000 str lr, [ip]
*pathloc = newloc;
30008d84: e28dc028 add ip, sp, #40 ; 0x28
30008d88: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008d8c: e1a0c004 mov ip, r4
30008d90: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30008d94: e59d103c ldr r1, [sp, #60] ; 0x3c
30008d98: e59d2000 ldr r2, [sp]
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
30008d9c: e58ce000 str lr, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30008da0: e0610007 rsb r0, r1, r7
30008da4: e0820000 add r0, r2, r0
30008da8: e594c00c ldr ip, [r4, #12]
30008dac: e0861001 add r1, r6, r1
30008db0: e1a02008 mov r2, r8
30008db4: e1a03004 mov r3, r4
30008db8: e1a0e00f mov lr, pc
30008dbc: e59cf000 ldr pc, [ip]
30008dc0: e1a0b000 mov fp, r0
30008dc4: ea00000b b 30008df8 <IMFS_eval_path+0x23c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30008dc8: e1a00004 mov r0, r4
30008dcc: ebffff30 bl 30008a94 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30008dd0: e1a01008 mov r1, r8
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30008dd4: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30008dd8: e1a00004 mov r0, r4
30008ddc: ebffff49 bl 30008b08 <IMFS_evaluate_permission>
30008de0: e3500000 cmp r0, #0
30008de4: 1a000003 bne 30008df8 <IMFS_eval_path+0x23c>
rtems_set_errno_and_return_minus_one( EACCES );
30008de8: eb000f95 bl 3000cc44 <__errno>
30008dec: e3a0300d mov r3, #13
30008df0: e5803000 str r3, [r0]
30008df4: e3e0b000 mvn fp, #0
return result;
}
30008df8: e1a0000b mov r0, fp
30008dfc: e28dd040 add sp, sp, #64 ; 0x40
30008e00: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30008f44 <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 */
)
{
30008f44: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30008f48: e24dd03c sub sp, sp, #60 ; 0x3c
30008f4c: e1a07000 mov r7, r0
30008f50: e1a04001 mov r4, r1
30008f54: e1a0a002 mov sl, r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30008f58: e5916000 ldr r6, [r1]
/*
* Get the path length.
*/
pathlen = strlen( path );
30008f5c: eb001322 bl 3000dbec <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
30008f60: e3a05000 mov r5, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
30008f64: e1a08000 mov r8, r0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30008f68: e1a01008 mov r1, r8
30008f6c: e28d3038 add r3, sp, #56 ; 0x38
30008f70: e0870005 add r0, r7, r5
30008f74: e1a0200d mov r2, sp
30008f78: eb0000d2 bl 300092c8 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
30008f7c: e5943000 ldr r3, [r4]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
30008f80: e59db038 ldr fp, [sp, #56] ; 0x38
i += len;
if ( !pathloc->node_access )
30008f84: e3530000 cmp r3, #0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30008f88: e1a09000 mov r9, r0
pathlen -= len;
30008f8c: e06b8008 rsb r8, fp, r8
i += len;
if ( !pathloc->node_access )
30008f90: 0a000060 beq 30009118 <IMFS_evaluate_for_make+0x1d4>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30008f94: e3500000 cmp r0, #0
30008f98: 0a000006 beq 30008fb8 <IMFS_evaluate_for_make+0x74>
if ( node->type == IMFS_DIRECTORY )
30008f9c: e596104c ldr r1, [r6, #76] ; 0x4c
30008fa0: e3510001 cmp r1, #1
30008fa4: 1a000003 bne 30008fb8 <IMFS_evaluate_for_make+0x74>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30008fa8: e1a00004 mov r0, r4
30008fac: ebfffed5 bl 30008b08 <IMFS_evaluate_permission>
30008fb0: e3500000 cmp r0, #0
30008fb4: 0a00006c beq 3000916c <IMFS_evaluate_for_make+0x228>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
30008fb8: e5943000 ldr r3, [r4]
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
30008fbc: e085500b add r5, r5, fp
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;
30008fc0: e1a06003 mov r6, r3
switch( type ) {
30008fc4: e3590004 cmp r9, #4
30008fc8: 979ff109 ldrls pc, [pc, r9, lsl #2]
30008fcc: eaffffe5 b 30008f68 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
30008fd0: 300090dc .word 0x300090dc <== NOT EXECUTED
30008fd4: 30008f68 .word 0x30008f68 <== NOT EXECUTED
30008fd8: 30008fe4 .word 0x30008fe4 <== NOT EXECUTED
30008fdc: 30009020 .word 0x30009020 <== NOT EXECUTED
30008fe0: 300090e8 .word 0x300090e8 <== NOT EXECUTED
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30008fe4: e59f119c ldr r1, [pc, #412] ; 30009188 <IMFS_evaluate_for_make+0x244>
30008fe8: e5912000 ldr r2, [r1]
30008fec: e5922018 ldr r2, [r2, #24]
30008ff0: e1530002 cmp r3, r2
30008ff4: 0affffdb beq 30008f68 <IMFS_evaluate_for_make+0x24>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
30008ff8: e594e010 ldr lr, [r4, #16]
30008ffc: e59e201c ldr r2, [lr, #28]
30009000: e1530002 cmp r3, r2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
30009004: 028dc024 addeq ip, sp, #36 ; 0x24
30009008: 028ee008 addeq lr, lr, #8
3000900c: 0a000019 beq 30009078 <IMFS_evaluate_for_make+0x134>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
30009010: e5936008 ldr r6, [r3, #8]
30009014: e3560000 cmp r6, #0
30009018: 1a00002d bne 300090d4 <IMFS_evaluate_for_make+0x190>
3000901c: ea00003d b 30009118 <IMFS_evaluate_for_make+0x1d4>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
30009020: e593304c ldr r3, [r3, #76] ; 0x4c
30009024: e3530003 cmp r3, #3
30009028: 0a000001 beq 30009034 <IMFS_evaluate_for_make+0xf0>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
3000902c: e3530004 cmp r3, #4
30009030: 1a000005 bne 3000904c <IMFS_evaluate_for_make+0x108>
result = IMFS_evaluate_link( pathloc, 0 );
30009034: e1a00004 mov r0, r4
30009038: e3a01000 mov r1, #0
3000903c: ebffff93 bl 30008e90 <IMFS_evaluate_link>
if ( result == -1 )
30009040: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
30009044: e1a06000 mov r6, r0
if ( result == -1 )
30009048: 0a00004b beq 3000917c <IMFS_evaluate_for_make+0x238>
return -1;
}
node = pathloc->node_access;
3000904c: e5940000 ldr r0, [r4]
if ( !node )
30009050: e3500000 cmp r0, #0
30009054: 0a00003c beq 3000914c <IMFS_evaluate_for_make+0x208>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30009058: e590304c ldr r3, [r0, #76] ; 0x4c
3000905c: e3530001 cmp r3, #1
30009060: 1a000039 bne 3000914c <IMFS_evaluate_for_make+0x208>
/*
* 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 ) {
30009064: e590e05c ldr lr, [r0, #92] ; 0x5c
30009068: e35e0000 cmp lr, #0
3000906c: 0a000014 beq 300090c4 <IMFS_evaluate_for_make+0x180>
newloc = node->info.directory.mt_fs->mt_fs_root;
30009070: e28dc024 add ip, sp, #36 ; 0x24
30009074: e28ee01c add lr, lr, #28
30009078: e8be000f ldm lr!, {r0, r1, r2, r3}
3000907c: e8ac000f stmia ip!, {r0, r1, r2, r3}
30009080: e59ee000 ldr lr, [lr]
30009084: e58ce000 str lr, [ip]
*pathloc = newloc;
30009088: e28dc024 add ip, sp, #36 ; 0x24
3000908c: e8bc000f ldm ip!, {r0, r1, r2, r3}
30009090: e1a0c004 mov ip, r4
30009094: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30009098: e59d2038 ldr r2, [sp, #56] ; 0x38
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
3000909c: e58ce000 str lr, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
300090a0: e0625005 rsb r5, r2, r5
300090a4: e594300c ldr r3, [r4, #12]
300090a8: e0870005 add r0, r7, r5
300090ac: e1a01004 mov r1, r4
300090b0: e1a0200a mov r2, sl
300090b4: e1a0e00f mov lr, pc
300090b8: e593f004 ldr pc, [r3, #4]
300090bc: e1a06000 mov r6, r0
300090c0: ea00002d b 3000917c <IMFS_evaluate_for_make+0x238>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
300090c4: e1a0100d mov r1, sp
300090c8: eb00005e bl 30009248 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
300090cc: e2506000 subs r6, r0, #0
300090d0: 0a000007 beq 300090f4 <IMFS_evaluate_for_make+0x1b0>
done = true;
else
pathloc->node_access = node;
300090d4: e5846000 str r6, [r4]
300090d8: eaffffa2 b 30008f68 <IMFS_evaluate_for_make+0x24>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
300090dc: eb000ed8 bl 3000cc44 <__errno>
300090e0: e3a03011 mov r3, #17
300090e4: ea000022 b 30009174 <IMFS_evaluate_for_make+0x230>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
300090e8: eb000ed5 bl 3000cc44 <__errno>
300090ec: e3a0305b mov r3, #91 ; 0x5b
300090f0: ea00001f b 30009174 <IMFS_evaluate_for_make+0x230>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
300090f4: e59d3038 ldr r3, [sp, #56] ; 0x38
300090f8: e0633005 rsb r3, r3, r5
300090fc: e0873003 add r3, r7, r3
30009100: e58a3000 str r3, [sl]
* 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(
30009104: e0875005 add r5, r7, r5
/*
* 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++) {
30009108: ea000005 b 30009124 <IMFS_evaluate_for_make+0x1e0>
if ( !IMFS_is_separator( path[ i ] ) )
3000910c: ebffe6b9 bl 30002bf8 <rtems_filesystem_is_separator>
30009110: e3500000 cmp r0, #0
30009114: 1a000002 bne 30009124 <IMFS_evaluate_for_make+0x1e0>
rtems_set_errno_and_return_minus_one( ENOENT );
30009118: eb000ec9 bl 3000cc44 <__errno>
3000911c: e3a03002 mov r3, #2
30009120: ea000013 b 30009174 <IMFS_evaluate_for_make+0x230>
/*
* 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++) {
30009124: e4d50001 ldrb r0, [r5], #1
30009128: e3500000 cmp r0, #0
3000912c: 1afffff6 bne 3000910c <IMFS_evaluate_for_make+0x1c8>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30009130: e1a00004 mov r0, r4
30009134: ebfffe56 bl 30008a94 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30009138: e5943000 ldr r3, [r4]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
3000913c: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30009140: e593304c ldr r3, [r3, #76] ; 0x4c
30009144: e3530001 cmp r3, #1
30009148: 0a000002 beq 30009158 <IMFS_evaluate_for_make+0x214>
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000914c: eb000ebc bl 3000cc44 <__errno>
30009150: e3a03014 mov r3, #20
30009154: ea000006 b 30009174 <IMFS_evaluate_for_make+0x230>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
30009158: e1a00004 mov r0, r4
3000915c: e3a01003 mov r1, #3
30009160: ebfffe68 bl 30008b08 <IMFS_evaluate_permission>
30009164: e3500000 cmp r0, #0
30009168: 1a000003 bne 3000917c <IMFS_evaluate_for_make+0x238>
rtems_set_errno_and_return_minus_one( EACCES );
3000916c: eb000eb4 bl 3000cc44 <__errno>
30009170: e3a0300d mov r3, #13
30009174: e5803000 str r3, [r0]
30009178: e3e06000 mvn r6, #0
return result;
}
3000917c: e1a00006 mov r0, r6
30009180: e28dd03c add sp, sp, #60 ; 0x3c
30009184: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30008b08 <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 ) )
30008b08: e3d13007 bics r3, r1, #7
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
30008b0c: e92d4070 push {r4, r5, r6, lr}
30008b10: e1a04001 mov r4, r1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
30008b14: 0a000004 beq 30008b2c <IMFS_evaluate_permission+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
30008b18: eb001049 bl 3000cc44 <__errno> <== NOT EXECUTED
30008b1c: e3a03001 mov r3, #1 <== NOT EXECUTED
30008b20: e5803000 str r3, [r0] <== NOT EXECUTED
30008b24: e3e00000 mvn r0, #0 <== NOT EXECUTED
30008b28: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
jnode = node->node_access;
30008b2c: e5905000 ldr r5, [r0]
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
30008b30: eb0002dd bl 300096ac <geteuid>
30008b34: e1a06000 mov r6, r0
st_gid = getegid();
30008b38: eb0002d6 bl 30009698 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
30008b3c: e1d533bc ldrh r3, [r5, #60] ; 0x3c
30008b40: e1530006 cmp r3, r6
flags_to_test <<= 6;
30008b44: 01a04304 lsleq r4, r4, #6
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
30008b48: 0a000002 beq 30008b58 <IMFS_evaluate_permission+0x50>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
30008b4c: e1d533be ldrh r3, [r5, #62] ; 0x3e
30008b50: e1530000 cmp r3, r0
flags_to_test <<= 3;
30008b54: 01a04184 lsleq r4, r4, #3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
30008b58: e5950030 ldr r0, [r5, #48] ; 0x30
30008b5c: e0040000 and r0, r4, r0
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 );
30008b60: e1500004 cmp r0, r4
30008b64: 13a00000 movne r0, #0
30008b68: 03a00001 moveq r0, #1
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
30008b6c: e8bd8070 pop {r4, r5, r6, pc}
3000918c <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
)
{
3000918c: e92d4070 push {r4, r5, r6, lr}
/*
* 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;
30009190: e1a0c000 mov ip, r0
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
30009194: e24dd014 sub sp, sp, #20
/*
* 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;
30009198: e5bc401c ldr r4, [ip, #28]!
loc = temp_mt_entry->mt_fs_root;
3000919c: e1a0e00d mov lr, sp
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
300091a0: e1a05000 mov r5, r0
* 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;
300091a4: e8bc000f ldm ip!, {r0, r1, r2, r3}
300091a8: e8ae000f stmia lr!, {r0, r1, r2, r3}
300091ac: e59c3000 ldr r3, [ip]
300091b0: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
300091b4: e3a03000 mov r3, #0
300091b8: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
300091bc: e1a0500d mov r5, sp
300091c0: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
300091c4: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
300091c8: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
300091cc: ebfffe30 bl 30008a94 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
300091d0: e594304c ldr r3, [r4, #76] ; 0x4c
300091d4: e3530001 cmp r3, #1
300091d8: 1a000003 bne 300091ec <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
300091dc: e5942050 ldr r2, [r4, #80] ; 0x50
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
300091e0: e2843054 add r3, r4, #84 ; 0x54
300091e4: e1520003 cmp r2, r3
300091e8: 1a000005 bne 30009204 <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
300091ec: e3a00000 mov r0, #0
300091f0: e1a0100d mov r1, sp
300091f4: ebffe1d4 bl 3000194c <IMFS_unlink>
if (result != 0)
300091f8: e3500000 cmp r0, #0
300091fc: 1a00000c bne 30009234 <IMFS_fsunmount+0xa8>
return -1;
jnode = next;
30009200: e1a04006 mov r4, r6
}
if ( jnode != NULL ) {
30009204: e3540000 cmp r4, #0
30009208: 0a00000b beq 3000923c <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
3000920c: e594304c ldr r3, [r4, #76] ; 0x4c
30009210: e3530001 cmp r3, #1
30009214: 1affffe9 bne 300091c0 <IMFS_fsunmount+0x34>
}
}
} while (jnode != NULL);
return 0;
}
30009218: e5943050 ldr r3, [r4, #80] ; 0x50
3000921c: e2842054 add r2, r4, #84 ; 0x54
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
30009220: e1530002 cmp r3, r2
30009224: 0affffe5 beq 300091c0 <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
30009228: e2534000 subs r4, r3, #0
3000922c: 1affffe3 bne 300091c0 <IMFS_fsunmount+0x34>
30009230: ea000001 b 3000923c <IMFS_fsunmount+0xb0> <== NOT EXECUTED
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
30009234: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009238: ea000000 b 30009240 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
3000923c: e1a00004 mov r0, r4
}
30009240: e28dd014 add sp, sp, #20
30009244: e8bd8070 pop {r4, r5, r6, pc}
3000b3a8 <IMFS_memfile_get_block_pointer>:
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b3a8: e59f31e4 ldr r3, [pc, #484] ; 3000b594 <IMFS_memfile_get_block_pointer+0x1ec>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b3ac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b3b0: e5935000 ldr r5, [r3]
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b3b4: e1a04000 mov r4, r0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b3b8: e1a05125 lsr r5, r5, #2
3000b3bc: e2453001 sub r3, r5, #1
3000b3c0: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b3c4: e1a06001 mov r6, r1
3000b3c8: e1a08002 mov r8, r2
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b3cc: 8a00000e bhi 3000b40c <IMFS_memfile_get_block_pointer+0x64>
p = info->indirect;
if ( malloc_it ) {
3000b3d0: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
3000b3d4: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
3000b3d8: 0a000007 beq 3000b3fc <IMFS_memfile_get_block_pointer+0x54>
if ( !p ) {
3000b3dc: e3500000 cmp r0, #0
3000b3e0: 1a000003 bne 3000b3f4 <IMFS_memfile_get_block_pointer+0x4c>
p = memfile_alloc_block();
3000b3e4: ebffffe2 bl 3000b374 <memfile_alloc_block>
if ( !p )
3000b3e8: e3500000 cmp r0, #0
3000b3ec: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->indirect = p;
3000b3f0: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
3000b3f4: e5940058 ldr r0, [r4, #88] ; 0x58
3000b3f8: ea000001 b 3000b404 <IMFS_memfile_get_block_pointer+0x5c>
}
if ( !p )
3000b3fc: e3500000 cmp r0, #0
3000b400: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return &info->indirect[ my_block ];
3000b404: e0800106 add r0, r0, r6, lsl #2
3000b408: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
3000b40c: e2853001 add r3, r5, #1
3000b410: e0030395 mul r3, r5, r3
3000b414: e2432001 sub r2, r3, #1
3000b418: e1510002 cmp r1, r2
3000b41c: 8a000021 bhi 3000b4a8 <IMFS_memfile_get_block_pointer+0x100>
my_block -= FIRST_DOUBLY_INDIRECT;
3000b420: e0656001 rsb r6, r5, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b424: e1a00006 mov r0, r6
3000b428: e1a01005 mov r1, r5
3000b42c: eb00143b bl 30010520 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b430: e1a01005 mov r1, r5
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b434: e1a07000 mov r7, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b438: e1a00006 mov r0, r6
3000b43c: eb00139f bl 300102c0 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
3000b440: e3580000 cmp r8, #0
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b444: e1a05000 mov r5, r0
p = info->doubly_indirect;
3000b448: e594005c ldr r0, [r4, #92] ; 0x5c
if ( malloc_it ) {
3000b44c: 0a00000e beq 3000b48c <IMFS_memfile_get_block_pointer+0xe4>
if ( !p ) {
3000b450: e3500000 cmp r0, #0
3000b454: 1a000003 bne 3000b468 <IMFS_memfile_get_block_pointer+0xc0>
p = memfile_alloc_block();
3000b458: ebffffc5 bl 3000b374 <memfile_alloc_block>
if ( !p )
3000b45c: e3500000 cmp r0, #0
3000b460: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->doubly_indirect = p;
3000b464: e584005c str r0, [r4, #92] ; 0x5c
}
p1 = (block_p *)p[ doubly ];
3000b468: e0804105 add r4, r0, r5, lsl #2
3000b46c: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p1 ) {
3000b470: e3500000 cmp r0, #0
3000b474: 1a000009 bne 3000b4a0 <IMFS_memfile_get_block_pointer+0xf8>
p1 = memfile_alloc_block();
3000b478: ebffffbd bl 3000b374 <memfile_alloc_block>
if ( !p1 )
3000b47c: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
3000b480: 15840000 strne r0, [r4]
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
3000b484: 1a000005 bne 3000b4a0 <IMFS_memfile_get_block_pointer+0xf8>
3000b488: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
3000b48c: e3500000 cmp r0, #0
3000b490: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p = (block_p *)p[ doubly ];
3000b494: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p )
3000b498: e3500000 cmp r0, #0
3000b49c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return (block_p *)&p[ singly ];
3000b4a0: e0800107 add r0, r0, r7, lsl #2
3000b4a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000b4a8: e2832001 add r2, r3, #1
3000b4ac: e0020295 mul r2, r5, r2
3000b4b0: e2422001 sub r2, r2, #1
3000b4b4: e1510002 cmp r1, r2
3000b4b8: 8a000033 bhi 3000b58c <IMFS_memfile_get_block_pointer+0x1e4>
my_block -= FIRST_TRIPLY_INDIRECT;
3000b4bc: e0636001 rsb r6, r3, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b4c0: e1a00006 mov r0, r6
3000b4c4: e1a01005 mov r1, r5
3000b4c8: eb001414 bl 30010520 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b4cc: e1a01005 mov r1, r5
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b4d0: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b4d4: e1a00006 mov r0, r6
3000b4d8: eb001378 bl 300102c0 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000b4dc: e1a01005 mov r1, r5
*/
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;
3000b4e0: e1a06000 mov r6, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000b4e4: eb001375 bl 300102c0 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000b4e8: e1a01005 mov r1, r5
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;
3000b4ec: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000b4f0: e1a00006 mov r0, r6
3000b4f4: eb001409 bl 30010520 <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
3000b4f8: e3580000 cmp r8, #0
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000b4fc: e1a05000 mov r5, r0
p = info->triply_indirect;
3000b500: e5940060 ldr r0, [r4, #96] ; 0x60
if ( malloc_it ) {
3000b504: 0a000016 beq 3000b564 <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
3000b508: e3500000 cmp r0, #0
3000b50c: 1a000003 bne 3000b520 <IMFS_memfile_get_block_pointer+0x178>
p = memfile_alloc_block();
3000b510: ebffff97 bl 3000b374 <memfile_alloc_block>
if ( !p )
3000b514: e3500000 cmp r0, #0
3000b518: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->triply_indirect = p;
3000b51c: e5840060 str r0, [r4, #96] ; 0x60
}
p1 = (block_p *) p[ triply ];
3000b520: e0804107 add r4, r0, r7, lsl #2
3000b524: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 ) {
3000b528: e3500000 cmp r0, #0
3000b52c: 1a000003 bne 3000b540 <IMFS_memfile_get_block_pointer+0x198>
p1 = memfile_alloc_block();
3000b530: ebffff8f bl 3000b374 <memfile_alloc_block>
if ( !p1 )
3000b534: e3500000 cmp r0, #0
3000b538: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p[ triply ] = (block_p) p1;
3000b53c: e5840000 str r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
3000b540: e0804105 add r4, r0, r5, lsl #2
3000b544: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 ) {
3000b548: e3500000 cmp r0, #0
3000b54c: 1a00000c bne 3000b584 <IMFS_memfile_get_block_pointer+0x1dc>
p2 = memfile_alloc_block();
3000b550: ebffff87 bl 3000b374 <memfile_alloc_block>
if ( !p2 )
3000b554: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
3000b558: 15840000 strne r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
3000b55c: 1a000008 bne 3000b584 <IMFS_memfile_get_block_pointer+0x1dc>
3000b560: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
3000b564: e3500000 cmp r0, #0
3000b568: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p1 = (block_p *) p[ triply ];
3000b56c: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
3000b570: e3500000 cmp r0, #0
3000b574: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p2 = (block_p *)p1[ doubly ];
3000b578: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 )
3000b57c: e3500000 cmp r0, #0
3000b580: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return (block_p *)&p2[ singly ];
3000b584: e080010a add r0, r0, sl, lsl #2
3000b588: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* This means the requested block number is out of range.
*/
return 0;
3000b58c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000b590: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
300017ec <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
300017ec: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
300017f0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
300017f4: e593204c ldr r2, [r3, #76] ; 0x4c
300017f8: e3520001 cmp r2, #1
300017fc: 0a000004 beq 30001814 <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30001800: eb002d0f bl 3000cc44 <__errno> <== NOT EXECUTED
30001804: e3a03014 mov r3, #20 <== NOT EXECUTED
30001808: e5803000 str r3, [r0] <== NOT EXECUTED
3000180c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001810: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
30001814: e583005c str r0, [r3, #92] ; 0x5c
return 0;
30001818: e3a00000 mov r0, #0
}
3000181c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30004170 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30004170: e92d4030 push {r4, r5, lr}
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
30004174: e59f50e0 ldr r5, [pc, #224] ; 3000425c <IMFS_print_jnode+0xec>
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30004178: e1a04000 mov r4, r0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
3000417c: e5953000 ldr r3, [r5]
30004180: e280000c add r0, r0, #12
30004184: e5931008 ldr r1, [r3, #8]
30004188: eb003486 bl 300113a8 <fputs>
switch( the_jnode->type ) {
3000418c: e594204c ldr r2, [r4, #76] ; 0x4c
30004190: e2423001 sub r3, r2, #1
30004194: e3530006 cmp r3, #6
30004198: 979ff103 ldrls pc, [pc, r3, lsl #2]
3000419c: ea000026 b 3000423c <IMFS_print_jnode+0xcc>
300041a0: 300041bc .word 0x300041bc
300041a4: 300041d0 .word 0x300041d0
300041a8: 3000421c .word 0x3000421c
300041ac: 3000421c .word 0x3000421c
300041b0: 30004204 .word 0x30004204
300041b4: 300041e8 .word 0x300041e8
300041b8: 30004228 .word 0x30004228
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
300041bc: e5953000 ldr r3, [r5]
300041c0: e3a0002f mov r0, #47 ; 0x2f
300041c4: e5931008 ldr r1, [r3, #8]
300041c8: eb003441 bl 300112d4 <fputc>
break;
300041cc: ea00001f b 30004250 <IMFS_print_jnode+0xe0>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
300041d0: e5953000 ldr r3, [r5]
300041d4: e59f1084 ldr r1, [pc, #132] ; 30004260 <IMFS_print_jnode+0xf0>
300041d8: e5930008 ldr r0, [r3, #8]
300041dc: e5942050 ldr r2, [r4, #80] ; 0x50
300041e0: e5943054 ldr r3, [r4, #84] ; 0x54
300041e4: ea000004 b 300041fc <IMFS_print_jnode+0x8c>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
300041e8: e5953000 ldr r3, [r5]
300041ec: e59f1070 ldr r1, [pc, #112] ; 30004264 <IMFS_print_jnode+0xf4>
300041f0: e5930008 ldr r0, [r3, #8]
300041f4: e5942050 ldr r2, [r4, #80] ; 0x50
300041f8: e5943058 ldr r3, [r4, #88] ; 0x58
300041fc: eb003414 bl 30011254 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
30004200: ea000012 b 30004250 <IMFS_print_jnode+0xe0>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
30004204: e5953000 ldr r3, [r5]
30004208: e59f1058 ldr r1, [pc, #88] ; 30004268 <IMFS_print_jnode+0xf8>
3000420c: e5930008 ldr r0, [r3, #8]
30004210: e5942050 ldr r2, [r4, #80] ; 0x50
30004214: eb00340e bl 30011254 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
30004218: ea00000c b 30004250 <IMFS_print_jnode+0xe0>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
3000421c: e5953000 ldr r3, [r5]
30004220: e59f0044 ldr r0, [pc, #68] ; 3000426c <IMFS_print_jnode+0xfc>
30004224: ea000001 b 30004230 <IMFS_print_jnode+0xc0>
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30004228: e5953000 ldr r3, [r5]
3000422c: e59f003c ldr r0, [pc, #60] ; 30004270 <IMFS_print_jnode+0x100>
30004230: e5931008 ldr r1, [r3, #8]
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
30004234: e8bd4030 pop {r4, r5, lr}
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30004238: ea00345a b 300113a8 <fputs>
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
3000423c: e5953000 ldr r3, [r5]
30004240: e59f102c ldr r1, [pc, #44] ; 30004274 <IMFS_print_jnode+0x104><== NOT EXECUTED
30004244: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
30004248: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
3000424c: ea003400 b 30011254 <fprintf> <== NOT EXECUTED
return;
}
puts("");
30004250: e59f0020 ldr r0, [pc, #32] ; 30004278 <IMFS_print_jnode+0x108>
}
30004254: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
30004258: ea003b2c b 30012f10 <puts>
30009470 <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
30009470: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
30009474: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
30009478: e593204c ldr r2, [r3, #76] ; 0x4c
3000947c: e2422002 sub r2, r2, #2
30009480: e3520005 cmp r2, #5
30009484: 979ff102 ldrls pc, [pc, r2, lsl #2]
30009488: ea000012 b 300094d8 <IMFS_stat+0x68> <== NOT EXECUTED
3000948c: 300094a4 .word 0x300094a4 <== NOT EXECUTED
30009490: 300094d8 .word 0x300094d8 <== NOT EXECUTED
30009494: 300094c4 .word 0x300094c4 <== NOT EXECUTED
30009498: 300094b8 .word 0x300094b8 <== NOT EXECUTED
3000949c: 300094b8 .word 0x300094b8 <== NOT EXECUTED
300094a0: 300094c4 .word 0x300094c4 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
300094a4: e5932054 ldr r2, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
300094a8: e593c050 ldr ip, [r3, #80] ; 0x50
300094ac: e581201c str r2, [r1, #28]
300094b0: e581c018 str ip, [r1, #24]
break;
300094b4: ea00000c b 300094ec <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
300094b8: e283c050 add ip, r3, #80 ; 0x50
300094bc: e89c1800 ldm ip, {fp, ip}
300094c0: ea000001 b 300094cc <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
300094c4: e3a0b000 mov fp, #0
300094c8: e3a0c000 mov ip, #0
300094cc: e581b020 str fp, [r1, #32]
300094d0: e581c024 str ip, [r1, #36] ; 0x24
break;
300094d4: ea000004 b 300094ec <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
300094d8: eb000dd9 bl 3000cc44 <__errno>
300094dc: e3a03086 mov r3, #134 ; 0x86
300094e0: e5803000 str r3, [r0]
300094e4: e3e00000 mvn r0, #0
300094e8: e8bd8800 pop {fp, pc}
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
300094ec: e5902010 ldr r2, [r0, #16]
300094f0: e59f0050 ldr r0, [pc, #80] ; 30009548 <IMFS_stat+0xd8>
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
300094f4: e5922034 ldr r2, [r2, #52] ; 0x34
300094f8: e5922000 ldr r2, [r2]
/*
* 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 =
300094fc: e8810005 stm r1, {r0, r2}
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
30009500: e5932030 ldr r2, [r3, #48] ; 0x30
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
30009504: e3a00000 mov r0, #0
*/
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;
30009508: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
3000950c: e1d323b4 ldrh r2, [r3, #52] ; 0x34
30009510: e1c121b0 strh r2, [r1, #16]
buf->st_ino = the_jnode->st_ino;
30009514: e5932038 ldr r2, [r3, #56] ; 0x38
30009518: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
3000951c: e1d323bc ldrh r2, [r3, #60] ; 0x3c
30009520: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid;
30009524: e1d323be ldrh r2, [r3, #62] ; 0x3e
30009528: e1c121b4 strh r2, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
3000952c: e5932040 ldr r2, [r3, #64] ; 0x40
30009530: e5812028 str r2, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
30009534: e5932044 ldr r2, [r3, #68] ; 0x44
buf->st_ctime = the_jnode->stat_ctime;
30009538: e5933048 ldr r3, [r3, #72] ; 0x48
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
3000953c: e5812030 str r2, [r1, #48] ; 0x30
buf->st_ctime = the_jnode->stat_ctime;
30009540: e5813038 str r3, [r1, #56] ; 0x38
return 0;
}
30009544: e8bd8800 pop {fp, pc}
3000194c <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
3000194c: e92d40f0 push {r4, r5, r6, r7, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
30001950: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001954: e24dd01c sub sp, sp, #28
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001958: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
3000195c: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001960: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001964: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001968: 1a000024 bne 30001a00 <IMFS_unlink+0xb4>
if ( !node->info.hard_link.link_node )
3000196c: e595e050 ldr lr, [r5, #80] ; 0x50
30001970: e35e0000 cmp lr, #0
30001974: 1a000003 bne 30001988 <IMFS_unlink+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
30001978: eb002cb1 bl 3000cc44 <__errno> <== NOT EXECUTED
3000197c: e3a03016 mov r3, #22 <== NOT EXECUTED
30001980: e5803000 str r3, [r0] <== NOT EXECUTED
30001984: ea000023 b 30001a18 <IMFS_unlink+0xcc> <== NOT EXECUTED
the_link = *loc;
30001988: e1a0c00d mov ip, sp
3000198c: e1a07001 mov r7, r1
30001990: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001994: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001998: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
3000199c: e28d701c add r7, sp, #28
300019a0: e527e01c str lr, [r7, #-28]!
IMFS_Set_handlers( &the_link );
300019a4: e1a0000d mov r0, sp
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
300019a8: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
300019ac: eb001c38 bl 30008a94 <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)
300019b0: e5953050 ldr r3, [r5, #80] ; 0x50
300019b4: e1d323b4 ldrh r2, [r3, #52] ; 0x34
300019b8: e3520001 cmp r2, #1
300019bc: 1a000007 bne 300019e0 <IMFS_unlink+0x94>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
300019c0: e1a00006 mov r0, r6
300019c4: e1a0100d mov r1, sp
300019c8: e59d3008 ldr r3, [sp, #8]
300019cc: e1a0e00f mov lr, pc
300019d0: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
300019d4: e3500000 cmp r0, #0
300019d8: 0a000008 beq 30001a00 <IMFS_unlink+0xb4>
300019dc: ea00000d b 30001a18 <IMFS_unlink+0xcc>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
300019e0: e2422001 sub r2, r2, #1
300019e4: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
300019e8: e28d0014 add r0, sp, #20
300019ec: e3a01000 mov r1, #0
300019f0: eb00012c bl 30001ea8 <gettimeofday>
300019f4: e5953050 ldr r3, [r5, #80] ; 0x50
300019f8: e59d2014 ldr r2, [sp, #20]
300019fc: e5832048 str r2, [r3, #72] ; 0x48
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
30001a00: e5943008 ldr r3, [r4, #8]
30001a04: e1a00006 mov r0, r6
30001a08: e1a01004 mov r1, r4
30001a0c: e1a0e00f mov lr, pc
30001a10: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
30001a14: ea000000 b 30001a1c <IMFS_unlink+0xd0>
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
return -1;
30001a18: e3e00000 mvn r0, #0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
30001a1c: e28dd01c add sp, sp, #28
30001a20: e8bd80f0 pop {r4, r5, r6, r7, pc}
30001a24 <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001a24: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
30001a28: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001a2c: e593204c ldr r2, [r3, #76] ; 0x4c
30001a30: e3520001 cmp r2, #1
30001a34: 0a000002 beq 30001a44 <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30001a38: eb002c81 bl 3000cc44 <__errno> <== NOT EXECUTED
30001a3c: e3a03014 mov r3, #20 <== NOT EXECUTED
30001a40: ea000004 b 30001a58 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
30001a44: e593205c ldr r2, [r3, #92] ; 0x5c
30001a48: e3520000 cmp r2, #0
30001a4c: 1a000004 bne 30001a64 <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
30001a50: eb002c7b bl 3000cc44 <__errno> <== NOT EXECUTED
30001a54: e3a03016 mov r3, #22 <== NOT EXECUTED
30001a58: e5803000 str r3, [r0] <== NOT EXECUTED
30001a5c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001a60: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* 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;
30001a64: e3a00000 mov r0, #0
30001a68: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
30001a6c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30001d38 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
30001d38: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
30001d3c: e59030bc ldr r3, [r0, #188] ; 0xbc <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
30001d40: e59070b8 ldr r7, [r0, #184] ; 0xb8 <== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
30001d44: e2832010 add r2, r3, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
30001d48: e2477010 sub r7, r7, #16 <== 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++)
30001d4c: e3c71003 bic r1, r7, #3 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
30001d50: e1a05000 mov r5, r0 <== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
30001d54: e590b0e8 ldr fp, [r0, #232] ; 0xe8 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
30001d58: e2820010 add r0, r2, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
30001d5c: e0800001 add r0, r0, r1 <== 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(
30001d60: e2833020 add r3, r3, #32 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
30001d64: e59f10c0 ldr r1, [pc, #192] ; 30001e2c <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
30001d68: ea000002 b 30001d78 <Stack_check_Dump_threads_usage+0x40> <== NOT EXECUTED
30001d6c: e493c004 ldr ip, [r3], #4 <== NOT EXECUTED
30001d70: e15c0001 cmp ip, r1 <== NOT EXECUTED
30001d74: 1a000004 bne 30001d8c <Stack_check_Dump_threads_usage+0x54><== 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++)
30001d78: e1530000 cmp r3, r0 <== NOT EXECUTED
if (*base != U32_PATTERN)
30001d7c: e1a06003 mov r6, r3 <== 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++)
30001d80: 3afffff9 bcc 30001d6c <Stack_check_Dump_threads_usage+0x34><== 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;
30001d84: e3a06000 mov r6, #0 <== NOT EXECUTED
30001d88: ea000002 b 30001d98 <Stack_check_Dump_threads_usage+0x60> <== 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 )
30001d8c: e3560000 cmp r6, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
30001d90: 10822007 addne r2, r2, r7 <== NOT EXECUTED
30001d94: 10666002 rsbne r6, r6, r2 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
30001d98: e5958008 ldr r8, [r5, #8] <== NOT EXECUTED
30001d9c: e59f408c ldr r4, [pc, #140] ; 30001e30 <Stack_check_Dump_threads_usage+0xf8><== NOT EXECUTED
30001da0: e3a01005 mov r1, #5 <== NOT EXECUTED
30001da4: e28d2008 add r2, sp, #8 <== NOT EXECUTED
30001da8: e1a00008 mov r0, r8 <== NOT EXECUTED
30001dac: e8940600 ldm r4, {r9, sl} <== NOT EXECUTED
30001db0: eb001631 bl 3000767c <rtems_object_get_name> <== NOT EXECUTED
30001db4: e59f1078 ldr r1, [pc, #120] ; 30001e34 <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
30001db8: e1a03000 mov r3, r0 <== NOT EXECUTED
30001dbc: e1a02008 mov r2, r8 <== NOT EXECUTED
30001dc0: e1a0000a mov r0, sl <== NOT EXECUTED
30001dc4: e1a0e00f mov lr, pc <== NOT EXECUTED
30001dc8: e12fff19 bx r9 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
30001dcc: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30001dd0: e59520bc ldr r2, [r5, #188] ; 0xbc <== NOT EXECUTED
30001dd4: e2433001 sub r3, r3, #1 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
30001dd8: e0823003 add r3, r2, r3 <== NOT EXECUTED
30001ddc: e58db000 str fp, [sp] <== NOT EXECUTED
30001de0: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
30001de4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001de8: e59f1048 ldr r1, [pc, #72] ; 30001e38 <Stack_check_Dump_threads_usage+0x100><== NOT EXECUTED
30001dec: e1a0e00f mov lr, pc <== NOT EXECUTED
30001df0: e594f000 ldr pc, [r4] <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
30001df4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
30001df8: e3530000 cmp r3, #0 <== NOT EXECUTED
30001dfc: 1a000004 bne 30001e14 <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
30001e00: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001e04: e59f1030 ldr r1, [pc, #48] ; 30001e3c <Stack_check_Dump_threads_usage+0x104><== NOT EXECUTED
30001e08: e1a0e00f mov lr, pc <== NOT EXECUTED
30001e0c: e594f000 ldr pc, [r4] <== NOT EXECUTED
30001e10: ea000004 b 30001e28 <Stack_check_Dump_threads_usage+0xf0> <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
30001e14: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001e18: e59f1020 ldr r1, [pc, #32] ; 30001e40 <Stack_check_Dump_threads_usage+0x108><== NOT EXECUTED
30001e1c: e1a02006 mov r2, r6 <== NOT EXECUTED
30001e20: e1a0e00f mov lr, pc <== NOT EXECUTED
30001e24: e594f000 ldr pc, [r4] <== NOT EXECUTED
}
}
30001e28: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
30001ee8 <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)
{
30001ee8: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED
30001eec: e1a06000 mov r6, r0 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
30001ef0: e59040bc ldr r4, [r0, #188] ; 0xbc <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
30001ef4: e59f0078 ldr r0, [pc, #120] ; 30001f74 <Stack_check_report_blown_task+0x8c><== 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)
{
30001ef8: e20150ff and r5, r1, #255 ; 0xff <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
30001efc: eb0006e6 bl 30003a9c <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
30001f00: e59f0070 ldr r0, [pc, #112] ; 30001f78 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
30001f04: e1a01006 mov r1, r6 <== NOT EXECUTED
30001f08: eb0006e3 bl 30003a9c <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
30001f0c: e59f0068 ldr r0, [pc, #104] ; 30001f7c <Stack_check_report_blown_task+0x94><== NOT EXECUTED
30001f10: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
30001f14: eb0006e0 bl 30003a9c <printk> <== NOT EXECUTED
printk(
30001f18: e59f0060 ldr r0, [pc, #96] ; 30001f80 <Stack_check_report_blown_task+0x98><== NOT EXECUTED
30001f1c: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
30001f20: eb0006dd bl 30003a9c <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
30001f24: e1a0200d mov r2, sp <== NOT EXECUTED
30001f28: e3a01020 mov r1, #32 <== NOT EXECUTED
30001f2c: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
30001f30: eb0015d1 bl 3000767c <rtems_object_get_name> <== NOT EXECUTED
30001f34: e1a01000 mov r1, r0 <== NOT EXECUTED
30001f38: e59f0044 ldr r0, [pc, #68] ; 30001f84 <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
30001f3c: eb0006d6 bl 30003a9c <printk> <== 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)
30001f40: e59620bc ldr r2, [r6, #188] ; 0xbc <== NOT EXECUTED
30001f44: e59610b8 ldr r1, [r6, #184] ; 0xb8 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
30001f48: e59f0038 ldr r0, [pc, #56] ; 30001f88 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
30001f4c: e0823001 add r3, r2, r1 <== NOT EXECUTED
30001f50: eb0006d1 bl 30003a9c <printk> <== 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) {
30001f54: e3550000 cmp r5, #0 <== NOT EXECUTED
printk(
30001f58: 059f002c ldreq r0, [pc, #44] ; 30001f8c <Stack_check_report_blown_task+0xa4><== NOT EXECUTED
30001f5c: 03a01010 moveq r1, #16 <== NOT EXECUTED
30001f60: 02842008 addeq r2, r4, #8 <== NOT EXECUTED
30001f64: 02843018 addeq r3, r4, #24 <== NOT EXECUTED
30001f68: 0b0006cb bleq 30003a9c <printk> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
30001f6c: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED
30001f70: eb0017b8 bl 30007e58 <rtems_fatal_error_occurred> <== NOT EXECUTED
30014cb0 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014cb0: e590304c ldr r3, [r0, #76] ; 0x4c
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
30014cb4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014cb8: e1520003 cmp r2, r3
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
30014cbc: e1a06000 mov r6, r0
30014cc0: e1a0a001 mov sl, r1
30014cc4: e1a07002 mov r7, r2
30014cc8: e59d8020 ldr r8, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014ccc: 8a000013 bhi 30014d20 <_CORE_message_queue_Broadcast+0x70>
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
30014cd0: e5905048 ldr r5, [r0, #72] ; 0x48
30014cd4: e3550000 cmp r5, #0
*count = 0;
30014cd8: 13a00000 movne r0, #0
30014cdc: 15880000 strne r0, [r8]
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
30014ce0: 0a000007 beq 30014d04 <_CORE_message_queue_Broadcast+0x54>
30014ce4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
30014ce8: e594002c ldr r0, [r4, #44] ; 0x2c
30014cec: e1a0100a mov r1, sl
30014cf0: e1a02007 mov r2, r7
30014cf4: eb00221e bl 3001d574 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014cf8: e5943028 ldr r3, [r4, #40] ; 0x28
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
30014cfc: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014d00: e5837000 str r7, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30014d04: e1a00006 mov r0, r6
30014d08: eb000a82 bl 30017718 <_Thread_queue_Dequeue>
30014d0c: e2504000 subs r4, r0, #0
30014d10: 1afffff4 bne 30014ce8 <_CORE_message_queue_Broadcast+0x38>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
30014d14: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
30014d18: e1a00004 mov r0, r4
30014d1c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
30014d20: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
30014d24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
30006e08 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
30006e0c: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e10: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
30006e14: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
30006e18: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e1c: e59f4500 ldr r4, [pc, #1280] ; 30007324 <_Heap_Walk+0x51c>
)
{
uintptr_t const page_size = heap->page_size;
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;
30006e20: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e24: e59f34fc ldr r3, [pc, #1276] ; 30007328 <_Heap_Walk+0x520>
30006e28: e31200ff tst r2, #255 ; 0xff
30006e2c: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e30: e59f34f4 ldr r3, [pc, #1268] ; 3000732c <_Heap_Walk+0x524>
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
30006e34: e590c020 ldr ip, [r0, #32]
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e38: e5933000 ldr r3, [r3]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e3c: e1a06000 mov r6, r0
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e40: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e44: e1a05001 mov r5, r1
uintptr_t const page_size = heap->page_size;
30006e48: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
30006e4c: e58dc020 str ip, [sp, #32]
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e50: 1a000127 bne 300072f4 <_Heap_Walk+0x4ec>
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)(
30006e54: e59dc024 ldr ip, [sp, #36] ; 0x24
30006e58: e59d2020 ldr r2, [sp, #32]
30006e5c: e58dc000 str ip, [sp]
30006e60: e5903018 ldr r3, [r0, #24]
30006e64: e58d3004 str r3, [sp, #4]
30006e68: e590301c ldr r3, [r0, #28]
30006e6c: e58d200c str r2, [sp, #12]
30006e70: e58d3008 str r3, [sp, #8]
30006e74: e59d3028 ldr r3, [sp, #40] ; 0x28
30006e78: e59f24b0 ldr r2, [pc, #1200] ; 30007330 <_Heap_Walk+0x528>
30006e7c: e58d3010 str r3, [sp, #16]
30006e80: e5903008 ldr r3, [r0, #8]
30006e84: e58d3014 str r3, [sp, #20]
30006e88: e590300c ldr r3, [r0, #12]
30006e8c: e1a00001 mov r0, r1
30006e90: e58d3018 str r3, [sp, #24]
30006e94: e3a01000 mov r1, #0
30006e98: e1a03009 mov r3, r9
30006e9c: e1a0e00f mov lr, pc
30006ea0: e12fff14 bx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
30006ea4: e3590000 cmp r9, #0
30006ea8: 1a000006 bne 30006ec8 <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
30006eac: e1a00005 mov r0, r5
30006eb0: e3a01001 mov r1, #1
30006eb4: e59f2478 ldr r2, [pc, #1144] ; 30007334 <_Heap_Walk+0x52c>
30006eb8: e1a0e00f mov lr, pc
30006ebc: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30006ec0: e1a08009 mov r8, r9
30006ec4: ea00010b b 300072f8 <_Heap_Walk+0x4f0>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
30006ec8: e2198007 ands r8, r9, #7
(*printer)(
30006ecc: 11a00005 movne r0, r5
30006ed0: 13a01001 movne r1, #1
30006ed4: 159f245c ldrne r2, [pc, #1116] ; 30007338 <_Heap_Walk+0x530>
30006ed8: 11a03009 movne r3, r9
30006edc: 1a00010c bne 30007314 <_Heap_Walk+0x50c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006ee0: e59d0024 ldr r0, [sp, #36] ; 0x24
30006ee4: e1a01009 mov r1, r9
30006ee8: ebffe72b bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
30006eec: e250b000 subs fp, r0, #0
30006ef0: 0a000006 beq 30006f10 <_Heap_Walk+0x108>
(*printer)(
30006ef4: e1a00005 mov r0, r5
30006ef8: e3a01001 mov r1, #1
30006efc: e59f2438 ldr r2, [pc, #1080] ; 3000733c <_Heap_Walk+0x534>
30006f00: e59d3024 ldr r3, [sp, #36] ; 0x24
30006f04: e1a0e00f mov lr, pc
30006f08: e12fff14 bx r4
30006f0c: ea0000f9 b 300072f8 <_Heap_Walk+0x4f0>
30006f10: e59dc020 ldr ip, [sp, #32]
30006f14: e1a01009 mov r1, r9
30006f18: e28c0008 add r0, ip, #8
30006f1c: ebffe71e bl 30000b9c <__umodsi3>
);
return false;
}
if (
30006f20: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
30006f24: 11a00005 movne r0, r5
30006f28: 13a01001 movne r1, #1
30006f2c: 159f240c ldrne r2, [pc, #1036] ; 30007340 <_Heap_Walk+0x538>
30006f30: 159d3020 ldrne r3, [sp, #32]
30006f34: 1a0000cc bne 3000726c <_Heap_Walk+0x464>
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;
30006f38: e59d2020 ldr r2, [sp, #32]
30006f3c: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
30006f40: e2188001 ands r8, r8, #1
(*printer)(
30006f44: 01a00005 moveq r0, r5
30006f48: 03a01001 moveq r1, #1
30006f4c: 059f23f0 ldreq r2, [pc, #1008] ; 30007344 <_Heap_Walk+0x53c>
30006f50: 0a000009 beq 30006f7c <_Heap_Walk+0x174>
- 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;
30006f54: e59d3028 ldr r3, [sp, #40] ; 0x28
30006f58: e5937004 ldr r7, [r3, #4]
30006f5c: e3c77001 bic r7, r7, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
30006f60: e0837007 add r7, r3, r7
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;
30006f64: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
30006f68: e2188001 ands r8, r8, #1
30006f6c: 1a000005 bne 30006f88 <_Heap_Walk+0x180>
(*printer)(
30006f70: e59f23d0 ldr r2, [pc, #976] ; 30007348 <_Heap_Walk+0x540>
30006f74: e1a00005 mov r0, r5
30006f78: e3a01001 mov r1, #1
30006f7c: e1a0e00f mov lr, pc
30006f80: e12fff14 bx r4
30006f84: ea0000db b 300072f8 <_Heap_Walk+0x4f0>
);
return false;
}
if (
30006f88: e59dc020 ldr ip, [sp, #32]
30006f8c: e157000c cmp r7, ip
30006f90: 0a000006 beq 30006fb0 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
30006f94: e1a00005 mov r0, r5 <== NOT EXECUTED
30006f98: e3a01001 mov r1, #1 <== NOT EXECUTED
30006f9c: e59f23a8 ldr r2, [pc, #936] ; 3000734c <_Heap_Walk+0x544> <== NOT EXECUTED
30006fa0: e1a0e00f mov lr, pc <== NOT EXECUTED
30006fa4: e12fff14 bx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30006fa8: e1a0800a mov r8, sl <== NOT EXECUTED
30006fac: ea0000d1 b 300072f8 <_Heap_Walk+0x4f0> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
30006fb0: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
30006fb4: e5968008 ldr r8, [r6, #8]
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
30006fb8: e1a0a006 mov sl, r6
30006fbc: ea000034 b 30007094 <_Heap_Walk+0x28c>
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;
30006fc0: e5963020 ldr r3, [r6, #32]
30006fc4: e1530008 cmp r3, r8
30006fc8: 83a0c000 movhi ip, #0
30006fcc: 8a000003 bhi 30006fe0 <_Heap_Walk+0x1d8>
30006fd0: e596c024 ldr ip, [r6, #36] ; 0x24
30006fd4: e15c0008 cmp ip, r8
30006fd8: 33a0c000 movcc ip, #0
30006fdc: 23a0c001 movcs ip, #1
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 ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
30006fe0: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
30006fe4: 01a00005 moveq r0, r5
30006fe8: 03a01001 moveq r1, #1
30006fec: 059f235c ldreq r2, [pc, #860] ; 30007350 <_Heap_Walk+0x548>
30006ff0: 0a000012 beq 30007040 <_Heap_Walk+0x238>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006ff4: e2880008 add r0, r8, #8
30006ff8: e1a0100b mov r1, fp
30006ffc: ebffe6e6 bl 30000b9c <__umodsi3>
);
return false;
}
if (
30007000: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
30007004: 11a00005 movne r0, r5
30007008: 13a01001 movne r1, #1
3000700c: 159f2340 ldrne r2, [pc, #832] ; 30007354 <_Heap_Walk+0x54c>
30007010: 11a03008 movne r3, r8
30007014: 1a0000be bne 30007314 <_Heap_Walk+0x50c>
- 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;
30007018: e5983004 ldr r3, [r8, #4]
3000701c: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
30007020: e0883003 add r3, r8, r3
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;
30007024: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007028: e2133001 ands r3, r3, #1
3000702c: e58d302c str r3, [sp, #44] ; 0x2c
30007030: 0a000009 beq 3000705c <_Heap_Walk+0x254>
(*printer)(
30007034: e59f231c ldr r2, [pc, #796] ; 30007358 <_Heap_Walk+0x550>
30007038: e1a00005 mov r0, r5
3000703c: e3a01001 mov r1, #1
30007040: e1a03008 mov r3, r8
30007044: e58dc01c str ip, [sp, #28]
30007048: e1a0e00f mov lr, pc
3000704c: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007050: e59dc01c ldr ip, [sp, #28]
30007054: e1a0800c mov r8, ip
30007058: ea0000a6 b 300072f8 <_Heap_Walk+0x4f0>
);
return false;
}
if ( free_block->prev != prev_block ) {
3000705c: e598300c ldr r3, [r8, #12]
30007060: e153000a cmp r3, sl
30007064: 0a000008 beq 3000708c <_Heap_Walk+0x284>
(*printer)(
30007068: e58d3000 str r3, [sp]
3000706c: e1a00005 mov r0, r5
30007070: e1a03008 mov r3, r8
30007074: e3a01001 mov r1, #1
30007078: e59f22dc ldr r2, [pc, #732] ; 3000735c <_Heap_Walk+0x554>
3000707c: e1a0e00f mov lr, pc
30007080: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007084: e59d802c ldr r8, [sp, #44] ; 0x2c
30007088: ea00009a b 300072f8 <_Heap_Walk+0x4f0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
3000708c: e1a0a008 mov sl, r8
30007090: e5988008 ldr r8, [r8, #8]
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 ) {
30007094: e1580006 cmp r8, r6
30007098: 1affffc8 bne 30006fc0 <_Heap_Walk+0x1b8>
3000709c: ea000000 b 300070a4 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300070a0: e1a07008 mov r7, r8
return true;
}
300070a4: e5973004 ldr r3, [r7, #4]
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;
300070a8: e5962020 ldr r2, [r6, #32]
- 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;
300070ac: e3c3a001 bic sl, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
300070b0: e087800a add r8, r7, sl
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;
300070b4: e1520008 cmp r2, r8
300070b8: 83a0b000 movhi fp, #0
300070bc: 8a000003 bhi 300070d0 <_Heap_Walk+0x2c8>
300070c0: e596b024 ldr fp, [r6, #36] ; 0x24
300070c4: e15b0008 cmp fp, r8
300070c8: 33a0b000 movcc fp, #0
300070cc: 23a0b001 movcs fp, #1
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;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
300070d0: e21bb0ff ands fp, fp, #255 ; 0xff
300070d4: 1a000007 bne 300070f8 <_Heap_Walk+0x2f0>
(*printer)(
300070d8: e58d8000 str r8, [sp]
300070dc: e1a00005 mov r0, r5
300070e0: e3a01001 mov r1, #1
300070e4: e59f2274 ldr r2, [pc, #628] ; 30007360 <_Heap_Walk+0x558>
300070e8: e1a03007 mov r3, r7
300070ec: e1a0e00f mov lr, pc
300070f0: e12fff14 bx r4
300070f4: ea00005e b 30007274 <_Heap_Walk+0x46c>
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;
300070f8: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
300070fc: e1a0000a mov r0, sl
30007100: e1a01009 mov r1, r9
30007104: e057b002 subs fp, r7, r2
30007108: 13a0b001 movne fp, #1
3000710c: e58d301c str r3, [sp, #28]
30007110: ebffe6a1 bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
30007114: e3500000 cmp r0, #0
30007118: e59d301c ldr r3, [sp, #28]
3000711c: 0a000005 beq 30007138 <_Heap_Walk+0x330>
30007120: e35b0000 cmp fp, #0
(*printer)(
30007124: 158da000 strne sl, [sp]
30007128: 11a00005 movne r0, r5
3000712c: 13a01001 movne r1, #1
30007130: 159f222c ldrne r2, [pc, #556] ; 30007364 <_Heap_Walk+0x55c>
30007134: 1a000014 bne 3000718c <_Heap_Walk+0x384>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
30007138: e59dc024 ldr ip, [sp, #36] ; 0x24
3000713c: e15a000c cmp sl, ip
30007140: 2a000009 bcs 3000716c <_Heap_Walk+0x364>
30007144: e35b0000 cmp fp, #0
30007148: 0a000007 beq 3000716c <_Heap_Walk+0x364>
(*printer)(
3000714c: e88d1400 stm sp, {sl, ip}
30007150: e1a00005 mov r0, r5
30007154: e3a01001 mov r1, #1
30007158: e59f2208 ldr r2, [pc, #520] ; 30007368 <_Heap_Walk+0x560>
3000715c: e1a03007 mov r3, r7
30007160: e1a0e00f mov lr, pc
30007164: e12fff14 bx r4
30007168: ea00006b b 3000731c <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
3000716c: e1580007 cmp r8, r7
30007170: 8a000009 bhi 3000719c <_Heap_Walk+0x394>
30007174: e35b0000 cmp fp, #0
30007178: 0a000007 beq 3000719c <_Heap_Walk+0x394>
(*printer)(
3000717c: e59f21e8 ldr r2, [pc, #488] ; 3000736c <_Heap_Walk+0x564>
30007180: e58d8000 str r8, [sp]
30007184: e1a00005 mov r0, r5
30007188: e3a01001 mov r1, #1
3000718c: e1a03007 mov r3, r7
30007190: e1a0e00f mov lr, pc
30007194: e12fff14 bx r4
30007198: ea00005f b 3000731c <_Heap_Walk+0x514>
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;
3000719c: e203b001 and fp, r3, #1
300071a0: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
300071a4: e3130001 tst r3, #1
300071a8: 1a00003b bne 3000729c <_Heap_Walk+0x494>
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 ?
300071ac: e597200c ldr r2, [r7, #12]
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)(
300071b0: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
300071b4: e596100c ldr r1, [r6, #12]
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)(
300071b8: e1520003 cmp r2, r3
300071bc: 059f01ac ldreq r0, [pc, #428] ; 30007370 <_Heap_Walk+0x568>
300071c0: 0a000003 beq 300071d4 <_Heap_Walk+0x3cc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
300071c4: e59f31a8 ldr r3, [pc, #424] ; 30007374 <_Heap_Walk+0x56c>
300071c8: e1520006 cmp r2, r6
300071cc: e59f01a4 ldr r0, [pc, #420] ; 30007378 <_Heap_Walk+0x570>
300071d0: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
300071d4: e5973008 ldr r3, [r7, #8]
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)(
300071d8: e1530001 cmp r3, r1
300071dc: 059f1198 ldreq r1, [pc, #408] ; 3000737c <_Heap_Walk+0x574>
300071e0: 0a000003 beq 300071f4 <_Heap_Walk+0x3ec>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
300071e4: e59fc194 ldr ip, [pc, #404] ; 30007380 <_Heap_Walk+0x578>
300071e8: e1530006 cmp r3, r6
300071ec: e59f1184 ldr r1, [pc, #388] ; 30007378 <_Heap_Walk+0x570>
300071f0: 01a0100c moveq r1, ip
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)(
300071f4: e58d2004 str r2, [sp, #4]
300071f8: e58d0008 str r0, [sp, #8]
300071fc: e58d300c str r3, [sp, #12]
30007200: e58d1010 str r1, [sp, #16]
30007204: e1a03007 mov r3, r7
30007208: e58da000 str sl, [sp]
3000720c: e1a00005 mov r0, r5
30007210: e3a01000 mov r1, #0
30007214: e59f2168 ldr r2, [pc, #360] ; 30007384 <_Heap_Walk+0x57c>
30007218: e1a0e00f mov lr, pc
3000721c: e12fff14 bx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
30007220: e5983000 ldr r3, [r8]
30007224: e15a0003 cmp sl, r3
30007228: 0a000009 beq 30007254 <_Heap_Walk+0x44c>
(*printer)(
3000722c: e58d3004 str r3, [sp, #4]
30007230: e58da000 str sl, [sp]
30007234: e58d8008 str r8, [sp, #8]
30007238: e1a00005 mov r0, r5
3000723c: e3a01001 mov r1, #1
30007240: e59f2140 ldr r2, [pc, #320] ; 30007388 <_Heap_Walk+0x580>
30007244: e1a03007 mov r3, r7
30007248: e1a0e00f mov lr, pc
3000724c: e12fff14 bx r4
30007250: ea000031 b 3000731c <_Heap_Walk+0x514>
);
return false;
}
if ( !prev_used ) {
30007254: e35b0000 cmp fp, #0
30007258: 1a000007 bne 3000727c <_Heap_Walk+0x474>
(*printer)(
3000725c: e59f2128 ldr r2, [pc, #296] ; 3000738c <_Heap_Walk+0x584>
30007260: e1a00005 mov r0, r5
30007264: e3a01001 mov r1, #1
30007268: e1a03007 mov r3, r7
3000726c: e1a0e00f mov lr, pc
30007270: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007274: e1a0800b mov r8, fp
30007278: ea00001e b 300072f8 <_Heap_Walk+0x4f0>
block = next_block;
} while ( block != first_block );
return true;
}
3000727c: e5963008 ldr r3, [r6, #8]
30007280: ea000002 b 30007290 <_Heap_Walk+0x488>
{
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 ) {
if ( free_block == block ) {
30007284: e1530007 cmp r3, r7
30007288: 0a000016 beq 300072e8 <_Heap_Walk+0x4e0>
return true;
}
free_block = free_block->next;
3000728c: e5933008 ldr r3, [r3, #8]
)
{
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 ) {
30007290: e1530006 cmp r3, r6
30007294: 1afffffa bne 30007284 <_Heap_Walk+0x47c>
30007298: ea000019 b 30007304 <_Heap_Walk+0x4fc>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
3000729c: e35b0000 cmp fp, #0
300072a0: 0a000007 beq 300072c4 <_Heap_Walk+0x4bc>
(*printer)(
300072a4: e58da000 str sl, [sp]
300072a8: e1a00005 mov r0, r5
300072ac: e3a01000 mov r1, #0
300072b0: e59f20d8 ldr r2, [pc, #216] ; 30007390 <_Heap_Walk+0x588>
300072b4: e1a03007 mov r3, r7
300072b8: e1a0e00f mov lr, pc
300072bc: e12fff14 bx r4
300072c0: ea000008 b 300072e8 <_Heap_Walk+0x4e0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
300072c4: e58da000 str sl, [sp]
300072c8: e5973000 ldr r3, [r7]
300072cc: e1a00005 mov r0, r5
300072d0: e58d3004 str r3, [sp, #4]
300072d4: e1a0100b mov r1, fp
300072d8: e59f20b4 ldr r2, [pc, #180] ; 30007394 <_Heap_Walk+0x58c>
300072dc: e1a03007 mov r3, r7
300072e0: e1a0e00f mov lr, pc
300072e4: e12fff14 bx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300072e8: e59d2020 ldr r2, [sp, #32]
300072ec: e1580002 cmp r8, r2
300072f0: 1affff6a bne 300070a0 <_Heap_Walk+0x298>
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
300072f4: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
300072f8: e1a00008 mov r0, r8
300072fc: e28dd030 add sp, sp, #48 ; 0x30
30007300: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
30007304: e59f208c ldr r2, [pc, #140] ; 30007398 <_Heap_Walk+0x590>
30007308: e1a00005 mov r0, r5
3000730c: e3a01001 mov r1, #1
30007310: e1a03007 mov r3, r7
30007314: e1a0e00f mov lr, pc
30007318: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
3000731c: e3a08000 mov r8, #0
30007320: eafffff4 b 300072f8 <_Heap_Walk+0x4f0>
30006228 <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
30006228: e59f3038 ldr r3, [pc, #56] ; 30006268 <_Internal_error_Occurred+0x40>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
3000622c: e20110ff and r1, r1, #255 ; 0xff
30006230: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
30006234: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
30006238: e5c31004 strb r1, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
3000623c: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30006240: e1a04002 mov r4, r2
_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 );
30006244: eb000732 bl 30007f14 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
30006248: e59f301c ldr r3, [pc, #28] ; 3000626c <_Internal_error_Occurred+0x44><== NOT EXECUTED
3000624c: e3a02005 mov r2, #5 <== NOT EXECUTED
30006250: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30006254: e10f2000 mrs r2, CPSR <== NOT EXECUTED
30006258: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
3000625c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
30006260: e1a00004 mov r0, r4 <== NOT EXECUTED
30006264: eafffffe b 30006264 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED
30007f14 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007f14: e92d41f0 push {r4, r5, r6, r7, r8, lr}
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
30007f18: e59f503c ldr r5, [pc, #60] ; 30007f5c <_User_extensions_Fatal+0x48>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007f1c: e1a08000 mov r8, r0
30007f20: e1a07002 mov r7, r2
30007f24: e20160ff and r6, r1, #255 ; 0xff
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
30007f28: e5954008 ldr r4, [r5, #8]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
30007f2c: ea000007 b 30007f50 <_User_extensions_Fatal+0x3c>
!_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 )
30007f30: e5943030 ldr r3, [r4, #48] ; 0x30
30007f34: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
30007f38: 11a00008 movne r0, r8
30007f3c: 11a01006 movne r1, r6
30007f40: 11a02007 movne r2, r7
30007f44: 11a0e00f movne lr, pc
30007f48: 112fff13 bxne r3
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 ) {
30007f4c: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
30007f50: e1540005 cmp r4, r5
30007f54: 1afffff5 bne 30007f30 <_User_extensions_Fatal+0x1c>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
30007f58: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
300058e0 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
300058e0: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
300058e4: e59f419c ldr r4, [pc, #412] ; 30005a88 <aio_cancel+0x1a8>
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
300058e8: e1a05001 mov r5, r1
300058ec: e1a07000 mov r7, r0
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
300058f0: e1a00004 mov r0, r4
300058f4: eb000407 bl 30006918 <pthread_mutex_lock>
if (aiocbp == NULL)
300058f8: e3550000 cmp r5, #0
300058fc: 1a000035 bne 300059d8 <aio_cancel+0xf8>
{
if (fcntl (fildes, F_GETFL) < 0) {
30005900: e1a00007 mov r0, r7
30005904: e3a01003 mov r1, #3
30005908: eb0019fb bl 3000c0fc <fcntl>
3000590c: e3500000 cmp r0, #0
30005910: aa000004 bge 30005928 <aio_cancel+0x48>
pthread_mutex_unlock(&aio_request_queue.mutex);
30005914: e1a00004 mov r0, r4
30005918: eb00041d bl 30006994 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
3000591c: eb002711 bl 3000f568 <__errno>
30005920: e3a03009 mov r3, #9
30005924: ea000032 b 300059f4 <aio_cancel+0x114>
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
30005928: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
3000592c: e1a01007 mov r1, r7 <== NOT EXECUTED
30005930: e1a02005 mov r2, r5 <== NOT EXECUTED
30005934: eb0000a4 bl 30005bcc <rtems_aio_search_fd> <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL)
30005938: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3000593c: 1a00001b bne 300059b0 <aio_cancel+0xd0> <== NOT EXECUTED
{
if (!rtems_chain_is_empty (&aio_request_queue.idle_req))
30005940: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
30005944: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED
30005948: e1520003 cmp r2, r3 <== NOT EXECUTED
3000594c: 0a000013 beq 300059a0 <aio_cancel+0xc0> <== NOT EXECUTED
{
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
30005950: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
30005954: e1a01007 mov r1, r7 <== NOT EXECUTED
30005958: e1a02006 mov r2, r6 <== NOT EXECUTED
3000595c: eb00009a bl 30005bcc <rtems_aio_search_fd> <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL) {
30005960: e2505000 subs r5, r0, #0 <== NOT EXECUTED
30005964: 0a00000d beq 300059a0 <aio_cancel+0xc0> <== NOT EXECUTED
return AIO_ALLDONE;
}
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
30005968: e285701c add r7, r5, #28 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
3000596c: eb000a01 bl 30008178 <_Chain_Extract> <== NOT EXECUTED
pthread_mutex_unlock(&aio_request_queue.mutex);
return AIO_ALLDONE;
}
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
30005970: e1a00005 mov r0, r5 <== NOT EXECUTED
30005974: eb00016b bl 30005f28 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_destroy (&r_chain->mutex);
30005978: e1a00007 mov r0, r7 <== NOT EXECUTED
3000597c: eb000347 bl 300066a0 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->mutex);
30005980: e1a00007 mov r0, r7 <== NOT EXECUTED
30005984: eb000279 bl 30006370 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
30005988: e1a00005 mov r0, r5 <== NOT EXECUTED
3000598c: ebfff420 bl 30002a14 <free> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
30005990: e1a00004 mov r0, r4 <== NOT EXECUTED
30005994: eb0003fe bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_CANCELED;
30005998: e1a05006 mov r5, r6 <== NOT EXECUTED
3000599c: ea000037 b 30005a80 <aio_cancel+0x1a0> <== NOT EXECUTED
}
pthread_mutex_unlock (&aio_request_queue.mutex);
300059a0: e1a00004 mov r0, r4 <== NOT EXECUTED
300059a4: eb0003fa bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
300059a8: e3a05002 mov r5, #2 <== NOT EXECUTED
300059ac: ea000033 b 30005a80 <aio_cancel+0x1a0> <== NOT EXECUTED
}
pthread_mutex_lock (&r_chain->mutex);
300059b0: e286701c add r7, r6, #28 <== NOT EXECUTED
300059b4: e1a00007 mov r0, r7 <== NOT EXECUTED
300059b8: eb0003d6 bl 30006918 <pthread_mutex_lock> <== NOT EXECUTED
300059bc: e1a00006 mov r0, r6 <== NOT EXECUTED
300059c0: eb0009ec bl 30008178 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
300059c4: e1a00006 mov r0, r6 <== NOT EXECUTED
300059c8: eb000156 bl 30005f28 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
300059cc: e1a00007 mov r0, r7 <== NOT EXECUTED
300059d0: eb0003ef bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
300059d4: ea00001c b 30005a4c <aio_cancel+0x16c> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
}
else
{
if (aiocbp->aio_fildes != fildes) {
300059d8: e5956000 ldr r6, [r5]
300059dc: e1560007 cmp r6, r7
300059e0: 0a000006 beq 30005a00 <aio_cancel+0x120>
pthread_mutex_unlock (&aio_request_queue.mutex);
300059e4: e1a00004 mov r0, r4
300059e8: eb0003e9 bl 30006994 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
300059ec: eb0026dd bl 3000f568 <__errno>
300059f0: e3a03016 mov r3, #22
300059f4: e5803000 str r3, [r0]
300059f8: e3e05000 mvn r5, #0
300059fc: ea00001f b 30005a80 <aio_cancel+0x1a0>
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
30005a00: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
30005a04: e1a01006 mov r1, r6 <== NOT EXECUTED
30005a08: e3a02000 mov r2, #0 <== NOT EXECUTED
30005a0c: eb00006e bl 30005bcc <rtems_aio_search_fd> <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL)
30005a10: e2507000 subs r7, r0, #0 <== NOT EXECUTED
30005a14: 1a00000e bne 30005a54 <aio_cancel+0x174> <== NOT EXECUTED
if (!rtems_chain_is_empty (&aio_request_queue.idle_req))
30005a18: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
30005a1c: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED
30005a20: e1520003 cmp r2, r3 <== NOT EXECUTED
30005a24: 0a00000a beq 30005a54 <aio_cancel+0x174> <== NOT EXECUTED
{
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
30005a28: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
30005a2c: e1a01006 mov r1, r6 <== NOT EXECUTED
30005a30: e1a02007 mov r2, r7 <== NOT EXECUTED
30005a34: eb000064 bl 30005bcc <rtems_aio_search_fd> <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL)
30005a38: e3500000 cmp r0, #0 <== NOT EXECUTED
30005a3c: 0affffe8 beq 300059e4 <aio_cancel+0x104> <== NOT EXECUTED
{
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp);
30005a40: e1a01005 mov r1, r5 <== NOT EXECUTED
30005a44: eb000147 bl 30005f68 <rtems_aio_remove_req> <== NOT EXECUTED
30005a48: e1a05000 mov r5, r0 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
30005a4c: e1a00004 mov r0, r4 <== NOT EXECUTED
30005a50: ea000009 b 30005a7c <aio_cancel+0x19c> <== NOT EXECUTED
return result;
}
pthread_mutex_lock (&r_chain->mutex);
30005a54: e287401c add r4, r7, #28 <== NOT EXECUTED
30005a58: e1a00004 mov r0, r4 <== NOT EXECUTED
30005a5c: eb0003ad bl 30006918 <pthread_mutex_lock> <== NOT EXECUTED
result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp);
30005a60: e1a01005 mov r1, r5 <== NOT EXECUTED
30005a64: e1a00007 mov r0, r7 <== NOT EXECUTED
30005a68: eb00013e bl 30005f68 <rtems_aio_remove_req> <== NOT EXECUTED
30005a6c: e1a05000 mov r5, r0 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
30005a70: e1a00004 mov r0, r4 <== NOT EXECUTED
30005a74: eb0003c6 bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
30005a78: e59f0008 ldr r0, [pc, #8] ; 30005a88 <aio_cancel+0x1a8> <== NOT EXECUTED
30005a7c: eb0003c4 bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
}
return AIO_ALLDONE;
}
30005a80: e1a00005 mov r0, r5
30005a84: e8bd80f0 pop {r4, r5, r6, r7, pc}
30005a94 <aio_fsync>:
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
30005a94: e3500a02 cmp r0, #8192 ; 0x2000
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
30005a98: e92d4030 push {r4, r5, lr}
30005a9c: e1a04001 mov r4, r1
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
30005aa0: 13a05016 movne r5, #22
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
30005aa4: 1a00000c bne 30005adc <aio_fsync+0x48>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
30005aa8: e5910000 ldr r0, [r1]
30005aac: e3a01003 mov r1, #3
30005ab0: eb001991 bl 3000c0fc <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
30005ab4: e2000003 and r0, r0, #3
30005ab8: e2400001 sub r0, r0, #1
30005abc: e3500001 cmp r0, #1
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
30005ac0: 83a05009 movhi r5, #9
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
30005ac4: 8a000004 bhi 30005adc <aio_fsync+0x48>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
30005ac8: e3a00018 mov r0, #24 <== NOT EXECUTED
30005acc: ebfff536 bl 30002fac <malloc> <== NOT EXECUTED
if (req == NULL)
30005ad0: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30005ad4: 1a000007 bne 30005af8 <aio_fsync+0x64> <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
30005ad8: e3a0500b mov r5, #11 <== NOT EXECUTED
30005adc: e3e03000 mvn r3, #0
30005ae0: e5845030 str r5, [r4, #48] ; 0x30
30005ae4: e5843034 str r3, [r4, #52] ; 0x34
30005ae8: eb00269e bl 3000f568 <__errno>
30005aec: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
30005af0: e3e00000 mvn r0, #0
30005af4: e8bd8030 pop {r4, r5, pc}
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
30005af8: e5834014 str r4, [r3, #20] <== NOT EXECUTED
req->aiocbp->aio_lio_opcode = LIO_SYNC;
30005afc: e3a03003 mov r3, #3 <== NOT EXECUTED
30005b00: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
return rtems_aio_enqueue (req);
}
30005b04: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
30005b08: ea00012c b 30005fc0 <rtems_aio_enqueue> <== NOT EXECUTED
300061d0 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
300061d0: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
300061d4: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
300061d8: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
300061dc: e5900000 ldr r0, [r0]
300061e0: eb0017c5 bl 3000c0fc <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
300061e4: e2000003 and r0, r0, #3
300061e8: e3500002 cmp r0, #2
300061ec: 13500000 cmpne r0, #0
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
300061f0: 13a05009 movne r5, #9
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
300061f4: 1a00000d bne 30006230 <aio_read+0x60>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
300061f8: e5943014 ldr r3, [r4, #20]
300061fc: e3530000 cmp r3, #0
30006200: 1a000007 bne 30006224 <aio_read+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
30006204: e5943008 ldr r3, [r4, #8]
30006208: e3530000 cmp r3, #0
3000620c: ba000004 blt 30006224 <aio_read+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
30006210: e3a00018 mov r0, #24
30006214: ebfff364 bl 30002fac <malloc>
if (req == NULL)
30006218: e2503000 subs r3, r0, #0
3000621c: 1a00000a bne 3000624c <aio_read+0x7c>
30006220: ea000001 b 3000622c <aio_read+0x5c> <== NOT EXECUTED
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
30006224: e3a05016 mov r5, #22
30006228: ea000000 b 30006230 <aio_read+0x60>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
3000622c: e3a0500b mov r5, #11 <== NOT EXECUTED
30006230: e3e03000 mvn r3, #0
30006234: e5845030 str r5, [r4, #48] ; 0x30
30006238: e5843034 str r3, [r4, #52] ; 0x34
3000623c: eb0024c9 bl 3000f568 <__errno>
30006240: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
30006244: e3e00000 mvn r0, #0
30006248: e8bd8030 pop {r4, r5, pc}
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
3000624c: e5834014 str r4, [r3, #20]
req->aiocbp->aio_lio_opcode = LIO_READ;
30006250: e3a03001 mov r3, #1
30006254: e584302c str r3, [r4, #44] ; 0x2c
return rtems_aio_enqueue (req);
}
30006258: e8bd4030 pop {r4, r5, lr}
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
3000625c: eaffff57 b 30005fc0 <rtems_aio_enqueue>
30006268 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
30006268: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
3000626c: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
30006270: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
30006274: e5900000 ldr r0, [r0]
30006278: eb00179f bl 3000c0fc <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
3000627c: e2000003 and r0, r0, #3
30006280: e2400001 sub r0, r0, #1
30006284: e3500001 cmp r0, #1
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
30006288: 83a05009 movhi r5, #9
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
3000628c: 8a00000d bhi 300062c8 <aio_write+0x60>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
30006290: e5943014 ldr r3, [r4, #20]
30006294: e3530000 cmp r3, #0
30006298: 1a000007 bne 300062bc <aio_write+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
3000629c: e5943008 ldr r3, [r4, #8]
300062a0: e3530000 cmp r3, #0
300062a4: ba000004 blt 300062bc <aio_write+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
300062a8: e3a00018 mov r0, #24
300062ac: ebfff33e bl 30002fac <malloc>
if (req == NULL)
300062b0: e2503000 subs r3, r0, #0
300062b4: 1a00000a bne 300062e4 <aio_write+0x7c>
300062b8: ea000001 b 300062c4 <aio_write+0x5c> <== NOT EXECUTED
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
300062bc: e3a05016 mov r5, #22
300062c0: ea000000 b 300062c8 <aio_write+0x60>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
300062c4: e3a0500b mov r5, #11 <== NOT EXECUTED
300062c8: e3e03000 mvn r3, #0
300062cc: e5845030 str r5, [r4, #48] ; 0x30
300062d0: e5843034 str r3, [r4, #52] ; 0x34
300062d4: eb0024a3 bl 3000f568 <__errno>
300062d8: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
300062dc: e3e00000 mvn r0, #0
300062e0: e8bd8030 pop {r4, r5, pc}
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
300062e4: e5834014 str r4, [r3, #20]
req->aiocbp->aio_lio_opcode = LIO_WRITE;
300062e8: e3a03002 mov r3, #2
300062ec: e584302c str r3, [r4, #44] ; 0x2c
return rtems_aio_enqueue (req);
}
300062f0: e8bd4030 pop {r4, r5, lr}
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
300062f4: eaffff31 b 30005fc0 <rtems_aio_enqueue>
3000876c <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
3000876c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
30008770: e3d27007 bics r7, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008774: e1a09000 mov r9, r0
30008778: e1a04001 mov r4, r1
3000877c: e1a05003 mov r5, r3
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
30008780: 0a000002 beq 30008790 <devFS_evaluate_path+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
30008784: eb00099b bl 3000adf8 <__errno> <== NOT EXECUTED
30008788: e3a03001 mov r3, #1 <== NOT EXECUTED
3000878c: ea000005 b 300087a8 <devFS_evaluate_path+0x3c> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
30008790: e5936000 ldr r6, [r3]
if (!device_name_table)
30008794: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
30008798: 159fa094 ldrne sl, [pc, #148] ; 30008834 <devFS_evaluate_path+0xc8>
if ( !rtems_libio_is_valid_perms( flags ) )
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)
3000879c: 1a00001c bne 30008814 <devFS_evaluate_path+0xa8>
rtems_set_errno_and_return_minus_one( EFAULT );
300087a0: eb000994 bl 3000adf8 <__errno>
300087a4: e3a0300e mov r3, #14
300087a8: e5803000 str r3, [r0]
300087ac: e3e00000 mvn r0, #0
300087b0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
300087b4: e5968000 ldr r8, [r6]
300087b8: e3580000 cmp r8, #0
300087bc: 0a000012 beq 3000880c <devFS_evaluate_path+0xa0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
300087c0: e1a00009 mov r0, r9
300087c4: e1a01008 mov r1, r8
300087c8: e1a02004 mov r2, r4
300087cc: eb000d10 bl 3000bc14 <strncmp>
300087d0: e3500000 cmp r0, #0
300087d4: 1a00000c bne 3000880c <devFS_evaluate_path+0xa0>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
300087d8: e7d80004 ldrb r0, [r8, r4]
300087dc: e3500000 cmp r0, #0
300087e0: 1a000009 bne 3000880c <devFS_evaluate_path+0xa0>
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
300087e4: e59f304c ldr r3, [pc, #76] ; 30008838 <devFS_evaluate_path+0xcc>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
300087e8: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
300087ec: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
300087f0: e59f3044 ldr r3, [pc, #68] ; 3000883c <devFS_evaluate_path+0xd0>
300087f4: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
300087f8: e59f3040 ldr r3, [pc, #64] ; 30008840 <devFS_evaluate_path+0xd4>
300087fc: e5933000 ldr r3, [r3]
30008800: e5933028 ldr r3, [r3, #40] ; 0x28
30008804: e5853010 str r3, [r5, #16]
return 0;
30008808: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/* 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++) {
3000880c: e2877001 add r7, r7, #1
30008810: e2866014 add r6, r6, #20
30008814: e59a3000 ldr r3, [sl]
30008818: e1570003 cmp r7, r3
3000881c: 3affffe4 bcc 300087b4 <devFS_evaluate_path+0x48>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
30008820: eb000974 bl 3000adf8 <__errno>
30008824: e3a03002 mov r3, #2
30008828: e5803000 str r3, [r0]
3000882c: e3e00000 mvn r0, #0
}
30008830: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
30002c68 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002c68: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002c6c: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002c70: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002c74: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002c78: 08bd8030 popeq {r4, r5, pc}
rtems_interrupt_disable (level);
30002c7c: ebfffff5 bl 30002c58 <arm_interrupt_disable>
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
30002c80: e3a05002 mov r5, #2
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) {
30002c84: ea000008 b 30002cac <drainOutput+0x44>
tty->rawOutBufState = rob_wait;
30002c88: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30002c8c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
30002c90: e3a01000 mov r1, #0 <== NOT EXECUTED
30002c94: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
30002c98: e1a02001 mov r2, r1 <== NOT EXECUTED
30002c9c: eb0008cc bl 30004fd4 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30002ca0: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
30002ca4: 1b000a66 blne 30005644 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
30002ca8: ebffffea bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
30002cac: e5942084 ldr r2, [r4, #132] ; 0x84
30002cb0: e5943080 ldr r3, [r4, #128] ; 0x80
30002cb4: e1520003 cmp r2, r3
30002cb8: 1afffff2 bne 30002c88 <drainOutput+0x20>
30002cbc: e129f000 msr CPSR_fc, r0
30002cc0: e8bd8030 pop {r4, r5, pc}
30003948 <erase>:
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
30003948: e5903020 ldr r3, [r0, #32]
* 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)
{
3000394c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
if (tty->ccount == 0)
30003950: e3530000 cmp r3, #0
* 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)
{
30003954: e1a04000 mov r4, r0
30003958: e1a07001 mov r7, r1
if (tty->ccount == 0)
3000395c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
return;
if (lineFlag) {
30003960: e3510000 cmp r1, #0
30003964: 0a000060 beq 30003aec <erase+0x1a4>
if (!(tty->termios.c_lflag & ECHO)) {
30003968: e590303c ldr r3, [r0, #60] ; 0x3c
3000396c: e2132008 ands r2, r3, #8
tty->ccount = 0;
30003970: 05802020 streq r2, [r0, #32]
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
30003974: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
30003978: e2133010 ands r3, r3, #16
3000397c: 1a00005a bne 30003aec <erase+0x1a4>
tty->ccount = 0;
30003980: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
30003984: e1a01004 mov r1, r4 <== NOT EXECUTED
30003988: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
3000398c: ebffffca bl 300038bc <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
30003990: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003994: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
30003998: 13a0000a movne r0, #10 <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
3000399c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
300039a0: ea00000b b 300039d4 <erase+0x8c> <== NOT EXECUTED
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
300039a4: e594303c ldr r3, [r4, #60] ; 0x3c
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
300039a8: e2411001 sub r1, r1, #1
300039ac: e594001c ldr r0, [r4, #28]
300039b0: e5841020 str r1, [r4, #32]
if (tty->termios.c_lflag & ECHO) {
300039b4: e3130008 tst r3, #8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
300039b8: e7d05001 ldrb r5, [r0, r1]
if (tty->termios.c_lflag & ECHO) {
300039bc: 0a000047 beq 30003ae0 <erase+0x198>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
300039c0: e3570000 cmp r7, #0
300039c4: 1a000005 bne 300039e0 <erase+0x98>
300039c8: e3130010 tst r3, #16
300039cc: 1a000003 bne 300039e0 <erase+0x98>
echo (tty->termios.c_cc[VERASE], tty);
300039d0: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
300039d4: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
300039d8: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== 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);
300039dc: eaffffb6 b 300038bc <echo> <== NOT EXECUTED
} else if (c == '\t') {
300039e0: e3550009 cmp r5, #9
300039e4: 1a00001f bne 30003a68 <erase+0x120>
int col = tty->read_start_column;
300039e8: e594502c ldr r5, [r4, #44] ; 0x2c
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
300039ec: e5968000 ldr r8, [r6]
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;
300039f0: e3a02000 mov r2, #0
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)
300039f4: e2033c02 and r3, r3, #512 ; 0x200
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
300039f8: ea00000c b 30003a30 <erase+0xe8>
c = tty->cbuf[i++];
300039fc: e7d0c002 ldrb ip, [r0, r2]
30003a00: e2822001 add r2, r2, #1
if (c == '\t') {
30003a04: e35c0009 cmp ip, #9
col = (col | 7) + 1;
30003a08: 03855007 orreq r5, r5, #7
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
30003a0c: 0a000006 beq 30003a2c <erase+0xe4>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003a10: e088c00c add ip, r8, ip
30003a14: e5dcc001 ldrb ip, [ip, #1]
30003a18: e31c0020 tst ip, #32
30003a1c: 0a000002 beq 30003a2c <erase+0xe4>
if (tty->termios.c_lflag & ECHOCTL)
30003a20: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
30003a24: 12855002 addne r5, r5, #2 <== NOT EXECUTED
30003a28: ea000000 b 30003a30 <erase+0xe8> <== NOT EXECUTED
} else {
col++;
30003a2c: e2855001 add r5, r5, #1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003a30: e1520001 cmp r2, r1
30003a34: 1afffff0 bne 300039fc <erase+0xb4>
30003a38: ea000006 b 30003a58 <erase+0x110>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
30003a3c: e59f00bc ldr r0, [pc, #188] ; 30003b00 <erase+0x1b8>
30003a40: e3a01001 mov r1, #1
30003a44: e1a02004 mov r2, r4
30003a48: ebffff07 bl 3000366c <rtems_termios_puts>
tty->column--;
30003a4c: e5943028 ldr r3, [r4, #40] ; 0x28
30003a50: e2433001 sub r3, r3, #1
30003a54: e5843028 str r3, [r4, #40] ; 0x28
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003a58: e5943028 ldr r3, [r4, #40] ; 0x28
30003a5c: e1530005 cmp r3, r5
30003a60: cafffff5 bgt 30003a3c <erase+0xf4>
30003a64: ea00001d b 30003ae0 <erase+0x198>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003a68: e5962000 ldr r2, [r6]
30003a6c: e2855001 add r5, r5, #1
30003a70: e7d22005 ldrb r2, [r2, r5]
30003a74: e3120020 tst r2, #32
30003a78: 0a000009 beq 30003aa4 <erase+0x15c>
30003a7c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003a80: 0a000007 beq 30003aa4 <erase+0x15c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003a84: e59f0078 ldr r0, [pc, #120] ; 30003b04 <erase+0x1bc> <== NOT EXECUTED
30003a88: e3a01003 mov r1, #3 <== NOT EXECUTED
30003a8c: e1a02004 mov r2, r4 <== NOT EXECUTED
30003a90: ebfffef5 bl 3000366c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003a94: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003a98: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003a9c: 12433001 subne r3, r3, #1 <== NOT EXECUTED
30003aa0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
30003aa4: e5963000 ldr r3, [r6]
30003aa8: e7d33005 ldrb r3, [r3, r5]
30003aac: e3130020 tst r3, #32
30003ab0: 0a000002 beq 30003ac0 <erase+0x178>
30003ab4: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003ab8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003abc: 0a000007 beq 30003ae0 <erase+0x198> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003ac0: e59f003c ldr r0, [pc, #60] ; 30003b04 <erase+0x1bc>
30003ac4: e3a01003 mov r1, #3
30003ac8: e1a02004 mov r2, r4
30003acc: ebfffee6 bl 3000366c <rtems_termios_puts>
if (tty->column)
30003ad0: e5943028 ldr r3, [r4, #40] ; 0x28
30003ad4: e3530000 cmp r3, #0
tty->column--;
30003ad8: 12433001 subne r3, r3, #1
30003adc: 15843028 strne r3, [r4, #40] ; 0x28
}
}
}
if (!lineFlag)
30003ae0: e3570000 cmp r7, #0
30003ae4: 1a000001 bne 30003af0 <erase+0x1a8>
30003ae8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30003aec: e59f6014 ldr r6, [pc, #20] ; 30003b08 <erase+0x1c0>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
30003af0: e5941020 ldr r1, [r4, #32]
30003af4: e3510000 cmp r1, #0
30003af8: 1affffa9 bne 300039a4 <erase+0x5c>
30003afc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002704 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
30002704: e92d000e push {r1, r2, r3}
30002708: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
3000270c: e59f21a4 ldr r2, [pc, #420] ; 300028b8 <fcntl+0x1b4>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002710: e28d301c add r3, sp, #28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002714: e5921000 ldr r1, [r2]
int fcntl(
int fd,
int cmd,
...
)
{
30002718: e59d7018 ldr r7, [sp, #24]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
3000271c: e1500001 cmp r0, r1
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002720: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002724: 2a000006 bcs 30002744 <fcntl+0x40>
iop = rtems_libio_iop( fd );
30002728: e59f218c ldr r2, [pc, #396] ; 300028bc <fcntl+0x1b8>
3000272c: e3a04038 mov r4, #56 ; 0x38
30002730: e5922000 ldr r2, [r2]
30002734: e0242490 mla r4, r0, r4, r2
rtems_libio_check_is_open(iop);
30002738: e5940014 ldr r0, [r4, #20]
3000273c: e3100c01 tst r0, #256 ; 0x100
30002740: 1a000002 bne 30002750 <fcntl+0x4c>
30002744: eb002d1f bl 3000dbc8 <__errno>
30002748: e3a03009 mov r3, #9
3000274c: ea000047 b 30002870 <fcntl+0x16c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
30002750: e3570009 cmp r7, #9
30002754: 979ff107 ldrls pc, [pc, r7, lsl #2]
30002758: ea000042 b 30002868 <fcntl+0x164>
3000275c: 30002784 .word 0x30002784
30002760: 300027f4 .word 0x300027f4
30002764: 30002804 .word 0x30002804
30002768: 30002824 .word 0x30002824
3000276c: 30002830 .word 0x30002830
30002770: 3000285c .word 0x3000285c
30002774: 3000285c .word 0x3000285c
30002778: 3000285c .word 0x3000285c
3000277c: 3000285c .word 0x3000285c
30002780: 3000285c .word 0x3000285c
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
30002784: e5933000 ldr r3, [r3]
if ( fd2 )
30002788: e3530000 cmp r3, #0
3000278c: 0a000004 beq 300027a4 <fcntl+0xa0>
diop = rtems_libio_iop( fd2 );
30002790: e1530001 cmp r3, r1
30002794: 33a06038 movcc r6, #56 ; 0x38
30002798: 30262693 mlacc r6, r3, r6, r2
3000279c: 3a000005 bcc 300027b8 <fcntl+0xb4>
300027a0: ea000003 b 300027b4 <fcntl+0xb0> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
300027a4: eb000190 bl 30002dec <rtems_libio_allocate>
if ( diop == 0 ) {
300027a8: e2506000 subs r6, r0, #0
300027ac: 1a000001 bne 300027b8 <fcntl+0xb4>
300027b0: ea00003b b 300028a4 <fcntl+0x1a0> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
300027b4: e3a06000 mov r6, #0 <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
300027b8: e5943014 ldr r3, [r4, #20]
diop->pathinfo = iop->pathinfo;
300027bc: e286c018 add ip, r6, #24
300027c0: e2845018 add r5, r4, #24
ret = -1;
break;
}
}
diop->flags = iop->flags;
300027c4: e5863014 str r3, [r6, #20]
diop->pathinfo = iop->pathinfo;
300027c8: e8b5000f ldm r5!, {r0, r1, r2, r3}
300027cc: e8ac000f stmia ip!, {r0, r1, r2, r3}
300027d0: e5953000 ldr r3, [r5]
300027d4: e58c3000 str r3, [ip]
ret = (int) (diop - rtems_libio_iops);
300027d8: e59f30dc ldr r3, [pc, #220] ; 300028bc <fcntl+0x1b8>
300027dc: e5933000 ldr r3, [r3]
300027e0: e0636006 rsb r6, r3, r6
300027e4: e59f30d4 ldr r3, [pc, #212] ; 300028c0 <fcntl+0x1bc>
300027e8: e1a061c6 asr r6, r6, #3
300027ec: e0060693 mul r6, r3, r6
300027f0: ea000020 b 30002878 <fcntl+0x174>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
300027f4: e3100b02 tst r0, #2048 ; 0x800
300027f8: 03a06000 moveq r6, #0
300027fc: 13a06001 movne r6, #1
30002800: ea00001e b 30002880 <fcntl+0x17c>
* 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 ) )
30002804: e5936000 ldr r6, [r3]
30002808: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
3000280c: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002810: 03c00b02 biceq r0, r0, #2048 ; 0x800
* 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;
30002814: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002818: 05840014 streq r0, [r4, #20]
* 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 ) )
3000281c: 0a000017 beq 30002880 <fcntl+0x17c>
30002820: ea00000b b 30002854 <fcntl+0x150>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
30002824: eb00015e bl 30002da4 <rtems_libio_to_fcntl_flags>
30002828: e1a06000 mov r6, r0
3000282c: ea000011 b 30002878 <fcntl+0x174>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
30002830: e5930000 ldr r0, [r3]
30002834: eb00014d bl 30002d70 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
30002838: e5942014 ldr r2, [r4, #20]
3000283c: e59f3080 ldr r3, [pc, #128] ; 300028c4 <fcntl+0x1c0>
30002840: e3c22c02 bic r2, r2, #512 ; 0x200
30002844: e0003003 and r3, r0, r3
30002848: e3c22001 bic r2, r2, #1
3000284c: e1833002 orr r3, r3, r2
30002850: e5843014 str r3, [r4, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
30002854: e3a06000 mov r6, #0
30002858: ea000008 b 30002880 <fcntl+0x17c>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
3000285c: eb002cd9 bl 3000dbc8 <__errno>
30002860: e3a03086 mov r3, #134 ; 0x86
30002864: ea000001 b 30002870 <fcntl+0x16c>
ret = -1;
break;
default:
errno = EINVAL;
30002868: eb002cd6 bl 3000dbc8 <__errno>
3000286c: e3a03016 mov r3, #22
30002870: e5803000 str r3, [r0]
30002874: ea00000a b 300028a4 <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
30002878: e3560000 cmp r6, #0
3000287c: ba000009 blt 300028a8 <fcntl+0x1a4>
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
30002880: e5943020 ldr r3, [r4, #32]
30002884: e1a01004 mov r1, r4
30002888: e1a00007 mov r0, r7
3000288c: e1a0e00f mov lr, pc
30002890: e593f030 ldr pc, [r3, #48] ; 0x30
if (err) {
30002894: e2504000 subs r4, r0, #0
30002898: 0a000002 beq 300028a8 <fcntl+0x1a4>
errno = err;
3000289c: eb002cc9 bl 3000dbc8 <__errno> <== NOT EXECUTED
300028a0: e5804000 str r4, [r0] <== NOT EXECUTED
ret = -1;
300028a4: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
300028a8: e1a00006 mov r0, r6
300028ac: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
300028b0: e28dd00c add sp, sp, #12
300028b4: e12fff1e bx lr
3000b51c <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b51c: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr}
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b520: e59f53bc ldr r5, [pc, #956] ; 3000b8e4 <fifo_open+0x3c8>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b524: e1a08000 mov r8, r0
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b528: e5954000 ldr r4, [r5]
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b52c: e1a07001 mov r7, r1
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b530: e3540000 cmp r4, #0
3000b534: 1a000012 bne 3000b584 <fifo_open+0x68>
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 );
3000b538: e59f33a8 ldr r3, [pc, #936] ; 3000b8e8 <fifo_open+0x3cc>
3000b53c: e1a01004 mov r1, r4
3000b540: e5930000 ldr r0, [r3]
3000b544: e1a02004 mov r2, r4
3000b548: ebffeea9 bl 30006ff4 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b54c: e5953000 ldr r3, [r5]
3000b550: e3530000 cmp r3, #0
3000b554: 1a000005 bne 3000b570 <fifo_open+0x54>
sc = rtems_semaphore_create(
3000b558: e59f038c ldr r0, [pc, #908] ; 3000b8ec <fifo_open+0x3d0>
3000b55c: e3a01001 mov r1, #1
3000b560: e3a02054 mov r2, #84 ; 0x54
3000b564: e58d5000 str r5, [sp]
3000b568: ebffee0f bl 30006dac <rtems_semaphore_create>
3000b56c: e1a04000 mov r4, r0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000b570: e59f3370 ldr r3, [pc, #880] ; 3000b8e8 <fifo_open+0x3cc>
3000b574: e5930000 ldr r0, [r3]
3000b578: ebffeee3 bl 3000710c <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
3000b57c: e3540000 cmp r4, #0
3000b580: 1a000006 bne 3000b5a0 <fifo_open+0x84>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3000b584: e59f3358 ldr r3, [pc, #856] ; 3000b8e4 <fifo_open+0x3c8>
3000b588: e3a01000 mov r1, #0
3000b58c: e5930000 ldr r0, [r3]
3000b590: e1a02001 mov r2, r1
3000b594: ebffee96 bl 30006ff4 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
3000b598: e2505000 subs r5, r0, #0
3000b59c: 0a000000 beq 3000b5a4 <fifo_open+0x88>
return 0;
} else {
return -ENOMEM;
3000b5a0: e3e0500b mvn r5, #11
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
if (err)
3000b5a4: e2556000 subs r6, r5, #0
3000b5a8: 1a0000cb bne 3000b8dc <fifo_open+0x3c0>
return err;
pipe = *pipep;
3000b5ac: e5984000 ldr r4, [r8]
if (pipe == NULL) {
3000b5b0: e3540000 cmp r4, #0
3000b5b4: 1a00004d bne 3000b6f0 <fifo_open+0x1d4>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000b5b8: e3a00034 mov r0, #52 ; 0x34
3000b5bc: ebffe2ab bl 30004070 <malloc>
if (pipe == NULL)
3000b5c0: e250a000 subs sl, r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000b5c4: e1a04000 mov r4, r0
if (pipe == NULL)
3000b5c8: 0a000046 beq 3000b6e8 <fifo_open+0x1cc>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
3000b5cc: e1a01005 mov r1, r5
3000b5d0: e3a02034 mov r2, #52 ; 0x34
3000b5d4: eb001286 bl 3000fff4 <memset>
pipe->Size = PIPE_BUF;
3000b5d8: e3a00c02 mov r0, #512 ; 0x200
3000b5dc: e5840004 str r0, [r4, #4]
pipe->Buffer = malloc(pipe->Size);
3000b5e0: ebffe2a2 bl 30004070 <malloc>
if (! pipe->Buffer)
3000b5e4: e3500000 cmp r0, #0
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
3000b5e8: e5840000 str r0, [r4]
if (! pipe->Buffer)
3000b5ec: 0a00003b beq 3000b6e0 <fifo_open+0x1c4>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
3000b5f0: e59f62f8 ldr r6, [pc, #760] ; 3000b8f0 <fifo_open+0x3d4>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000b5f4: e59f02f8 ldr r0, [pc, #760] ; 3000b8f4 <fifo_open+0x3d8>
rtems_build_name ('P', 'I', 'r', c),
3000b5f8: e5d63000 ldrb r3, [r6]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000b5fc: e1a01005 mov r1, r5
3000b600: e1830000 orr r0, r3, r0
3000b604: e1a02005 mov r2, r5
3000b608: e284302c add r3, r4, #44 ; 0x2c
3000b60c: eb00061e bl 3000ce8c <rtems_barrier_create>
3000b610: e3500000 cmp r0, #0
3000b614: 1a00002f bne 3000b6d8 <fifo_open+0x1bc>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
3000b618: e5d63000 ldrb r3, [r6]
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(
3000b61c: e59f02d4 ldr r0, [pc, #724] ; 3000b8f8 <fifo_open+0x3dc>
3000b620: e1a01005 mov r1, r5
3000b624: e1830000 orr r0, r3, r0
3000b628: e1a02005 mov r2, r5
3000b62c: e2843030 add r3, r4, #48 ; 0x30
3000b630: eb000615 bl 3000ce8c <rtems_barrier_create>
3000b634: e3500000 cmp r0, #0
3000b638: 1a000024 bne 3000b6d0 <fifo_open+0x1b4>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
rtems_build_name ('P', 'I', 's', c), 1,
3000b63c: e5d63000 ldrb r3, [r6]
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(
3000b640: e59f02b4 ldr r0, [pc, #692] ; 3000b8fc <fifo_open+0x3e0>
3000b644: e2842028 add r2, r4, #40 ; 0x28
3000b648: e58d2000 str r2, [sp]
3000b64c: e1830000 orr r0, r3, r0
3000b650: e3a01001 mov r1, #1
3000b654: e3a02010 mov r2, #16
3000b658: e1a03005 mov r3, r5
3000b65c: ebffedd2 bl 30006dac <rtems_semaphore_create>
3000b660: e3500000 cmp r0, #0
3000b664: 1a000017 bne 3000b6c8 <fifo_open+0x1ac>
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
3000b668: e28d5004 add r5, sp, #4
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
3000b66c: e594102c ldr r1, [r4, #44] ; 0x2c
3000b670: e1a02005 mov r2, r5
3000b674: e59f0284 ldr r0, [pc, #644] ; 3000b900 <fifo_open+0x3e4>
3000b678: ebfff40e bl 300086b8 <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
3000b67c: e590304c ldr r3, [r0, #76] ; 0x4c
3000b680: e3833201 orr r3, r3, #268435456 ; 0x10000000
3000b684: e580304c str r3, [r0, #76] ; 0x4c
_Thread_Enable_dispatch();
3000b688: ebfff6cc bl 300091c0 <_Thread_Enable_dispatch>
3000b68c: e1a02005 mov r2, r5
3000b690: e5941030 ldr r1, [r4, #48] ; 0x30
3000b694: e59f0264 ldr r0, [pc, #612] ; 3000b900 <fifo_open+0x3e4>
3000b698: ebfff406 bl 300086b8 <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
3000b69c: e590304c ldr r3, [r0, #76] ; 0x4c
3000b6a0: e3833201 orr r3, r3, #268435456 ; 0x10000000
3000b6a4: e580304c str r3, [r0, #76] ; 0x4c
_Thread_Enable_dispatch();
3000b6a8: ebfff6c4 bl 300091c0 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000b6ac: e5d63000 ldrb r3, [r6]
3000b6b0: e353007a cmp r3, #122 ; 0x7a
3000b6b4: e2832001 add r2, r3, #1
c = 'a';
3000b6b8: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000b6bc: e5c62000 strb r2, [r6]
c = 'a';
3000b6c0: 05c63000 strbeq r3, [r6]
3000b6c4: ea000009 b 3000b6f0 <fifo_open+0x1d4>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
3000b6c8: e59a0030 ldr r0, [sl, #48] ; 0x30
3000b6cc: eb00061e bl 3000cf4c <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
3000b6d0: e59a002c ldr r0, [sl, #44] ; 0x2c
3000b6d4: eb00061c bl 3000cf4c <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
3000b6d8: e59a0000 ldr r0, [sl]
3000b6dc: ebffe086 bl 300038fc <free>
err_buf:
free(pipe);
3000b6e0: e1a0000a mov r0, sl
3000b6e4: ebffe084 bl 300038fc <free>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
3000b6e8: e3e0600b mvn r6, #11
3000b6ec: ea00000d b 3000b728 <fifo_open+0x20c>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000b6f0: e3a01000 mov r1, #0
3000b6f4: e5940028 ldr r0, [r4, #40] ; 0x28
3000b6f8: e1a02001 mov r2, r1
3000b6fc: ebffee3c bl 30006ff4 <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
3000b700: e5983000 ldr r3, [r8]
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
3000b704: e3500000 cmp r0, #0
3000b708: 03a06000 moveq r6, #0
3000b70c: 13e06003 mvnne r6, #3
if (*pipep == NULL) {
3000b710: e3530000 cmp r3, #0
3000b714: 1a000003 bne 3000b728 <fifo_open+0x20c>
if (err)
3000b718: e3560000 cmp r6, #0
pipe_free(pipe);
else
*pipep = pipe;
3000b71c: 05884000 streq r4, [r8]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
3000b720: 11a00004 movne r0, r4
3000b724: 1bffff43 blne 3000b438 <pipe_free>
else
*pipep = pipe;
}
out:
pipe_unlock();
3000b728: ebffff3e bl 3000b428 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
3000b72c: e3560000 cmp r6, #0
3000b730: 1a000069 bne 3000b8dc <fifo_open+0x3c0>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
3000b734: e5973014 ldr r3, [r7, #20]
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
3000b738: e5984000 ldr r4, [r8]
switch (LIBIO_ACCMODE(iop)) {
3000b73c: e2033006 and r3, r3, #6
3000b740: e3530004 cmp r3, #4
3000b744: 0a000024 beq 3000b7dc <fifo_open+0x2c0>
3000b748: e3530006 cmp r3, #6
3000b74c: 0a000047 beq 3000b870 <fifo_open+0x354>
3000b750: e3530002 cmp r3, #2
3000b754: 1a000059 bne 3000b8c0 <fifo_open+0x3a4>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000b758: e5943020 ldr r3, [r4, #32]
3000b75c: e2833001 add r3, r3, #1
3000b760: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
3000b764: e5943010 ldr r3, [r4, #16]
3000b768: e2832001 add r2, r3, #1
3000b76c: e3530000 cmp r3, #0
3000b770: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
3000b774: 05940030 ldreq r0, [r4, #48] ; 0x30
3000b778: 028d1008 addeq r1, sp, #8
3000b77c: 0b00061a bleq 3000cfec <rtems_barrier_release>
if (pipe->Writers == 0) {
3000b780: e5943014 ldr r3, [r4, #20]
3000b784: e3530000 cmp r3, #0
3000b788: 1a00004c bne 3000b8c0 <fifo_open+0x3a4>
/* Not an error */
if (LIBIO_NODELAY(iop))
3000b78c: e5973014 ldr r3, [r7, #20]
3000b790: e3130001 tst r3, #1
3000b794: 1a000049 bne 3000b8c0 <fifo_open+0x3a4>
break;
prevCounter = pipe->writerCounter;
3000b798: e5945024 ldr r5, [r4, #36] ; 0x24
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
3000b79c: e5940028 ldr r0, [r4, #40] ; 0x28
3000b7a0: ebffee59 bl 3000710c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000b7a4: e3a01000 mov r1, #0
3000b7a8: e594002c ldr r0, [r4, #44] ; 0x2c
3000b7ac: eb000624 bl 3000d044 <rtems_barrier_wait>
3000b7b0: e2501000 subs r1, r0, #0
3000b7b4: 1a000044 bne 3000b8cc <fifo_open+0x3b0>
goto out_error;
if (! PIPE_LOCK(pipe))
3000b7b8: e5940028 ldr r0, [r4, #40] ; 0x28
3000b7bc: e1a02001 mov r2, r1
3000b7c0: ebffee0b bl 30006ff4 <rtems_semaphore_obtain>
3000b7c4: e3500000 cmp r0, #0
3000b7c8: 1a00003f bne 3000b8cc <fifo_open+0x3b0>
goto out_error;
} while (prevCounter == pipe->writerCounter);
3000b7cc: e5943024 ldr r3, [r4, #36] ; 0x24
3000b7d0: e1550003 cmp r5, r3
3000b7d4: 0afffff0 beq 3000b79c <fifo_open+0x280>
3000b7d8: ea000038 b 3000b8c0 <fifo_open+0x3a4>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000b7dc: e5943024 ldr r3, [r4, #36] ; 0x24
3000b7e0: e2833001 add r3, r3, #1
3000b7e4: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000b7e8: e5943014 ldr r3, [r4, #20]
3000b7ec: e2832001 add r2, r3, #1
3000b7f0: e3530000 cmp r3, #0
3000b7f4: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
3000b7f8: 0594002c ldreq r0, [r4, #44] ; 0x2c
3000b7fc: 028d1008 addeq r1, sp, #8
3000b800: 0b0005f9 bleq 3000cfec <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000b804: e5943010 ldr r3, [r4, #16]
3000b808: e3530000 cmp r3, #0
3000b80c: 1a00002b bne 3000b8c0 <fifo_open+0x3a4>
3000b810: e5973014 ldr r3, [r7, #20]
3000b814: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
3000b818: 05945020 ldreq r5, [r4, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000b81c: 0a000003 beq 3000b830 <fifo_open+0x314>
PIPE_UNLOCK(pipe);
3000b820: e5940028 ldr r0, [r4, #40] ; 0x28
3000b824: ebffee38 bl 3000710c <rtems_semaphore_release>
err = -ENXIO;
3000b828: e3e06005 mvn r6, #5
goto out_error;
3000b82c: ea000027 b 3000b8d0 <fifo_open+0x3b4>
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
3000b830: e5940028 ldr r0, [r4, #40] ; 0x28
3000b834: ebffee34 bl 3000710c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000b838: e3a01000 mov r1, #0
3000b83c: e5940030 ldr r0, [r4, #48] ; 0x30
3000b840: eb0005ff bl 3000d044 <rtems_barrier_wait>
3000b844: e2501000 subs r1, r0, #0
3000b848: 1a00001f bne 3000b8cc <fifo_open+0x3b0>
goto out_error;
if (! PIPE_LOCK(pipe))
3000b84c: e5940028 ldr r0, [r4, #40] ; 0x28
3000b850: e1a02001 mov r2, r1
3000b854: ebffede6 bl 30006ff4 <rtems_semaphore_obtain>
3000b858: e3500000 cmp r0, #0
3000b85c: 1a00001a bne 3000b8cc <fifo_open+0x3b0>
goto out_error;
} while (prevCounter == pipe->readerCounter);
3000b860: e5943020 ldr r3, [r4, #32]
3000b864: e1550003 cmp r5, r3
3000b868: 0afffff0 beq 3000b830 <fifo_open+0x314>
3000b86c: ea000013 b 3000b8c0 <fifo_open+0x3a4>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000b870: e5943020 ldr r3, [r4, #32]
3000b874: e2833001 add r3, r3, #1
3000b878: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
3000b87c: e5943010 ldr r3, [r4, #16]
3000b880: e2832001 add r2, r3, #1
3000b884: e3530000 cmp r3, #0
3000b888: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
3000b88c: 05940030 ldreq r0, [r4, #48] ; 0x30
3000b890: 028d1008 addeq r1, sp, #8
3000b894: 0b0005d4 bleq 3000cfec <rtems_barrier_release>
pipe->writerCounter ++;
3000b898: e5943024 ldr r3, [r4, #36] ; 0x24
3000b89c: e2833001 add r3, r3, #1
3000b8a0: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000b8a4: e5943014 ldr r3, [r4, #20]
3000b8a8: e2832001 add r2, r3, #1
3000b8ac: e3530000 cmp r3, #0
3000b8b0: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
3000b8b4: 0594002c ldreq r0, [r4, #44] ; 0x2c
3000b8b8: 028d1008 addeq r1, sp, #8
3000b8bc: 0b0005ca bleq 3000cfec <rtems_barrier_release>
break;
}
PIPE_UNLOCK(pipe);
3000b8c0: e5940028 ldr r0, [r4, #40] ; 0x28
3000b8c4: ebffee10 bl 3000710c <rtems_semaphore_release>
return 0;
3000b8c8: ea000003 b 3000b8dc <fifo_open+0x3c0>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
3000b8cc: e3e06003 mvn r6, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
3000b8d0: e1a00008 mov r0, r8
3000b8d4: e1a01007 mov r1, r7
3000b8d8: ebfffee3 bl 3000b46c <pipe_release>
return err;
}
3000b8dc: e1a00006 mov r0, r6
3000b8e0: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc}
30002948 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002948: e59f3104 ldr r3, [pc, #260] ; 30002a54 <fpathconf+0x10c>
long fpathconf(
int fd,
int name
)
{
3000294c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002950: e5933000 ldr r3, [r3]
30002954: e1500003 cmp r0, r3
30002958: 2a000006 bcs 30002978 <fpathconf+0x30>
iop = rtems_libio_iop(fd);
3000295c: e59f30f4 ldr r3, [pc, #244] ; 30002a58 <fpathconf+0x110>
30002960: e3a02038 mov r2, #56 ; 0x38
30002964: e5933000 ldr r3, [r3]
30002968: e0203092 mla r0, r2, r0, r3
rtems_libio_check_is_open(iop);
3000296c: e5903014 ldr r3, [r0, #20]
30002970: e3130c01 tst r3, #256 ; 0x100
30002974: 1a000002 bne 30002984 <fpathconf+0x3c>
30002978: eb002c92 bl 3000dbc8 <__errno>
3000297c: e3a03009 mov r3, #9
30002980: ea000003 b 30002994 <fpathconf+0x4c>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002984: e3130002 tst r3, #2
30002988: 1a000004 bne 300029a0 <fpathconf+0x58>
3000298c: eb002c8d bl 3000dbc8 <__errno>
30002990: e3a03016 mov r3, #22
30002994: e5803000 str r3, [r0]
30002998: e3e00000 mvn r0, #0
3000299c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
300029a0: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
300029a4: e351000b cmp r1, #11
300029a8: 979ff101 ldrls pc, [pc, r1, lsl #2]
300029ac: ea000023 b 30002a40 <fpathconf+0xf8>
300029b0: 300029e0 .word 0x300029e0
300029b4: 300029e8 .word 0x300029e8
300029b8: 300029f0 .word 0x300029f0
300029bc: 300029f8 .word 0x300029f8
300029c0: 30002a00 .word 0x30002a00
300029c4: 30002a08 .word 0x30002a08
300029c8: 30002a10 .word 0x30002a10
300029cc: 30002a18 .word 0x30002a18
300029d0: 30002a20 .word 0x30002a20
300029d4: 30002a28 .word 0x30002a28
300029d8: 30002a30 .word 0x30002a30
300029dc: 30002a38 .word 0x30002a38
case _PC_LINK_MAX:
return_value = the_limits->link_max;
300029e0: e5930038 ldr r0, [r3, #56] ; 0x38
break;
300029e4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
300029e8: e593003c ldr r0, [r3, #60] ; 0x3c
break;
300029ec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
300029f0: e5930040 ldr r0, [r3, #64] ; 0x40
break;
300029f4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
300029f8: e5930044 ldr r0, [r3, #68] ; 0x44
break;
300029fc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
30002a00: e5930048 ldr r0, [r3, #72] ; 0x48
break;
30002a04: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
30002a08: e593004c ldr r0, [r3, #76] ; 0x4c
break;
30002a0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
30002a10: e5930054 ldr r0, [r3, #84] ; 0x54
break;
30002a14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
30002a18: e5930058 ldr r0, [r3, #88] ; 0x58
break;
30002a1c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
30002a20: e5930064 ldr r0, [r3, #100] ; 0x64
break;
30002a24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
30002a28: e5930050 ldr r0, [r3, #80] ; 0x50
break;
30002a2c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
30002a30: e593005c ldr r0, [r3, #92] ; 0x5c
break;
30002a34: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
30002a38: e5930060 ldr r0, [r3, #96] ; 0x60
break;
30002a3c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
30002a40: eb002c60 bl 3000dbc8 <__errno>
30002a44: e3a03016 mov r3, #22
30002a48: e5803000 str r3, [r0]
30002a4c: e3e00000 mvn r0, #0
break;
}
return return_value;
}
30002a50: e49df004 pop {pc} ; (ldr pc, [sp], #4)
3000bff4 <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 )
3000bff4: e5903018 ldr r3, [r0, #24]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000bff8: e92d4010 push {r4, lr}
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 )
3000bffc: e593304c ldr r3, [r3, #76] ; 0x4c
3000c000: e3530001 cmp r3, #1
3000c004: 1a000005 bne 3000c020 <imfs_dir_open+0x2c>
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
3000c008: e3a03000 mov r3, #0
3000c00c: e3a04000 mov r4, #0
3000c010: e580300c str r3, [r0, #12]
3000c014: e5804010 str r4, [r0, #16]
return 0;
3000c018: e3a00000 mov r0, #0
3000c01c: e8bd8010 pop {r4, pc}
/* 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 */
3000c020: e3e00000 mvn r0, #0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
3000c024: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30003b0c <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
30003b0c: e5913030 ldr r3, [r1, #48] ; 0x30
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b10: e92d4030 push {r4, r5, lr}
if (tty->termios.c_iflag & ISTRIP)
30003b14: e3130020 tst r3, #32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b18: e20050ff and r5, r0, #255 ; 0xff
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
30003b1c: 1200507f andne r5, r0, #127 ; 0x7f
if (tty->termios.c_iflag & IUCLC)
30003b20: e3130c02 tst r3, #512 ; 0x200
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b24: e1a04001 mov r4, r1
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
30003b28: 0a000007 beq 30003b4c <iproc+0x40>
c = tolower (c);
30003b2c: e59f2164 ldr r2, [pc, #356] ; 30003c98 <iproc+0x18c>
30003b30: e5922000 ldr r2, [r2]
30003b34: e0822005 add r2, r2, r5
30003b38: e5d22001 ldrb r2, [r2, #1]
30003b3c: e2022003 and r2, r2, #3
30003b40: e3520001 cmp r2, #1
30003b44: 02855020 addeq r5, r5, #32
30003b48: e20550ff and r5, r5, #255 ; 0xff
if (c == '\r') {
30003b4c: e355000d cmp r5, #13
30003b50: 1a000005 bne 30003b6c <iproc+0x60>
if (tty->termios.c_iflag & IGNCR)
30003b54: e3130080 tst r3, #128 ; 0x80
30003b58: 1a000048 bne 30003c80 <iproc+0x174>
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
30003b5c: e3130c01 tst r3, #256 ; 0x100
30003b60: 03a0500d moveq r5, #13
30003b64: 13a0500a movne r5, #10
30003b68: ea000007 b 30003b8c <iproc+0x80>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
30003b6c: e355000a cmp r5, #10
30003b70: 1a000003 bne 30003b84 <iproc+0x78>
c = '\r';
30003b74: e3130040 tst r3, #64 ; 0x40
30003b78: 03a0500a moveq r5, #10
30003b7c: 13a0500d movne r5, #13
30003b80: ea000001 b 30003b8c <iproc+0x80>
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30003b84: e3550000 cmp r5, #0
30003b88: 0a00002c beq 30003c40 <iproc+0x134>
30003b8c: e594303c ldr r3, [r4, #60] ; 0x3c
30003b90: e3130002 tst r3, #2
30003b94: 0a000029 beq 30003c40 <iproc+0x134>
if (c == tty->termios.c_cc[VERASE]) {
30003b98: e5d42043 ldrb r2, [r4, #67] ; 0x43
30003b9c: e1520005 cmp r2, r5
erase (tty, 0);
30003ba0: 01a00004 moveq r0, r4
30003ba4: 03a01000 moveq r1, #0
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
30003ba8: 0a000004 beq 30003bc0 <iproc+0xb4>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
30003bac: e5d42044 ldrb r2, [r4, #68] ; 0x44
30003bb0: e1520005 cmp r2, r5
30003bb4: 1a000003 bne 30003bc8 <iproc+0xbc>
erase (tty, 1);
30003bb8: e1a00004 mov r0, r4
30003bbc: e3a01001 mov r1, #1
30003bc0: ebffff60 bl 30003948 <erase>
30003bc4: ea00002d b 30003c80 <iproc+0x174>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
30003bc8: e5d42045 ldrb r2, [r4, #69] ; 0x45
30003bcc: e1520005 cmp r2, r5
30003bd0: 0a00002c beq 30003c88 <iproc+0x17c>
return 1;
} else if (c == '\n') {
30003bd4: e355000a cmp r5, #10
30003bd8: 1a000008 bne 30003c00 <iproc+0xf4>
if (tty->termios.c_lflag & (ECHO | ECHONL))
30003bdc: e3130048 tst r3, #72 ; 0x48
echo (c, tty);
30003be0: 11a00005 movne r0, r5
30003be4: 11a01004 movne r1, r4
30003be8: 1bffff33 blne 300038bc <echo>
tty->cbuf[tty->ccount++] = c;
30003bec: e5943020 ldr r3, [r4, #32]
30003bf0: e594201c ldr r2, [r4, #28]
30003bf4: e3a0100a mov r1, #10
30003bf8: e7c21003 strb r1, [r2, r3]
30003bfc: ea00000c b 30003c34 <iproc+0x128>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
30003c00: e5d4204c ldrb r2, [r4, #76] ; 0x4c
30003c04: e1520005 cmp r2, r5
30003c08: 0a000002 beq 30003c18 <iproc+0x10c>
30003c0c: e5d42051 ldrb r2, [r4, #81] ; 0x51
30003c10: e1520005 cmp r2, r5
30003c14: 1a000009 bne 30003c40 <iproc+0x134>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
30003c18: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
30003c1c: 11a00005 movne r0, r5 <== NOT EXECUTED
30003c20: 11a01004 movne r1, r4 <== NOT EXECUTED
30003c24: 1bffff24 blne 300038bc <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
30003c28: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30003c2c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
30003c30: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED
30003c34: e2833001 add r3, r3, #1
30003c38: e5843020 str r3, [r4, #32]
30003c3c: ea000011 b 30003c88 <iproc+0x17c>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
30003c40: e59f3054 ldr r3, [pc, #84] ; 30003c9c <iproc+0x190>
30003c44: e5942020 ldr r2, [r4, #32]
30003c48: e5933008 ldr r3, [r3, #8]
30003c4c: e2433001 sub r3, r3, #1
30003c50: e1520003 cmp r2, r3
30003c54: aa00000d bge 30003c90 <iproc+0x184>
if (tty->termios.c_lflag & ECHO)
30003c58: e594303c ldr r3, [r4, #60] ; 0x3c
30003c5c: e3130008 tst r3, #8
echo (c, tty);
30003c60: 11a00005 movne r0, r5
30003c64: 11a01004 movne r1, r4
30003c68: 1bffff13 blne 300038bc <echo>
tty->cbuf[tty->ccount++] = c;
30003c6c: e5943020 ldr r3, [r4, #32]
30003c70: e594201c ldr r2, [r4, #28]
30003c74: e7c25003 strb r5, [r2, r3]
30003c78: e2833001 add r3, r3, #1
30003c7c: e5843020 str r3, [r4, #32]
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
30003c80: e3a00000 mov r0, #0
30003c84: e8bd8030 pop {r4, r5, pc}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
30003c88: e3a00001 mov r0, #1
30003c8c: e8bd8030 pop {r4, r5, pc}
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
30003c90: e3a00000 mov r0, #0 <== NOT EXECUTED
}
30003c94: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
3000bd64 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000bd64: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000bd68: e5905018 ldr r5, [r0, #24]
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000bd6c: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000bd70: e595304c ldr r3, [r5, #76] ; 0x4c
3000bd74: e3530006 cmp r3, #6
3000bd78: 1a00000b bne 3000bdac <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
3000bd7c: e5953054 ldr r3, [r5, #84] ; 0x54
3000bd80: e5901010 ldr r1, [r0, #16]
3000bd84: e5952050 ldr r2, [r5, #80] ; 0x50
3000bd88: e1510003 cmp r1, r3
3000bd8c: ca000003 bgt 3000bda0 <memfile_lseek+0x3c>
3000bd90: 1a000014 bne 3000bde8 <memfile_lseek+0x84>
3000bd94: e590100c ldr r1, [r0, #12]
3000bd98: e1510002 cmp r1, r2
3000bd9c: 9a000011 bls 3000bde8 <memfile_lseek+0x84>
iop->offset = the_jnode->info.linearfile.size;
3000bda0: e584200c str r2, [r4, #12] <== NOT EXECUTED
3000bda4: e5843010 str r3, [r4, #16] <== NOT EXECUTED
3000bda8: ea00000e b 3000bde8 <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
3000bdac: e1a00005 mov r0, r5
3000bdb0: e284200c add r2, r4, #12
3000bdb4: e8920006 ldm r2, {r1, r2}
3000bdb8: ebfffeed bl 3000b974 <IMFS_memfile_extend>
3000bdbc: e3500000 cmp r0, #0
3000bdc0: 0a000005 beq 3000bddc <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
3000bdc4: eb00039e bl 3000cc44 <__errno>
3000bdc8: e3a0301c mov r3, #28
3000bdcc: e5803000 str r3, [r0]
3000bdd0: e3e04000 mvn r4, #0
3000bdd4: e3e03000 mvn r3, #0
3000bdd8: ea000004 b 3000bdf0 <memfile_lseek+0x8c>
iop->size = the_jnode->info.file.size;
3000bddc: e2853050 add r3, r5, #80 ; 0x50
3000bde0: e893000c ldm r3, {r2, r3}
3000bde4: e984000c stmib r4, {r2, r3}
}
return iop->offset;
3000bde8: e284400c add r4, r4, #12
3000bdec: e8940018 ldm r4, {r3, r4}
}
3000bdf0: e1a00003 mov r0, r3
3000bdf4: e1a01004 mov r1, r4
3000bdf8: e8bd8030 pop {r4, r5, pc}
3000bc70 <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bc70: e5903014 ldr r3, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000bc74: e92d4031 push {r0, r4, r5, lr}
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bc78: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000bc7c: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000bc80: e5904018 ldr r4, [r0, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bc84: 0a000015 beq 3000bce0 <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
3000bc88: e594304c ldr r3, [r4, #76] ; 0x4c
3000bc8c: e3530006 cmp r3, #6
3000bc90: 1a000012 bne 3000bce0 <memfile_open+0x70>
uint32_t count = the_jnode->info.linearfile.size;
3000bc94: e594c050 ldr ip, [r4, #80] ; 0x50 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
3000bc98: e3a00000 mov r0, #0 <== 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;
3000bc9c: e3a02005 mov r2, #5 <== NOT EXECUTED
3000bca0: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
3000bca4: e3a01000 mov r1, #0 <== NOT EXECUTED
3000bca8: e3a02000 mov r2, #0 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
3000bcac: e15c0000 cmp ip, r0 <== 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;
3000bcb0: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
3000bcb4: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED
3000bcb8: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
3000bcbc: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
3000bcc0: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
3000bcc4: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
3000bcc8: 0a000004 beq 3000bce0 <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
3000bccc: e1a00004 mov r0, r4 <== NOT EXECUTED
3000bcd0: e58dc000 str ip, [sp] <== NOT EXECUTED
3000bcd4: ebffff6d bl 3000ba90 <IMFS_memfile_write> <== NOT EXECUTED
3000bcd8: e3700001 cmn r0, #1 <== NOT EXECUTED
3000bcdc: 0a000009 beq 3000bd08 <memfile_open+0x98> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
3000bce0: e5953014 ldr r3, [r5, #20]
3000bce4: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
3000bce8: 12843050 addne r3, r4, #80 ; 0x50
3000bcec: 1893000c ldmne r3, {r2, r3}
3000bcf0: 1585200c strne r2, [r5, #12]
3000bcf4: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
3000bcf8: e2844050 add r4, r4, #80 ; 0x50
3000bcfc: e8940018 ldm r4, {r3, r4}
3000bd00: e9850018 stmib r5, {r3, r4}
return 0;
3000bd04: e3a00000 mov r0, #0
}
3000bd08: e8bd8038 pop {r3, r4, r5, pc}
30002378 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
30002378: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
3000237c: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
30002380: e24dd02c sub sp, sp, #44 ; 0x2c
30002384: e1a06000 mov r6, r0
30002388: e1a0b001 mov fp, r1
3000238c: e1a0a002 mov sl, r2
30002390: e58d300c str r3, [sp, #12]
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002394: 8a000004 bhi 300023ac <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
30002398: e1a00002 mov r0, r2
3000239c: eb001d9a bl 30009a0c <rtems_filesystem_get_mount_handler>
if ( !mount_h )
300023a0: e3500000 cmp r0, #0
300023a4: e58d0014 str r0, [sp, #20]
300023a8: 1a000002 bne 300023b8 <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
300023ac: eb002a24 bl 3000cc44 <__errno>
300023b0: e3a03016 mov r3, #22
300023b4: ea00003b b 300024a8 <mount+0x130>
{
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;
300023b8: e25b5000 subs r5, fp, #0
300023bc: 13a05001 movne r5, #1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
300023c0: e59f3258 ldr r3, [pc, #600] ; 30002620 <mount+0x2a8>
300023c4: e3550000 cmp r5, #0
300023c8: 11a0300b movne r3, fp
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
300023cc: e1a0000a mov r0, sl
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
300023d0: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
300023d4: eb002e04 bl 3000dbec <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300023d8: e3560000 cmp r6, #0
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;
300023dc: e2809001 add r9, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300023e0: 01a07006 moveq r7, r6
300023e4: 0a000002 beq 300023f4 <mount+0x7c>
300023e8: e1a00006 mov r0, r6
300023ec: eb002dfe bl 3000dbec <strlen>
300023f0: e2807001 add r7, r0, #1
size_t target_size = strlen( target ) + 1;
300023f4: e59d0004 ldr r0, [sp, #4]
300023f8: eb002dfb bl 3000dbec <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
300023fc: e2891074 add r1, r9, #116 ; 0x74
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
30002400: e2803001 add r3, r0, #1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
30002404: e0811007 add r1, r1, r7
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
30002408: e58d0010 str r0, [sp, #16]
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 );
3000240c: e0811003 add r1, r1, r3
30002410: e3a00001 mov r0, #1
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
30002414: e58d3008 str r3, [sp, #8]
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 );
30002418: ebfffe15 bl 30001c74 <calloc>
if ( mt_entry != NULL ) {
3000241c: e2504000 subs r4, r0, #0
30002420: 0a00001e beq 300024a0 <mount+0x128>
char *str = (char *) mt_entry + sizeof( *mt_entry );
30002424: e2848074 add r8, r4, #116 ; 0x74
memcpy( str, filesystemtype, filesystemtype_size );
30002428: e1a00008 mov r0, r8
3000242c: e1a0100a mov r1, sl
30002430: e1a02009 mov r2, r9
30002434: eb002c30 bl 3000d4fc <memcpy>
mt_entry->type = str;
30002438: e584806c str r8, [r4, #108] ; 0x6c
str += filesystemtype_size;
3000243c: e0888009 add r8, r8, r9
memcpy( str, source_or_null, source_size );
30002440: e1a00008 mov r0, r8
30002444: e1a01006 mov r1, r6
30002448: e1a02007 mov r2, r7
3000244c: eb002c2a bl 3000d4fc <memcpy>
mt_entry->dev = str;
30002450: e5848070 str r8, [r4, #112] ; 0x70
str += source_size;
30002454: e0888007 add r8, r8, r7
memcpy( str, target, target_size );
30002458: e99d0006 ldmib sp, {r1, r2}
3000245c: e1a00008 mov r0, r8
30002460: eb002c25 bl 3000d4fc <memcpy>
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
30002464: e59d300c ldr r3, [sp, #12]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
30002468: e59fe1b4 ldr lr, [pc, #436] ; 30002624 <mount+0x2ac>
3000246c: e284c038 add ip, r4, #56 ; 0x38
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
30002470: e5843030 str r3, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
30002474: e8be000f ldm lr!, {r0, r1, r2, r3}
30002478: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000247c: e8be000f ldm lr!, {r0, r1, r2, r3}
30002480: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002484: e89e000f ldm lr, {r0, r1, r2, r3}
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
30002488: e3550000 cmp r5, #0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
3000248c: e5848068 str r8, [r4, #104] ; 0x68
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
30002490: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
30002494: e88c000f stm ip, {r0, r1, r2, r3}
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
30002498: 0a00002e beq 30002558 <mount+0x1e0>
3000249c: ea000003 b 300024b0 <mount+0x138>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
300024a0: eb0029e7 bl 3000cc44 <__errno> <== NOT EXECUTED
300024a4: e3a0300c mov r3, #12 <== NOT EXECUTED
300024a8: e5803000 str r3, [r0]
300024ac: ea000058 b 30002614 <mount+0x29c>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
300024b0: e3a03001 mov r3, #1
300024b4: e28d6018 add r6, sp, #24
300024b8: e58d3000 str r3, [sp]
300024bc: e1a0000b mov r0, fp
300024c0: e59d1010 ldr r1, [sp, #16]
300024c4: e3a02007 mov r2, #7
300024c8: e1a03006 mov r3, r6
300024cc: ebfffe17 bl 30001d30 <rtems_filesystem_evaluate_path>
300024d0: e3700001 cmn r0, #1
300024d4: 0a000048 beq 300025fc <mount+0x284>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
300024d8: e1a00006 mov r0, r6
300024dc: e59d3024 ldr r3, [sp, #36] ; 0x24
300024e0: e1a0e00f mov lr, pc
300024e4: e593f010 ldr pc, [r3, #16]
300024e8: e3500001 cmp r0, #1
300024ec: 0a000002 beq 300024fc <mount+0x184>
errno = ENOTDIR;
300024f0: eb0029d3 bl 3000cc44 <__errno>
300024f4: e3a03014 mov r3, #20
300024f8: ea000006 b 30002518 <mount+0x1a0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
300024fc: e59f0124 ldr r0, [pc, #292] ; 30002628 <mount+0x2b0>
30002500: e59d1018 ldr r1, [sp, #24]
30002504: ebffff85 bl 30002320 <rtems_filesystem_mount_iterate>
30002508: e3500000 cmp r0, #0
3000250c: 0a000003 beq 30002520 <mount+0x1a8>
errno = EBUSY;
30002510: eb0029cb bl 3000cc44 <__errno>
30002514: e3a03010 mov r3, #16
30002518: e5803000 str r3, [r0]
goto cleanup_and_bail;
3000251c: ea000037 b 30002600 <mount+0x288>
* 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;
30002520: e59d3018 ldr r3, [sp, #24]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
30002524: e59d2028 ldr r2, [sp, #40] ; 0x28
* 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;
30002528: e5843008 str r3, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
3000252c: e59d3020 ldr r3, [sp, #32]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
30002530: e5842018 str r2, [r4, #24]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
30002534: e5843010 str r3, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
30002538: e59d3024 ldr r3, [sp, #36] ; 0x24
/*
* 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 ) ) {
3000253c: e1a00004 mov r0, r4
* 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;
30002540: e5843014 str r3, [r4, #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 ) ) {
30002544: e1a0e00f mov lr, pc
30002548: e593f020 ldr pc, [r3, #32]
3000254c: e3500000 cmp r0, #0
30002550: 0a00000b beq 30002584 <mount+0x20c>
30002554: ea000029 b 30002600 <mount+0x288> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
30002558: e59f30cc ldr r3, [pc, #204] ; 3000262c <mount+0x2b4>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
3000255c: e2832004 add r2, r3, #4
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
30002560: e5933000 ldr r3, [r3]
30002564: e1530002 cmp r3, r2
)
{
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;
30002568: 01a06005 moveq r6, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
3000256c: 0a000004 beq 30002584 <mount+0x20c>
errno = EINVAL;
30002570: eb0029b3 bl 3000cc44 <__errno> <== NOT EXECUTED
30002574: e3a03016 mov r3, #22 <== NOT EXECUTED
30002578: e5803000 str r3, [r0] <== NOT EXECUTED
)
{
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;
3000257c: e1a06005 mov r6, r5 <== NOT EXECUTED
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
goto cleanup_and_bail;
30002580: ea00001e b 30002600 <mount+0x288> <== NOT EXECUTED
* 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 ) ) {
30002584: e1a00004 mov r0, r4
30002588: e59d1050 ldr r1, [sp, #80] ; 0x50
3000258c: e59d3014 ldr r3, [sp, #20]
30002590: e1a0e00f mov lr, pc
30002594: e12fff13 bx r3
30002598: e2507000 subs r7, r0, #0
3000259c: 0a000004 beq 300025b4 <mount+0x23c>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
300025a0: e1a00004 mov r0, r4
300025a4: e59d3024 ldr r3, [sp, #36] ; 0x24
300025a8: e1a0e00f mov lr, pc
300025ac: e593f028 ldr pc, [r3, #40] ; 0x28
goto cleanup_and_bail;
300025b0: ea000012 b 30002600 <mount+0x288>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
300025b4: ebffff4f bl 300022f8 <rtems_libio_lock>
300025b8: e59f006c ldr r0, [pc, #108] ; 3000262c <mount+0x2b4>
300025bc: e1a01004 mov r1, r4
300025c0: eb000cdc bl 30005938 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
300025c4: ebffff51 bl 30002310 <rtems_libio_unlock>
if ( !has_target )
300025c8: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
300025cc: 11a00007 movne r0, r7
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
300025d0: 1a000010 bne 30002618 <mount+0x2a0>
rtems_filesystem_root = mt_entry->mt_fs_root;
300025d4: e59f3054 ldr r3, [pc, #84] ; 30002630 <mount+0x2b8>
300025d8: e284401c add r4, r4, #28
300025dc: e593c000 ldr ip, [r3]
300025e0: e8b4000f ldm r4!, {r0, r1, r2, r3}
300025e4: e28cc018 add ip, ip, #24
300025e8: e8ac000f stmia ip!, {r0, r1, r2, r3}
300025ec: e5943000 ldr r3, [r4]
return 0;
300025f0: e1a00005 mov r0, r5
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;
300025f4: e58c3000 str r3, [ip]
300025f8: ea000006 b 30002618 <mount+0x2a0>
)
{
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;
300025fc: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
30002600: e1a00004 mov r0, r4
30002604: ebfffdfe bl 30001e04 <free>
if ( loc_to_free )
30002608: e3560000 cmp r6, #0
rtems_filesystem_freenode( loc_to_free );
3000260c: 11a00006 movne r0, r6
30002610: 1bfffdf6 blne 30001df0 <rtems_filesystem_freenode>
return -1;
30002614: e3e00000 mvn r0, #0
}
30002618: e28dd02c add sp, sp, #44 ; 0x2c
3000261c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30002638 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
30002638: e92d4010 push {r4, lr}
3000263c: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
30002640: eb002a82 bl 3000d050 <fileno>
30002644: e3500002 cmp r0, #2
30002648: 8a00000b bhi 3000267c <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
3000264c: e1d430bc ldrh r3, [r4, #12]
30002650: e3130080 tst r3, #128 ; 0x80
30002654: 0a00000a beq 30002684 <newlib_free_buffers+0x4c>
free( fp->_bf._base );
30002658: e5940010 ldr r0, [r4, #16]
3000265c: ebfffde8 bl 30001e04 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
30002660: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED
30002664: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED
30002668: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
3000266c: e3a03000 mov r3, #0 <== NOT EXECUTED
30002670: e5843000 str r3, [r4] <== NOT EXECUTED
30002674: e5843010 str r3, [r4, #16] <== NOT EXECUTED
30002678: ea000001 b 30002684 <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
3000267c: e1a00004 mov r0, r4 <== NOT EXECUTED
30002680: eb0029bd bl 3000cd7c <fclose> <== NOT EXECUTED
}
return 0;
}
30002684: e3a00000 mov r0, #0
30002688: e8bd8010 pop {r4, pc}
3000376c <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3000376c: e92d4011 push {r0, r4, lr}
30003770: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
30003774: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003778: e1a04001 mov r4, r1
int i;
if (tty->termios.c_oflag & OPOST) {
3000377c: e3130001 tst r3, #1
30003780: 0a000045 beq 3000389c <oproc+0x130>
switch (c) {
30003784: e5dd2000 ldrb r2, [sp]
30003788: e2421008 sub r1, r2, #8
3000378c: e3510005 cmp r1, #5
30003790: 979ff101 ldrls pc, [pc, r1, lsl #2]
30003794: ea00002c b 3000384c <oproc+0xe0>
30003798: 30003838 .word 0x30003838
3000379c: 30003810 .word 0x30003810
300037a0: 300037b0 .word 0x300037b0
300037a4: 3000384c .word 0x3000384c
300037a8: 3000384c .word 0x3000384c
300037ac: 300037d8 .word 0x300037d8
case '\n':
if (tty->termios.c_oflag & ONLRET)
300037b0: e3130020 tst r3, #32
tty->column = 0;
300037b4: 13a02000 movne r2, #0
300037b8: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
300037bc: e3130004 tst r3, #4
300037c0: 0a000035 beq 3000389c <oproc+0x130>
rtems_termios_puts ("\r", 1, tty);
300037c4: e59f00e4 ldr r0, [pc, #228] ; 300038b0 <oproc+0x144>
300037c8: e3a01001 mov r1, #1
300037cc: e1a02004 mov r2, r4
300037d0: ebffffa5 bl 3000366c <rtems_termios_puts>
300037d4: ea00000b b 30003808 <oproc+0x9c>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
300037d8: e3130010 tst r3, #16 <== NOT EXECUTED
300037dc: 0a000002 beq 300037ec <oproc+0x80> <== NOT EXECUTED
300037e0: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
300037e4: e3520000 cmp r2, #0 <== NOT EXECUTED
300037e8: 0a00002f beq 300038ac <oproc+0x140> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
300037ec: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
300037f0: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
300037f4: 0a000028 beq 3000389c <oproc+0x130> <== NOT EXECUTED
c = '\n';
300037f8: e3a0200a mov r2, #10 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
300037fc: e3130020 tst r3, #32 <== NOT EXECUTED
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
c = '\n';
30003800: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
30003804: 0a000024 beq 3000389c <oproc+0x130> <== NOT EXECUTED
tty->column = 0;
30003808: e3a03000 mov r3, #0
3000380c: ea000021 b 30003898 <oproc+0x12c>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003810: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003814: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003818: e2021007 and r1, r2, #7
3000381c: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003820: e3530b06 cmp r3, #6144 ; 0x1800
30003824: e0813002 add r3, r1, r2
tty->column += i;
30003828: 05843028 streq r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
3000382c: 059f0080 ldreq r0, [pc, #128] ; 300038b4 <oproc+0x148>
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003830: 1a000018 bne 30003898 <oproc+0x12c>
30003834: ea00001a b 300038a4 <oproc+0x138>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
30003838: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3000383c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003840: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
30003844: ca000013 bgt 30003898 <oproc+0x12c> <== NOT EXECUTED
30003848: ea000013 b 3000389c <oproc+0x130> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
3000384c: e3130002 tst r3, #2
30003850: 0a000007 beq 30003874 <oproc+0x108>
c = toupper(c);
30003854: e59f305c ldr r3, [pc, #92] ; 300038b8 <oproc+0x14c> <== NOT EXECUTED
30003858: e5933000 ldr r3, [r3] <== NOT EXECUTED
3000385c: e0833002 add r3, r3, r2 <== NOT EXECUTED
30003860: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
30003864: e2033003 and r3, r3, #3 <== NOT EXECUTED
30003868: e3530002 cmp r3, #2 <== NOT EXECUTED
3000386c: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
30003870: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
30003874: e59f203c ldr r2, [pc, #60] ; 300038b8 <oproc+0x14c>
30003878: e5dd3000 ldrb r3, [sp]
3000387c: e5922000 ldr r2, [r2]
30003880: e0823003 add r3, r2, r3
30003884: e5d33001 ldrb r3, [r3, #1]
30003888: e3130020 tst r3, #32
3000388c: 1a000002 bne 3000389c <oproc+0x130>
tty->column++;
30003890: e5943028 ldr r3, [r4, #40] ; 0x28
30003894: e2833001 add r3, r3, #1
30003898: e5843028 str r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
3000389c: e1a0000d mov r0, sp
300038a0: e3a01001 mov r1, #1
300038a4: e1a02004 mov r2, r4
300038a8: ebffff6f bl 3000366c <rtems_termios_puts>
}
300038ac: e8bd8018 pop {r3, r4, pc}
3000bc30 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000bc30: e59f3058 ldr r3, [pc, #88] ; 3000bc90 <pipe_ioctl+0x60>
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000bc34: e92d4070 push {r4, r5, r6, lr}
if (cmd == FIONREAD) {
3000bc38: e1510003 cmp r1, r3
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000bc3c: e1a04000 mov r4, r0
3000bc40: e1a05002 mov r5, r2
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
3000bc44: 13e00015 mvnne r0, #21
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000bc48: 18bd8070 popne {r4, r5, r6, pc}
if (buffer == NULL)
3000bc4c: e3520000 cmp r2, #0
return -EFAULT;
3000bc50: 03e0000d mvneq r0, #13
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
3000bc54: 08bd8070 popeq {r4, r5, r6, pc}
return -EFAULT;
if (! PIPE_LOCK(pipe))
3000bc58: e3a01000 mov r1, #0
3000bc5c: e5940028 ldr r0, [r4, #40] ; 0x28
3000bc60: e1a02001 mov r2, r1
3000bc64: ebffece2 bl 30006ff4 <rtems_semaphore_obtain>
3000bc68: e2506000 subs r6, r0, #0
3000bc6c: 1a000005 bne 3000bc88 <pipe_ioctl+0x58>
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000bc70: e594300c ldr r3, [r4, #12]
PIPE_UNLOCK(pipe);
3000bc74: e5940028 ldr r0, [r4, #40] ; 0x28
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000bc78: e5853000 str r3, [r5]
PIPE_UNLOCK(pipe);
3000bc7c: ebffed22 bl 3000710c <rtems_semaphore_release>
return 0;
3000bc80: e1a00006 mov r0, r6
3000bc84: e8bd8070 pop {r4, r5, r6, pc}
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
return -EINTR;
3000bc88: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
3000bc8c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
3000b904 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b904: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000b908: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b90c: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b910: e1a04000 mov r4, r0
3000b914: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b918: e5900028 ldr r0, [r0, #40] ; 0x28
3000b91c: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b920: e1a0a003 mov sl, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b924: ebffedb2 bl 30006ff4 <rtems_semaphore_obtain>
3000b928: e2506000 subs r6, r0, #0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
3000b92c: 01a0b00d moveq fp, sp
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b930: 0a000043 beq 3000ba44 <pipe_read+0x140>
3000b934: ea00004e b 3000ba74 <pipe_read+0x170> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
3000b938: e5947014 ldr r7, [r4, #20]
3000b93c: e3570000 cmp r7, #0
3000b940: 0a000044 beq 3000ba58 <pipe_read+0x154>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
3000b944: e59a8014 ldr r8, [sl, #20]
3000b948: e2188001 ands r8, r8, #1
3000b94c: 1a000040 bne 3000ba54 <pipe_read+0x150>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000b950: e5943018 ldr r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000b954: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000b958: e2833001 add r3, r3, #1
3000b95c: e5843018 str r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000b960: ebffede9 bl 3000710c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000b964: e1a01008 mov r1, r8
3000b968: e594002c ldr r0, [r4, #44] ; 0x2c
3000b96c: eb0005b4 bl 3000d044 <rtems_barrier_wait>
3000b970: e3500000 cmp r0, #0
3000b974: 01a07000 moveq r7, r0
3000b978: 13e07003 mvnne r7, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000b97c: e1a01008 mov r1, r8
3000b980: e5940028 ldr r0, [r4, #40] ; 0x28
3000b984: e1a02008 mov r2, r8
3000b988: ebffed99 bl 30006ff4 <rtems_semaphore_obtain>
3000b98c: e3500000 cmp r0, #0
3000b990: 1a000033 bne 3000ba64 <pipe_read+0x160>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000b994: e5943018 ldr r3, [r4, #24]
if (ret != 0)
3000b998: e3570000 cmp r7, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000b99c: e2433001 sub r3, r3, #1
3000b9a0: e5843018 str r3, [r4, #24]
if (ret != 0)
3000b9a4: 1a00002b bne 3000ba58 <pipe_read+0x154>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
3000b9a8: e594300c ldr r3, [r4, #12]
3000b9ac: e3530000 cmp r3, #0
3000b9b0: 0affffe0 beq 3000b938 <pipe_read+0x34>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
3000b9b4: e0667005 rsb r7, r6, r5
3000b9b8: e1530007 cmp r3, r7
3000b9bc: 31a07003 movcc r7, r3
chunk1 = pipe->Size - pipe->Start;
3000b9c0: e5948004 ldr r8, [r4, #4]
3000b9c4: e5943008 ldr r3, [r4, #8]
3000b9c8: e5941000 ldr r1, [r4]
3000b9cc: e0638008 rsb r8, r3, r8
if (chunk > chunk1) {
3000b9d0: e1570008 cmp r7, r8
3000b9d4: e0890006 add r0, r9, r6
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);
3000b9d8: d0811003 addle r1, r1, r3
3000b9dc: d1a02007 movle r2, r7
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
3000b9e0: da000006 ble 3000ba00 <pipe_read+0xfc>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
3000b9e4: e0811003 add r1, r1, r3
3000b9e8: e1a02008 mov r2, r8
3000b9ec: eb001104 bl 3000fe04 <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
3000b9f0: e0860008 add r0, r6, r8
3000b9f4: e5941000 ldr r1, [r4]
3000b9f8: e0890000 add r0, r9, r0
3000b9fc: e0682007 rsb r2, r8, r7
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
3000ba00: eb0010ff bl 3000fe04 <memcpy>
pipe->Start += chunk;
3000ba04: e5940008 ldr r0, [r4, #8]
pipe->Start %= pipe->Size;
3000ba08: e5941004 ldr r1, [r4, #4]
3000ba0c: e0870000 add r0, r7, r0
3000ba10: eb003d46 bl 3001af30 <__umodsi3>
pipe->Length -= chunk;
3000ba14: e594300c ldr r3, [r4, #12]
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
3000ba18: e5840008 str r0, [r4, #8]
pipe->Length -= chunk;
3000ba1c: e0673003 rsb r3, r7, r3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
3000ba20: e3530000 cmp r3, #0
pipe->Start = 0;
3000ba24: 05843008 streq r3, [r4, #8]
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
3000ba28: e584300c str r3, [r4, #12]
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
3000ba2c: e594301c ldr r3, [r4, #28]
3000ba30: e3530000 cmp r3, #0
PIPE_WAKEUPWRITERS(pipe);
3000ba34: 15940030 ldrne r0, [r4, #48] ; 0x30
3000ba38: 11a0100d movne r1, sp
3000ba3c: 1b00056a blne 3000cfec <rtems_barrier_release>
read += chunk;
3000ba40: e0866007 add r6, r6, r7
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
3000ba44: e1560005 cmp r6, r5
3000ba48: 3affffd6 bcc 3000b9a8 <pipe_read+0xa4>
3000ba4c: e3a07000 mov r7, #0
3000ba50: ea000000 b 3000ba58 <pipe_read+0x154>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000ba54: e3e0700a mvn r7, #10
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
3000ba58: e5940028 ldr r0, [r4, #40] ; 0x28
3000ba5c: ebffedaa bl 3000710c <rtems_semaphore_release>
3000ba60: ea000000 b 3000ba68 <pipe_read+0x164>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
3000ba64: e3e07003 mvn r7, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
3000ba68: e3560000 cmp r6, #0
3000ba6c: d1a06007 movle r6, r7
3000ba70: ea000000 b 3000ba78 <pipe_read+0x174>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
3000ba74: e3e06003 mvn r6, #3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
3000ba78: e1a00006 mov r0, r6
3000ba7c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000ba80 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000ba80: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000ba84: e2527000 subs r7, r2, #0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000ba88: e1a04000 mov r4, r0
3000ba8c: e1a0b001 mov fp, r1
3000ba90: e1a08003 mov r8, r3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
3000ba94: 01a05007 moveq r5, r7
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000ba98: 0a000062 beq 3000bc28 <pipe_write+0x1a8>
return 0;
if (! PIPE_LOCK(pipe))
3000ba9c: e3a01000 mov r1, #0
3000baa0: e5900028 ldr r0, [r0, #40] ; 0x28
3000baa4: e1a02001 mov r2, r1
3000baa8: ebffed51 bl 30006ff4 <rtems_semaphore_obtain>
3000baac: e3500000 cmp r0, #0
return -EINTR;
3000bab0: 13e05003 mvnne r5, #3
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
3000bab4: 1a00005b bne 3000bc28 <pipe_write+0x1a8>
return -EINTR;
if (pipe->Readers == 0) {
3000bab8: e5945010 ldr r5, [r4, #16]
3000babc: e3550000 cmp r5, #0
3000bac0: 0a00004c beq 3000bbf8 <pipe_write+0x178>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
3000bac4: e5949004 ldr r9, [r4, #4]
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
3000bac8: e1a05000 mov r5, r0
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
3000bacc: e1570009 cmp r7, r9
3000bad0: 91a09007 movls r9, r7
3000bad4: 83a09001 movhi r9, #1
3000bad8: ea000040 b 3000bbe0 <pipe_write+0x160>
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
3000badc: e598a014 ldr sl, [r8, #20]
3000bae0: e21aa001 ands sl, sl, #1
3000bae4: 1a000041 bne 3000bbf0 <pipe_write+0x170>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000bae8: e594301c ldr r3, [r4, #28]
PIPE_UNLOCK(pipe);
3000baec: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000baf0: e2833001 add r3, r3, #1
3000baf4: e584301c str r3, [r4, #28]
PIPE_UNLOCK(pipe);
3000baf8: ebffed83 bl 3000710c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000bafc: e1a0100a mov r1, sl
3000bb00: e5940030 ldr r0, [r4, #48] ; 0x30
3000bb04: eb00054e bl 3000d044 <rtems_barrier_wait>
3000bb08: e3500000 cmp r0, #0
3000bb0c: 01a06000 moveq r6, r0
3000bb10: 13e06003 mvnne r6, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bb14: e1a0100a mov r1, sl
3000bb18: e5940028 ldr r0, [r4, #40] ; 0x28
3000bb1c: e1a0200a mov r2, sl
3000bb20: ebffed33 bl 30006ff4 <rtems_semaphore_obtain>
3000bb24: e3500000 cmp r0, #0
3000bb28: 1a00003b bne 3000bc1c <pipe_write+0x19c>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000bb2c: e594301c ldr r3, [r4, #28]
if (ret != 0)
3000bb30: e3560000 cmp r6, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000bb34: e2433001 sub r3, r3, #1
3000bb38: e584301c str r3, [r4, #28]
if (ret != 0)
3000bb3c: 1a00002e bne 3000bbfc <pipe_write+0x17c>
goto out_locked;
if (pipe->Readers == 0) {
3000bb40: e5943010 ldr r3, [r4, #16]
3000bb44: e3530000 cmp r3, #0
3000bb48: 0a00002a beq 3000bbf8 <pipe_write+0x178>
/* 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) {
3000bb4c: e594a004 ldr sl, [r4, #4]
3000bb50: e594300c ldr r3, [r4, #12]
3000bb54: e063200a rsb r2, r3, sl
3000bb58: e1520009 cmp r2, r9
3000bb5c: 3affffde bcc 3000badc <pipe_write+0x5c>
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000bb60: e5940008 ldr r0, [r4, #8]
3000bb64: e1a0100a mov r1, sl
3000bb68: e0830000 add r0, r3, r0
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000bb6c: e0656007 rsb r6, r5, r7
3000bb70: e1520006 cmp r2, r6
3000bb74: 31a06002 movcc r6, r2
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000bb78: eb003cec bl 3001af30 <__umodsi3>
3000bb7c: e5943000 ldr r3, [r4]
3000bb80: e060a00a rsb sl, r0, sl
if (chunk > chunk1) {
3000bb84: e156000a cmp r6, sl
3000bb88: e08b1005 add r1, fp, r5
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);
3000bb8c: d0830000 addle r0, r3, r0
3000bb90: d1a02006 movle r2, r6
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
3000bb94: da000006 ble 3000bbb4 <pipe_write+0x134>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
3000bb98: e1a0200a mov r2, sl
3000bb9c: e0830000 add r0, r3, r0
3000bba0: eb001097 bl 3000fe04 <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
3000bba4: e08a1005 add r1, sl, r5
3000bba8: e5940000 ldr r0, [r4]
3000bbac: e08b1001 add r1, fp, r1
3000bbb0: e06a2006 rsb r2, sl, r6
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
3000bbb4: eb001092 bl 3000fe04 <memcpy>
pipe->Length += chunk;
3000bbb8: e594300c ldr r3, [r4, #12]
3000bbbc: e0833006 add r3, r3, r6
3000bbc0: e584300c str r3, [r4, #12]
if (pipe->waitingReaders > 0)
3000bbc4: e5943018 ldr r3, [r4, #24]
3000bbc8: e3530000 cmp r3, #0
PIPE_WAKEUPREADERS(pipe);
3000bbcc: 1594002c ldrne r0, [r4, #44] ; 0x2c
3000bbd0: 11a0100d movne r1, sp
3000bbd4: 1b000504 blne 3000cfec <rtems_barrier_release>
written += chunk;
3000bbd8: e0855006 add r5, r5, r6
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
3000bbdc: e3a09001 mov r9, #1
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
3000bbe0: e1550007 cmp r5, r7
3000bbe4: 3affffd8 bcc 3000bb4c <pipe_write+0xcc>
3000bbe8: e3a06000 mov r6, #0
3000bbec: ea000002 b 3000bbfc <pipe_write+0x17c>
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000bbf0: e3e0600a mvn r6, #10
3000bbf4: ea000000 b 3000bbfc <pipe_write+0x17c>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
3000bbf8: e3e0601f mvn r6, #31
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
3000bbfc: e5940028 ldr r0, [r4, #40] ; 0x28
3000bc00: ebffed41 bl 3000710c <rtems_semaphore_release>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
3000bc04: e3760020 cmn r6, #32
3000bc08: 1a000004 bne 3000bc20 <pipe_write+0x1a0>
kill(getpid(), SIGPIPE);
3000bc0c: eb0001f1 bl 3000c3d8 <getpid>
3000bc10: e3a0100d mov r1, #13
3000bc14: eb0002a4 bl 3000c6ac <kill>
3000bc18: ea000000 b 3000bc20 <pipe_write+0x1a0>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
3000bc1c: e3e06003 mvn r6, #3 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
3000bc20: e3550000 cmp r5, #0
3000bc24: d1a05006 movle r5, r6
return written;
return ret;
}
3000bc28: e1a00005 mov r0, r5
3000bc2c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000a354 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
3000a354: e3500000 cmp r0, #0
3000a358: 0a00000b beq 3000a38c <pthread_attr_setschedpolicy+0x38>
3000a35c: e5903000 ldr r3, [r0]
3000a360: e3530000 cmp r3, #0
3000a364: 0a000008 beq 3000a38c <pthread_attr_setschedpolicy+0x38>
return EINVAL;
switch ( policy ) {
3000a368: e3510004 cmp r1, #4
3000a36c: 8a000008 bhi 3000a394 <pthread_attr_setschedpolicy+0x40>
3000a370: e3a03001 mov r3, #1
3000a374: e1a03113 lsl r3, r3, r1
3000a378: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
3000a37c: 15801014 strne r1, [r0, #20]
return 0;
3000a380: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
3000a384: 112fff1e bxne lr
3000a388: ea000001 b 3000a394 <pthread_attr_setschedpolicy+0x40> <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
3000a38c: e3a00016 mov r0, #22
3000a390: e12fff1e bx lr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
3000a394: e3a00086 mov r0, #134 ; 0x86
}
}
3000a398: e12fff1e bx lr
3000719c <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
3000719c: e3500000 cmp r0, #0
300071a0: 0a000007 beq 300071c4 <pthread_mutexattr_setpshared+0x28>
300071a4: e5903000 ldr r3, [r0]
300071a8: e3530000 cmp r3, #0
300071ac: 0a000004 beq 300071c4 <pthread_mutexattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
300071b0: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
300071b4: 95801004 strls r1, [r0, #4]
return 0;
300071b8: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
300071bc: 912fff1e bxls lr
300071c0: ea000001 b 300071cc <pthread_mutexattr_setpshared+0x30> <== NOT EXECUTED
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
300071c4: e3a00016 mov r0, #22
300071c8: e12fff1e bx lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
300071cc: e3a00016 mov r0, #22
}
}
300071d0: e12fff1e bx lr
30006e08 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
30006e08: e3500000 cmp r0, #0
30006e0c: 0a000007 beq 30006e30 <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
if ( !attr->is_initialized )
30006e10: e5903000 ldr r3, [r0]
30006e14: e3530000 cmp r3, #0
30006e18: 0a000004 beq 30006e30 <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
30006e1c: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
30006e20: 95801004 strls r1, [r0, #4]
return 0;
30006e24: 93a00000 movls r0, #0
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
30006e28: 912fff1e bxls lr
30006e2c: ea000001 b 30006e38 <pthread_rwlockattr_setpshared+0x30>
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
30006e30: e3a00016 mov r0, #22
30006e34: e12fff1e bx lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
30006e38: e3a00016 mov r0, #22
}
}
30006e3c: e12fff1e bx lr
30012610 <realloc>:
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
30012610: e59f310c ldr r3, [pc, #268] ; 30012724 <realloc+0x114>
void *realloc(
void *ptr,
size_t size
)
{
30012614: e92d40f1 push {r0, r4, r5, r6, r7, lr}
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
30012618: e5932010 ldr r2, [r3, #16]
void *realloc(
void *ptr,
size_t size
)
{
3001261c: e1a04000 mov r4, r0
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
30012620: e2822001 add r2, r2, #1
30012624: e5832010 str r2, [r3, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30012628: e59f30f8 ldr r3, [pc, #248] ; 30012728 <realloc+0x118>
void *realloc(
void *ptr,
size_t size
)
{
3001262c: e1a05001 mov r5, r1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30012630: e5933000 ldr r3, [r3]
30012634: e3530003 cmp r3, #3
30012638: 1a000009 bne 30012664 <realloc+0x54>
if (_Thread_Dispatch_disable_level > 0)
3001263c: e59f30e8 ldr r3, [pc, #232] ; 3001272c <realloc+0x11c>
30012640: e5933000 ldr r3, [r3]
30012644: e3530000 cmp r3, #0
return (void *) 0;
30012648: 13a04000 movne r4, #0
/*
* 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)
3001264c: 1a000032 bne 3001271c <realloc+0x10c>
return (void *) 0;
if (_ISR_Nest_level > 0)
30012650: e59f20d8 ldr r2, [pc, #216] ; 30012730 <realloc+0x120>
30012654: e5922000 ldr r2, [r2]
30012658: e3520000 cmp r2, #0
return (void *) 0;
3001265c: 11a04003 movne r4, r3
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
30012660: 1a00002d bne 3001271c <realloc+0x10c>
}
/*
* Continue with realloc().
*/
if ( !ptr )
30012664: e3540000 cmp r4, #0
30012668: 1a000003 bne 3001267c <realloc+0x6c>
return malloc( size );
3001266c: e1a00005 mov r0, r5
30012670: ebffbeb2 bl 30002140 <malloc>
30012674: e1a04000 mov r4, r0
30012678: ea000027 b 3001271c <realloc+0x10c>
if ( !size ) {
3001267c: e3550000 cmp r5, #0
30012680: 1a000003 bne 30012694 <realloc+0x84>
free( ptr );
30012684: e1a00004 mov r0, r4 <== NOT EXECUTED
30012688: ebffbddd bl 30001e04 <free> <== NOT EXECUTED
return (void *) 0;
3001268c: e1a04005 mov r4, r5 <== NOT EXECUTED
30012690: ea000021 b 3001271c <realloc+0x10c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
30012694: e59f6098 ldr r6, [pc, #152] ; 30012734 <realloc+0x124>
30012698: e1a01004 mov r1, r4
3001269c: e5960000 ldr r0, [r6]
300126a0: e1a0200d mov r2, sp
300126a4: eb00004e bl 300127e4 <_Protected_heap_Get_block_size>
300126a8: e2507000 subs r7, r0, #0
300126ac: 1a000004 bne 300126c4 <realloc+0xb4>
errno = EINVAL;
300126b0: ebffe963 bl 3000cc44 <__errno>
300126b4: e3a03016 mov r3, #22
300126b8: e5803000 str r3, [r0]
return (void *) 0;
300126bc: e1a04007 mov r4, r7
300126c0: ea000015 b 3001271c <realloc+0x10c>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
300126c4: e5960000 ldr r0, [r6]
300126c8: e1a01004 mov r1, r4
300126cc: e1a02005 mov r2, r5
300126d0: eb000054 bl 30012828 <_Protected_heap_Resize_block>
300126d4: e3500000 cmp r0, #0
300126d8: 1a00000f bne 3001271c <realloc+0x10c>
* 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 );
300126dc: e1a00005 mov r0, r5
300126e0: ebffbe96 bl 30002140 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
300126e4: e59f3038 ldr r3, [pc, #56] ; 30012724 <realloc+0x114>
if ( !new_area ) {
300126e8: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
300126ec: e5932004 ldr r2, [r3, #4]
300126f0: e2422001 sub r2, r2, #1
300126f4: e5832004 str r2, [r3, #4]
if ( !new_area ) {
300126f8: 0a000006 beq 30012718 <realloc+0x108>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
300126fc: e59d2000 ldr r2, [sp]
30012700: e1a01004 mov r1, r4
30012704: e1550002 cmp r5, r2
30012708: 31a02005 movcc r2, r5
3001270c: ebffeb7a bl 3000d4fc <memcpy>
free( ptr );
30012710: e1a00004 mov r0, r4
30012714: ebffbdba bl 30001e04 <free>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
30012718: e1a04006 mov r4, r6
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
3001271c: e1a00004 mov r0, r4
30012720: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
30005fc0 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
30005fc0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
30005fc4: e59f41f0 ldr r4, [pc, #496] ; 300061bc <rtems_aio_enqueue+0x1fc>
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
30005fc8: e24dd024 sub sp, sp, #36 ; 0x24
30005fcc: e1a06000 mov r6, r0
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
30005fd0: e1a00004 mov r0, r4
30005fd4: eb00024f bl 30006918 <pthread_mutex_lock>
if (result != 0) {
30005fd8: e2505000 subs r5, r0, #0
30005fdc: 0a000002 beq 30005fec <rtems_aio_enqueue+0x2c>
free (req);
30005fe0: e1a00006 mov r0, r6 <== NOT EXECUTED
30005fe4: ebfff28a bl 30002a14 <free> <== NOT EXECUTED
return result;
30005fe8: ea000070 b 300061b0 <rtems_aio_enqueue+0x1f0> <== NOT EXECUTED
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
30005fec: eb000457 bl 30007150 <pthread_self>
30005ff0: e28d101c add r1, sp, #28
30005ff4: e1a0200d mov r2, sp
30005ff8: eb00035b bl 30006d6c <pthread_getschedparam>
req->caller_thread = pthread_self ();
30005ffc: eb000453 bl 30007150 <pthread_self>
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
30006000: e5963014 ldr r3, [r6, #20]
30006004: e59d1000 ldr r1, [sp]
30006008: e5932014 ldr r2, [r3, #20]
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
3000600c: e5860010 str r0, [r6, #16]
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
30006010: e0622001 rsb r2, r2, r1
30006014: e586200c str r2, [r6, #12]
req->policy = policy;
30006018: e59d201c ldr r2, [sp, #28]
3000601c: e5862008 str r2, [r6, #8]
req->aiocbp->error_code = EINPROGRESS;
30006020: e3a02077 mov r2, #119 ; 0x77
30006024: e5832030 str r2, [r3, #48] ; 0x30
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
30006028: e5942068 ldr r2, [r4, #104] ; 0x68
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
3000602c: e5835034 str r5, [r3, #52] ; 0x34
if ((aio_request_queue.idle_threads == 0) &&
30006030: e3520000 cmp r2, #0
30006034: 1a00002e bne 300060f4 <rtems_aio_enqueue+0x134>
30006038: e5942064 ldr r2, [r4, #100] ; 0x64
3000603c: e3520004 cmp r2, #4
30006040: ca00002b bgt 300060f4 <rtems_aio_enqueue+0x134>
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
30006044: e5931000 ldr r1, [r3]
30006048: e2840048 add r0, r4, #72 ; 0x48
3000604c: e3a02001 mov r2, #1
30006050: ebfffedd bl 30005bcc <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
30006054: e5903018 ldr r3, [r0, #24]
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
30006058: e1a07000 mov r7, r0
if (r_chain->new_fd == 1) {
3000605c: e3530001 cmp r3, #1
30006060: e2809008 add r9, r0, #8
30006064: e280801c add r8, r0, #28
30006068: e280a020 add sl, r0, #32
3000606c: 1a000017 bne 300060d0 <rtems_aio_enqueue+0x110>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
30006070: e1a01006 mov r1, r6
30006074: e1a00009 mov r0, r9
30006078: eb000853 bl 300081cc <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
3000607c: e1a01005 mov r1, r5
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
if (r_chain->new_fd == 1) {
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
30006080: e5875018 str r5, [r7, #24]
pthread_mutex_init (&r_chain->mutex, NULL);
30006084: e1a00008 mov r0, r8
30006088: eb0001d0 bl 300067d0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
3000608c: e1a01005 mov r1, r5
30006090: e1a0000a mov r0, sl
30006094: eb0000e5 bl 30006430 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
30006098: e1a03007 mov r3, r7
3000609c: e28d0020 add r0, sp, #32
300060a0: e2841008 add r1, r4, #8
300060a4: e59f2114 ldr r2, [pc, #276] ; 300061c0 <rtems_aio_enqueue+0x200>
300060a8: eb00029b bl 30006b1c <pthread_create>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
300060ac: e2506000 subs r6, r0, #0
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
300060b0: 05943064 ldreq r3, [r4, #100] ; 0x64
300060b4: 02833001 addeq r3, r3, #1
300060b8: 05843064 streq r3, [r4, #100] ; 0x64
pthread_cond_init (&r_chain->cond, NULL);
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
300060bc: 0a000039 beq 300061a8 <rtems_aio_enqueue+0x1e8>
pthread_mutex_unlock (&aio_request_queue.mutex);
300060c0: e1a00004 mov r0, r4 <== NOT EXECUTED
300060c4: eb000232 bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
300060c8: e1a05006 mov r5, r6 <== NOT EXECUTED
300060cc: ea000037 b 300061b0 <rtems_aio_enqueue+0x1f0> <== NOT EXECUTED
}
++aio_request_queue.active_threads;
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
300060d0: e1a00008 mov r0, r8
300060d4: eb00020f bl 30006918 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
300060d8: e1a00009 mov r0, r9
300060dc: e1a01006 mov r1, r6
300060e0: ebffff7c bl 30005ed8 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
300060e4: e1a0000a mov r0, sl
300060e8: eb000100 bl 300064f0 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
300060ec: e1a00008 mov r0, r8
300060f0: ea00000e b 30006130 <rtems_aio_enqueue+0x170>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
300060f4: e59f00c8 ldr r0, [pc, #200] ; 300061c4 <rtems_aio_enqueue+0x204>
300060f8: e5931000 ldr r1, [r3]
300060fc: e3a02000 mov r2, #0
30006100: ebfffeb1 bl 30005bcc <rtems_aio_search_fd>
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
30006104: e2504000 subs r4, r0, #0
30006108: 0a00000a beq 30006138 <rtems_aio_enqueue+0x178>
{
pthread_mutex_lock (&r_chain->mutex);
3000610c: e284701c add r7, r4, #28 <== NOT EXECUTED
30006110: e1a00007 mov r0, r7 <== NOT EXECUTED
30006114: eb0001ff bl 30006918 <pthread_mutex_lock> <== NOT EXECUTED
rtems_aio_insert_prio (&r_chain->perfd, req);
30006118: e2840008 add r0, r4, #8 <== NOT EXECUTED
3000611c: e1a01006 mov r1, r6 <== NOT EXECUTED
30006120: ebffff6c bl 30005ed8 <rtems_aio_insert_prio> <== NOT EXECUTED
pthread_cond_signal (&r_chain->cond);
30006124: e2840020 add r0, r4, #32 <== NOT EXECUTED
30006128: eb0000f0 bl 300064f0 <pthread_cond_signal> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
3000612c: e1a00007 mov r0, r7 <== NOT EXECUTED
30006130: eb000217 bl 30006994 <pthread_mutex_unlock>
30006134: ea00001b b 300061a8 <rtems_aio_enqueue+0x1e8>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
30006138: e5963014 ldr r3, [r6, #20]
3000613c: e59f0084 ldr r0, [pc, #132] ; 300061c8 <rtems_aio_enqueue+0x208>
30006140: e5931000 ldr r1, [r3]
30006144: e3a02001 mov r2, #1
30006148: ebfffe9f bl 30005bcc <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
3000614c: e5903018 ldr r3, [r0, #24]
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
30006150: e1a07000 mov r7, r0
if (r_chain->new_fd == 1) {
30006154: e3530001 cmp r3, #1
30006158: e2800008 add r0, r0, #8
3000615c: 1a00000f bne 300061a0 <rtems_aio_enqueue+0x1e0>
30006160: e1a01006 mov r1, r6
30006164: eb000818 bl 300081cc <_Chain_Insert>
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
30006168: e1a01004 mov r1, r4
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
3000616c: e5874018 str r4, [r7, #24]
pthread_mutex_init (&r_chain->mutex, NULL);
30006170: e287001c add r0, r7, #28
30006174: eb000195 bl 300067d0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
30006178: e1a01004 mov r1, r4
3000617c: e2870020 add r0, r7, #32
30006180: eb0000aa bl 30006430 <pthread_cond_init>
pthread_cond_signal (&aio_request_queue.new_req);
30006184: e59f0040 ldr r0, [pc, #64] ; 300061cc <rtems_aio_enqueue+0x20c>
30006188: eb0000d8 bl 300064f0 <pthread_cond_signal>
++aio_request_queue.idle_threads;
3000618c: e59f3028 ldr r3, [pc, #40] ; 300061bc <rtems_aio_enqueue+0x1fc>
30006190: e5932068 ldr r2, [r3, #104] ; 0x68
30006194: e2822001 add r2, r2, #1
30006198: e5832068 str r2, [r3, #104] ; 0x68
3000619c: ea000001 b 300061a8 <rtems_aio_enqueue+0x1e8>
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
300061a0: e1a01006 mov r1, r6
300061a4: ebffff4b bl 30005ed8 <rtems_aio_insert_prio>
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
300061a8: e59f000c ldr r0, [pc, #12] ; 300061bc <rtems_aio_enqueue+0x1fc>
300061ac: eb0001f8 bl 30006994 <pthread_mutex_unlock>
return 0;
}
300061b0: e1a00005 mov r0, r5
300061b4: e28dd024 add sp, sp, #36 ; 0x24
300061b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
30005c74 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
30005c74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
The fd chain is already unlocked */
struct timespec timeout;
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
30005c78: e59f624c ldr r6, [pc, #588] ; 30005ecc <rtems_aio_handle+0x258><== NOT EXECUTED
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
30005c7c: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
30005c80: e1a04000 mov r4, r0 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
30005c84: e28d7020 add r7, sp, #32 <== NOT EXECUTED
pthread_cond_destroy (&r_chain->cond);
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
30005c88: e286b058 add fp, r6, #88 ; 0x58 <== NOT EXECUTED
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
30005c8c: e28d9004 add r9, sp, #4 <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
30005c90: e284a01c add sl, r4, #28 <== NOT EXECUTED
30005c94: e1a0000a mov r0, sl <== NOT EXECUTED
30005c98: eb00031e bl 30006918 <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
30005c9c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
30005ca0: 1a000086 bne 30005ec0 <rtems_aio_handle+0x24c> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
30005ca4: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
30005ca8: e284300c add r3, r4, #12 <== NOT EXECUTED
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
30005cac: e1550003 cmp r5, r3 <== NOT EXECUTED
30005cb0: 0a000035 beq 30005d8c <rtems_aio_handle+0x118> <== NOT EXECUTED
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
30005cb4: eb000525 bl 30007150 <pthread_self> <== NOT EXECUTED
30005cb8: e28d1028 add r1, sp, #40 ; 0x28 <== NOT EXECUTED
30005cbc: e1a02009 mov r2, r9 <== NOT EXECUTED
30005cc0: eb000429 bl 30006d6c <pthread_getschedparam> <== NOT EXECUTED
param.sched_priority = req->priority;
30005cc4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
30005cc8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
pthread_setschedparam (pthread_self(), req->policy, ¶m);
30005ccc: eb00051f bl 30007150 <pthread_self> <== NOT EXECUTED
30005cd0: e1a02009 mov r2, r9 <== NOT EXECUTED
30005cd4: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
30005cd8: eb000521 bl 30007164 <pthread_setschedparam> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30005cdc: e1a00005 mov r0, r5 <== NOT EXECUTED
30005ce0: eb000924 bl 30008178 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
30005ce4: e1a0000a mov r0, sl <== NOT EXECUTED
30005ce8: eb000329 bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
switch (req->aiocbp->aio_lio_opcode) {
30005cec: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED
30005cf0: e592302c ldr r3, [r2, #44] ; 0x2c <== NOT EXECUTED
30005cf4: e3530002 cmp r3, #2 <== NOT EXECUTED
30005cf8: 0a00000b beq 30005d2c <rtems_aio_handle+0xb8> <== NOT EXECUTED
30005cfc: e3530003 cmp r3, #3 <== NOT EXECUTED
30005d00: 0a000011 beq 30005d4c <rtems_aio_handle+0xd8> <== NOT EXECUTED
30005d04: e3530001 cmp r3, #1 <== NOT EXECUTED
30005d08: 1a000013 bne 30005d5c <rtems_aio_handle+0xe8> <== NOT EXECUTED
case LIO_READ:
result = pread (req->aiocbp->aio_fildes,
30005d0c: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED
30005d10: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
30005d14: e58d1000 str r1, [sp] <== NOT EXECUTED
30005d18: e592100c ldr r1, [r2, #12] <== NOT EXECUTED
30005d1c: e5920000 ldr r0, [r2] <== NOT EXECUTED
30005d20: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED
30005d24: eb002911 bl 30010170 <pread> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
30005d28: ea000009 b 30005d54 <rtems_aio_handle+0xe0> <== NOT EXECUTED
case LIO_WRITE:
result = pwrite (req->aiocbp->aio_fildes,
30005d2c: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED
30005d30: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
30005d34: e58d1000 str r1, [sp] <== NOT EXECUTED
30005d38: e592100c ldr r1, [r2, #12] <== NOT EXECUTED
30005d3c: e5920000 ldr r0, [r2] <== NOT EXECUTED
30005d40: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED
30005d44: eb002951 bl 30010290 <pwrite> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
30005d48: ea000001 b 30005d54 <rtems_aio_handle+0xe0> <== NOT EXECUTED
case LIO_SYNC:
result = fsync (req->aiocbp->aio_fildes);
30005d4c: e5920000 ldr r0, [r2] <== NOT EXECUTED
30005d50: eb00195e bl 3000c2d0 <fsync> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
30005d54: e3700001 cmn r0, #1 <== NOT EXECUTED
30005d58: 1a000006 bne 30005d78 <rtems_aio_handle+0x104> <== NOT EXECUTED
req->aiocbp->return_value = -1;
30005d5c: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED
30005d60: e3e02000 mvn r2, #0 <== NOT EXECUTED
30005d64: e5852034 str r2, [r5, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = errno;
30005d68: eb0025fe bl 3000f568 <__errno> <== NOT EXECUTED
30005d6c: e5903000 ldr r3, [r0] <== NOT EXECUTED
30005d70: e5853030 str r3, [r5, #48] ; 0x30 <== NOT EXECUTED
30005d74: eaffffc5 b 30005c90 <rtems_aio_handle+0x1c> <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
30005d78: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
req->aiocbp->error_code = 0;
30005d7c: e3a02000 mov r2, #0 <== NOT EXECUTED
}
if (result == -1) {
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
30005d80: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = 0;
30005d84: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
30005d88: eaffffc0 b 30005c90 <rtems_aio_handle+0x1c> <== NOT EXECUTED
wait for a signal on chain, this will unlock the queue.
The fd chain is already unlocked */
struct timespec timeout;
pthread_mutex_unlock (&r_chain->mutex);
30005d8c: e1a0000a mov r0, sl <== NOT EXECUTED
30005d90: eb0002ff bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
30005d94: e59f0130 ldr r0, [pc, #304] ; 30005ecc <rtems_aio_handle+0x258><== NOT EXECUTED
30005d98: eb0002de bl 30006918 <pthread_mutex_lock> <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
30005d9c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
30005da0: e1530005 cmp r3, r5 <== NOT EXECUTED
30005da4: 1affffb9 bne 30005c90 <rtems_aio_handle+0x1c> <== NOT EXECUTED
{
clock_gettime (CLOCK_REALTIME, &timeout);
30005da8: e1a01007 mov r1, r7 <== NOT EXECUTED
30005dac: e3a00001 mov r0, #1 <== NOT EXECUTED
30005db0: eb000150 bl 300062f8 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
30005db4: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
30005db8: e2845020 add r5, r4, #32 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
30005dbc: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
30005dc0: e1a00005 mov r0, r5 <== NOT EXECUTED
30005dc4: e59f1100 ldr r1, [pc, #256] ; 30005ecc <rtems_aio_handle+0x258><== NOT EXECUTED
30005dc8: e1a02007 mov r2, r7 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
30005dcc: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
30005dd0: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&r_chain->cond,
30005dd4: eb0001dc bl 3000654c <pthread_cond_timedwait> <== NOT EXECUTED
&aio_request_queue.mutex, &timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
30005dd8: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
30005ddc: 1affffab bne 30005c90 <rtems_aio_handle+0x1c> <== NOT EXECUTED
30005de0: e1a00004 mov r0, r4 <== NOT EXECUTED
30005de4: eb0008e3 bl 30008178 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
30005de8: e1a0000a mov r0, sl <== NOT EXECUTED
30005dec: eb00022b bl 300066a0 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->cond);
30005df0: e1a00005 mov r0, r5 <== NOT EXECUTED
30005df4: eb00015d bl 30006370 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
30005df8: e1a00004 mov r0, r4 <== NOT EXECUTED
30005dfc: ebfff304 bl 30002a14 <free> <== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
30005e00: e5963054 ldr r3, [r6, #84] ; 0x54 <== NOT EXECUTED
30005e04: e153000b cmp r3, fp <== NOT EXECUTED
30005e08: 1a000029 bne 30005eb4 <rtems_aio_handle+0x240> <== NOT EXECUTED
++aio_request_queue.idle_threads;
30005e0c: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
30005e10: e1a01007 mov r1, r7 <== NOT EXECUTED
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
30005e14: e2833001 add r3, r3, #1 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
30005e18: e3a00001 mov r0, #1 <== NOT EXECUTED
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
30005e1c: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
30005e20: eb000134 bl 300062f8 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
30005e24: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
30005e28: e59f00a0 ldr r0, [pc, #160] ; 30005ed0 <rtems_aio_handle+0x25c><== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
30005e2c: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
30005e30: e59f1094 ldr r1, [pc, #148] ; 30005ecc <rtems_aio_handle+0x258><== NOT EXECUTED
30005e34: e1a02007 mov r2, r7 <== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
30005e38: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
30005e3c: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&aio_request_queue.new_req,
30005e40: eb0001c1 bl 3000654c <pthread_cond_timedwait> <== NOT EXECUTED
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
30005e44: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
30005e48: 1a000002 bne 30005e58 <rtems_aio_handle+0x1e4> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
30005e4c: e59f0078 ldr r0, [pc, #120] ; 30005ecc <rtems_aio_handle+0x258><== NOT EXECUTED
30005e50: eb0002cf bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
return NULL;
30005e54: ea000019 b 30005ec0 <rtems_aio_handle+0x24c> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
30005e58: e5965054 ldr r5, [r6, #84] ; 0x54 <== NOT EXECUTED
return NULL;
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
30005e5c: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED
30005e60: e1a00005 mov r0, r5 <== NOT EXECUTED
30005e64: e2433001 sub r3, r3, #1 <== NOT EXECUTED
30005e68: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED
30005e6c: eb0008c1 bl 30008178 <_Chain_Extract> <== NOT EXECUTED
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
30005e70: e3a02001 mov r2, #1 <== NOT EXECUTED
30005e74: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED
30005e78: e59f0054 ldr r0, [pc, #84] ; 30005ed4 <rtems_aio_handle+0x260><== NOT EXECUTED
30005e7c: ebffff52 bl 30005bcc <rtems_aio_search_fd> <== NOT EXECUTED
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
30005e80: e1a01008 mov r1, r8 <== NOT EXECUTED
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
30005e84: e1a04000 mov r4, r0 <== NOT EXECUTED
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
30005e88: e5808018 str r8, [r0, #24] <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
30005e8c: e280001c add r0, r0, #28 <== NOT EXECUTED
30005e90: eb00024e bl 300067d0 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
30005e94: e1a01008 mov r1, r8 <== NOT EXECUTED
30005e98: e2840020 add r0, r4, #32 <== NOT EXECUTED
30005e9c: eb000163 bl 30006430 <pthread_cond_init> <== NOT EXECUTED
r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd;
30005ea0: e2855008 add r5, r5, #8 <== NOT EXECUTED
30005ea4: e2843008 add r3, r4, #8 <== NOT EXECUTED
30005ea8: e8950007 ldm r5, {r0, r1, r2} <== NOT EXECUTED
30005eac: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED
30005eb0: eaffff76 b 30005c90 <rtems_aio_handle+0x1c> <== NOT EXECUTED
}
else
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
30005eb4: e59f0010 ldr r0, [pc, #16] ; 30005ecc <rtems_aio_handle+0x258><== NOT EXECUTED
30005eb8: eb0002b5 bl 30006994 <pthread_mutex_unlock> <== NOT EXECUTED
30005ebc: eaffff73 b 30005c90 <rtems_aio_handle+0x1c> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
30005ec0: e3a00000 mov r0, #0 <== NOT EXECUTED
30005ec4: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
30005ec8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30005b0c <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
30005b0c: e92d4010 push {r4, lr}
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
30005b10: e59f00a4 ldr r0, [pc, #164] ; 30005bbc <rtems_aio_init+0xb0>
30005b14: eb0003e0 bl 30006a9c <pthread_attr_init>
if (result != 0)
30005b18: e2504000 subs r4, r0, #0
30005b1c: 1a000024 bne 30005bb4 <rtems_aio_init+0xa8>
return result;
result =
30005b20: e59f0094 ldr r0, [pc, #148] ; 30005bbc <rtems_aio_init+0xb0>
30005b24: e1a01004 mov r1, r4
30005b28: eb0003ed bl 30006ae4 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
30005b2c: e3500000 cmp r0, #0
pthread_attr_destroy (&aio_request_queue.attr);
30005b30: 159f0084 ldrne r0, [pc, #132] ; 30005bbc <rtems_aio_init+0xb0>
30005b34: 1b0003cf blne 30006a78 <pthread_attr_destroy>
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
30005b38: e59f0080 ldr r0, [pc, #128] ; 30005bc0 <rtems_aio_init+0xb4>
30005b3c: e3a01000 mov r1, #0
30005b40: eb000322 bl 300067d0 <pthread_mutex_init>
if (result != 0)
30005b44: e3500000 cmp r0, #0
pthread_attr_destroy (&aio_request_queue.attr);
30005b48: 159f006c ldrne r0, [pc, #108] ; 30005bbc <rtems_aio_init+0xb0>
30005b4c: 1b0003c9 blne 30006a78 <pthread_attr_destroy>
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
30005b50: e59f006c ldr r0, [pc, #108] ; 30005bc4 <rtems_aio_init+0xb8>
30005b54: e3a01000 mov r1, #0
30005b58: eb000234 bl 30006430 <pthread_cond_init>
if (result != 0) {
30005b5c: e2504000 subs r4, r0, #0
30005b60: 0a000003 beq 30005b74 <rtems_aio_init+0x68>
pthread_mutex_destroy (&aio_request_queue.mutex);
30005b64: e59f0054 ldr r0, [pc, #84] ; 30005bc0 <rtems_aio_init+0xb4><== NOT EXECUTED
30005b68: eb0002cc bl 300066a0 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
30005b6c: e59f0048 ldr r0, [pc, #72] ; 30005bbc <rtems_aio_init+0xb0><== NOT EXECUTED
30005b70: eb0003c0 bl 30006a78 <pthread_attr_destroy> <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
30005b74: e59f3044 ldr r3, [pc, #68] ; 30005bc0 <rtems_aio_init+0xb4>
30005b78: e283204c add r2, r3, #76 ; 0x4c
head->previous = NULL;
tail->previous = head;
30005b7c: e2831048 add r1, r3, #72 ; 0x48
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
30005b80: e5832048 str r2, [r3, #72] ; 0x48
head->previous = NULL;
30005b84: e3a02000 mov r2, #0
30005b88: e583204c str r2, [r3, #76] ; 0x4c
tail->previous = head;
30005b8c: e5831050 str r1, [r3, #80] ; 0x50
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
30005b90: e5832058 str r2, [r3, #88] ; 0x58
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
30005b94: e2831058 add r1, r3, #88 ; 0x58
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
30005b98: e5832064 str r2, [r3, #100] ; 0x64
aio_request_queue.idle_threads = 0;
30005b9c: e5832068 str r2, [r3, #104] ; 0x68
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
30005ba0: e59f2020 ldr r2, [pc, #32] ; 30005bc8 <rtems_aio_init+0xbc>
30005ba4: e5831054 str r1, [r3, #84] ; 0x54
head->previous = NULL;
tail->previous = head;
30005ba8: e2831054 add r1, r3, #84 ; 0x54
30005bac: e583105c str r1, [r3, #92] ; 0x5c
30005bb0: e5832060 str r2, [r3, #96] ; 0x60
return result;
}
30005bb4: e1a00004 mov r0, r4
30005bb8: e8bd8010 pop {r4, pc}
30005ed8 <rtems_aio_insert_prio>:
30005ed8: e1a02000 mov r2, r0
30005edc: e4923004 ldr r3, [r2], #4
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
30005ee0: e1a0c001 mov ip, r1
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
30005ee4: e1530002 cmp r3, r2
30005ee8: 0a00000d beq 30005f24 <rtems_aio_insert_prio+0x4c>
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
30005eec: e5931014 ldr r1, [r3, #20]
while (req->aiocbp->aio_reqprio > prio &&
30005ef0: e59c0014 ldr r0, [ip, #20]
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
30005ef4: e5911014 ldr r1, [r1, #20]
while (req->aiocbp->aio_reqprio > prio &&
30005ef8: e5900014 ldr r0, [r0, #20]
30005efc: ea000002 b 30005f0c <rtems_aio_insert_prio+0x34>
}
AIO_printf ("Thread finished\n");
return NULL;
}
30005f00: e5933000 ldr r3, [r3] <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
30005f04: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED
30005f08: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
30005f0c: e1500001 cmp r0, r1
30005f10: da000001 ble 30005f1c <rtems_aio_insert_prio+0x44>
30005f14: e1530002 cmp r3, r2 <== NOT EXECUTED
30005f18: 1afffff8 bne 30005f00 <rtems_aio_insert_prio+0x28> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
30005f1c: e5930004 ldr r0, [r3, #4]
30005f20: e1a0100c mov r1, ip
30005f24: ea0008a8 b 300081cc <_Chain_Insert>
30005f28 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
30005f28: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
30005f2c: e280700c add r7, r0, #12 <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
30005f30: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
30005f34: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED
req->aiocbp->return_value = -1;
30005f38: e3e05000 mvn r5, #0 <== NOT EXECUTED
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
30005f3c: ea000006 b 30005f5c <rtems_aio_remove_fd+0x34> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30005f40: e1a00004 mov r0, r4 <== NOT EXECUTED
30005f44: eb00088b bl 30008178 <_Chain_Extract> <== NOT EXECUTED
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
30005f48: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
req->aiocbp->return_value = -1;
free (req);
30005f4c: e1a00004 mov r0, r4 <== NOT EXECUTED
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
30005f50: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED
req->aiocbp->return_value = -1;
30005f54: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED
free (req);
30005f58: ebfff2ad bl 30002a14 <free> <== NOT EXECUTED
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
30005f5c: e1540007 cmp r4, r7 <== NOT EXECUTED
30005f60: 1afffff6 bne 30005f40 <rtems_aio_remove_fd+0x18> <== NOT EXECUTED
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
}
}
30005f64: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
30005f68 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
30005f68: e92d4010 push {r4, lr} <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
30005f6c: e4904004 ldr r4, [r0], #4 <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
30005f70: ea000000 b 30005f78 <rtems_aio_remove_req+0x10> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
30005f74: e5944000 ldr r4, [r4] <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
30005f78: e1540000 cmp r4, r0 <== NOT EXECUTED
30005f7c: 0a00000d beq 30005fb8 <rtems_aio_remove_req+0x50> <== NOT EXECUTED
30005f80: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
30005f84: e1530001 cmp r3, r1 <== NOT EXECUTED
30005f88: 1afffff9 bne 30005f74 <rtems_aio_remove_req+0xc> <== NOT EXECUTED
30005f8c: e1a00004 mov r0, r4 <== NOT EXECUTED
30005f90: eb000878 bl 30008178 <_Chain_Extract> <== NOT EXECUTED
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
30005f94: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
30005f98: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED
30005f9c: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
current->aiocbp->return_value = -1;
30005fa0: e3e02000 mvn r2, #0 <== NOT EXECUTED
free (current);
30005fa4: e1a00004 mov r0, r4 <== NOT EXECUTED
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
30005fa8: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
free (current);
30005fac: ebfff298 bl 30002a14 <free> <== NOT EXECUTED
}
return AIO_CANCELED;
30005fb0: e3a00000 mov r0, #0 <== NOT EXECUTED
30005fb4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
30005fb8: e3a00001 mov r0, #1 <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
30005fbc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30002450 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30002450: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
30002454: e251a000 subs sl, r1, #0
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30002458: e24dd040 sub sp, sp, #64 ; 0x40
3000245c: e1a08000 mov r8, r0
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
30002460: 0a000055 beq 300025bc <rtems_cpu_usage_report_with_plugin+0x16c>
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
30002464: e28d5030 add r5, sp, #48 ; 0x30
30002468: e1a00005 mov r0, r5
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
3000246c: e28d4028 add r4, sp, #40 ; 0x28
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
30002470: eb00147f bl 30007674 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
30002474: e1a01005 mov r1, r5
30002478: e59f0144 ldr r0, [pc, #324] ; 300025c4 <rtems_cpu_usage_report_with_plugin+0x174>
3000247c: e1a02004 mov r2, r4
30002480: eb001d3b bl 30009974 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
30002484: e1a00008 mov r0, r8
30002488: e59f1138 ldr r1, [pc, #312] ; 300025c8 <rtems_cpu_usage_report_with_plugin+0x178>
3000248c: e1a0e00f mov lr, pc
30002490: e12fff1a bx sl
30002494: e59f5130 ldr r5, [pc, #304] ; 300025cc <rtems_cpu_usage_report_with_plugin+0x17c>
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
30002498: e28db008 add fp, sp, #8
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
3000249c: e5b53004 ldr r3, [r5, #4]!
300024a0: e5936004 ldr r6, [r3, #4]
if ( information ) {
300024a4: e3560000 cmp r6, #0
300024a8: 13a07001 movne r7, #1
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
300024ac: 128d9018 addne r9, sp, #24
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
300024b0: 1a000032 bne 30002580 <rtems_cpu_usage_report_with_plugin+0x130>
300024b4: ea000034 b 3000258c <rtems_cpu_usage_report_with_plugin+0x13c><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
300024b8: e596301c ldr r3, [r6, #28]
300024bc: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
300024c0: e3540000 cmp r4, #0
300024c4: 0a00002c beq 3000257c <rtems_cpu_usage_report_with_plugin+0x12c>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
300024c8: e3a0100d mov r1, #13
300024cc: e1a0200b mov r2, fp
300024d0: e5940008 ldr r0, [r4, #8]
300024d4: eb000fc5 bl 300063f0 <rtems_object_get_name>
(*print)(
300024d8: e5942008 ldr r2, [r4, #8]
300024dc: e1a0300b mov r3, fp
300024e0: e1a00008 mov r0, r8
300024e4: e59f10e4 ldr r1, [pc, #228] ; 300025d0 <rtems_cpu_usage_report_with_plugin+0x180>
300024e8: e1a0e00f mov lr, pc
300024ec: e12fff1a bx sl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
300024f0: e2843084 add r3, r4, #132 ; 0x84
300024f4: e893000c ldm r3, {r2, r3}
300024f8: e58d2020 str r2, [sp, #32]
300024fc: e58d3024 str r3, [sp, #36] ; 0x24
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
30002500: e59f20cc ldr r2, [pc, #204] ; 300025d4 <rtems_cpu_usage_report_with_plugin+0x184>
30002504: e5923004 ldr r3, [r2, #4]
30002508: e5932008 ldr r2, [r3, #8]
3000250c: e5943008 ldr r3, [r4, #8]
30002510: e1520003 cmp r2, r3
30002514: 1a000006 bne 30002534 <rtems_cpu_usage_report_with_plugin+0xe4>
Timestamp_Control used;
_Timestamp_Subtract(
30002518: e59f00b8 ldr r0, [pc, #184] ; 300025d8 <rtems_cpu_usage_report_with_plugin+0x188>
3000251c: e28d1030 add r1, sp, #48 ; 0x30
30002520: e1a02009 mov r2, r9
30002524: eb001d12 bl 30009974 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
30002528: e28d0020 add r0, sp, #32
3000252c: e1a01009 mov r1, r9
30002530: eb001cd4 bl 30009888 <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
30002534: e28d203c add r2, sp, #60 ; 0x3c
30002538: e28d3038 add r3, sp, #56 ; 0x38
3000253c: e28d0020 add r0, sp, #32
30002540: e28d1028 add r1, sp, #40 ; 0x28
30002544: eb001ce7 bl 300098e8 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
30002548: e3a01ffa mov r1, #1000 ; 0x3e8
3000254c: e59d0024 ldr r0, [sp, #36] ; 0x24
30002550: eb0054ef bl 30017914 <__aeabi_uidiv>
30002554: e59d203c ldr r2, [sp, #60] ; 0x3c
30002558: e1a03000 mov r3, r0
3000255c: e58d2000 str r2, [sp]
30002560: e59d2038 ldr r2, [sp, #56] ; 0x38
30002564: e1a00008 mov r0, r8
30002568: e58d2004 str r2, [sp, #4]
3000256c: e59f1068 ldr r1, [pc, #104] ; 300025dc <rtems_cpu_usage_report_with_plugin+0x18c>
30002570: e59d2020 ldr r2, [sp, #32]
30002574: e1a0e00f mov lr, pc
30002578: e12fff1a bx sl
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
3000257c: e2877001 add r7, r7, #1
30002580: e1d631b0 ldrh r3, [r6, #16]
30002584: e1570003 cmp r7, r3
30002588: 9affffca bls 300024b8 <rtems_cpu_usage_report_with_plugin+0x68>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
3000258c: e59f304c ldr r3, [pc, #76] ; 300025e0 <rtems_cpu_usage_report_with_plugin+0x190>
30002590: e1550003 cmp r5, r3
30002594: 1affffc0 bne 3000249c <rtems_cpu_usage_report_with_plugin+0x4c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
30002598: e3a01ffa mov r1, #1000 ; 0x3e8
3000259c: e59d002c ldr r0, [sp, #44] ; 0x2c
300025a0: eb0054db bl 30017914 <__aeabi_uidiv>
300025a4: e59f1038 ldr r1, [pc, #56] ; 300025e4 <rtems_cpu_usage_report_with_plugin+0x194>
300025a8: e1a03000 mov r3, r0
300025ac: e59d2028 ldr r2, [sp, #40] ; 0x28
300025b0: e1a00008 mov r0, r8
300025b4: e1a0e00f mov lr, pc
300025b8: e12fff1a bx sl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
300025bc: e28dd040 add sp, sp, #64 ; 0x40
300025c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30001b64 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
30001b64: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001b68: e59f60e0 ldr r6, [pc, #224] ; 30001c50 <rtems_filesystem_initialize+0xec>
30001b6c: e3a02012 mov r2, #18
30001b70: e5963000 ldr r3, [r6]
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
30001b74: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001b78: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001b7c: e59f30d0 ldr r3, [pc, #208] ; 30001c54 <rtems_filesystem_initialize+0xf0>
30001b80: e5933000 ldr r3, [r3]
30001b84: e3530000 cmp r3, #0
rtems_fatal_error_occurred( 0xABCD0001 );
30001b88: 059f00c8 ldreq r0, [pc, #200] ; 30001c58 <rtems_filesystem_initialize+0xf4>
rtems_filesystem_umask = 022;
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001b8c: 0a00000a beq 30001bbc <rtems_filesystem_initialize+0x58>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001b90: e59f30c4 ldr r3, [pc, #196] ; 30001c5c <rtems_filesystem_initialize+0xf8>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001b94: e3a05000 mov r5, #0
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001b98: e5933000 ldr r3, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001b9c: e58d5000 str r5, [sp]
30001ba0: e5930008 ldr r0, [r3, #8]
30001ba4: e593100c ldr r1, [r3, #12]
30001ba8: e893000c ldm r3, {r2, r3}
30001bac: eb0001f1 bl 30002378 <mount>
if ( status == -1 )
30001bb0: e3700001 cmn r0, #1
30001bb4: 1a000001 bne 30001bc0 <rtems_filesystem_initialize+0x5c>
rtems_fatal_error_occurred( 0xABCD0002 );
30001bb8: e59f00a0 ldr r0, [pc, #160] ; 30001c60 <rtems_filesystem_initialize+0xfc><== NOT EXECUTED
30001bbc: eb000ea0 bl 30005644 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
30001bc0: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001bc4: e28d4004 add r4, sp, #4
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;
30001bc8: e1c353b0 strh r5, [r3, #48] ; 0x30
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001bcc: e3a01001 mov r1, #1
30001bd0: e1a03004 mov r3, r4
30001bd4: e1a02005 mov r2, r5
30001bd8: e59f0084 ldr r0, [pc, #132] ; 30001c64 <rtems_filesystem_initialize+0x100>
30001bdc: e58d5000 str r5, [sp]
30001be0: eb000052 bl 30001d30 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30001be4: e596c000 ldr ip, [r6]
30001be8: e1a07004 mov r7, r4
30001bec: e28cc018 add ip, ip, #24
30001bf0: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001bf4: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001bf8: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001bfc: e3a01001 mov r1, #1
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
30001c00: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001c04: e1a02005 mov r2, r5
30001c08: e1a03004 mov r3, r4
30001c0c: e59f0050 ldr r0, [pc, #80] ; 30001c64 <rtems_filesystem_initialize+0x100>
30001c10: e58d5000 str r5, [sp]
30001c14: eb000045 bl 30001d30 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30001c18: e8b4000f ldm r4!, {r0, r1, r2, r3}
30001c1c: e596c000 ldr ip, [r6]
30001c20: e28cc004 add ip, ip, #4
30001c24: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001c28: e5973000 ldr r3, [r7]
*
* 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);
30001c2c: e59f0034 ldr r0, [pc, #52] ; 30001c68 <rtems_filesystem_initialize+0x104>
/* 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;
30001c30: e58c3000 str r3, [ip]
*
* 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);
30001c34: e59f1030 ldr r1, [pc, #48] ; 30001c6c <rtems_filesystem_initialize+0x108>
30001c38: eb00017c bl 30002230 <mkdir>
if ( status != 0 )
30001c3c: e3500000 cmp r0, #0
rtems_fatal_error_occurred( 0xABCD0003 );
30001c40: 159f0028 ldrne r0, [pc, #40] ; 30001c70 <rtems_filesystem_initialize+0x10c>
* 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);
if ( status != 0 )
30001c44: 1affffdc bne 30001bbc <rtems_filesystem_initialize+0x58>
* 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.
*/
}
30001c48: e28dd018 add sp, sp, #24
30001c4c: e8bd80f0 pop {r4, r5, r6, r7, pc}
300028e4 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
300028e4: e92d4070 push {r4, r5, r6, lr}
300028e8: e1a06000 mov r6, r0
* 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 ) );
300028ec: e3a00008 mov r0, #8
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
300028f0: e1a05001 mov r5, r1
* 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 ) );
300028f4: eb0000fa bl 30002ce4 <malloc>
300028f8: e1a04000 mov r4, r0
*key = new_key;
300028fc: e5860000 str r0, [r6]
"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 );
30002900: e1a01004 mov r1, r4
* 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;
30002904: e3a00000 mov r0, #0
"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 );
30002908: e1a02005 mov r2, r5
* 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;
3000290c: e8840021 stm r4, {r0, r5}
"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 );
30002910: eb000e07 bl 30006134 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
30002914: e3500000 cmp r0, #0
30002918: 08bd8070 popeq {r4, r5, r6, pc}
return 0;
free( new_key );
3000291c: e1a00004 mov r0, r4 <== NOT EXECUTED
30002920: ebffff95 bl 3000277c <free> <== NOT EXECUTED
return -1;
30002924: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
30002928: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
3000971c <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
3000971c: e2003006 and r3, r0, #6
30009720: e3530006 cmp r3, #6
fcntl_flags |= O_RDWR;
30009724: 03a03002 moveq r3, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
30009728: 0a000005 beq 30009744 <rtems_libio_to_fcntl_flags+0x28>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
3000972c: e3100002 tst r0, #2
fcntl_flags |= O_RDONLY;
30009730: 13a03000 movne r3, #0
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
30009734: 1a000002 bne 30009744 <rtems_libio_to_fcntl_flags+0x28>
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
30009738: e3100004 tst r0, #4 <== NOT EXECUTED
3000973c: 03a03000 moveq r3, #0 <== NOT EXECUTED
30009740: 13a03001 movne r3, #1 <== NOT EXECUTED
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
30009744: e3100001 tst r0, #1
fcntl_flags |= O_NONBLOCK;
30009748: 13833901 orrne r3, r3, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
3000974c: e3100c02 tst r0, #512 ; 0x200
fcntl_flags |= O_APPEND;
30009750: 13833008 orrne r3, r3, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
30009754: e3100b01 tst r0, #1024 ; 0x400
fcntl_flags |= O_CREAT;
30009758: 13833c02 orrne r3, r3, #512 ; 0x200
}
return fcntl_flags;
}
3000975c: e1a00003 mov r0, r3
30009760: e12fff1e bx lr
30001ff4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
30001ff4: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
30001ff8: e59f3078 ldr r3, [pc, #120] ; 30002078 <rtems_stack_checker_is_blown+0x84>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
30001ffc: e28db008 add fp, sp, #8
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
30002000: e5933004 ldr r3, [r3, #4]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30002004: e59300bc ldr r0, [r3, #188] ; 0xbc
30002008: e15b0000 cmp fp, r0
return false;
3000200c: 33a04000 movcc r4, #0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30002010: 3a000004 bcc 30002028 <rtems_stack_checker_is_blown+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
30002014: e59340b8 ldr r4, [r3, #184] ; 0xb8
30002018: e0804004 add r4, r0, r4
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
3000201c: e15b0004 cmp fp, r4
30002020: 83a04000 movhi r4, #0
30002024: 93a04001 movls r4, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
30002028: e59f304c ldr r3, [pc, #76] ; 3000207c <rtems_stack_checker_is_blown+0x88>
3000202c: e5933008 ldr r3, [r3, #8]
30002030: e3530000 cmp r3, #0
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
30002034: 03a01001 moveq r1, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
30002038: 0a000005 beq 30002054 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
3000203c: e59f103c ldr r1, [pc, #60] ; 30002080 <rtems_stack_checker_is_blown+0x8c>
30002040: e2800008 add r0, r0, #8
30002044: e3a02010 mov r2, #16
30002048: eb003774 bl 3000fe20 <memcmp>
3000204c: e2701001 rsbs r1, r0, #1
30002050: 33a01000 movcc r1, #0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
30002054: e3540000 cmp r4, #0
30002058: 0a000001 beq 30002064 <rtems_stack_checker_is_blown+0x70>
3000205c: e3510000 cmp r1, #0
30002060: 1a000002 bne 30002070 <rtems_stack_checker_is_blown+0x7c>
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
30002064: e59f300c ldr r3, [pc, #12] ; 30002078 <rtems_stack_checker_is_blown+0x84><== NOT EXECUTED
30002068: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
3000206c: ebffff9d bl 30001ee8 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
30002070: e3a00000 mov r0, #0
30002074: e8bd8810 pop {r4, fp, pc}
300020e4 <rtems_stack_checker_report_usage>:
}
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
300020e4: e59f1004 ldr r1, [pc, #4] ; 300020f0 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
300020e8: e3a00000 mov r0, #0 <== NOT EXECUTED
300020ec: eaffffe4 b 30002084 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
30002084 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30002084: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if ( !print )
30002088: e2515000 subs r5, r1, #0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
3000208c: e1a06000 mov r6, r0 <== NOT EXECUTED
if ( !print )
30002090: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return;
print_context = context;
30002094: e59f4038 ldr r4, [pc, #56] ; 300020d4 <rtems_stack_checker_report_usage_with_plugin+0x50><== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
30002098: e59f1038 ldr r1, [pc, #56] ; 300020d8 <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
3000209c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
print_handler = print;
300020a0: e5845000 str r5, [r4] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
300020a4: e1a0e00f mov lr, pc <== NOT EXECUTED
300020a8: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
300020ac: e59f1028 ldr r1, [pc, #40] ; 300020dc <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
300020b0: e1a00006 mov r0, r6 <== NOT EXECUTED
300020b4: e1a0e00f mov lr, pc <== NOT EXECUTED
300020b8: e12fff15 bx r5 <== 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 );
300020bc: e59f001c ldr r0, [pc, #28] ; 300020e0 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
300020c0: eb001a85 bl 30008adc <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);
#endif
print_context = NULL;
300020c4: e3a03000 mov r3, #0 <== NOT EXECUTED
300020c8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
print_handler = NULL;
300020cc: e5843000 str r3, [r4] <== NOT EXECUTED
300020d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
30001f90 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001f90: e92d4830 push {r4, r5, fp, lr}
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);
30001f94: e59030bc ldr r3, [r0, #188] ; 0xbc
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001f98: e28db00c add fp, sp, #12
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001f9c: e15b0003 cmp fp, r3
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001fa0: e1a04000 mov r4, r0
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
30001fa4: 33a05000 movcc r5, #0
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);
30001fa8: e2830008 add r0, r3, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001fac: 3a000004 bcc 30001fc4 <rtems_stack_checker_switch_extension+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
30001fb0: e59450b8 ldr r5, [r4, #184] ; 0xb8
30001fb4: e0835005 add r5, r3, r5
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
30001fb8: e15b0005 cmp fp, r5
30001fbc: 83a05000 movhi r5, #0
30001fc0: 93a05001 movls r5, #1
/*
* 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,
30001fc4: e59f1024 ldr r1, [pc, #36] ; 30001ff0 <rtems_stack_checker_switch_extension+0x60>
30001fc8: e3a02010 mov r2, #16
30001fcc: eb003793 bl 3000fe20 <memcmp>
30001fd0: e2701001 rsbs r1, r0, #1
30001fd4: 33a01000 movcc r1, #0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
30001fd8: e3550000 cmp r5, #0
30001fdc: 0a000001 beq 30001fe8 <rtems_stack_checker_switch_extension+0x58>
30001fe0: e3510000 cmp r1, #0
30001fe4: 18bd8830 popne {r4, r5, fp, pc}
Stack_check_report_blown_task( running, pattern_ok );
30001fe8: e1a00004 mov r0, r4 <== NOT EXECUTED
30001fec: ebffffbd bl 30001ee8 <Stack_check_report_blown_task> <== NOT EXECUTED
3000b694 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000b694: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000b698: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000b69c: e1a05000 mov r5, r0
3000b6a0: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
3000b6a4: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000b6a8: 0a000018 beq 3000b710 <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000b6ac: eb000adb bl 3000e220 <__errno>
3000b6b0: e3a03000 mov r3, #0
3000b6b4: e5803000 str r3, [r0]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000b6b8: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
3000b6bc: e5843000 str r3, [r4]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000b6c0: e1a00005 mov r0, r5
3000b6c4: e3a02010 mov r2, #16
3000b6c8: eb001803 bl 300116dc <strtoul>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
3000b6cc: e3560000 cmp r6, #0
*endptr = end;
3000b6d0: 159d3000 ldrne r3, [sp]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000b6d4: e1a07000 mov r7, r0
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
3000b6d8: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
3000b6dc: e59d3000 ldr r3, [sp]
3000b6e0: e1530005 cmp r3, r5
return RTEMS_NOT_DEFINED;
3000b6e4: 03a0000b moveq r0, #11
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
3000b6e8: 0a000008 beq 3000b710 <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000b6ec: e3770001 cmn r7, #1
3000b6f0: 1a000004 bne 3000b708 <rtems_string_to_pointer+0x74>
3000b6f4: eb000ac9 bl 3000e220 <__errno> <== NOT EXECUTED
3000b6f8: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000b6fc: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
3000b700: 03a0000a moveq r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000b704: 0a000001 beq 3000b710 <rtems_string_to_pointer+0x7c> <== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
3000b708: e5847000 str r7, [r4]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
3000b70c: e3a00000 mov r0, #0
}
3000b710: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
30001bc8 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
30001bc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30001bcc: e24ddf6b sub sp, sp, #428 ; 0x1ac
30001bd0: e58d1010 str r1, [sp, #16]
30001bd4: e58d2018 str r2, [sp, #24]
30001bd8: e58d000c str r0, [sp, #12]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
30001bdc: eb003fd6 bl 30011b3c <strlen>
30001be0: e3a02000 mov r2, #0
30001be4: e1a01000 mov r1, r0
30001be8: e28d3f65 add r3, sp, #404 ; 0x194
30001bec: e59d000c ldr r0, [sp, #12]
30001bf0: e58d2000 str r2, [sp]
30001bf4: eb00029b bl 30002668 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001bf8: e2504000 subs r4, r0, #0
30001bfc: 1a00006c bne 30001db4 <rtems_tarfs_load+0x1ec>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
30001c00: e59d31a0 ldr r3, [sp, #416] ; 0x1a0
30001c04: e59f21c0 ldr r2, [pc, #448] ; 30001dcc <rtems_tarfs_load+0x204>
30001c08: e1530002 cmp r3, r2
30001c0c: 0a000005 beq 30001c28 <rtems_tarfs_load+0x60>
30001c10: e59f21b8 ldr r2, [pc, #440] ; 30001dd0 <rtems_tarfs_load+0x208>
30001c14: e1530002 cmp r3, r2
30001c18: 1a000065 bne 30001db4 <rtems_tarfs_load+0x1ec>
30001c1c: ea000001 b 30001c28 <rtems_tarfs_load+0x60> <== NOT EXECUTED
30001c20: e1a08004 mov r8, r4
30001c24: ea000006 b 30001c44 <rtems_tarfs_load+0x7c>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c28: e28d2f65 add r2, sp, #404 ; 0x194
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
30001c2c: e1a08004 mov r8, r4
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001c30: e28d7f47 add r7, sp, #284 ; 0x11c
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c34: e28d9d06 add r9, sp, #384 ; 0x180
30001c38: e58d2004 str r2, [sp, #4]
* - 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);
30001c3c: e28d501c add r5, sp, #28
30001c40: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001c44: e59d3018 ldr r3, [sp, #24]
30001c48: e2884c02 add r4, r8, #512 ; 0x200
30001c4c: e1540003 cmp r4, r3
30001c50: 8a000059 bhi 30001dbc <rtems_tarfs_load+0x1f4>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001c54: e59de010 ldr lr, [sp, #16]
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
30001c58: e59f1174 ldr r1, [pc, #372] ; 30001dd4 <rtems_tarfs_load+0x20c>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001c5c: e08e8008 add r8, lr, r8
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
30001c60: e2880c01 add r0, r8, #256 ; 0x100
30001c64: e2800001 add r0, r0, #1
30001c68: e3a02005 mov r2, #5
30001c6c: eb003fca bl 30011b9c <strncmp>
30001c70: e2506000 subs r6, r0, #0
30001c74: 1a000050 bne 30001dbc <rtems_tarfs_load+0x1f4>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001c78: e3a02063 mov r2, #99 ; 0x63
30001c7c: e1a01008 mov r1, r8
30001c80: e1a00007 mov r0, r7
30001c84: eb004020 bl 30011d0c <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
30001c88: e5cd617f strb r6, [sp, #383] ; 0x17f
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001c8c: e3a01008 mov r1, #8
30001c90: e2880064 add r0, r8, #100 ; 0x64
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
30001c94: e5d8609c ldrb r6, [r8, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001c98: eb001dff bl 3000949c <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001c9c: e3a0100c mov r1, #12
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);
30001ca0: e58d0014 str r0, [sp, #20]
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001ca4: e288007c add r0, r8, #124 ; 0x7c
30001ca8: eb001dfb bl 3000949c <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001cac: e3a01008 mov r1, #8
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);
30001cb0: e1a0b000 mov fp, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001cb4: e2880094 add r0, r8, #148 ; 0x94
30001cb8: eb001df7 bl 3000949c <_rtems_octal2ulong>
30001cbc: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
30001cc0: e1a00008 mov r0, r8
30001cc4: e58d3008 str r3, [sp, #8]
30001cc8: eb001e01 bl 300094d4 <_rtems_tar_header_checksum>
30001ccc: e59d3008 ldr r3, [sp, #8]
30001cd0: e1500003 cmp r0, r3
30001cd4: 1a000038 bne 30001dbc <rtems_tarfs_load+0x1f4>
* 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) {
30001cd8: e3560035 cmp r6, #53 ; 0x35
30001cdc: 1a000012 bne 30001d2c <rtems_tarfs_load+0x164>
strcpy(full_filename, mountpoint);
30001ce0: e59d100c ldr r1, [sp, #12]
30001ce4: e1a00005 mov r0, r5
30001ce8: eb003dcf bl 3001142c <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
30001cec: e1a00005 mov r0, r5
30001cf0: eb003f91 bl 30011b3c <strlen>
30001cf4: e28d2f6b add r2, sp, #428 ; 0x1ac
30001cf8: e0820000 add r0, r2, r0
30001cfc: e5503191 ldrb r3, [r0, #-401] ; 0x191
30001d00: e353002f cmp r3, #47 ; 0x2f
strcat(full_filename, "/");
30001d04: 11a00005 movne r0, r5
30001d08: 159f10c8 ldrne r1, [pc, #200] ; 30001dd8 <rtems_tarfs_load+0x210>
30001d0c: 1b003d0f blne 30011150 <strcat>
strcat(full_filename, filename);
30001d10: e1a01007 mov r1, r7
30001d14: e1a00005 mov r0, r5
30001d18: eb003d0c bl 30011150 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
30001d1c: e1a00005 mov r0, r5
30001d20: e59f10b4 ldr r1, [pc, #180] ; 30001ddc <rtems_tarfs_load+0x214>
30001d24: eb000464 bl 30002ebc <mkdir>
30001d28: eaffffbc b 30001c20 <rtems_tarfs_load+0x58>
* 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) {
30001d2c: e3560030 cmp r6, #48 ; 0x30
30001d30: 1affffba bne 30001c20 <rtems_tarfs_load+0x58>
const char *name;
loc = root_loc;
30001d34: e59dc004 ldr ip, [sp, #4]
30001d38: e1a0e009 mov lr, r9
30001d3c: e8bc000f ldm ip!, {r0, r1, r2, r3}
30001d40: e8ae000f stmia lr!, {r0, r1, r2, r3}
30001d44: e59c2000 ldr r2, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001d48: e1a00007 mov r0, r7
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001d4c: e58e2000 str r2, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001d50: e1a01009 mov r1, r9
30001d54: e28d2f6a add r2, sp, #424 ; 0x1a8
30001d58: eb0020c3 bl 3000a06c <IMFS_evaluate_for_make>
30001d5c: e2506000 subs r6, r0, #0
30001d60: 1a00000d bne 30001d9c <rtems_tarfs_load+0x1d4>
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001d64: e59d2014 ldr r2, [sp, #20]
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
30001d68: e1a00009 mov r0, r9
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001d6c: e1a03b82 lsl r3, r2, #23
30001d70: e1a03ba3 lsr r3, r3, #23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
30001d74: e59d21a8 ldr r2, [sp, #424] ; 0x1a8
30001d78: e3833902 orr r3, r3, #32768 ; 0x8000
30001d7c: e3a01006 mov r1, #6
30001d80: e58d6000 str r6, [sp]
30001d84: eb001f2c bl 30009a3c <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];
30001d88: e59d2010 ldr r2, [sp, #16]
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001d8c: e580b050 str fp, [r0, #80] ; 0x50
node->info.linearfile.direct = &tar_image[offset];
30001d90: e0823004 add r3, r2, r4
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001d94: e5806054 str r6, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
30001d98: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001d9c: e28bbf7f add fp, fp, #508 ; 0x1fc
30001da0: e28bb003 add fp, fp, #3
offset += 512 * nblocks;
30001da4: e3cbbf7f bic fp, fp, #508 ; 0x1fc
30001da8: e3cbb003 bic fp, fp, #3
30001dac: e08b4004 add r4, fp, r4
30001db0: eaffff9a b 30001c20 <rtems_tarfs_load+0x58>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
30001db4: e3e04000 mvn r4, #0
30001db8: ea000000 b 30001dc0 <rtems_tarfs_load+0x1f8>
30001dbc: e1a0400a mov r4, sl
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
30001dc0: e1a00004 mov r0, r4
30001dc4: e28ddf6b add sp, sp, #428 ; 0x1ac
30001dc8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000c768 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000c768: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
3000c76c: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000c770: e1a04000 mov r4, r0
3000c774: e1a05001 mov r5, r1
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
3000c778: 03a00009 moveq r0, #9
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
3000c77c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
3000c780: e59f313c ldr r3, [pc, #316] ; 3000c8c4 <rtems_task_mode+0x15c>
3000c784: e5937004 ldr r7, [r3, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
3000c788: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
3000c78c: e59760f8 ldr r6, [r7, #248] ; 0xf8
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
3000c790: e597307c ldr r3, [r7, #124] ; 0x7c
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
3000c794: e3580000 cmp r8, #0
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;
3000c798: e5d69008 ldrb r9, [r6, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
3000c79c: 03a08c01 moveq r8, #256 ; 0x100
3000c7a0: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
3000c7a4: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
3000c7a8: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
3000c7ac: e3590000 cmp r9, #0
3000c7b0: 03a09b01 moveq r9, #1024 ; 0x400
3000c7b4: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
3000c7b8: ebffefe3 bl 3000874c <_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;
3000c7bc: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
3000c7c0: e1898008 orr r8, r9, r8
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000c7c4: e3150c01 tst r5, #256 ; 0x100
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
3000c7c8: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000c7cc: 0a000003 beq 3000c7e0 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
3000c7d0: e3140c01 tst r4, #256 ; 0x100
3000c7d4: 13a03000 movne r3, #0
3000c7d8: 03a03001 moveq r3, #1
3000c7dc: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
3000c7e0: e3150c02 tst r5, #512 ; 0x200
3000c7e4: 0a000006 beq 3000c804 <rtems_task_mode+0x9c>
if ( _Modes_Is_timeslice(mode_set) ) {
3000c7e8: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
3000c7ec: 13a03001 movne r3, #1
3000c7f0: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
3000c7f4: 159f30cc ldrne r3, [pc, #204] ; 3000c8c8 <rtems_task_mode+0x160>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
3000c7f8: 0587307c streq r3, [r7, #124] ; 0x7c
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;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
3000c7fc: 15933000 ldrne r3, [r3]
3000c800: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
3000c804: e3150080 tst r5, #128 ; 0x80
3000c808: 0a000001 beq 3000c814 <rtems_task_mode+0xac>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
3000c80c: e2040080 and r0, r4, #128 ; 0x80
3000c810: ebffefc8 bl 30008738 <_CPU_ISR_Set_level>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
3000c814: e2150b01 ands r0, r5, #1024 ; 0x400
3000c818: 0a000013 beq 3000c86c <rtems_task_mode+0x104>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000c81c: e3140b01 tst r4, #1024 ; 0x400
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 ) {
3000c820: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000c824: 13a03000 movne r3, #0
3000c828: 03a03001 moveq r3, #1
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 ) {
3000c82c: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000c830: 03a00000 moveq r0, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
3000c834: 0a00000c beq 3000c86c <rtems_task_mode+0x104>
asr->is_enabled = is_asr_enabled;
3000c838: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000c83c: e10f3000 mrs r3, CPSR
3000c840: e3832080 orr r2, r3, #128 ; 0x80
3000c844: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
3000c848: e5962018 ldr r2, [r6, #24]
information->signals_pending = information->signals_posted;
3000c84c: e5961014 ldr r1, [r6, #20]
information->signals_posted = _signals;
3000c850: e5862014 str r2, [r6, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
3000c854: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000c858: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
3000c85c: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000c860: e3500000 cmp r0, #0
3000c864: 13a00001 movne r0, #1
3000c868: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
3000c86c: e59f3058 ldr r3, [pc, #88] ; 3000c8cc <rtems_task_mode+0x164>
3000c870: e5933000 ldr r3, [r3]
3000c874: e3530003 cmp r3, #3
3000c878: 1a00000f bne 3000c8bc <rtems_task_mode+0x154>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
3000c87c: e59f2040 ldr r2, [pc, #64] ; 3000c8c4 <rtems_task_mode+0x15c>
if ( are_signals_pending ||
3000c880: e3500000 cmp r0, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
3000c884: e5923004 ldr r3, [r2, #4]
if ( are_signals_pending ||
3000c888: 1a000005 bne 3000c8a4 <rtems_task_mode+0x13c>
3000c88c: e5922008 ldr r2, [r2, #8]
3000c890: e1530002 cmp r3, r2
3000c894: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
3000c898: e5d33074 ldrb r3, [r3, #116] ; 0x74
3000c89c: e3530000 cmp r3, #0
3000c8a0: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
_Thread_Dispatch_necessary = true;
3000c8a4: e59f3018 ldr r3, [pc, #24] ; 3000c8c4 <rtems_task_mode+0x15c>
3000c8a8: e3a02001 mov r2, #1
3000c8ac: e5c32010 strb r2, [r3, #16]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
3000c8b0: ebffea22 bl 30007140 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
3000c8b4: e3a00000 mov r0, #0
3000c8b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000c8bc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000c8c0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
30003118 <rtems_termios_close>:
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003118: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000311c: e92d4030 push {r4, r5, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003120: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
30003124: e59f317c ldr r3, [pc, #380] ; 300032a8 <rtems_termios_close+0x190>
30003128: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000312c: e1a05000 mov r5, r0
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
30003130: e1a02001 mov r2, r1
30003134: e5930000 ldr r0, [r3]
30003138: eb0007a5 bl 30004fd4 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3000313c: e3500000 cmp r0, #0
30003140: 1a000024 bne 300031d8 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
30003144: e5943008 ldr r3, [r4, #8]
30003148: e2433001 sub r3, r3, #1
3000314c: e3530000 cmp r3, #0
30003150: e5843008 str r3, [r4, #8]
30003154: 1a00004e bne 30003294 <rtems_termios_close+0x17c>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
30003158: e59420cc ldr r2, [r4, #204] ; 0xcc
3000315c: e59f3148 ldr r3, [pc, #328] ; 300032ac <rtems_termios_close+0x194>
30003160: e0833282 add r3, r3, r2, lsl #5
30003164: e5931004 ldr r1, [r3, #4]
30003168: e3510000 cmp r1, #0
3000316c: 0a000003 beq 30003180 <rtems_termios_close+0x68>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30003170: e1a00004 mov r0, r4
30003174: e1a0e00f mov lr, pc
30003178: e12fff11 bx r1
3000317c: ea000008 b 300031a4 <rtems_termios_close+0x8c>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003180: e5940018 ldr r0, [r4, #24]
30003184: e1a02001 mov r2, r1
30003188: eb000791 bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3000318c: e3500000 cmp r0, #0
30003190: 1a000010 bne 300031d8 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
30003194: e1a00004 mov r0, r4
30003198: ebfffeb2 bl 30002c68 <drainOutput>
rtems_semaphore_release (tty->osem);
3000319c: e5940018 ldr r0, [r4, #24]
300031a0: eb0007d1 bl 300050ec <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300031a4: e59430b4 ldr r3, [r4, #180] ; 0xb4
300031a8: e3530002 cmp r3, #2
300031ac: 1a00000a bne 300031dc <rtems_termios_close+0xc4>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
300031b0: e59400c4 ldr r0, [r4, #196] ; 0xc4
300031b4: e3a01001 mov r1, #1
300031b8: eb000673 bl 30004b8c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
300031bc: e3500000 cmp r0, #0
300031c0: 1a000004 bne 300031d8 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
300031c4: e59400c8 ldr r0, [r4, #200] ; 0xc8
300031c8: e3a01001 mov r1, #1
300031cc: eb00066e bl 30004b8c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
300031d0: e3500000 cmp r0, #0
300031d4: 0a000000 beq 300031dc <rtems_termios_close+0xc4>
rtems_fatal_error_occurred (sc);
300031d8: eb000919 bl 30005644 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
300031dc: e594309c ldr r3, [r4, #156] ; 0x9c
300031e0: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
300031e4: 1594000c ldrne r0, [r4, #12]
300031e8: 15941010 ldrne r1, [r4, #16]
300031ec: 11a02005 movne r2, r5
300031f0: 11a0e00f movne lr, pc
300031f4: 112fff13 bxne r3
if (tty->forw == NULL) {
300031f8: e894000c ldm r4, {r2, r3}
300031fc: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
30003200: 15823004 strne r3, [r2, #4]
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
30003204: 1a000003 bne 30003218 <rtems_termios_close+0x100>
rtems_termios_ttyTail = tty->back;
30003208: e59f10a0 ldr r1, [pc, #160] ; 300032b0 <rtems_termios_close+0x198>
if ( rtems_termios_ttyTail != NULL ) {
3000320c: e3530000 cmp r3, #0
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;
30003210: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
30003214: 15832000 strne r2, [r3]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
30003218: e5942004 ldr r2, [r4, #4]
3000321c: e5943000 ldr r3, [r4]
30003220: e3520000 cmp r2, #0
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
30003224: 15823000 strne r3, [r2]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
30003228: 1a000003 bne 3000323c <rtems_termios_close+0x124>
rtems_termios_ttyHead = tty->forw;
3000322c: e59f1080 ldr r1, [pc, #128] ; 300032b4 <rtems_termios_close+0x19c>
if ( rtems_termios_ttyHead != NULL ) {
30003230: e3530000 cmp r3, #0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
30003234: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
30003238: 15832004 strne r2, [r3, #4]
}
} else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
3000323c: e5940014 ldr r0, [r4, #20]
30003240: eb00073c bl 30004f38 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
30003244: e5940018 ldr r0, [r4, #24]
30003248: eb00073a bl 30004f38 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
3000324c: e594008c ldr r0, [r4, #140] ; 0x8c
30003250: eb000738 bl 30004f38 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
30003254: e59430a0 ldr r3, [r4, #160] ; 0xa0
30003258: e3530000 cmp r3, #0
3000325c: 0a000002 beq 3000326c <rtems_termios_close+0x154>
30003260: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003264: e3530002 cmp r3, #2
30003268: 1a000001 bne 30003274 <rtems_termios_close+0x15c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3000326c: e5940068 ldr r0, [r4, #104] ; 0x68
30003270: eb000730 bl 30004f38 <rtems_semaphore_delete>
free (tty->rawInBuf.theBuf);
30003274: e5940058 ldr r0, [r4, #88] ; 0x58
30003278: ebfffae1 bl 30001e04 <free>
free (tty->rawOutBuf.theBuf);
3000327c: e594007c ldr r0, [r4, #124] ; 0x7c
30003280: ebfffadf bl 30001e04 <free>
free (tty->cbuf);
30003284: e594001c ldr r0, [r4, #28]
30003288: ebfffadd bl 30001e04 <free>
free (tty);
3000328c: e1a00004 mov r0, r4
30003290: ebfffadb bl 30001e04 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
30003294: e59f300c ldr r3, [pc, #12] ; 300032a8 <rtems_termios_close+0x190>
30003298: e5930000 ldr r0, [r3]
3000329c: eb000792 bl 300050ec <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
300032a0: e3a00000 mov r0, #0
300032a4: e8bd8030 pop {r4, r5, pc}
30004634 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004634: e5902090 ldr r2, [r0, #144] ; 0x90
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
30004638: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
3000463c: e0822001 add r2, r2, r1
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004640: e59010b4 ldr r1, [r0, #180] ; 0xb4
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004644: e5802090 str r2, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004648: e3510002 cmp r1, #2
3000464c: 1a000004 bne 30004664 <rtems_termios_dequeue_characters+0x30>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
30004650: e59000c8 ldr r0, [r0, #200] ; 0xc8
30004654: eb00014c bl 30004b8c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30004658: e2503000 subs r3, r0, #0
3000465c: 0a00000d beq 30004698 <rtems_termios_dequeue_characters+0x64>
rtems_fatal_error_occurred (sc);
30004660: eb0003f7 bl 30005644 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
30004664: e59030cc ldr r3, [r0, #204] ; 0xcc
30004668: e3530005 cmp r3, #5
3000466c: 1a000007 bne 30004690 <rtems_termios_dequeue_characters+0x5c>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004670: e59f3028 ldr r3, [pc, #40] ; 300046a0 <rtems_termios_dequeue_characters+0x6c>
30004674: e59330b4 ldr r3, [r3, #180] ; 0xb4
30004678: e3530000 cmp r3, #0
3000467c: 0a000005 beq 30004698 <rtems_termios_dequeue_characters+0x64>
rtems_termios_linesw[tty->t_line].l_start(tty);
30004680: e1a0e00f mov lr, pc
30004684: e12fff13 bx r3
}
return 0; /* nothing to output in IRQ... */
30004688: e3a03000 mov r3, #0
3000468c: ea000001 b 30004698 <rtems_termios_dequeue_characters+0x64>
}
return rtems_termios_refill_transmitter(tty);
}
30004690: e49de004 pop {lr} ; (ldr lr, [sp], #4)
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
30004694: eaffff5a b 30004404 <rtems_termios_refill_transmitter>
}
30004698: e1a00003 mov r0, r3
3000469c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30004100 <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)
{
30004100: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr}
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) {
30004104: e59030cc ldr r3, [r0, #204] ; 0xcc
30004108: e59f7288 ldr r7, [pc, #648] ; 30004398 <rtems_termios_enqueue_raw_characters+0x298>
* 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)
{
3000410c: e1a04000 mov r4, r0
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) {
30004110: e0873283 add r3, r7, r3, lsl #5
30004114: e5939010 ldr r9, [r3, #16]
* 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)
{
30004118: e1a06001 mov r6, r1
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) {
3000411c: e3590000 cmp r9, #0
30004120: 11a05002 movne r5, r2
30004124: 1a00000d bne 30004160 <rtems_termios_enqueue_raw_characters+0x60>
/*
* 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);
30004128: e2803030 add r3, r0, #48 ; 0x30
3000412c: e58d3000 str r3, [sp]
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,
30004130: e280304a add r3, r0, #74 ; 0x4a
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) {
30004134: e1a08002 mov r8, r2
30004138: e1a05009 mov r5, r9
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,
3000413c: e58d3004 str r3, [sp, #4]
30004140: ea00008b b 30004374 <rtems_termios_enqueue_raw_characters+0x274>
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
30004144: e59430cc ldr r3, [r4, #204] ; 0xcc
30004148: e4d60001 ldrb r0, [r6], #1
3000414c: e0873283 add r3, r7, r3, lsl #5
30004150: e1a01004 mov r1, r4
30004154: e1a0e00f mov lr, pc
30004158: e593f010 ldr pc, [r3, #16]
3000415c: e2455001 sub r5, r5, #1
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--) {
30004160: e3550000 cmp r5, #0
30004164: 1afffff6 bne 30004144 <rtems_termios_enqueue_raw_characters+0x44>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30004168: e59430e4 ldr r3, [r4, #228] ; 0xe4
3000416c: e3530000 cmp r3, #0
30004170: 1a000086 bne 30004390 <rtems_termios_enqueue_raw_characters+0x290>
30004174: e59430dc ldr r3, [r4, #220] ; 0xdc
30004178: e3530000 cmp r3, #0
3000417c: 0a000083 beq 30004390 <rtems_termios_enqueue_raw_characters+0x290>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
30004180: e2840030 add r0, r4, #48 ; 0x30
30004184: e59410e0 ldr r1, [r4, #224] ; 0xe0
30004188: e1a0e00f mov lr, pc
3000418c: e12fff13 bx r3
tty->tty_rcvwakeup = 1;
30004190: e3a03001 mov r3, #1
30004194: e58430e4 str r3, [r4, #228] ; 0xe4
30004198: ea00007c b 30004390 <rtems_termios_enqueue_raw_characters+0x290>
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
3000419c: e59430b8 ldr r3, [r4, #184] ; 0xb8
}
return 0;
}
while (len--) {
c = *buf++;
300041a0: e4d6a001 ldrb sl, [r6], #1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
300041a4: e3130c02 tst r3, #512 ; 0x200
300041a8: 0a00000f beq 300041ec <rtems_termios_enqueue_raw_characters+0xec>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
300041ac: e5d4204a ldrb r2, [r4, #74] ; 0x4a
300041b0: e5d43049 ldrb r3, [r4, #73] ; 0x49
300041b4: e152000a cmp r2, sl
300041b8: 1a000007 bne 300041dc <rtems_termios_enqueue_raw_characters+0xdc>
if (c == tty->termios.c_cc[VSTART]) {
300041bc: e1530002 cmp r3, r2
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
300041c0: 059430b8 ldreq r3, [r4, #184] ; 0xb8
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300041c4: 159430b8 ldrne r3, [r4, #184] ; 0xb8
/* 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;
300041c8: 02233010 eoreq r3, r3, #16
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300041cc: 13833010 orrne r3, r3, #16
300041d0: e58430b8 str r3, [r4, #184] ; 0xb8
* 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)
{
300041d4: e3a09001 mov r9, #1
300041d8: ea000005 b 300041f4 <rtems_termios_enqueue_raw_characters+0xf4>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
300041dc: e153000a cmp r3, sl
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
300041e0: 059430b8 ldreq r3, [r4, #184] ; 0xb8
300041e4: 03c33010 biceq r3, r3, #16
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
300041e8: 0afffff8 beq 300041d0 <rtems_termios_enqueue_raw_characters+0xd0>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
300041ec: e3590000 cmp r9, #0
300041f0: 0a000014 beq 30004248 <rtems_termios_enqueue_raw_characters+0x148>
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
300041f4: e59430b8 ldr r3, [r4, #184] ; 0xb8
300041f8: e2033030 and r3, r3, #48 ; 0x30
300041fc: e3530020 cmp r3, #32
30004200: 1a00005a bne 30004370 <rtems_termios_enqueue_raw_characters+0x270>
/* disable interrupts */
rtems_interrupt_disable(level);
30004204: ebfffa93 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
30004208: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
3000420c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004210: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
30004214: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30004218: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3000421c: e3530000 cmp r3, #0 <== NOT EXECUTED
30004220: 0a000006 beq 30004240 <rtems_termios_enqueue_raw_characters+0x140><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
30004224: e5943084 ldr r3, [r4, #132] ; 0x84 <== 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)(
30004228: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3000422c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30004230: e0811003 add r1, r1, r3 <== NOT EXECUTED
30004234: e3a02001 mov r2, #1 <== NOT EXECUTED
30004238: e1a0e00f mov lr, pc <== NOT EXECUTED
3000423c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
30004240: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
30004244: ea000049 b 30004370 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
30004248: e5940060 ldr r0, [r4, #96] ; 0x60
3000424c: e5941064 ldr r1, [r4, #100] ; 0x64
30004250: e2800001 add r0, r0, #1
30004254: eb0030b1 bl 30010520 <__umodsi3>
30004258: e1a07000 mov r7, r0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
3000425c: ebfffa7d bl 30002c58 <arm_interrupt_disable>
30004260: e1a0b000 mov fp, r0
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
30004264: e594305c ldr r3, [r4, #92] ; 0x5c
30004268: e5940064 ldr r0, [r4, #100] ; 0x64
% tty->rawInBuf.Size) > tty->highwater) &&
3000426c: e5941064 ldr r1, [r4, #100] ; 0x64
}
} 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)
30004270: e0630000 rsb r0, r3, r0
% tty->rawInBuf.Size) > tty->highwater) &&
30004274: e0800007 add r0, r0, r7
30004278: eb0030a8 bl 30010520 <__umodsi3>
}
} 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)
3000427c: e59430c0 ldr r3, [r4, #192] ; 0xc0
30004280: e1500003 cmp r0, r3
30004284: 9a000025 bls 30004320 <rtems_termios_enqueue_raw_characters+0x220>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
30004288: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== 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) &&
3000428c: e3130001 tst r3, #1 <== NOT EXECUTED
30004290: 1a000022 bne 30004320 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
30004294: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004298: e3833001 orr r3, r3, #1 <== NOT EXECUTED
3000429c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
300042a0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
300042a4: e59f30f0 ldr r3, [pc, #240] ; 3000439c <rtems_termios_enqueue_raw_characters+0x29c><== NOT EXECUTED
300042a8: e0023003 and r3, r2, r3 <== NOT EXECUTED
300042ac: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
300042b0: 1a00000e bne 300042f0 <rtems_termios_enqueue_raw_characters+0x1f0><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
300042b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300042b8: e3130020 tst r3, #32 <== NOT EXECUTED
300042bc: 1a000002 bne 300042cc <rtems_termios_enqueue_raw_characters+0x1cc><== NOT EXECUTED
300042c0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
300042c4: e3530000 cmp r3, #0 <== NOT EXECUTED
300042c8: 1a000014 bne 30004320 <rtems_termios_enqueue_raw_characters+0x220><== 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;
300042cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
300042d0: e5940010 ldr r0, [r4, #16] <== 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;
300042d4: e3833002 orr r3, r3, #2 <== NOT EXECUTED
300042d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
300042dc: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
300042e0: e3a02001 mov r2, #1 <== NOT EXECUTED
300042e4: e1a0e00f mov lr, pc <== NOT EXECUTED
300042e8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
300042ec: ea00000b b 30004320 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
300042f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300042f4: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
300042f8: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
300042fc: 1a000007 bne 30004320 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
30004300: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004304: e3833004 orr r3, r3, #4 <== NOT EXECUTED
30004308: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
3000430c: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
30004310: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
30004314: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
30004318: 11a0e00f movne lr, pc <== NOT EXECUTED
3000431c: 112fff13 bxne r3 <== NOT EXECUTED
30004320: e129f00b msr CPSR_fc, fp
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
30004324: e594305c ldr r3, [r4, #92] ; 0x5c
30004328: e1570003 cmp r7, r3
dropped++;
3000432c: 02855001 addeq r5, r5, #1
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
30004330: 0a00000e beq 30004370 <rtems_termios_enqueue_raw_characters+0x270>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
30004334: e5943058 ldr r3, [r4, #88] ; 0x58
30004338: e7c3a007 strb sl, [r3, r7]
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
3000433c: e59430e4 ldr r3, [r4, #228] ; 0xe4
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
30004340: e5847060 str r7, [r4, #96] ; 0x60
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30004344: e3530000 cmp r3, #0
30004348: 1a000008 bne 30004370 <rtems_termios_enqueue_raw_characters+0x270>
3000434c: e59430dc ldr r3, [r4, #220] ; 0xdc
30004350: e3530000 cmp r3, #0
30004354: 0a000005 beq 30004370 <rtems_termios_enqueue_raw_characters+0x270>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
30004358: e59d0000 ldr r0, [sp] <== NOT EXECUTED
3000435c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
30004360: e1a0e00f mov lr, pc <== NOT EXECUTED
30004364: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
30004368: e3a03001 mov r3, #1 <== NOT EXECUTED
3000436c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
30004370: e2488001 sub r8, r8, #1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004374: e3580000 cmp r8, #0
30004378: 1affff87 bne 3000419c <rtems_termios_enqueue_raw_characters+0x9c>
}
}
}
}
tty->rawInBufDropped += dropped;
3000437c: e5943078 ldr r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30004380: e5940068 ldr r0, [r4, #104] ; 0x68
}
}
}
}
tty->rawInBufDropped += dropped;
30004384: e0833005 add r3, r3, r5
30004388: e5843078 str r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
3000438c: eb000356 bl 300050ec <rtems_semaphore_release>
return dropped;
}
30004390: e1a00005 mov r0, r5
30004394: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
300032d0 <rtems_termios_ioctl>:
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300032d0: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300032d4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300032d8: e5934034 ldr r4, [r3, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
300032dc: e3a01000 mov r1, #0
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;
300032e0: e5907008 ldr r7, [r0, #8]
rtems_status_code sc;
args->ioctl_return = 0;
300032e4: e580100c str r1, [r0, #12]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300032e8: e1a05000 mov r5, r0
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);
300032ec: e1a02001 mov r2, r1
300032f0: e5940018 ldr r0, [r4, #24]
300032f4: eb000736 bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
300032f8: e2506000 subs r6, r0, #0
300032fc: 1a0000d4 bne 30003654 <rtems_termios_ioctl+0x384>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003300: e5953004 ldr r3, [r5, #4]
30003304: e3530004 cmp r3, #4
30003308: 0a0000a8 beq 300035b0 <rtems_termios_ioctl+0x2e0>
3000330c: 8a000005 bhi 30003328 <rtems_termios_ioctl+0x58>
30003310: e3530002 cmp r3, #2
30003314: 0a000029 beq 300033c0 <rtems_termios_ioctl+0xf0>
30003318: 8a00009d bhi 30003594 <rtems_termios_ioctl+0x2c4>
3000331c: e3530001 cmp r3, #1
30003320: 1a000010 bne 30003368 <rtems_termios_ioctl+0x98>
30003324: ea00001b b 30003398 <rtems_termios_ioctl+0xc8>
30003328: e59f2330 ldr r2, [pc, #816] ; 30003660 <rtems_termios_ioctl+0x390>
3000332c: e1530002 cmp r3, r2
30003330: 0a0000ba beq 30003620 <rtems_termios_ioctl+0x350>
30003334: 8a000002 bhi 30003344 <rtems_termios_ioctl+0x74>
30003338: e3530005 cmp r3, #5
3000333c: 1a000009 bne 30003368 <rtems_termios_ioctl+0x98>
30003340: ea000096 b 300035a0 <rtems_termios_ioctl+0x2d0>
30003344: e59f2318 ldr r2, [pc, #792] ; 30003664 <rtems_termios_ioctl+0x394>
30003348: e1530002 cmp r3, r2
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;
3000334c: 05953008 ldreq r3, [r5, #8]
30003350: 059420cc ldreq r2, [r4, #204] ; 0xcc
30003354: 05832000 streq r2, [r3]
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003358: 0a0000bb beq 3000364c <rtems_termios_ioctl+0x37c>
3000335c: e2822105 add r2, r2, #1073741825 ; 0x40000001
30003360: e1530002 cmp r3, r2
30003364: 0a000095 beq 300035c0 <rtems_termios_ioctl+0x2f0>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003368: e59420cc ldr r2, [r4, #204] ; 0xcc
3000336c: e59f32f4 ldr r3, [pc, #756] ; 30003668 <rtems_termios_ioctl+0x398>
30003370: e0833282 add r3, r3, r2, lsl #5
30003374: e5933018 ldr r3, [r3, #24]
30003378: e3530000 cmp r3, #0
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
3000337c: 03a0600a moveq r6, #10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003380: 0a0000b1 beq 3000364c <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
30003384: e1a00004 mov r0, r4
30003388: e1a01005 mov r1, r5
3000338c: e1a0e00f mov lr, pc
30003390: e12fff13 bx r3
30003394: ea00009f b 30003618 <rtems_termios_ioctl+0x348>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
30003398: e5957008 ldr r7, [r5, #8]
3000339c: e284c030 add ip, r4, #48 ; 0x30
300033a0: e1a0e007 mov lr, r7
300033a4: e8bc000f ldm ip!, {r0, r1, r2, r3}
300033a8: e8ae000f stmia lr!, {r0, r1, r2, r3}
300033ac: e8bc000f ldm ip!, {r0, r1, r2, r3}
300033b0: e8ae000f stmia lr!, {r0, r1, r2, r3}
300033b4: e59c3000 ldr r3, [ip]
300033b8: e58e3000 str r3, [lr]
break;
300033bc: ea0000a2 b 3000364c <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
300033c0: e595e008 ldr lr, [r5, #8]
300033c4: e284c030 add ip, r4, #48 ; 0x30
300033c8: e8be000f ldm lr!, {r0, r1, r2, r3}
300033cc: e8ac000f stmia ip!, {r0, r1, r2, r3}
300033d0: e8be000f ldm lr!, {r0, r1, r2, r3}
300033d4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300033d8: e59e3000 ldr r3, [lr]
300033dc: e58c3000 str r3, [ip]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300033e0: e59430b8 ldr r3, [r4, #184] ; 0xb8
300033e4: e3130c02 tst r3, #512 ; 0x200
300033e8: 0a000018 beq 30003450 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
300033ec: e5943030 ldr r3, [r4, #48] ; 0x30
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300033f0: e3130b01 tst r3, #1024 ; 0x400
300033f4: 1a000015 bne 30003450 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
300033f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300033fc: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
30003400: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
30003404: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003408: e3130020 tst r3, #32 <== NOT EXECUTED
3000340c: 0a00000f beq 30003450 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
30003410: ebfffe10 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
30003414: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
30003418: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000341c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
30003420: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003424: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30003428: e3530000 cmp r3, #0 <== NOT EXECUTED
3000342c: 0a000006 beq 3000344c <rtems_termios_ioctl+0x17c> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
30003430: e5943084 ldr r3, [r4, #132] ; 0x84 <== 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)(
30003434: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
30003438: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3000343c: e0811003 add r1, r1, r3 <== NOT EXECUTED
30003440: e3a02001 mov r2, #1 <== NOT EXECUTED
30003444: e1a0e00f mov lr, pc <== NOT EXECUTED
30003448: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3000344c: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
30003450: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003454: e3130b01 tst r3, #1024 ; 0x400
30003458: 0a000008 beq 30003480 <rtems_termios_ioctl+0x1b0>
3000345c: e5943030 ldr r3, [r4, #48] ; 0x30
30003460: e3130a01 tst r3, #4096 ; 0x1000
30003464: 1a000005 bne 30003480 <rtems_termios_ioctl+0x1b0>
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
30003468: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000346c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
30003470: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
30003474: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003478: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
3000347c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
30003480: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003484: e3130c01 tst r3, #256 ; 0x100
30003488: 0a000010 beq 300034d0 <rtems_termios_ioctl+0x200>
3000348c: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
30003490: e3530000 cmp r3, #0 <== NOT EXECUTED
30003494: ba00000d blt 300034d0 <rtems_termios_ioctl+0x200> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
30003498: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000349c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
300034a0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
300034a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300034a8: e3130004 tst r3, #4 <== NOT EXECUTED
300034ac: 0a000004 beq 300034c4 <rtems_termios_ioctl+0x1f4> <== NOT EXECUTED
300034b0: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
300034b4: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
300034b8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
300034bc: 11a0e00f movne lr, pc <== NOT EXECUTED
300034c0: 112fff13 bxne r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
300034c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300034c8: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
300034cc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
300034d0: e5943038 ldr r3, [r4, #56] ; 0x38
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) {
300034d4: e594703c ldr r7, [r4, #60] ; 0x3c
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
300034d8: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
300034dc: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
300034e0: b3833c01 orrlt r3, r3, #256 ; 0x100
300034e4: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
300034e8: e5943030 ldr r3, [r4, #48] ; 0x30
300034ec: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
300034f0: 159420b8 ldrne r2, [r4, #184] ; 0xb8
300034f4: 13822b01 orrne r2, r2, #1024 ; 0x400
300034f8: 158420b8 strne r2, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
300034fc: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
30003500: 159430b8 ldrne r3, [r4, #184] ; 0xb8
30003504: 13833c02 orrne r3, r3, #512 ; 0x200
30003508: 158430b8 strne r3, [r4, #184] ; 0xb8
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) {
3000350c: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003510: 13a03000 movne r3, #0
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) {
30003514: 1a000013 bne 30003568 <rtems_termios_ioctl+0x298>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
30003518: e5d48046 ldrb r8, [r4, #70] ; 0x46
rtems_clock_get_ticks_per_second() / 10;
3000351c: eb000519 bl 30004988 <rtems_clock_get_ticks_per_second>
30003520: e3a0100a mov r1, #10
30003524: e0000098 mul r0, r8, r0
30003528: eb003364 bl 300102c0 <__aeabi_uidiv>
if (tty->termios.c_cc[VTIME]) {
3000352c: e5d43046 ldrb r3, [r4, #70] ; 0x46
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] *
30003530: e5840054 str r0, [r4, #84] ; 0x54
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
30003534: e3530000 cmp r3, #0
30003538: e5d42047 ldrb r2, [r4, #71] ; 0x47
3000353c: 0a000005 beq 30003558 <rtems_termios_ioctl+0x288>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003540: e3520000 cmp r2, #0
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
30003544: e5840070 str r0, [r4, #112] ; 0x70
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003548: 13a00000 movne r0, #0
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
3000354c: e584706c str r7, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003550: e5840074 str r0, [r4, #116] ; 0x74
30003554: ea000006 b 30003574 <rtems_termios_ioctl+0x2a4>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
30003558: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
3000355c: 03a03001 moveq r3, #1
30003560: 0584306c streq r3, [r4, #108] ; 0x6c
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
30003564: 0a000002 beq 30003574 <rtems_termios_ioctl+0x2a4>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003568: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
3000356c: e5843070 str r3, [r4, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003570: e5843074 str r3, [r4, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
30003574: e59430a8 ldr r3, [r4, #168] ; 0xa8
30003578: e3530000 cmp r3, #0
3000357c: 0a000032 beq 3000364c <rtems_termios_ioctl+0x37c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
30003580: e5940010 ldr r0, [r4, #16]
30003584: e2841030 add r1, r4, #48 ; 0x30
30003588: e1a0e00f mov lr, pc
3000358c: e12fff13 bx r3
30003590: ea00002d b 3000364c <rtems_termios_ioctl+0x37c>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
30003594: e1a00004 mov r0, r4
30003598: ebfffdb2 bl 30002c68 <drainOutput>
break;
3000359c: ea00002a b 3000364c <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
300035a0: e897000c ldm r7, {r2, r3}
300035a4: e58420d4 str r2, [r4, #212] ; 0xd4
300035a8: e58430d8 str r3, [r4, #216] ; 0xd8
break;
300035ac: ea000026 b 3000364c <rtems_termios_ioctl+0x37c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
300035b0: e897000c ldm r7, {r2, r3}
300035b4: e58420dc str r2, [r4, #220] ; 0xdc
300035b8: e58430e0 str r3, [r4, #224] ; 0xe0
break;
300035bc: ea000022 b 3000364c <rtems_termios_ioctl+0x37c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
300035c0: e59420cc ldr r2, [r4, #204] ; 0xcc
300035c4: e59f309c ldr r3, [pc, #156] ; 30003668 <rtems_termios_ioctl+0x398>
300035c8: e0833282 add r3, r3, r2, lsl #5
300035cc: e5933004 ldr r3, [r3, #4]
300035d0: e3530000 cmp r3, #0
300035d4: 0a000003 beq 300035e8 <rtems_termios_ioctl+0x318>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
300035d8: e1a00004 mov r0, r4
300035dc: e1a0e00f mov lr, pc
300035e0: e12fff13 bx r3
300035e4: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
300035e8: e5953008 ldr r3, [r5, #8]
tty->t_sc = NULL; /* ensure that no more valid data */
300035ec: e3a02000 mov r2, #0
* 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);
300035f0: e5933000 ldr r3, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
300035f4: e58420d0 str r2, [r4, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
300035f8: e59f2068 ldr r2, [pc, #104] ; 30003668 <rtems_termios_ioctl+0x398>
* 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);
300035fc: e58430cc str r3, [r4, #204] ; 0xcc
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
30003600: e7923283 ldr r3, [r2, r3, lsl #5]
30003604: e3530000 cmp r3, #0
30003608: 0a00000f beq 3000364c <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
3000360c: e1a00004 mov r0, r4
30003610: e1a0e00f mov lr, pc
30003614: e12fff13 bx r3
30003618: e1a06000 mov r6, r0
3000361c: ea00000a b 3000364c <rtems_termios_ioctl+0x37c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
30003620: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
30003624: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30003628: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
3000362c: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
30003630: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30003634: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
30003638: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3000363c: e0611000 rsb r1, r1, r0 <== NOT EXECUTED
30003640: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
30003644: e0813003 add r3, r1, r3 <== NOT EXECUTED
30003648: e5823000 str r3, [r2] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
3000364c: e5940018 ldr r0, [r4, #24]
30003650: eb0006a5 bl 300050ec <rtems_semaphore_release>
args->ioctl_return = sc;
30003654: e585600c str r6, [r5, #12]
return sc;
}
30003658: e1a00006 mov r0, r6
3000365c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002cc4 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30002cc4: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
30002cc8: e58d300c str r3, [sp, #12]
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30002ccc: e59f3404 ldr r3, [pc, #1028] ; 300030d8 <rtems_termios_open+0x414>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30002cd0: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30002cd4: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30002cd8: e1a09000 mov r9, r0
30002cdc: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30002ce0: e5930000 ldr r0, [r3]
30002ce4: e1a02001 mov r2, r1
30002ce8: eb0008b9 bl 30004fd4 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30002cec: e2506000 subs r6, r0, #0
30002cf0: 1a0000ee bne 300030b0 <rtems_termios_open+0x3ec>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
30002cf4: e59f33e0 ldr r3, [pc, #992] ; 300030dc <rtems_termios_open+0x418>
30002cf8: e5937000 ldr r7, [r3]
30002cfc: e1a05007 mov r5, r7
30002d00: ea000006 b 30002d20 <rtems_termios_open+0x5c>
if ((tty->major == major) && (tty->minor == minor))
30002d04: e595300c ldr r3, [r5, #12]
30002d08: e1530009 cmp r3, r9
30002d0c: 1a000002 bne 30002d1c <rtems_termios_open+0x58>
30002d10: e5953010 ldr r3, [r5, #16]
30002d14: e153000a cmp r3, sl
30002d18: 0a0000c3 beq 3000302c <rtems_termios_open+0x368>
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) {
30002d1c: e5955000 ldr r5, [r5]
30002d20: e3550000 cmp r5, #0
30002d24: 1afffff6 bne 30002d04 <rtems_termios_open+0x40>
30002d28: ea0000e3 b 300030bc <rtems_termios_open+0x3f8>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
30002d2c: e59f23ac ldr r2, [pc, #940] ; 300030e0 <rtems_termios_open+0x41c>
30002d30: e5923000 ldr r3, [r2]
30002d34: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30002d38: e5950064 ldr r0, [r5, #100] ; 0x64
30002d3c: e58d2008 str r2, [sp, #8]
30002d40: ebfffcfe bl 30002140 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
30002d44: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30002d48: e1a0b000 mov fp, r0
30002d4c: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
30002d50: e59d2008 ldr r2, [sp, #8]
30002d54: 1a000006 bne 30002d74 <rtems_termios_open+0xb0>
free(tty);
30002d58: e1a00005 mov r0, r5
30002d5c: ebfffc28 bl 30001e04 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
30002d60: e59f3370 ldr r3, [pc, #880] ; 300030d8 <rtems_termios_open+0x414>
return RTEMS_NO_MEMORY;
30002d64: e3a0601a mov r6, #26
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
30002d68: e5930000 ldr r0, [r3]
30002d6c: eb0008de bl 300050ec <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
30002d70: ea0000ce b 300030b0 <rtems_termios_open+0x3ec>
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
30002d74: e5923004 ldr r3, [r2, #4]
30002d78: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
30002d7c: e5950088 ldr r0, [r5, #136] ; 0x88
30002d80: e58d2008 str r2, [sp, #8]
30002d84: ebfffced bl 30002140 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
30002d88: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
30002d8c: e1a03000 mov r3, r0
30002d90: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
30002d94: e59d2008 ldr r2, [sp, #8]
30002d98: 0a000008 beq 30002dc0 <rtems_termios_open+0xfc>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
30002d9c: e5920008 ldr r0, [r2, #8]
30002da0: e58d3008 str r3, [sp, #8]
30002da4: ebfffce5 bl 30002140 <malloc>
if (tty->cbuf == NULL) {
30002da8: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
30002dac: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) {
30002db0: e59d3008 ldr r3, [sp, #8]
30002db4: 1a000004 bne 30002dcc <rtems_termios_open+0x108>
free((void *)(tty->rawOutBuf.theBuf));
30002db8: e1a00003 mov r0, r3 <== NOT EXECUTED
30002dbc: ebfffc10 bl 30001e04 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
30002dc0: e1a0000b mov r0, fp
30002dc4: ebfffc0e bl 30001e04 <free>
30002dc8: eaffffe2 b 30002d58 <rtems_termios_open+0x94>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
30002dcc: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
30002dd0: e5853004 str r3, [r5, #4]
if (rtems_termios_ttyHead != NULL)
30002dd4: e1570003 cmp r7, r3
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
30002dd8: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
30002ddc: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
30002de0: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
30002de4: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
30002de8: e58530e4 str r3, [r5, #228] ; 0xe4
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
30002dec: e59f32e8 ldr r3, [pc, #744] ; 300030dc <rtems_termios_open+0x418>
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
30002df0: 15875004 strne r5, [r7, #4]
rtems_termios_ttyHead = tty;
30002df4: e5834000 str r4, [r3]
if (rtems_termios_ttyTail == NULL)
30002df8: e59f32e4 ldr r3, [pc, #740] ; 300030e4 <rtems_termios_open+0x420>
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
30002dfc: e5857000 str r7, [r5]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
30002e00: e5932000 ldr r2, [r3]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
30002e04: e59f72d4 ldr r7, [pc, #724] ; 300030e0 <rtems_termios_open+0x41c>
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
30002e08: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
30002e0c: 05834000 streq r4, [r3]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30002e10: e59f02d0 ldr r0, [pc, #720] ; 300030e8 <rtems_termios_open+0x424>
rtems_build_name ('T', 'R', 'i', c),
30002e14: e5d7300c ldrb r3, [r7, #12]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30002e18: e2842014 add r2, r4, #20
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
30002e1c: e584a010 str sl, [r4, #16]
tty->major = major;
30002e20: e584900c str r9, [r4, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30002e24: e1830000 orr r0, r3, r0
30002e28: e58d2000 str r2, [sp]
30002e2c: e3a03000 mov r3, #0
30002e30: e3a01001 mov r1, #1
30002e34: e3a02054 mov r2, #84 ; 0x54
30002e38: eb0007d3 bl 30004d8c <rtems_semaphore_create>
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)
30002e3c: e2503000 subs r3, r0, #0
30002e40: 1a000096 bne 300030a0 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
30002e44: e5d7200c ldrb r2, [r7, #12]
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 (
30002e48: e59f029c ldr r0, [pc, #668] ; 300030ec <rtems_termios_open+0x428>
30002e4c: e2841018 add r1, r4, #24
30002e50: e58d1000 str r1, [sp]
30002e54: e1820000 orr r0, r2, r0
30002e58: e3a01001 mov r1, #1
30002e5c: e3a02054 mov r2, #84 ; 0x54
30002e60: eb0007c9 bl 30004d8c <rtems_semaphore_create>
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)
30002e64: e2501000 subs r1, r0, #0
30002e68: 1a00008c bne 300030a0 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
30002e6c: e5d7300c ldrb r3, [r7, #12]
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 (
30002e70: e59f0278 ldr r0, [pc, #632] ; 300030f0 <rtems_termios_open+0x42c>
30002e74: e284208c add r2, r4, #140 ; 0x8c
30002e78: e58d2000 str r2, [sp]
30002e7c: e1830000 orr r0, r3, r0
30002e80: e3a02020 mov r2, #32
30002e84: e1a03001 mov r3, r1
30002e88: eb0007bf bl 30004d8c <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
30002e8c: e250b000 subs fp, r0, #0
30002e90: 1a000082 bne 300030a0 <rtems_termios_open+0x3dc>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
30002e94: e59de00c ldr lr, [sp, #12]
30002e98: e284c098 add ip, r4, #152 ; 0x98
30002e9c: e8be000f ldm lr!, {r0, r1, r2, r3}
30002ea0: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002ea4: e89e000f ldm lr, {r0, r1, r2, r3}
30002ea8: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30002eac: e59430b4 ldr r3, [r4, #180] ; 0xb4
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;
30002eb0: e584b094 str fp, [r4, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30002eb4: e3530002 cmp r3, #2
30002eb8: 1a000017 bne 30002f1c <rtems_termios_open+0x258>
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
30002ebc: e5d7300c ldrb r3, [r7, #12]
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
30002ec0: e59f022c ldr r0, [pc, #556] ; 300030f4 <rtems_termios_open+0x430>
30002ec4: e28420c8 add r2, r4, #200 ; 0xc8
30002ec8: e58d2004 str r2, [sp, #4]
30002ecc: e1830000 orr r0, r3, r0
30002ed0: e3a02b01 mov r2, #1024 ; 0x400
30002ed4: e3a0100a mov r1, #10
30002ed8: e3a03c05 mov r3, #1280 ; 0x500
30002edc: e58db000 str fp, [sp]
30002ee0: eb0008a8 bl 30005188 <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
30002ee4: e2502000 subs r2, r0, #0
30002ee8: 1a00006c bne 300030a0 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
30002eec: e5d7300c ldrb r3, [r7, #12]
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
30002ef0: e59f0200 ldr r0, [pc, #512] ; 300030f8 <rtems_termios_open+0x434>
30002ef4: e58d2000 str r2, [sp]
30002ef8: e28420c4 add r2, r4, #196 ; 0xc4
30002efc: e58d2004 str r2, [sp, #4]
30002f00: e1830000 orr r0, r3, r0
30002f04: e3a01009 mov r1, #9
30002f08: e3a02b01 mov r2, #1024 ; 0x400
30002f0c: e3a03c05 mov r3, #1280 ; 0x500
30002f10: eb00089c bl 30005188 <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
30002f14: e3500000 cmp r0, #0
30002f18: 1a000060 bne 300030a0 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
30002f1c: e59430a0 ldr r3, [r4, #160] ; 0xa0
30002f20: e3530000 cmp r3, #0
30002f24: 0a000002 beq 30002f34 <rtems_termios_open+0x270>
30002f28: e59430b4 ldr r3, [r4, #180] ; 0xb4
30002f2c: e3530002 cmp r3, #2
30002f30: 1a00000b bne 30002f64 <rtems_termios_open+0x2a0>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
30002f34: e59f31a4 ldr r3, [pc, #420] ; 300030e0 <rtems_termios_open+0x41c>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
30002f38: e59f01bc ldr r0, [pc, #444] ; 300030fc <rtems_termios_open+0x438>
rtems_build_name ('T', 'R', 'r', c),
30002f3c: e5d3300c ldrb r3, [r3, #12]
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
30002f40: e2842068 add r2, r4, #104 ; 0x68
30002f44: e3a01000 mov r1, #0
30002f48: e58d2000 str r2, [sp]
30002f4c: e1830000 orr r0, r3, r0
30002f50: e3a02024 mov r2, #36 ; 0x24
30002f54: e1a03001 mov r3, r1
30002f58: eb00078b bl 30004d8c <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
30002f5c: e3500000 cmp r0, #0
30002f60: 1a00004e bne 300030a0 <rtems_termios_open+0x3dc>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30002f64: e59f3194 ldr r3, [pc, #404] ; 30003100 <rtems_termios_open+0x43c>
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
30002f68: e3a02011 mov r2, #17
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30002f6c: e5843030 str r3, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30002f70: e59f318c ldr r3, [pc, #396] ; 30003104 <rtems_termios_open+0x440>
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
30002f74: e5c42049 strb r2, [r4, #73] ; 0x49
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30002f78: e5843034 str r3, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
30002f7c: e59f3184 ldr r3, [pc, #388] ; 30003108 <rtems_termios_open+0x444>
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';
30002f80: e2822002 add r2, r2, #2
/*
* 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;
30002f84: e5843038 str r3, [r4, #56] ; 0x38
tty->termios.c_lflag =
30002f88: e59f317c ldr r3, [pc, #380] ; 3000310c <rtems_termios_open+0x448>
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';
30002f8c: e5c4204a strb r2, [r4, #74] ; 0x4a
* 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 =
30002f90: e584303c str r3, [r4, #60] ; 0x3c
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
30002f94: e3a03003 mov r3, #3
30002f98: e5c43041 strb r3, [r4, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
30002f9c: e2833019 add r3, r3, #25
30002fa0: e5c43042 strb r3, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
30002fa4: e2833063 add r3, r3, #99 ; 0x63
30002fa8: e5c43043 strb r3, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
30002fac: e3a03015 mov r3, #21
30002fb0: e5c43044 strb r3, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
30002fb4: e3a03004 mov r3, #4
30002fb8: e5c43045 strb r3, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000';
30002fbc: e3a03000 mov r3, #0
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;
30002fc0: e58430b8 str r3, [r4, #184] ; 0xb8
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';
30002fc4: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
30002fc8: e5c43051 strb r3, [r4, #81] ; 0x51
/* 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;
30002fcc: e5943064 ldr r3, [r4, #100] ; 0x64
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';
30002fd0: e2822007 add r2, r2, #7
/* 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;
30002fd4: e1a030a3 lsr r3, r3, #1
30002fd8: e58430bc str r3, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
30002fdc: e5943064 ldr r3, [r4, #100] ; 0x64
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';
30002fe0: e5c4204b strb r2, [r4, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
30002fe4: e3a02012 mov r2, #18
30002fe8: e5c4204d strb r2, [r4, #77] ; 0x4d
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;
30002fec: e0833083 add r3, r3, r3, lsl #1
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';
30002ff0: e3a0200f mov r2, #15
30002ff4: e5c4204e strb r2, [r4, #78] ; 0x4e
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;
30002ff8: e1a03123 lsr r3, r3, #2
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';
30002ffc: e2822008 add r2, r2, #8
30003000: e5c4204f strb r2, [r4, #79] ; 0x4f
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;
30003004: e58430c0 str r3, [r4, #192] ; 0xc0
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';
tty->termios.c_cc[VLNEXT] = '\026';
30003008: e3a02016 mov r2, #22
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
3000300c: e59f30cc ldr r3, [pc, #204] ; 300030e0 <rtems_termios_open+0x41c>
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';
tty->termios.c_cc[VLNEXT] = '\026';
30003010: e5c42050 strb r2, [r4, #80] ; 0x50
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
30003014: e5d3200c ldrb r2, [r3, #12]
30003018: e352007a cmp r2, #122 ; 0x7a
3000301c: e2821001 add r1, r2, #1
c = 'a';
30003020: 03a02061 moveq r2, #97 ; 0x61
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
30003024: e5c3100c strb r1, [r3, #12]
c = 'a';
30003028: 05c3200c strbeq r2, [r3, #12]
}
args->iop->data1 = tty;
3000302c: e5983000 ldr r3, [r8]
30003030: e5835034 str r5, [r3, #52] ; 0x34
if (!tty->refcount++) {
30003034: e5953008 ldr r3, [r5, #8]
30003038: e2832001 add r2, r3, #1
3000303c: e3530000 cmp r3, #0
30003040: e5852008 str r2, [r5, #8]
30003044: 1a000016 bne 300030a4 <rtems_termios_open+0x3e0>
if (tty->device.firstOpen)
30003048: e5953098 ldr r3, [r5, #152] ; 0x98
3000304c: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
30003050: 11a00009 movne r0, r9
30003054: 11a0100a movne r1, sl
30003058: 11a02008 movne r2, r8
3000305c: 11a0e00f movne lr, pc
30003060: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30003064: e59530b4 ldr r3, [r5, #180] ; 0xb4
30003068: e3530002 cmp r3, #2
3000306c: 1a00000c bne 300030a4 <rtems_termios_open+0x3e0>
sc = rtems_task_start(
30003070: e59500c4 ldr r0, [r5, #196] ; 0xc4
30003074: e59f1094 ldr r1, [pc, #148] ; 30003110 <rtems_termios_open+0x44c>
30003078: e1a02005 mov r2, r5
3000307c: eb0008e9 bl 30005428 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
30003080: e3500000 cmp r0, #0
30003084: 1a000005 bne 300030a0 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
30003088: e59500c8 ldr r0, [r5, #200] ; 0xc8
3000308c: e59f1080 ldr r1, [pc, #128] ; 30003114 <rtems_termios_open+0x450>
30003090: e1a02005 mov r2, r5
30003094: eb0008e3 bl 30005428 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
30003098: e3500000 cmp r0, #0
3000309c: 0a000000 beq 300030a4 <rtems_termios_open+0x3e0>
rtems_fatal_error_occurred (sc);
300030a0: eb000967 bl 30005644 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
300030a4: e59f302c ldr r3, [pc, #44] ; 300030d8 <rtems_termios_open+0x414>
300030a8: e5930000 ldr r0, [r3]
300030ac: eb00080e bl 300050ec <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
300030b0: e1a00006 mov r0, r6
300030b4: e28dd010 add sp, sp, #16
300030b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
300030bc: e3a00001 mov r0, #1
300030c0: e3a010e8 mov r1, #232 ; 0xe8
300030c4: ebfffaea bl 30001c74 <calloc>
if (tty == NULL) {
300030c8: e2504000 subs r4, r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
300030cc: e1a05000 mov r5, r0
if (tty == NULL) {
300030d0: 1affff15 bne 30002d2c <rtems_termios_open+0x68>
300030d4: eaffff21 b 30002d60 <rtems_termios_open+0x9c>
30003db4 <rtems_termios_read>:
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003db4: e5903000 ldr r3, [r0]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003db8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003dbc: e5934034 ldr r4, [r3, #52] ; 0x34
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003dc0: e3a01000 mov r1, #0
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;
30003dc4: e5908010 ldr r8, [r0, #16]
char *buffer = args->buffer;
30003dc8: e590b00c ldr fp, [r0, #12]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003dcc: e1a05000 mov r5, r0
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);
30003dd0: e1a02001 mov r2, r1
30003dd4: e5940014 ldr r0, [r4, #20]
30003dd8: eb00047d bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
30003ddc: e2507000 subs r7, r0, #0
30003de0: 1a0000be bne 300040e0 <rtems_termios_read+0x32c>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
30003de4: e59420cc ldr r2, [r4, #204] ; 0xcc
30003de8: e59f32f8 ldr r3, [pc, #760] ; 300040e8 <rtems_termios_read+0x334>
30003dec: e0833282 add r3, r3, r2, lsl #5
30003df0: e5933008 ldr r3, [r3, #8]
30003df4: e3530000 cmp r3, #0
30003df8: 0a000005 beq 30003e14 <rtems_termios_read+0x60>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
30003dfc: e1a00004 mov r0, r4
30003e00: e1a01005 mov r1, r5
30003e04: e1a0e00f mov lr, pc
30003e08: e12fff13 bx r3
30003e0c: e1a07000 mov r7, r0
30003e10: ea0000ae b 300040d0 <rtems_termios_read+0x31c>
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
30003e14: e5942024 ldr r2, [r4, #36] ; 0x24
30003e18: e5943020 ldr r3, [r4, #32]
30003e1c: e1520003 cmp r2, r3
30003e20: 1a0000a1 bne 300040ac <rtems_termios_read+0x2f8>
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
30003e24: e5943028 ldr r3, [r4, #40] ; 0x28
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
30003e28: e5847020 str r7, [r4, #32]
tty->read_start_column = tty->column;
30003e2c: e584302c str r3, [r4, #44] ; 0x2c
if (tty->device.pollRead != NULL &&
30003e30: e59430a0 ldr r3, [r4, #160] ; 0xa0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
30003e34: e5847024 str r7, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
30003e38: e3530000 cmp r3, #0
30003e3c: 0a00003b beq 30003f30 <rtems_termios_read+0x17c>
30003e40: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003e44: e3530000 cmp r3, #0
30003e48: 1a000038 bne 30003f30 <rtems_termios_read+0x17c>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30003e4c: e594303c ldr r3, [r4, #60] ; 0x3c
30003e50: e3130002 tst r3, #2
30003e54: 0a00000d beq 30003e90 <rtems_termios_read+0xdc>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30003e58: e5940010 ldr r0, [r4, #16]
30003e5c: e1a0e00f mov lr, pc
30003e60: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
30003e64: e3500000 cmp r0, #0
30003e68: aa000002 bge 30003e78 <rtems_termios_read+0xc4>
rtems_task_wake_after (1);
30003e6c: e3a00001 mov r0, #1
30003e70: eb000584 bl 30005488 <rtems_task_wake_after>
30003e74: eafffff7 b 30003e58 <rtems_termios_read+0xa4>
} else {
if (siproc (n, tty))
30003e78: e20000ff and r0, r0, #255 ; 0xff
30003e7c: e1a01004 mov r1, r4
30003e80: ebffff86 bl 30003ca0 <siproc>
30003e84: e3500000 cmp r0, #0
30003e88: 0afffff2 beq 30003e58 <rtems_termios_read+0xa4>
30003e8c: ea000086 b 300040ac <rtems_termios_read+0x2f8>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
30003e90: eb0002c4 bl 300049a8 <rtems_clock_get_ticks_since_boot>
30003e94: e1a06000 mov r6, r0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30003e98: e5940010 ldr r0, [r4, #16]
30003e9c: e1a0e00f mov lr, pc
30003ea0: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
30003ea4: e3500000 cmp r0, #0
30003ea8: aa000013 bge 30003efc <rtems_termios_read+0x148>
if (tty->termios.c_cc[VMIN]) {
30003eac: e5d43047 ldrb r3, [r4, #71] ; 0x47
30003eb0: e3530000 cmp r3, #0
30003eb4: e5d43046 ldrb r3, [r4, #70] ; 0x46
30003eb8: 0a000005 beq 30003ed4 <rtems_termios_read+0x120>
if (tty->termios.c_cc[VTIME] && tty->ccount) {
30003ebc: e3530000 cmp r3, #0
30003ec0: 0a00000a beq 30003ef0 <rtems_termios_read+0x13c>
30003ec4: e5943020 ldr r3, [r4, #32]
30003ec8: e3530000 cmp r3, #0
30003ecc: 0a000007 beq 30003ef0 <rtems_termios_read+0x13c>
30003ed0: ea000001 b 30003edc <rtems_termios_read+0x128>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
30003ed4: e3530000 cmp r3, #0 <== NOT EXECUTED
30003ed8: 0a000073 beq 300040ac <rtems_termios_read+0x2f8> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
30003edc: eb0002b1 bl 300049a8 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
30003ee0: e5943054 ldr r3, [r4, #84] ; 0x54
30003ee4: e0660000 rsb r0, r6, r0
30003ee8: e1500003 cmp r0, r3
30003eec: 8a00006e bhi 300040ac <rtems_termios_read+0x2f8>
break;
}
}
rtems_task_wake_after (1);
30003ef0: e3a00001 mov r0, #1
30003ef4: eb000563 bl 30005488 <rtems_task_wake_after>
30003ef8: eaffffe6 b 30003e98 <rtems_termios_read+0xe4>
} else {
siproc (n, tty);
30003efc: e20000ff and r0, r0, #255 ; 0xff
30003f00: e1a01004 mov r1, r4
30003f04: ebffff65 bl 30003ca0 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
30003f08: e5d43047 ldrb r3, [r4, #71] ; 0x47
30003f0c: e5942020 ldr r2, [r4, #32]
30003f10: e1520003 cmp r2, r3
30003f14: aa000064 bge 300040ac <rtems_termios_read+0x2f8>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
30003f18: e3530000 cmp r3, #0
30003f1c: 0affffdd beq 30003e98 <rtems_termios_read+0xe4>
30003f20: e5d43046 ldrb r3, [r4, #70] ; 0x46
30003f24: e3530000 cmp r3, #0
30003f28: 0affffda beq 30003e98 <rtems_termios_read+0xe4>
30003f2c: eaffffd7 b 30003e90 <rtems_termios_read+0xdc>
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)(
30003f30: e2842049 add r2, r4, #73 ; 0x49
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
30003f34: e594a074 ldr sl, [r4, #116] ; 0x74
rtems_status_code sc;
int wait = (int)1;
30003f38: e3a06001 mov r6, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
30003f3c: e59f91a8 ldr r9, [pc, #424] ; 300040ec <rtems_termios_read+0x338>
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)(
30003f40: e58d2000 str r2, [sp]
30003f44: ea000040 b 3000404c <rtems_termios_read+0x298>
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;
30003f48: e594005c ldr r0, [r4, #92] ; 0x5c
30003f4c: e5941064 ldr r1, [r4, #100] ; 0x64
30003f50: e2800001 add r0, r0, #1
30003f54: eb003171 bl 30010520 <__umodsi3>
c = tty->rawInBuf.theBuf[newHead];
30003f58: e5943058 ldr r3, [r4, #88] ; 0x58
30003f5c: e7d3a000 ldrb sl, [r3, r0]
tty->rawInBuf.Head = newHead;
30003f60: e584005c str r0, [r4, #92] ; 0x5c
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
30003f64: e5943060 ldr r3, [r4, #96] ; 0x60
30003f68: e5942064 ldr r2, [r4, #100] ; 0x64
% tty->rawInBuf.Size)
30003f6c: e5941064 ldr r1, [r4, #100] ; 0x64
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)
30003f70: e0823003 add r3, r2, r3
% tty->rawInBuf.Size)
30003f74: e0600003 rsb r0, r0, r3
30003f78: eb003168 bl 30010520 <__umodsi3>
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)
30003f7c: e59430bc ldr r3, [r4, #188] ; 0xbc
30003f80: e1500003 cmp r0, r3
30003f84: 2a00001f bcs 30004008 <rtems_termios_read+0x254>
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30003f88: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003f8c: e3c33001 bic r3, r3, #1
30003f90: e58430b8 str r3, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30003f94: e59420b8 ldr r2, [r4, #184] ; 0xb8
30003f98: e59f3150 ldr r3, [pc, #336] ; 300040f0 <rtems_termios_read+0x33c>
30003f9c: e0023003 and r3, r2, r3
30003fa0: e59f2148 ldr r2, [pc, #328] ; 300040f0 <rtems_termios_read+0x33c>
30003fa4: e1530002 cmp r3, r2
30003fa8: 1a00000b bne 30003fdc <rtems_termios_read+0x228>
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
30003fac: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30003fb0: e3530000 cmp r3, #0 <== NOT EXECUTED
30003fb4: 0a000002 beq 30003fc4 <rtems_termios_read+0x210> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
30003fb8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003fbc: e3130020 tst r3, #32 <== NOT EXECUTED
30003fc0: 0a000005 beq 30003fdc <rtems_termios_read+0x228> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
30003fc4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30003fc8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
30003fcc: e3a02001 mov r2, #1 <== NOT EXECUTED
30003fd0: e1a0e00f mov lr, pc <== NOT EXECUTED
30003fd4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
30003fd8: ea00000a b 30004008 <rtems_termios_read+0x254> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
30003fdc: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003fe0: e3130c01 tst r3, #256 ; 0x100
30003fe4: 0a000007 beq 30004008 <rtems_termios_read+0x254>
tty->flow_ctrl &= ~FL_IRTSOFF;
30003fe8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003fec: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
30003ff0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
30003ff4: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
30003ff8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
30003ffc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
30004000: 11a0e00f movne lr, pc <== NOT EXECUTED
30004004: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
30004008: e594303c ldr r3, [r4, #60] ; 0x3c
3000400c: e3130002 tst r3, #2
30004010: 0a000005 beq 3000402c <rtems_termios_read+0x278>
if (siproc (c, tty))
30004014: e1a0000a mov r0, sl
30004018: e1a01004 mov r1, r4
3000401c: ebffff1f bl 30003ca0 <siproc>
wait = 0;
30004020: e3500000 cmp r0, #0
30004024: 13a06000 movne r6, #0
30004028: ea000006 b 30004048 <rtems_termios_read+0x294>
} else {
siproc (c, tty);
3000402c: e1a0000a mov r0, sl <== NOT EXECUTED
30004030: e1a01004 mov r1, r4 <== NOT EXECUTED
30004034: ebffff19 bl 30003ca0 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
30004038: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
3000403c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
30004040: e1520003 cmp r2, r3 <== NOT EXECUTED
30004044: a3a06000 movge r6, #0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
30004048: e594a070 ldr sl, [r4, #112] ; 0x70
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3000404c: e594205c ldr r2, [r4, #92] ; 0x5c
30004050: e5943060 ldr r3, [r4, #96] ; 0x60
30004054: e1520003 cmp r2, r3
30004058: 0a000004 beq 30004070 <rtems_termios_read+0x2bc>
(tty->ccount < (CBUFSIZE-1))) {
3000405c: e5993008 ldr r3, [r9, #8]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004060: e5942020 ldr r2, [r4, #32]
(tty->ccount < (CBUFSIZE-1))) {
30004064: e2433001 sub r3, r3, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004068: e1520003 cmp r2, r3
3000406c: baffffb5 blt 30003f48 <rtems_termios_read+0x194>
}
/*
* Wait for characters
*/
if ( wait ) {
30004070: e3560000 cmp r6, #0
30004074: 0a00000c beq 300040ac <rtems_termios_read+0x2f8>
sc = rtems_semaphore_obtain(
30004078: e5940068 ldr r0, [r4, #104] ; 0x68
3000407c: e594106c ldr r1, [r4, #108] ; 0x6c
30004080: e1a0200a mov r2, sl
30004084: eb0003d2 bl 30004fd4 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
30004088: e3500000 cmp r0, #0
3000408c: 0affffee beq 3000404c <rtems_termios_read+0x298>
30004090: ea000005 b 300040ac <rtems_termios_read+0x2f8> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
30004094: e594201c ldr r2, [r4, #28]
count--;
30004098: e2488001 sub r8, r8, #1
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
3000409c: e7d22003 ldrb r2, [r2, r3]
300040a0: e2833001 add r3, r3, #1
300040a4: e4cb2001 strb r2, [fp], #1
300040a8: e5843024 str r3, [r4, #36] ; 0x24
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
300040ac: e3580000 cmp r8, #0
300040b0: 0a000003 beq 300040c4 <rtems_termios_read+0x310>
300040b4: e5943024 ldr r3, [r4, #36] ; 0x24
300040b8: e5942020 ldr r2, [r4, #32]
300040bc: e1530002 cmp r3, r2
300040c0: bafffff3 blt 30004094 <rtems_termios_read+0x2e0>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
300040c4: e5953010 ldr r3, [r5, #16]
300040c8: e0688003 rsb r8, r8, r3
300040cc: e5858018 str r8, [r5, #24]
tty->tty_rcvwakeup = 0;
300040d0: e3a03000 mov r3, #0
300040d4: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
300040d8: e5940014 ldr r0, [r4, #20]
300040dc: eb000402 bl 300050ec <rtems_semaphore_release>
return sc;
}
300040e0: e1a00007 mov r0, r7
300040e4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
30004404 <rtems_termios_refill_transmitter>:
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30004404: e59020b8 ldr r2, [r0, #184] ; 0xb8
30004408: e59f31b8 ldr r3, [pc, #440] ; 300045c8 <rtems_termios_refill_transmitter+0x1c4>
* 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)
{
3000440c: e92d4070 push {r4, r5, r6, lr}
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30004410: e0023003 and r3, r2, r3
30004414: e59f21b0 ldr r2, [pc, #432] ; 300045cc <rtems_termios_refill_transmitter+0x1c8>
* 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)
{
30004418: e1a04000 mov r4, r0
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
3000441c: e1530002 cmp r3, r2
30004420: 1a00000c bne 30004458 <rtems_termios_refill_transmitter+0x54>
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
30004424: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
30004428: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
3000442c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004430: e1a0e00f mov lr, pc <== NOT EXECUTED
30004434: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
30004438: ebfffa06 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
3000443c: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
30004440: e2433001 sub r3, r3, #1 <== NOT EXECUTED
30004444: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004448: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000444c: e3833002 orr r3, r3, #2 <== NOT EXECUTED
30004450: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
rtems_interrupt_enable(level);
30004454: ea00000f b 30004498 <rtems_termios_refill_transmitter+0x94><== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
30004458: e59030b8 ldr r3, [r0, #184] ; 0xb8
3000445c: e2033003 and r3, r3, #3
30004460: e3530002 cmp r3, #2
30004464: 1a00000e bne 300044a4 <rtems_termios_refill_transmitter+0xa0>
* 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);
30004468: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
3000446c: e3a02001 mov r2, #1 <== NOT EXECUTED
30004470: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004474: e1a0e00f mov lr, pc <== NOT EXECUTED
30004478: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
3000447c: ebfff9f5 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
30004480: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
30004484: e2433001 sub r3, r3, #1 <== NOT EXECUTED
30004488: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
3000448c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004490: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
30004494: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004498: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
3000449c: e3a05001 mov r5, #1 <== NOT EXECUTED
300044a0: ea000046 b 300045c0 <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
300044a4: e5902080 ldr r2, [r0, #128] ; 0x80
300044a8: e5903084 ldr r3, [r0, #132] ; 0x84
300044ac: e1520003 cmp r2, r3
300044b0: 1a000005 bne 300044cc <rtems_termios_refill_transmitter+0xc8>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
300044b4: e5903094 ldr r3, [r0, #148] ; 0x94
300044b8: e3530002 cmp r3, #2
300044bc: 1a00003e bne 300045bc <rtems_termios_refill_transmitter+0x1b8>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
300044c0: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
300044c4: eb000308 bl 300050ec <rtems_semaphore_release> <== NOT EXECUTED
300044c8: ea00003b b 300045bc <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
300044cc: ebfff9e1 bl 30002c58 <arm_interrupt_disable>
len = tty->t_dqlen;
tty->t_dqlen = 0;
300044d0: e3a03000 mov r3, #0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
300044d4: e5942090 ldr r2, [r4, #144] ; 0x90
tty->t_dqlen = 0;
300044d8: e5843090 str r3, [r4, #144] ; 0x90
300044dc: e129f000 msr CPSR_fc, r0
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
300044e0: e5943084 ldr r3, [r4, #132] ; 0x84
300044e4: e5941088 ldr r1, [r4, #136] ; 0x88
300044e8: e0820003 add r0, r2, r3
300044ec: eb00300b bl 30010520 <__umodsi3>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
300044f0: e5943094 ldr r3, [r4, #148] ; 0x94
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
300044f4: e1a06000 mov r6, r0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
300044f8: e3530002 cmp r3, #2
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
300044fc: e5840084 str r0, [r4, #132] ; 0x84
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004500: 0594008c ldreq r0, [r4, #140] ; 0x8c
30004504: 0b0002f8 bleq 300050ec <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
30004508: e5943080 ldr r3, [r4, #128] ; 0x80
3000450c: e1560003 cmp r6, r3
30004510: 1a00000a bne 30004540 <rtems_termios_refill_transmitter+0x13c>
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004514: e59430d4 ldr r3, [r4, #212] ; 0xd4
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004518: e3a05000 mov r5, #0
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
3000451c: e1530005 cmp r3, r5
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004520: e5845094 str r5, [r4, #148] ; 0x94
nToSend = 0;
30004524: 01a05003 moveq r5, r3
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004528: 0a000021 beq 300045b4 <rtems_termios_refill_transmitter+0x1b0>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
3000452c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
30004530: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
30004534: e1a0e00f mov lr, pc <== NOT EXECUTED
30004538: e12fff13 bx r3 <== NOT EXECUTED
3000453c: ea00001c b 300045b4 <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
30004540: e59430b8 ldr r3, [r4, #184] ; 0xb8
30004544: e2033e21 and r3, r3, #528 ; 0x210
30004548: e3530e21 cmp r3, #528 ; 0x210
3000454c: 1a000008 bne 30004574 <rtems_termios_refill_transmitter+0x170>
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
30004550: ebfff9c0 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
30004554: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004558: e3833020 orr r3, r3, #32 <== NOT EXECUTED
3000455c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
30004560: e3a03001 mov r3, #1 <== NOT EXECUTED
30004564: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004568: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
3000456c: e3a05000 mov r5, #0 <== NOT EXECUTED
30004570: ea00000f b 300045b4 <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30004574: e5943080 ldr r3, [r4, #128] ; 0x80
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
30004578: e594107c ldr r1, [r4, #124] ; 0x7c
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
3000457c: e1560003 cmp r6, r3
nToSend = tty->rawOutBuf.Size - newTail;
30004580: 85945088 ldrhi r5, [r4, #136] ; 0x88
else
nToSend = tty->rawOutBuf.Head - newTail;
30004584: 95945080 ldrls r5, [r4, #128] ; 0x80
/* 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)) {
30004588: e59430b8 ldr r3, [r4, #184] ; 0xb8
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
3000458c: e0665005 rsb r5, r6, r5
/* 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)) {
30004590: e3130c06 tst r3, #1536 ; 0x600
nToSend = 1;
30004594: 13a05001 movne r5, #1
}
tty->rawOutBufState = rob_busy; /*apm*/
30004598: e3a03001 mov r3, #1
3000459c: e5843094 str r3, [r4, #148] ; 0x94
(*tty->device.write)(
300045a0: e5940010 ldr r0, [r4, #16]
300045a4: e0811006 add r1, r1, r6
300045a8: e1a02005 mov r2, r5
300045ac: e1a0e00f mov lr, pc
300045b0: e594f0a4 ldr pc, [r4, #164] ; 0xa4
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
300045b4: e5846084 str r6, [r4, #132] ; 0x84
300045b8: ea000000 b 300045c0 <rtems_termios_refill_transmitter+0x1bc>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
300045bc: e3a05000 mov r5, #0
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
300045c0: e1a00005 mov r0, r5
300045c4: e8bd8070 pop {r4, r5, r6, pc}
30003cfc <rtems_termios_write>:
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003cfc: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
30003d00: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003d04: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003d08: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
30003d0c: e1a04000 mov r4, r0
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);
30003d10: e1a02001 mov r2, r1
30003d14: e5950018 ldr r0, [r5, #24]
30003d18: eb0004ad bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
30003d1c: e2506000 subs r6, r0, #0
30003d20: 1a000020 bne 30003da8 <rtems_termios_write+0xac>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
30003d24: e59520cc ldr r2, [r5, #204] ; 0xcc
30003d28: e59f3080 ldr r3, [pc, #128] ; 30003db0 <rtems_termios_write+0xb4>
30003d2c: e0833282 add r3, r3, r2, lsl #5
30003d30: e593300c ldr r3, [r3, #12]
30003d34: e3530000 cmp r3, #0
30003d38: 0a000005 beq 30003d54 <rtems_termios_write+0x58>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
30003d3c: e1a00005 mov r0, r5
30003d40: e1a01004 mov r1, r4
30003d44: e1a0e00f mov lr, pc
30003d48: e12fff13 bx r3
30003d4c: e1a06000 mov r6, r0
30003d50: ea000012 b 30003da0 <rtems_termios_write+0xa4>
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
30003d54: e5953034 ldr r3, [r5, #52] ; 0x34
30003d58: e3130001 tst r3, #1
uint32_t count = args->count;
30003d5c: 15947010 ldrne r7, [r4, #16]
char *buffer = args->buffer;
30003d60: 1594800c ldrne r8, [r4, #12]
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) {
30003d64: 1a000004 bne 30003d7c <rtems_termios_write+0x80>
30003d68: ea000006 b 30003d88 <rtems_termios_write+0x8c> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
30003d6c: e4d80001 ldrb r0, [r8], #1
30003d70: e1a01005 mov r1, r5
30003d74: ebfffe7c bl 3000376c <oproc>
30003d78: e2477001 sub r7, r7, #1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
30003d7c: e3570000 cmp r7, #0
30003d80: 1afffff9 bne 30003d6c <rtems_termios_write+0x70>
30003d84: ea000003 b 30003d98 <rtems_termios_write+0x9c>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
30003d88: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
30003d8c: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
30003d90: e1a02005 mov r2, r5 <== NOT EXECUTED
30003d94: ebfffe34 bl 3000366c <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
30003d98: e5943010 ldr r3, [r4, #16]
30003d9c: e5843018 str r3, [r4, #24]
}
rtems_semaphore_release (tty->osem);
30003da0: e5950018 ldr r0, [r5, #24]
30003da4: eb0004d0 bl 300050ec <rtems_semaphore_release>
return sc;
}
30003da8: e1a00006 mov r0, r6
30003dac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30006340 <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006340: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
30006344: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30006348: e1a05000 mov r5, r0
3000634c: e1a08001 mov r8, r1
30006350: e1a04002 mov r4, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006354: 0a00000e beq 30006394 <rtems_verror+0x54>
if (rtems_panic_in_progress++)
30006358: e59f212c ldr r2, [pc, #300] ; 3000648c <rtems_verror+0x14c>
3000635c: e5923000 ldr r3, [r2]
30006360: e2831001 add r1, r3, #1
30006364: e3530000 cmp r3, #0
30006368: e5821000 str r1, [r2]
3000636c: 0a000003 beq 30006380 <rtems_verror+0x40>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
30006370: e59f3118 ldr r3, [pc, #280] ; 30006490 <rtems_verror+0x150><== NOT EXECUTED
30006374: e5932000 ldr r2, [r3] <== NOT EXECUTED
30006378: e2822001 add r2, r2, #1 <== NOT EXECUTED
3000637c: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
30006380: e59f3104 ldr r3, [pc, #260] ; 3000648c <rtems_verror+0x14c>
30006384: e5933000 ldr r3, [r3]
30006388: e3530002 cmp r3, #2
return 0;
3000638c: c3a04000 movgt r4, #0
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
30006390: ca00003b bgt 30006484 <rtems_verror+0x144>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006394: e59f30f8 ldr r3, [pc, #248] ; 30006494 <rtems_verror+0x154>
status = error_flag & ~RTEMS_ERROR_MASK;
30006398: e3c56207 bic r6, r5, #1879048192 ; 0x70000000
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
3000639c: e5933000 ldr r3, [r3]
300063a0: e5930008 ldr r0, [r3, #8]
300063a4: eb002f6d bl 30012160 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
300063a8: e2155101 ands r5, r5, #1073741824 ; 0x40000000
300063ac: 0a000001 beq 300063b8 <rtems_verror+0x78>
local_errno = errno;
300063b0: eb002e73 bl 30011d84 <__errno>
300063b4: e5905000 ldr r5, [r0]
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
300063b8: e59f70d4 ldr r7, [pc, #212] ; 30006494 <rtems_verror+0x154>
300063bc: e1a02004 mov r2, r4
300063c0: e5973000 ldr r3, [r7]
300063c4: e1a01008 mov r1, r8
300063c8: e593000c ldr r0, [r3, #12]
300063cc: eb0047d5 bl 30018328 <vfprintf>
if (status)
300063d0: e3560000 cmp r6, #0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
300063d4: e1a04000 mov r4, r0
if (status)
300063d8: 0a000008 beq 30006400 <rtems_verror+0xc0>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
300063dc: e5973000 ldr r3, [r7]
300063e0: e1a00006 mov r0, r6
300063e4: e593700c ldr r7, [r3, #12]
300063e8: ebffffd0 bl 30006330 <rtems_status_text>
300063ec: e59f10a4 ldr r1, [pc, #164] ; 30006498 <rtems_verror+0x158>
300063f0: e1a02000 mov r2, r0
300063f4: e1a00007 mov r0, r7
300063f8: eb00303e bl 300124f8 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
300063fc: e0844000 add r4, r4, r0
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
30006400: e3550000 cmp r5, #0
30006404: 0a000015 beq 30006460 <rtems_verror+0x120>
if ((local_errno > 0) && *strerror(local_errno))
30006408: da00000d ble 30006444 <rtems_verror+0x104>
3000640c: e1a00005 mov r0, r5
30006410: eb00333b bl 30013104 <strerror>
30006414: e5d03000 ldrb r3, [r0]
30006418: e3530000 cmp r3, #0
3000641c: 0a000008 beq 30006444 <rtems_verror+0x104>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
30006420: e59f306c ldr r3, [pc, #108] ; 30006494 <rtems_verror+0x154>
30006424: e1a00005 mov r0, r5
30006428: e5933000 ldr r3, [r3]
3000642c: e593600c ldr r6, [r3, #12]
30006430: eb003333 bl 30013104 <strerror>
30006434: e59f1060 ldr r1, [pc, #96] ; 3000649c <rtems_verror+0x15c>
30006438: e1a02000 mov r2, r0
3000643c: e1a00006 mov r0, r6
30006440: ea000004 b 30006458 <rtems_verror+0x118>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
30006444: e59f3048 ldr r3, [pc, #72] ; 30006494 <rtems_verror+0x154>
30006448: e59f1050 ldr r1, [pc, #80] ; 300064a0 <rtems_verror+0x160>
3000644c: e5933000 ldr r3, [r3]
30006450: e1a02005 mov r2, r5
30006454: e593000c ldr r0, [r3, #12]
30006458: eb003026 bl 300124f8 <fprintf>
3000645c: e0844000 add r4, r4, r0
}
chars_written += fprintf(stderr, "\n");
30006460: e59f502c ldr r5, [pc, #44] ; 30006494 <rtems_verror+0x154>
30006464: e59f1038 ldr r1, [pc, #56] ; 300064a4 <rtems_verror+0x164>
30006468: e5953000 ldr r3, [r5]
3000646c: e593000c ldr r0, [r3, #12]
30006470: eb003020 bl 300124f8 <fprintf>
(void) fflush(stderr);
30006474: e5953000 ldr r3, [r5]
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
30006478: e0804004 add r4, r0, r4
(void) fflush(stderr);
3000647c: e593000c ldr r0, [r3, #12]
30006480: eb002f36 bl 30012160 <fflush>
return chars_written;
}
30006484: e1a00004 mov r0, r4
30006488: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002500 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002500: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
30002504: e3a04000 mov r4, #0
int d;
for (;;) {
c = getc(fp);
30002508: e59fb0d8 ldr fp, [pc, #216] ; 300025e8 <scanInt+0xe8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
3000250c: e59f90d8 ldr r9, [pc, #216] ; 300025ec <scanInt+0xec>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002510: e1a05000 mov r5, r0
30002514: e58d1000 str r1, [sp]
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
30002518: e3e08102 mvn r8, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
3000251c: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
30002520: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002524: e5953004 ldr r3, [r5, #4]
30002528: e2433001 sub r3, r3, #1
3000252c: e3530000 cmp r3, #0
30002530: e5853004 str r3, [r5, #4]
30002534: a5953000 ldrge r3, [r5]
30002538: a4d36001 ldrbge r6, [r3], #1
3000253c: a5853000 strge r3, [r5]
30002540: aa000003 bge 30002554 <scanInt+0x54>
30002544: e59b0000 ldr r0, [fp] <== NOT EXECUTED
30002548: e1a01005 mov r1, r5 <== NOT EXECUTED
3000254c: eb003499 bl 3000f7b8 <__srget_r> <== NOT EXECUTED
30002550: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
30002554: e356003a cmp r6, #58 ; 0x3a
30002558: 0a000019 beq 300025c4 <scanInt+0xc4>
break;
if (sign == 0) {
3000255c: e3540000 cmp r4, #0
30002560: 1a000004 bne 30002578 <scanInt+0x78>
if (c == '-') {
30002564: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
30002568: 02888001 addeq r8, r8, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
3000256c: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
30002570: 0affffeb beq 30002524 <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
30002574: e3a04001 mov r4, #1
}
if (!isdigit(c))
30002578: e5993000 ldr r3, [r9]
3000257c: e0833006 add r3, r3, r6
30002580: e5d30001 ldrb r0, [r3, #1]
30002584: e2100004 ands r0, r0, #4
30002588: 0a000015 beq 300025e4 <scanInt+0xe4>
return 0;
d = c - '0';
if ((i > (limit / 10))
3000258c: e1a00008 mov r0, r8
30002590: e3a0100a mov r1, #10
30002594: eb003d91 bl 30011be0 <__aeabi_uidiv>
30002598: e1570000 cmp r7, r0
3000259c: 8a00000f bhi 300025e0 <scanInt+0xe0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
300025a0: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
300025a4: 1a000004 bne 300025bc <scanInt+0xbc>
300025a8: e1a00008 mov r0, r8
300025ac: e3a0100a mov r1, #10
300025b0: eb003e22 bl 30011e40 <__umodsi3>
300025b4: e1560000 cmp r6, r0
300025b8: 8a000008 bhi 300025e0 <scanInt+0xe0>
return 0;
i = i * 10 + d;
300025bc: e027679a mla r7, sl, r7, r6
300025c0: eaffffd7 b 30002524 <scanInt+0x24>
}
if (sign == 0)
300025c4: e3540000 cmp r4, #0
return 0;
300025c8: 01a00004 moveq r0, r4
*val = i * sign;
300025cc: 10040497 mulne r4, r7, r4
300025d0: 159d3000 ldrne r3, [sp]
return 1;
300025d4: 13a00001 movne r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
300025d8: 15834000 strne r4, [r3]
return 1;
300025dc: ea000000 b 300025e4 <scanInt+0xe4>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
300025e0: e3a00000 mov r0, #0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
300025e4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
300058a0 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
300058a0: e2523000 subs r3, r2, #0
*oact = _POSIX_signals_Vectors[ sig ];
300058a4: 159f20b8 ldrne r2, [pc, #184] ; 30005964 <sigaction+0xc4>
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
300058a8: e92d40f0 push {r4, r5, r6, r7, lr}
300058ac: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
300058b0: 13a0100c movne r1, #12
300058b4: 10222091 mlane r2, r1, r0, r2
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
300058b8: e1a04000 mov r4, r0
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
300058bc: 18920007 ldmne r2, {r0, r1, r2}
300058c0: 18830007 stmne r3, {r0, r1, r2}
if ( !sig )
300058c4: e3540000 cmp r4, #0
300058c8: 0a000004 beq 300058e0 <sigaction+0x40>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
300058cc: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
300058d0: e353001f cmp r3, #31
300058d4: 8a000001 bhi 300058e0 <sigaction+0x40>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
300058d8: e3540009 cmp r4, #9
300058dc: 1a000004 bne 300058f4 <sigaction+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
300058e0: eb002156 bl 3000de40 <__errno>
300058e4: e3a03016 mov r3, #22
300058e8: e5803000 str r3, [r0]
300058ec: e3e00000 mvn r0, #0
300058f0: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
300058f4: e3550000 cmp r5, #0
300058f8: 0a000017 beq 3000595c <sigaction+0xbc>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300058fc: e10f6000 mrs r6, CPSR
30005900: e3863080 orr r3, r6, #128 ; 0x80
30005904: e129f003 msr CPSR_fc, r3
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
30005908: e5953008 ldr r3, [r5, #8]
3000590c: e59f7050 ldr r7, [pc, #80] ; 30005964 <sigaction+0xc4>
30005910: e3530000 cmp r3, #0
30005914: 1a000007 bne 30005938 <sigaction+0x98>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
30005918: e283300c add r3, r3, #12
3000591c: e0040493 mul r4, r3, r4
30005920: e59f2040 ldr r2, [pc, #64] ; 30005968 <sigaction+0xc8>
30005924: e0873004 add r3, r7, r4
30005928: e0824004 add r4, r2, r4
3000592c: e8940007 ldm r4, {r0, r1, r2}
30005930: e8830007 stm r3, {r0, r1, r2}
30005934: ea000005 b 30005950 <sigaction+0xb0>
} else {
_POSIX_signals_Clear_process_signals( sig );
30005938: e1a00004 mov r0, r4
3000593c: eb0015b2 bl 3000b00c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
30005940: e8950007 ldm r5, {r0, r1, r2}
30005944: e3a0300c mov r3, #12
30005948: e0247493 mla r4, r3, r4, r7
3000594c: e8840007 stm r4, {r0, r1, r2}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30005950: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
30005954: e3a00000 mov r0, #0
30005958: e8bd80f0 pop {r4, r5, r6, r7, pc}
3000595c: e1a00005 mov r0, r5 <== NOT EXECUTED
}
30005960: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
30007f08 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
30007f08: e92d4010 push {r4, lr}
30007f0c: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
30007f10: e3a01000 mov r1, #0
30007f14: e1a02001 mov r2, r1
30007f18: ebffff84 bl 30007d30 <sigtimedwait>
if ( status != -1 ) {
30007f1c: e3700001 cmn r0, #1
30007f20: 0a000004 beq 30007f38 <sigwait+0x30>
if ( sig )
30007f24: e3540000 cmp r4, #0
*sig = status;
30007f28: 15840000 strne r0, [r4]
return 0;
30007f2c: 13a00000 movne r0, #0
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
30007f30: 18bd8010 popne {r4, pc}
30007f34: ea000002 b 30007f44 <sigwait+0x3c> <== NOT EXECUTED
*sig = status;
return 0;
}
return errno;
30007f38: eb002084 bl 30010150 <__errno>
30007f3c: e5900000 ldr r0, [r0]
30007f40: e8bd8010 pop {r4, pc}
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
30007f44: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
30007f48: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30003ca0 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003ca0: e591203c ldr r2, [r1, #60] ; 0x3c
30003ca4: e59f304c ldr r3, [pc, #76] ; 30003cf8 <siproc+0x58>
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003ca8: e92d4030 push {r4, r5, lr}
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003cac: e0023003 and r3, r2, r3
30003cb0: e3530000 cmp r3, #0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003cb4: e1a04001 mov r4, r1
30003cb8: e1a05000 mov r5, r0
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003cbc: 0a00000b beq 30003cf0 <siproc+0x50>
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003cc0: e5910018 ldr r0, [r1, #24]
30003cc4: e3a01000 mov r1, #0
30003cc8: e1a02001 mov r2, r1
30003ccc: eb0004c0 bl 30004fd4 <rtems_semaphore_obtain>
i = iproc (c, tty);
30003cd0: e1a01004 mov r1, r4
30003cd4: e1a00005 mov r0, r5
30003cd8: ebffff8b bl 30003b0c <iproc>
30003cdc: e1a05000 mov r5, r0
rtems_semaphore_release (tty->osem);
30003ce0: e5940018 ldr r0, [r4, #24]
30003ce4: eb000500 bl 300050ec <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
30003ce8: e1a00005 mov r0, r5
30003cec: e8bd8030 pop {r4, r5, pc}
30003cf0: e8bd4030 pop {r4, r5, lr} <== 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);
30003cf4: eaffff84 b 30003b0c <iproc> <== NOT EXECUTED
30005b68 <unmount>:
*/
int unmount(
const char *path
)
{
30005b68: e92d4070 push {r4, r5, r6, lr}
30005b6c: e24dd018 sub sp, sp, #24
30005b70: e1a05000 mov r5, r0
* 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 ) )
30005b74: eb002654 bl 3000f4cc <strlen>
30005b78: e28d4004 add r4, sp, #4
30005b7c: e3a03001 mov r3, #1
30005b80: e1a01000 mov r1, r0
30005b84: e58d3000 str r3, [sp]
30005b88: e1a00005 mov r0, r5
30005b8c: e3a02000 mov r2, #0
30005b90: e1a03004 mov r3, r4
30005b94: ebfff475 bl 30002d70 <rtems_filesystem_evaluate_path>
30005b98: e3500000 cmp r0, #0
30005b9c: 1a000040 bne 30005ca4 <unmount+0x13c>
return -1;
mt_entry = loc.mt_entry;
30005ba0: e59d5014 ldr r5, [sp, #20]
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
30005ba4: e59d3004 ldr r3, [sp, #4]
30005ba8: e595201c ldr r2, [r5, #28]
30005bac: e1520003 cmp r2, r3
30005bb0: 0a000004 beq 30005bc8 <unmount+0x60>
rtems_filesystem_freenode( &loc );
30005bb4: e1a00004 mov r0, r4
30005bb8: ebfff49c bl 30002e30 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
30005bbc: eb0020ca bl 3000deec <__errno>
30005bc0: e3a0300d mov r3, #13
30005bc4: ea000011 b 30005c10 <unmount+0xa8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
30005bc8: e1a00004 mov r0, r4
30005bcc: ebfff497 bl 30002e30 <rtems_filesystem_freenode>
* 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 )
30005bd0: e59f30d8 ldr r3, [pc, #216] ; 30005cb0 <unmount+0x148>
30005bd4: e5933000 ldr r3, [r3]
30005bd8: e5933014 ldr r3, [r3, #20]
30005bdc: e1530005 cmp r3, r5
30005be0: 0a000008 beq 30005c08 <unmount+0xa0>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
30005be4: e59f00c8 ldr r0, [pc, #200] ; 30005cb4 <unmount+0x14c>
30005be8: e595102c ldr r1, [r5, #44] ; 0x2c
30005bec: ebfff6b1 bl 300036b8 <rtems_filesystem_mount_iterate>
30005bf0: e3500000 cmp r0, #0
30005bf4: 1a000003 bne 30005c08 <unmount+0xa0>
* 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 )
30005bf8: e1a00005 mov r0, r5
30005bfc: ebfff566 bl 3000319c <rtems_libio_is_open_files_in_fs>
30005c00: e3500001 cmp r0, #1
30005c04: 1a000003 bne 30005c18 <unmount+0xb0>
rtems_set_errno_and_return_minus_one( EBUSY );
30005c08: eb0020b7 bl 3000deec <__errno>
30005c0c: e3a03010 mov r3, #16
30005c10: e5803000 str r3, [r0]
30005c14: ea000022 b 30005ca4 <unmount+0x13c>
* 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 )
30005c18: e5953014 ldr r3, [r5, #20]
30005c1c: e1a00005 mov r0, r5
30005c20: e1a0e00f mov lr, pc
30005c24: e593f028 ldr pc, [r3, #40] ; 0x28
30005c28: e2506000 subs r6, r0, #0
30005c2c: 1a00001c bne 30005ca4 <unmount+0x13c>
* 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){
30005c30: e5953028 ldr r3, [r5, #40] ; 0x28
30005c34: e1a00005 mov r0, r5
30005c38: e1a0e00f mov lr, pc
30005c3c: e593f02c ldr pc, [r3, #44] ; 0x2c
30005c40: e2504000 subs r4, r0, #0
30005c44: 0a000007 beq 30005c68 <unmount+0x100>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
30005c48: e5953014 ldr r3, [r5, #20]
30005c4c: e1a00005 mov r0, r5 <== NOT EXECUTED
30005c50: e1a0e00f mov lr, pc <== NOT EXECUTED
30005c54: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
30005c58: e3500000 cmp r0, #0 <== NOT EXECUTED
30005c5c: 0a000010 beq 30005ca4 <unmount+0x13c> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
30005c60: e1a00006 mov r0, r6 <== NOT EXECUTED
30005c64: eb0003e4 bl 30006bfc <rtems_fatal_error_occurred> <== NOT EXECUTED
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 );
30005c68: e59f6048 ldr r6, [pc, #72] ; 30005cb8 <unmount+0x150>
30005c6c: e1a01004 mov r1, r4
30005c70: e1a02004 mov r2, r4
30005c74: e5960000 ldr r0, [r6]
30005c78: eb00025b bl 300065ec <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30005c7c: e1a00005 mov r0, r5
30005c80: eb0004a5 bl 30006f1c <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
30005c84: e5960000 ldr r0, [r6]
30005c88: eb00029d bl 30006704 <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 );
30005c8c: e2850008 add r0, r5, #8
30005c90: ebfff466 bl 30002e30 <rtems_filesystem_freenode>
free( mt_entry );
30005c94: e1a00005 mov r0, r5
30005c98: ebfff469 bl 30002e44 <free>
return 0;
30005c9c: e1a00004 mov r0, r4
30005ca0: ea000000 b 30005ca8 <unmount+0x140>
*/
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;
30005ca4: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
30005ca8: e28dd018 add sp, sp, #24
30005cac: e8bd8070 pop {r4, r5, r6, pc}