30009c58 <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 ) {
30009c58: e5903000 ldr r3, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
30009c5c: e5902010 ldr r2, [r0, #16]
switch( node->type ) {
30009c60: e593304c ldr r3, [r3, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
30009c64: e5922034 ldr r2, [r2, #52] ; 0x34
switch( node->type ) {
30009c68: e2433001 sub r3, r3, #1 30009c6c: e3530006 cmp r3, #6 30009c70: 979ff103 ldrls pc, [pc, r3, lsl #2] 30009c74: ea000008 b 30009c9c <IMFS_Set_handlers+0x44> 30009c78: 30009cc4 .word 0x30009cc4 30009c7c: 30009cd4 .word 0x30009cd4 30009c80: 30009cb4 .word 0x30009cb4 30009c84: 30009cb4 .word 0x30009cb4 30009c88: 30009ca4 .word 0x30009ca4 30009c8c: 30009ca4 .word 0x30009ca4 30009c90: 30009c94 .word 0x30009c94
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
30009c94: e59f3048 ldr r3, [pc, #72] ; 30009ce4 <IMFS_Set_handlers+0x8c> 30009c98: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
30009c9c: e3a00000 mov r0, #0 30009ca0: e12fff1e bx lr
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
30009ca4: e5923008 ldr r3, [r2, #8] 30009ca8: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
30009cac: e3a00000 mov r0, #0 30009cb0: e12fff1e bx lr
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
30009cb4: e59f302c ldr r3, [pc, #44] ; 30009ce8 <IMFS_Set_handlers+0x90> 30009cb8: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
30009cbc: e3a00000 mov r0, #0 30009cc0: e12fff1e bx lr
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
30009cc4: e592300c ldr r3, [r2, #12] 30009cc8: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
30009ccc: e3a00000 mov r0, #0 30009cd0: e12fff1e bx lr
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
30009cd4: e59f3010 ldr r3, [pc, #16] ; 30009cec <IMFS_Set_handlers+0x94> 30009cd8: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
30009cdc: e3a00000 mov r0, #0 30009ce0: e12fff1e bx lr
30009b10 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
30009b10: e92d40f0 push {r4, r5, r6, r7, lr}
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30009b14: e2504000 subs r4, r0, #0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
30009b18: e1a05001 mov r5, r1 30009b1c: e59d6014 ldr r6, [sp, #20]
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30009b20: 01a07004 moveq r7, r4
30009b24: 1a000001 bne 30009b30 <IMFS_create_node+0x20>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
30009b28: e1a00007 mov r0, r7 <== NOT EXECUTED
30009b2c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
30009b30: e1a01002 mov r1, r2 30009b34: e59f210c ldr r2, [pc, #268] ; 30009c48 <IMFS_create_node+0x138> 30009b38: e1a00005 mov r0, r5 30009b3c: e5922000 ldr r2, [r2] 30009b40: e592202c ldr r2, [r2, #44] ; 0x2c 30009b44: e1c32002 bic r2, r3, r2 30009b48: ebffffc1 bl 30009a54 <IMFS_allocate_node>
if ( !node )
30009b4c: e2507000 subs r7, r0, #0
30009b50: 0afffff4 beq 30009b28 <IMFS_create_node+0x18>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
30009b54: e2455001 sub r5, r5, #1 30009b58: e3550006 cmp r5, #6 30009b5c: 979ff105 ldrls pc, [pc, r5, lsl #2]
30009b60: ea000033 b 30009c34 <IMFS_create_node+0x124> <== NOT EXECUTED 30009b64: 30009c18 .word 0x30009c18 <== NOT EXECUTED 30009b68: 30009c04 .word 0x30009c04 <== NOT EXECUTED 30009b6c: 30009b80 .word 0x30009b80 <== NOT EXECUTED 30009b70: 30009b80 .word 0x30009b80 <== NOT EXECUTED 30009b74: 30009bd4 .word 0x30009bd4 <== NOT EXECUTED 30009b78: 30009bbc .word 0x30009bbc <== NOT EXECUTED 30009b7c: 30009bf8 .word 0x30009bf8 <== NOT EXECUTED
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
30009b80: e5963000 ldr r3, [r6] 30009b84: e5873050 str r3, [r7, #80] ; 0x50
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
30009b88: e5943010 ldr r3, [r4, #16]
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
30009b8c: e5940000 ldr r0, [r4]
fs_info = parent_loc->mt_entry->fs_info;
30009b90: e5932034 ldr r2, [r3, #52] ; 0x34
node->Parent = parent;
30009b94: e5870008 str r0, [r7, #8]
node->st_ino = ++fs_info->ino_count;
30009b98: e5923004 ldr r3, [r2, #4] 30009b9c: e2800050 add r0, r0, #80 ; 0x50 30009ba0: e2833001 add r3, r3, #1 30009ba4: e5823004 str r3, [r2, #4] 30009ba8: e1a01007 mov r1, r7 30009bac: e5873038 str r3, [r7, #56] ; 0x38 30009bb0: ebfff147 bl 300060d4 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
30009bb4: e1a00007 mov r0, r7
30009bb8: e8bd80f0 pop {r4, r5, r6, r7, pc}
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
30009bbc: e3a03000 mov r3, #0 <== NOT EXECUTED 30009bc0: e3a02000 mov r2, #0 <== NOT EXECUTED 30009bc4: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED 30009bc8: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED
node->info.linearfile.direct = 0;
30009bcc: e3a03000 mov r3, #0 <== NOT EXECUTED 30009bd0: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
30009bd4: e3a03000 mov r3, #0
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
30009bd8: e3a01000 mov r1, #0 30009bdc: e3a02000 mov r2, #0 30009be0: e5871050 str r1, [r7, #80] ; 0x50 30009be4: e5872054 str r2, [r7, #84] ; 0x54
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
30009be8: e5873060 str r3, [r7, #96] ; 0x60
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
30009bec: e5873058 str r3, [r7, #88] ; 0x58
node->info.file.doubly_indirect = 0;
30009bf0: e587305c str r3, [r7, #92] ; 0x5c
node->info.file.triply_indirect = 0;
break;
30009bf4: eaffffe3 b 30009b88 <IMFS_create_node+0x78>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
30009bf8: e3a03000 mov r3, #0 30009bfc: e5873050 str r3, [r7, #80] ; 0x50
break;
30009c00: eaffffe0 b 30009b88 <IMFS_create_node+0x78>
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
30009c04: e5962004 ldr r2, [r6, #4]
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
30009c08: e5963000 ldr r3, [r6]
node->info.device.minor = info->device.minor;
30009c0c: e5872054 str r2, [r7, #84] ; 0x54
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
30009c10: e5873050 str r3, [r7, #80] ; 0x50
node->info.device.minor = info->device.minor;
break;
30009c14: eaffffdb b 30009b88 <IMFS_create_node+0x78>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30009c18: e2872054 add r2, r7, #84 ; 0x54
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
30009c1c: e2873050 add r3, r7, #80 ; 0x50
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30009c20: e5872050 str r2, [r7, #80] ; 0x50
the_chain->permanent_null = NULL;
30009c24: e3a02000 mov r2, #0 30009c28: e5872054 str r2, [r7, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
30009c2c: e5873058 str r3, [r7, #88] ; 0x58 30009c30: eaffffd4 b 30009b88 <IMFS_create_node+0x78>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
break;
default:
assert(0);
30009c34: e59f0010 ldr r0, [pc, #16] ; 30009c4c <IMFS_create_node+0x13c><== NOT EXECUTED 30009c38: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED 30009c3c: e59f200c ldr r2, [pc, #12] ; 30009c50 <IMFS_create_node+0x140><== NOT EXECUTED 30009c40: e59f300c ldr r3, [pc, #12] ; 30009c54 <IMFS_create_node+0x144><== NOT EXECUTED 30009c44: eb000380 bl 3000aa4c <__assert_func> <== NOT EXECUTED
300042c8 <IMFS_dump_directory>:
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
300042c8: e3500000 cmp r0, #0
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
300042cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
300042d0: e1a05001 mov r5, r1
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
300042d4: 0a000021 beq 30004360 <IMFS_dump_directory+0x98>
assert( level >= 0 );
300042d8: e3510000 cmp r1, #0
300042dc: ba000029 blt 30004388 <IMFS_dump_directory+0xc0>
assert( the_directory->type == IMFS_DIRECTORY );
300042e0: e590304c ldr r3, [r0, #76] ; 0x4c 300042e4: e3530001 cmp r3, #1
300042e8: 1a000021 bne 30004374 <IMFS_dump_directory+0xac>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
300042ec: e5907050 ldr r7, [r0, #80] ; 0x50
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300042f0: e2808054 add r8, r0, #84 ; 0x54
300042f4: e1570008 cmp r7, r8
300042f8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
300042fc: e59f6098 ldr r6, [pc, #152] ; 3000439c <IMFS_dump_directory+0xd4>
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
30004300: e281a001 add sl, r1, #1
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
30004304: e3a04000 mov r4, #0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
30004308: e5963000 ldr r3, [r6]
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
3000430c: e2844001 add r4, r4, #1
fprintf(stdout, "...." );
30004310: e5933008 ldr r3, [r3, #8] 30004314: e59f0084 ldr r0, [pc, #132] ; 300043a0 <IMFS_dump_directory+0xd8> 30004318: e3a01001 mov r1, #1 3000431c: e3a02004 mov r2, #4 30004320: eb003d6f bl 300138e4 <fwrite>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
30004324: e1550004 cmp r5, r4
30004328: aafffff6 bge 30004308 <IMFS_dump_directory+0x40>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
3000432c: e1a00007 mov r0, r7 30004330: ebffff7a bl 30004120 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
30004334: e597304c ldr r3, [r7, #76] ; 0x4c 30004338: e3530001 cmp r3, #1
3000433c: 0a000003 beq 30004350 <IMFS_dump_directory+0x88>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
30004340: e5977000 ldr r7, [r7]
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
30004344: e1570008 cmp r7, r8
30004348: 1affffed bne 30004304 <IMFS_dump_directory+0x3c>
3000434c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
30004350: e1a00007 mov r0, r7 30004354: e1a0100a mov r1, sl 30004358: ebffffda bl 300042c8 <IMFS_dump_directory> 3000435c: eafffff7 b 30004340 <IMFS_dump_directory+0x78>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
30004360: e59f003c ldr r0, [pc, #60] ; 300043a4 <IMFS_dump_directory+0xdc><== NOT EXECUTED 30004364: e3a01084 mov r1, #132 ; 0x84 <== NOT EXECUTED 30004368: e59f2038 ldr r2, [pc, #56] ; 300043a8 <IMFS_dump_directory+0xe0><== NOT EXECUTED 3000436c: e59f3038 ldr r3, [pc, #56] ; 300043ac <IMFS_dump_directory+0xe4><== NOT EXECUTED 30004370: eb00021f bl 30004bf4 <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
30004374: e59f0028 ldr r0, [pc, #40] ; 300043a4 <IMFS_dump_directory+0xdc><== NOT EXECUTED 30004378: e3a01088 mov r1, #136 ; 0x88 <== NOT EXECUTED 3000437c: e59f2024 ldr r2, [pc, #36] ; 300043a8 <IMFS_dump_directory+0xe0><== NOT EXECUTED 30004380: e59f3028 ldr r3, [pc, #40] ; 300043b0 <IMFS_dump_directory+0xe8><== NOT EXECUTED 30004384: eb00021a bl 30004bf4 <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
30004388: e59f0014 ldr r0, [pc, #20] ; 300043a4 <IMFS_dump_directory+0xdc><== NOT EXECUTED 3000438c: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 30004390: e59f2010 ldr r2, [pc, #16] ; 300043a8 <IMFS_dump_directory+0xe0><== NOT EXECUTED 30004394: e59f3018 ldr r3, [pc, #24] ; 300043b4 <IMFS_dump_directory+0xec><== NOT EXECUTED 30004398: eb000215 bl 30004bf4 <__assert_func> <== NOT EXECUTED
30009e50 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30009e50: 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 ) ) {
30009e54: e3d25007 bics r5, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30009e58: e24dd040 sub sp, sp, #64 ; 0x40 30009e5c: e58d2000 str r2, [sp] 30009e60: e1a0a000 mov sl, r0 30009e64: e1a04001 mov r4, r1 30009e68: e1a07003 mov r7, r3
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 ) ) {
30009e6c: 1a000091 bne 3000a0b8 <IMFS_eval_path+0x268>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30009e70: e5936000 ldr r6, [r3] 30009e74: e28d8004 add r8, sp, #4 30009e78: e28d903c add r9, sp, #60 ; 0x3c
* 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 );
30009e7c: e1a02008 mov r2, r8 30009e80: e1a03009 mov r3, r9 30009e84: e08a0005 add r0, sl, r5 30009e88: e1a01004 mov r1, r4 30009e8c: eb000254 bl 3000a7e4 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30009e90: e5973000 ldr r3, [r7]
* 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 );
30009e94: e1a0b000 mov fp, r0
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30009e98: 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;
30009e9c: e59d203c ldr r2, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
30009ea0: 0a00004e beq 30009fe0 <IMFS_eval_path+0x190>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30009ea4: e3500000 cmp r0, #0
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
i += len;
30009ea8: e0855002 add r5, r5, r2
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30009eac: e0624004 rsb r4, r2, r4
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30009eb0: 1a00000f bne 30009ef4 <IMFS_eval_path+0xa4>
* 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 ) {
30009eb4: e593204c ldr r2, [r3, #76] ; 0x4c 30009eb8: e3520001 cmp r2, #1
30009ebc: 0a000054 beq 3000a014 <IMFS_eval_path+0x1c4>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30009ec0: e1a00007 mov r0, r7 30009ec4: ebffff63 bl 30009c58 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30009ec8: e59d1000 ldr r1, [sp]
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30009ecc: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30009ed0: e1a00007 mov r0, r7 30009ed4: ebffff85 bl 30009cf0 <IMFS_evaluate_permission> 30009ed8: e3500000 cmp r0, #0
30009edc: 1a000036 bne 30009fbc <IMFS_eval_path+0x16c>
rtems_set_errno_and_return_minus_one( EACCES );
30009ee0: eb001135 bl 3000e3bc <__errno> 30009ee4: e3a0300d mov r3, #13 30009ee8: e5803000 str r3, [r0] 30009eec: e3e0b000 mvn fp, #0 30009ef0: ea000031 b 30009fbc <IMFS_eval_path+0x16c>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
30009ef4: e596104c ldr r1, [r6, #76] ; 0x4c 30009ef8: e3510001 cmp r1, #1
30009efc: 0a000031 beq 30009fc8 <IMFS_eval_path+0x178>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
30009f00: e35b0003 cmp fp, #3
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;
30009f04: e1a06003 mov r6, r3
switch( type ) {
30009f08: 0a000006 beq 30009f28 <IMFS_eval_path+0xd8>
30009f0c: e35b0004 cmp fp, #4
30009f10: 0a000025 beq 30009fac <IMFS_eval_path+0x15c>
30009f14: e35b0002 cmp fp, #2
30009f18: 0a000013 beq 30009f6c <IMFS_eval_path+0x11c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
30009f1c: e35b0004 cmp fp, #4
30009f20: 1affffd5 bne 30009e7c <IMFS_eval_path+0x2c>
30009f24: eaffffe2 b 30009eb4 <IMFS_eval_path+0x64> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
30009f28: e593304c ldr r3, [r3, #76] ; 0x4c 30009f2c: e3530003 cmp r3, #3
30009f30: 0a00002f beq 30009ff4 <IMFS_eval_path+0x1a4>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
30009f34: e3530004 cmp r3, #4
30009f38: 0a000053 beq 3000a08c <IMFS_eval_path+0x23c>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30009f3c: e3530001 cmp r3, #1
30009f40: 1a00004c bne 3000a078 <IMFS_eval_path+0x228>
/*
* 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 ) {
30009f44: e596e05c ldr lr, [r6, #92] ; 0x5c 30009f48: e35e0000 cmp lr, #0
30009f4c: 1a000033 bne 3000a020 <IMFS_eval_path+0x1d0>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
30009f50: e1a00006 mov r0, r6 30009f54: e1a01008 mov r1, r8 30009f58: eb0001f2 bl 3000a728 <IMFS_find_match_in_dir>
if ( !node )
30009f5c: e2506000 subs r6, r0, #0
30009f60: 0a00001e beq 30009fe0 <IMFS_eval_path+0x190>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
30009f64: e5876000 str r6, [r7]
break;
30009f68: eaffffc3 b 30009e7c <IMFS_eval_path+0x2c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30009f6c: e59f1158 ldr r1, [pc, #344] ; 3000a0cc <IMFS_eval_path+0x27c> 30009f70: e5912000 ldr r2, [r1] 30009f74: e5922018 ldr r2, [r2, #24] 30009f78: e1520003 cmp r2, r3
30009f7c: 0affffbe beq 30009e7c <IMFS_eval_path+0x2c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
30009f80: e597e010 ldr lr, [r7, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
30009f84: e59e201c ldr r2, [lr, #28] 30009f88: e1520003 cmp r2, r3
30009f8c: 0a000047 beq 3000a0b0 <IMFS_eval_path+0x260>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
30009f90: e5936008 ldr r6, [r3, #8] 30009f94: e3560000 cmp r6, #0
30009f98: 1afffff1 bne 30009f64 <IMFS_eval_path+0x114>
rtems_set_errno_and_return_minus_one( ENOENT );
30009f9c: eb001106 bl 3000e3bc <__errno> 30009fa0: e580b000 str fp, [r0] 30009fa4: e3e0b000 mvn fp, #0 30009fa8: ea000003 b 30009fbc <IMFS_eval_path+0x16c>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30009fac: eb001102 bl 3000e3bc <__errno> 30009fb0: e3a0305b mov r3, #91 ; 0x5b 30009fb4: e5803000 str r3, [r0] 30009fb8: e3e0b000 mvn fp, #0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009fbc: e1a0000b mov r0, fp
30009fc0: e28dd040 add sp, sp, #64 ; 0x40
30009fc4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30009fc8: e1a00007 mov r0, r7 30009fcc: ebffff47 bl 30009cf0 <IMFS_evaluate_permission> 30009fd0: e3500000 cmp r0, #0
30009fd4: 0affffc1 beq 30009ee0 <IMFS_eval_path+0x90>
30009fd8: e5973000 ldr r3, [r7] 30009fdc: eaffffc7 b 30009f00 <IMFS_eval_path+0xb0>
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
30009fe0: eb0010f5 bl 3000e3bc <__errno> 30009fe4: e3a03002 mov r3, #2 30009fe8: e5803000 str r3, [r0] 30009fec: e3e0b000 mvn fp, #0 30009ff0: eafffff1 b 30009fbc <IMFS_eval_path+0x16c>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
30009ff4: e1a00007 mov r0, r7 30009ff8: e3a01000 mov r1, #0 30009ffc: ebffff4b bl 30009d30 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
3000a000: e5976000 ldr r6, [r7]
if ( !node )
3000a004: e3560000 cmp r6, #0
3000a008: 0a00001a beq 3000a078 <IMFS_eval_path+0x228>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
3000a00c: e596304c ldr r3, [r6, #76] ; 0x4c 3000a010: eaffffc9 b 30009f3c <IMFS_eval_path+0xec>
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
3000a014: e593e05c ldr lr, [r3, #92] ; 0x5c 3000a018: e35e0000 cmp lr, #0
3000a01c: 0affffa7 beq 30009ec0 <IMFS_eval_path+0x70>
newloc = node->info.directory.mt_fs->mt_fs_root;
3000a020: e28ee01c add lr, lr, #28
3000a024: e28dc028 add ip, sp, #40 ; 0x28
3000a028: e8be000f ldm lr!, {r0, r1, r2, r3}
3000a02c: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
3000a030: e28d6028 add r6, sp, #40 ; 0x28
3000a034: e8b6000f ldm r6!, {r0, r1, r2, r3}
3000a038: e1a06007 mov r6, r7
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
3000a03c: e59ee000 ldr lr, [lr]
*pathloc = newloc;
3000a040: e8a6000f stmia r6!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
3000a044: e59d103c ldr r1, [sp, #60] ; 0x3c
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
3000a048: e586e000 str lr, [r6]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
3000a04c: e0610005 rsb r0, r1, r5
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
3000a050: e58ce000 str lr, [ip]
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
3000a054: e08a0000 add r0, sl, r0 3000a058: e0841001 add r1, r4, r1 3000a05c: e59d2000 ldr r2, [sp] 3000a060: e1a03007 mov r3, r7 3000a064: e597c00c ldr ip, [r7, #12] 3000a068: e1a0e00f mov lr, pc 3000a06c: e59cf000 ldr pc, [ip] 3000a070: e1a0b000 mov fp, r0 3000a074: eaffffd0 b 30009fbc <IMFS_eval_path+0x16c>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000a078: eb0010cf bl 3000e3bc <__errno> 3000a07c: e3a03014 mov r3, #20 3000a080: e5803000 str r3, [r0] 3000a084: e3e0b000 mvn fp, #0 3000a088: eaffffcb b 30009fbc <IMFS_eval_path+0x16c>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
3000a08c: e1a00007 mov r0, r7 3000a090: e3a01000 mov r1, #0 3000a094: ebffff3d bl 30009d90 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
3000a098: e3700001 cmn r0, #1
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
3000a09c: e1a0b000 mov fp, r0
node = pathloc->node_access;
3000a0a0: e5976000 ldr r6, [r7]
if ( result == -1 )
3000a0a4: 0affffc4 beq 30009fbc <IMFS_eval_path+0x16c>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
3000a0a8: e596304c ldr r3, [r6, #76] ; 0x4c 3000a0ac: eaffffa2 b 30009f3c <IMFS_eval_path+0xec>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
3000a0b0: e28ee008 add lr, lr, #8 3000a0b4: eaffffda b 3000a024 <IMFS_eval_path+0x1d4>
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
3000a0b8: e59f0010 ldr r0, [pc, #16] ; 3000a0d0 <IMFS_eval_path+0x280><== NOT EXECUTED 3000a0bc: e59f1010 ldr r1, [pc, #16] ; 3000a0d4 <IMFS_eval_path+0x284><== NOT EXECUTED 3000a0c0: e59f2010 ldr r2, [pc, #16] ; 3000a0d8 <IMFS_eval_path+0x288><== NOT EXECUTED 3000a0c4: e59f3010 ldr r3, [pc, #16] ; 3000a0dc <IMFS_eval_path+0x28c><== NOT EXECUTED 3000a0c8: eb00025f bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000a1b4 <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 */
)
{
3000a1b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000a1b8: e24dd040 sub sp, sp, #64 ; 0x40
3000a1bc: e1a06001 mov r6, r1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
3000a1c0: e5915000 ldr r5, [r1]
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
3000a1c4: e58d2000 str r2, [sp] 3000a1c8: e1a0a000 mov sl, r0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
3000a1cc: eb00147f bl 3000f3d0 <strlen> 3000a1d0: e3a07000 mov r7, #0 3000a1d4: e28d8004 add r8, sp, #4 3000a1d8: e1a04000 mov r4, r0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
3000a1dc: e1a01004 mov r1, r4 3000a1e0: e28d303c add r3, sp, #60 ; 0x3c 3000a1e4: e08a0007 add r0, sl, r7 3000a1e8: e1a02008 mov r2, r8 3000a1ec: eb00017c bl 3000a7e4 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
3000a1f0: e5963000 ldr r3, [r6]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
3000a1f4: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
3000a1f8: 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 );
3000a1fc: e1a09000 mov r9, r0
pathlen -= len;
3000a200: e06b4004 rsb r4, fp, r4
i += len;
if ( !pathloc->node_access )
3000a204: 0a00003a beq 3000a2f4 <IMFS_evaluate_for_make+0x140>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
3000a208: e3500000 cmp r0, #0
3000a20c: 1a000006 bne 3000a22c <IMFS_evaluate_for_make+0x78>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
3000a210: eb001069 bl 3000e3bc <__errno> 3000a214: e3a03011 mov r3, #17 3000a218: e5803000 str r3, [r0] 3000a21c: e3e05000 mvn r5, #0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
3000a220: e1a00005 mov r0, r5
3000a224: e28dd040 add sp, sp, #64 ; 0x40
3000a228: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
3000a22c: e595104c ldr r1, [r5, #76] ; 0x4c 3000a230: e3510001 cmp r1, #1
3000a234: 0a000044 beq 3000a34c <IMFS_evaluate_for_make+0x198>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
3000a238: 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;
3000a23c: e1a05003 mov r5, r3
switch( type ) {
3000a240: e3590004 cmp r9, #4 3000a244: 979ff109 ldrls pc, [pc, r9, lsl #2]
3000a248: eaffffe3 b 3000a1dc <IMFS_evaluate_for_make+0x28> <== NOT EXECUTED 3000a24c: 3000a210 .word 0x3000a210 <== NOT EXECUTED 3000a250: 3000a1dc .word 0x3000a1dc <== NOT EXECUTED 3000a254: 3000a2c4 .word 0x3000a2c4 <== NOT EXECUTED 3000a258: 3000a274 .word 0x3000a274 <== NOT EXECUTED 3000a25c: 3000a260 .word 0x3000a260 <== NOT EXECUTED
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
3000a260: eb001055 bl 3000e3bc <__errno> 3000a264: e3a0305b mov r3, #91 ; 0x5b 3000a268: e5803000 str r3, [r0] 3000a26c: e3e05000 mvn r5, #0 3000a270: eaffffea b 3000a220 <IMFS_evaluate_for_make+0x6c>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
3000a274: e593304c ldr r3, [r3, #76] ; 0x4c 3000a278: e3530003 cmp r3, #3
3000a27c: 0a000063 beq 3000a410 <IMFS_evaluate_for_make+0x25c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
3000a280: e3530004 cmp r3, #4
3000a284: 0a000061 beq 3000a410 <IMFS_evaluate_for_make+0x25c>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
3000a288: e3550000 cmp r5, #0
3000a28c: 0a000045 beq 3000a3a8 <IMFS_evaluate_for_make+0x1f4>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
3000a290: e595304c ldr r3, [r5, #76] ; 0x4c 3000a294: e3530001 cmp r3, #1
3000a298: 1a000042 bne 3000a3a8 <IMFS_evaluate_for_make+0x1f4>
/*
* 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 ) {
3000a29c: e595e05c ldr lr, [r5, #92] ; 0x5c 3000a2a0: e35e0000 cmp lr, #0
3000a2a4: 1a000044 bne 3000a3bc <IMFS_evaluate_for_make+0x208>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
3000a2a8: e1a00005 mov r0, r5 3000a2ac: e1a01008 mov r1, r8 3000a2b0: eb00011c bl 3000a728 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
3000a2b4: e2505000 subs r5, r0, #0
3000a2b8: 0a000012 beq 3000a308 <IMFS_evaluate_for_make+0x154>
done = true;
else
pathloc->node_access = node;
3000a2bc: e5865000 str r5, [r6] 3000a2c0: eaffffc5 b 3000a1dc <IMFS_evaluate_for_make+0x28>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
3000a2c4: e59f116c ldr r1, [pc, #364] ; 3000a438 <IMFS_evaluate_for_make+0x284> 3000a2c8: e5912000 ldr r2, [r1] 3000a2cc: e5922018 ldr r2, [r2, #24] 3000a2d0: e1520003 cmp r2, r3
3000a2d4: 0affffc0 beq 3000a1dc <IMFS_evaluate_for_make+0x28>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
3000a2d8: e596e010 ldr lr, [r6, #16] 3000a2dc: e59e201c ldr r2, [lr, #28] 3000a2e0: e1520003 cmp r2, r3
3000a2e4: 0a000051 beq 3000a430 <IMFS_evaluate_for_make+0x27c>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
3000a2e8: e5935008 ldr r5, [r3, #8] 3000a2ec: e3550000 cmp r5, #0
3000a2f0: 1afffff1 bne 3000a2bc <IMFS_evaluate_for_make+0x108>
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
3000a2f4: eb001030 bl 3000e3bc <__errno> 3000a2f8: e3a03002 mov r3, #2 3000a2fc: e5803000 str r3, [r0] 3000a300: e3e05000 mvn r5, #0 3000a304: eaffffc5 b 3000a220 <IMFS_evaluate_for_make+0x6c>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
3000a308: e59d303c ldr r3, [sp, #60] ; 0x3c 3000a30c: e59d1000 ldr r1, [sp] 3000a310: e0633007 rsb r3, r3, r7 3000a314: e08a3003 add r3, sl, r3 3000a318: e5813000 str r3, [r1]
/*
* 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++) {
3000a31c: e7da0007 ldrb r0, [sl, r7] 3000a320: e3500000 cmp r0, #0
3000a324: 0a00000e beq 3000a364 <IMFS_evaluate_for_make+0x1b0>
3000a328: e08a7007 add r7, sl, r7 3000a32c: ea000002 b 3000a33c <IMFS_evaluate_for_make+0x188> 3000a330: e5f70001 ldrb r0, [r7, #1]! 3000a334: e3500000 cmp r0, #0
3000a338: 0a000009 beq 3000a364 <IMFS_evaluate_for_make+0x1b0>
if ( !IMFS_is_separator( path[ i ] ) )
3000a33c: ebffe332 bl 3000300c <rtems_filesystem_is_separator> 3000a340: e3500000 cmp r0, #0
3000a344: 1afffff9 bne 3000a330 <IMFS_evaluate_for_make+0x17c>
3000a348: eaffffe9 b 3000a2f4 <IMFS_evaluate_for_make+0x140>
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
3000a34c: e1a00006 mov r0, r6 3000a350: ebfffe66 bl 30009cf0 <IMFS_evaluate_permission> 3000a354: e3500000 cmp r0, #0
3000a358: 0a00000d beq 3000a394 <IMFS_evaluate_for_make+0x1e0>
3000a35c: e5963000 ldr r3, [r6] 3000a360: eaffffb4 b 3000a238 <IMFS_evaluate_for_make+0x84>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
3000a364: e1a00006 mov r0, r6 3000a368: ebfffe3a bl 30009c58 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
3000a36c: e5963000 ldr r3, [r6]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
3000a370: e1a05000 mov r5, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
3000a374: e593304c ldr r3, [r3, #76] ; 0x4c 3000a378: e3530001 cmp r3, #1
3000a37c: 1a000009 bne 3000a3a8 <IMFS_evaluate_for_make+0x1f4>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
3000a380: e1a00006 mov r0, r6 3000a384: e3a01003 mov r1, #3 3000a388: ebfffe58 bl 30009cf0 <IMFS_evaluate_permission> 3000a38c: e3500000 cmp r0, #0
3000a390: 1affffa2 bne 3000a220 <IMFS_evaluate_for_make+0x6c>
rtems_set_errno_and_return_minus_one( EACCES );
3000a394: eb001008 bl 3000e3bc <__errno> 3000a398: e3a0300d mov r3, #13 3000a39c: e5803000 str r3, [r0] 3000a3a0: e3e05000 mvn r5, #0 3000a3a4: eaffff9d b 3000a220 <IMFS_evaluate_for_make+0x6c>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000a3a8: eb001003 bl 3000e3bc <__errno> 3000a3ac: e3a03014 mov r3, #20 3000a3b0: e5803000 str r3, [r0] 3000a3b4: e3e05000 mvn r5, #0 3000a3b8: eaffff98 b 3000a220 <IMFS_evaluate_for_make+0x6c>
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
3000a3bc: e28ee01c add lr, lr, #28
3000a3c0: e28dc028 add ip, sp, #40 ; 0x28
3000a3c4: e8be000f ldm lr!, {r0, r1, r2, r3}
3000a3c8: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
3000a3cc: e28d4028 add r4, sp, #40 ; 0x28
3000a3d0: e8b4000f ldm r4!, {r0, r1, r2, r3}
3000a3d4: e1a04006 mov r4, r6
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
3000a3d8: e59ee000 ldr lr, [lr]
*pathloc = newloc;
3000a3dc: e8a4000f stmia r4!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
3000a3e0: e59d003c ldr r0, [sp, #60] ; 0x3c
* 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;
3000a3e4: e584e000 str lr, [r4]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
3000a3e8: e0600007 rsb r0, r0, r7
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
3000a3ec: e58ce000 str lr, [ip]
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
3000a3f0: e08a0000 add r0, sl, r0 3000a3f4: e1a01006 mov r1, r6 3000a3f8: e59d2000 ldr r2, [sp] 3000a3fc: e596300c ldr r3, [r6, #12] 3000a400: e1a0e00f mov lr, pc 3000a404: e593f004 ldr pc, [r3, #4] 3000a408: e1a05000 mov r5, r0 3000a40c: eaffff83 b 3000a220 <IMFS_evaluate_for_make+0x6c>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
3000a410: e1a00006 mov r0, r6 3000a414: e3a01000 mov r1, #0 3000a418: ebffff30 bl 3000a0e0 <IMFS_evaluate_link>
if ( result == -1 )
3000a41c: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
3000a420: e1a05000 mov r5, r0
if ( result == -1 )
3000a424: 0affff7d beq 3000a220 <IMFS_evaluate_for_make+0x6c>
3000a428: e5965000 ldr r5, [r6] 3000a42c: eaffff95 b 3000a288 <IMFS_evaluate_for_make+0xd4>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
3000a430: e28ee008 add lr, lr, #8 3000a434: eaffffe1 b 3000a3c0 <IMFS_evaluate_for_make+0x20c>
30009d30 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
IMFS_jnode_t *jnode = node->node_access;
30009d30: e5903000 ldr r3, [r0]
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009d34: e92d4030 push {r4, r5, lr}
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
30009d38: e593204c ldr r2, [r3, #76] ; 0x4c
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009d3c: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
30009d40: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009d44: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
30009d48: 1a00000d bne 30009d84 <IMFS_evaluate_hard_link+0x54>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
30009d4c: e5933050 ldr r3, [r3, #80] ; 0x50 30009d50: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
30009d54: ebffffbf bl 30009c58 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
30009d58: e1a00004 mov r0, r4
30009d5c: e1a01005 mov r1, r5
30009d60: ebffffe2 bl 30009cf0 <IMFS_evaluate_permission>
30009d64: e3500000 cmp r0, #0
30009d68: 13a00000 movne r0, #0
30009d6c: 18bd8030 popne {r4, r5, pc}
rtems_set_errno_and_return_minus_one( EACCES );
30009d70: eb001191 bl 3000e3bc <__errno> <== NOT EXECUTED 30009d74: e3a0300d mov r3, #13 <== NOT EXECUTED 30009d78: e5803000 str r3, [r0] <== NOT EXECUTED 30009d7c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return result;
}
30009d80: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
30009d84: e59f0000 ldr r0, [pc, #0] ; 30009d8c <IMFS_evaluate_hard_link+0x5c><== NOT EXECUTED 30009d88: ebfff01b bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
30009cf0 <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 ) )
30009cf0: e3d13007 bics r3, r1, #7
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
30009cf4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
30009cf8: 1a000007 bne 30009d1c <IMFS_evaluate_permission+0x2c>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
30009cfc: e5903000 ldr r3, [r0] 30009d00: e1a01301 lsl r1, r1, #6 30009d04: e5930030 ldr r0, [r3, #48] ; 0x30 30009d08: e0010000 and r0, r1, r0 30009d0c: e1510000 cmp r1, r0 30009d10: 13a00000 movne r0, #0 30009d14: 03a00001 moveq r0, #1
return 1;
return 0;
}
30009d18: e49df004 pop {pc} ; (ldr pc, [sp], #4)
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 );
30009d1c: eb0011a6 bl 3000e3bc <__errno> <== NOT EXECUTED
30009d20: e3a03001 mov r3, #1 <== NOT EXECUTED
30009d24: e5803000 str r3, [r0] <== NOT EXECUTED
30009d28: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009d2c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30009d90 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009d90: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
30009d94: e5906000 ldr r6, [r0]
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009d98: e24dd004 sub sp, sp, #4
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30009d9c: e596304c ldr r3, [r6, #76] ; 0x4c
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009da0: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30009da4: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009da8: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30009dac: 1a000023 bne 30009e40 <IMFS_evaluate_sym_link+0xb0>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
30009db0: e5963008 ldr r3, [r6, #8] 30009db4: e3530000 cmp r3, #0
30009db8: 0a00001e beq 30009e38 <IMFS_evaluate_sym_link+0xa8>
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
30009dbc: e5803000 str r3, [r0]
rtems_filesystem_get_sym_start_loc(
30009dc0: e5960050 ldr r0, [r6, #80] ; 0x50 30009dc4: e1a0100d mov r1, sp 30009dc8: e1a02004 mov r2, r4 30009dcc: eb0004eb bl 3000b180 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
30009dd0: e59d3000 ldr r3, [sp] 30009dd4: e5966050 ldr r6, [r6, #80] ; 0x50 30009dd8: e0866003 add r6, r6, r3 30009ddc: e1a00006 mov r0, r6 30009de0: eb00157a bl 3000f3d0 <strlen> 30009de4: e1a02005 mov r2, r5 30009de8: e1a01000 mov r1, r0 30009dec: e1a03004 mov r3, r4 30009df0: e1a00006 mov r0, r6 30009df4: eb000015 bl 30009e50 <IMFS_eval_path> 30009df8: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
30009dfc: e1a00004 mov r0, r4 30009e00: ebffff94 bl 30009c58 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
30009e04: e1a00004 mov r0, r4 30009e08: e1a01005 mov r1, r5 30009e0c: ebffffb7 bl 30009cf0 <IMFS_evaluate_permission> 30009e10: e3500000 cmp r0, #0
30009e14: 0a000002 beq 30009e24 <IMFS_evaluate_sym_link+0x94>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009e18: e1a00006 mov r0, r6
30009e1c: e28dd004 add sp, sp, #4
30009e20: e8bd8070 pop {r4, r5, r6, pc}
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
30009e24: eb001164 bl 3000e3bc <__errno> <== NOT EXECUTED 30009e28: e3a0300d mov r3, #13 <== NOT EXECUTED 30009e2c: e5803000 str r3, [r0] <== NOT EXECUTED 30009e30: e3e06000 mvn r6, #0 <== NOT EXECUTED 30009e34: eafffff7 b 30009e18 <IMFS_evaluate_sym_link+0x88> <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
30009e38: e59f0008 ldr r0, [pc, #8] ; 30009e48 <IMFS_evaluate_sym_link+0xb8><== NOT EXECUTED 30009e3c: ebffefee bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
30009e40: e59f0004 ldr r0, [pc, #4] ; 30009e4c <IMFS_evaluate_sym_link+0xbc><== NOT EXECUTED 30009e44: ebffefec bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
3000a5bc <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
3000a5bc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
3000a5c0: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
3000a5c4: e1a01000 mov r1, r0 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
3000a5c8: e1a04000 mov r4, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
3000a5cc: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED 3000a5d0: ebfffbd8 bl 30009538 <pipe_release> <== NOT EXECUTED
if (! err) {
3000a5d4: e2506000 subs r6, r0, #0 <== NOT EXECUTED 3000a5d8: 0a000002 beq 3000a5e8 <IMFS_fifo_close+0x2c> <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
free(jnode);
}
IMFS_FIFO_RETURN(err);
3000a5dc: ba00000e blt 3000a61c <IMFS_fifo_close+0x60> <== NOT EXECUTED
}
3000a5e0: e1a00006 mov r0, r6 <== NOT EXECUTED
3000a5e4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
3000a5e8: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
3000a5ec: e1a00005 mov r0, r5 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
3000a5f0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 3000a5f4: e5843014 str r3, [r4, #20] <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
3000a5f8: eb0001a0 bl 3000ac80 <rtems_libio_is_file_open> <== NOT EXECUTED 3000a5fc: e3500000 cmp r0, #0 <== NOT EXECUTED 3000a600: 1afffff6 bne 3000a5e0 <IMFS_fifo_close+0x24> <== NOT EXECUTED 3000a604: e1d533b4 ldrh r3, [r5, #52] ; 0x34 <== NOT EXECUTED 3000a608: e3530000 cmp r3, #0 <== NOT EXECUTED 3000a60c: 1afffff3 bne 3000a5e0 <IMFS_fifo_close+0x24> <== NOT EXECUTED
free(jnode);
3000a610: e1a00005 mov r0, r5 <== NOT EXECUTED 3000a614: ebffdeb1 bl 300020e0 <free> <== NOT EXECUTED 3000a618: eafffff0 b 3000a5e0 <IMFS_fifo_close+0x24> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
3000a61c: eb000f66 bl 3000e3bc <__errno> <== NOT EXECUTED 3000a620: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 3000a624: e5806000 str r6, [r0] <== NOT EXECUTED 3000a628: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000a62c: eaffffeb b 3000a5e0 <IMFS_fifo_close+0x24> <== NOT EXECUTED
3000a494 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000a494: e1a03000 mov r3, r0 <== NOT EXECUTED
int err;
if (command == FIONBIO) {
3000a498: e59f0064 ldr r0, [pc, #100] ; 3000a504 <IMFS_fifo_ioctl+0x70><== NOT EXECUTED
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000a49c: e92d4010 push {r4, lr} <== NOT EXECUTED
int err;
if (command == FIONBIO) {
3000a4a0: e1510000 cmp r1, r0 <== NOT EXECUTED 3000a4a4: 0a000009 beq 3000a4d0 <IMFS_fifo_ioctl+0x3c> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
3000a4a8: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 3000a4ac: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 3000a4b0: ebfffb1a bl 30009120 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
3000a4b4: e3500000 cmp r0, #0 <== NOT EXECUTED
3000a4b8: a8bd8010 popge {r4, pc} <== NOT EXECUTED
3000a4bc: e2604000 rsb r4, r0, #0 <== NOT EXECUTED
3000a4c0: eb000fbd bl 3000e3bc <__errno> <== NOT EXECUTED
3000a4c4: e5804000 str r4, [r0] <== NOT EXECUTED
3000a4c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
3000a4cc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
3000a4d0: e3520000 cmp r2, #0 <== NOT EXECUTED 3000a4d4: 03a0400e moveq r4, #14 <== NOT EXECUTED 3000a4d8: 0afffff8 beq 3000a4c0 <IMFS_fifo_ioctl+0x2c> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
3000a4dc: e5920000 ldr r0, [r2] <== NOT EXECUTED 3000a4e0: e3500000 cmp r0, #0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
3000a4e4: 15932014 ldrne r2, [r3, #20] <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
3000a4e8: 05932014 ldreq r2, [r3, #20] <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
3000a4ec: 13822001 orrne r2, r2, #1 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
3000a4f0: 03c22001 biceq r2, r2, #1 <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
3000a4f4: 13a00000 movne r0, #0 <== NOT EXECUTED 3000a4f8: 15832014 strne r2, [r3, #20] <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
3000a4fc: 05832014 streq r2, [r3, #20] <== NOT EXECUTED
3000a500: e8bd8010 pop {r4, pc} <== NOT EXECUTED
3000a43c <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000a43c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
3000a440: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000a444: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
3000a448: e59cc050 ldr ip, [ip, #80] ; 0x50 <== NOT EXECUTED 3000a44c: e58d0000 str r0, [sp] <== NOT EXECUTED 3000a450: e1a0000c mov r0, ip <== NOT EXECUTED 3000a454: ebfffb13 bl 300090a8 <pipe_lseek> <== NOT EXECUTED 3000a458: e1a03000 mov r3, r0 <== NOT EXECUTED 3000a45c: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
3000a460: e3540000 cmp r4, #0 <== NOT EXECUTED
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
3000a464: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
3000a468: ba000003 blt 3000a47c <IMFS_fifo_lseek+0x40> <== NOT EXECUTED
}
3000a46c: e1a01004 mov r1, r4 <== NOT EXECUTED
3000a470: e1a00003 mov r0, r3 <== NOT EXECUTED
3000a474: e28dd004 add sp, sp, #4 <== NOT EXECUTED
3000a478: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
3000a47c: eb000fce bl 3000e3bc <__errno> <== NOT EXECUTED 3000a480: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 3000a484: e5805000 str r5, [r0] <== NOT EXECUTED 3000a488: e3e03000 mvn r3, #0 <== NOT EXECUTED 3000a48c: e3e04000 mvn r4, #0 <== NOT EXECUTED 3000a490: eafffff5 b 3000a46c <IMFS_fifo_lseek+0x30> <== NOT EXECUTED
3000a564 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000a564: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
3000a568: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000a56c: e1a03000 mov r3, r0 <== NOT EXECUTED 3000a570: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
3000a574: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 3000a578: ebfffb80 bl 30009380 <pipe_read> <== NOT EXECUTED
if (err > 0)
3000a57c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 3000a580: da000007 ble 3000a5a4 <IMFS_fifo_read+0x40> <== NOT EXECUTED
IMFS_update_atime(jnode);
3000a584: e1a0000d mov r0, sp <== NOT EXECUTED 3000a588: e3a01000 mov r1, #0 <== NOT EXECUTED 3000a58c: ebffdefc bl 30002184 <gettimeofday> <== NOT EXECUTED 3000a590: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000a594: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
}
3000a598: e1a00005 mov r0, r5 <== NOT EXECUTED
3000a59c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3000a5a0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
3000a5a4: 0afffffb beq 3000a598 <IMFS_fifo_read+0x34> <== NOT EXECUTED 3000a5a8: eb000f83 bl 3000e3bc <__errno> <== NOT EXECUTED 3000a5ac: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 3000a5b0: e5805000 str r5, [r0] <== NOT EXECUTED 3000a5b4: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000a5b8: eafffff6 b 3000a598 <IMFS_fifo_read+0x34> <== NOT EXECUTED
3000a508 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000a508: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
3000a50c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000a510: e1a03000 mov r3, r0 <== NOT EXECUTED 3000a514: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
3000a518: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 3000a51c: ebfffb17 bl 30009180 <pipe_write> <== NOT EXECUTED
if (err > 0) {
3000a520: e2505000 subs r5, r0, #0 <== NOT EXECUTED 3000a524: da000008 ble 3000a54c <IMFS_fifo_write+0x44> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
3000a528: e1a0000d mov r0, sp <== NOT EXECUTED 3000a52c: e3a01000 mov r1, #0 <== NOT EXECUTED 3000a530: ebffdf13 bl 30002184 <gettimeofday> <== NOT EXECUTED 3000a534: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000a538: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 3000a53c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
3000a540: e1a00005 mov r0, r5 <== NOT EXECUTED
3000a544: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3000a548: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
3000a54c: 0afffffb beq 3000a540 <IMFS_fifo_write+0x38> <== NOT EXECUTED 3000a550: eb000f99 bl 3000e3bc <__errno> <== NOT EXECUTED 3000a554: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 3000a558: e5805000 str r5, [r0] <== NOT EXECUTED 3000a55c: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000a560: eafffff6 b 3000a540 <IMFS_fifo_write+0x38> <== NOT EXECUTED
3000a728 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
3000a728: e92d4070 push {r4, r5, r6, lr}
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
3000a72c: e2505000 subs r5, r0, #0
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
3000a730: e1a04001 mov r4, r1
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
3000a734: 0a000020 beq 3000a7bc <IMFS_find_match_in_dir+0x94>
if ( !name )
3000a738: e3510000 cmp r1, #0
3000a73c: 0a00000c beq 3000a774 <IMFS_find_match_in_dir+0x4c>
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
3000a740: e1a00001 mov r0, r1 3000a744: e59f1084 ldr r1, [pc, #132] ; 3000a7d0 <IMFS_find_match_in_dir+0xa8> 3000a748: eb001244 bl 3000f060 <strcmp> 3000a74c: e3500000 cmp r0, #0
3000a750: 0a000005 beq 3000a76c <IMFS_find_match_in_dir+0x44>
return directory;
if ( !strcmp( name, dotdotname ) )
3000a754: e1a00004 mov r0, r4 3000a758: e59f1074 ldr r1, [pc, #116] ; 3000a7d4 <IMFS_find_match_in_dir+0xac> 3000a75c: eb00123f bl 3000f060 <strcmp> 3000a760: e3500000 cmp r0, #0
return directory->Parent;
3000a764: 05955008 ldreq r5, [r5, #8]
*/
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
3000a768: 1a000004 bne 3000a780 <IMFS_find_match_in_dir+0x58>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
3000a76c: e1a00005 mov r0, r5
3000a770: e8bd8070 pop {r4, r5, r6, pc}
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
3000a774: e3a05000 mov r5, #0
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
3000a778: e1a00005 mov r0, r5
3000a77c: e8bd8070 pop {r4, r5, r6, pc}
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
3000a780: e5956050 ldr r6, [r5, #80] ; 0x50 3000a784: e2855054 add r5, r5, #84 ; 0x54 3000a788: e1560005 cmp r6, r5
3000a78c: 1a000003 bne 3000a7a0 <IMFS_find_match_in_dir+0x78>
3000a790: eafffff7 b 3000a774 <IMFS_find_match_in_dir+0x4c>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
3000a794: e5966000 ldr r6, [r6]
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
3000a798: e1560005 cmp r6, r5
3000a79c: 0afffff4 beq 3000a774 <IMFS_find_match_in_dir+0x4c>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
3000a7a0: e1a00004 mov r0, r4 3000a7a4: e286100c add r1, r6, #12 3000a7a8: eb00122c bl 3000f060 <strcmp> 3000a7ac: e3500000 cmp r0, #0
3000a7b0: 1afffff7 bne 3000a794 <IMFS_find_match_in_dir+0x6c>
3000a7b4: e1a05006 mov r5, r6 3000a7b8: eaffffeb b 3000a76c <IMFS_find_match_in_dir+0x44>
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
3000a7bc: e59f0014 ldr r0, [pc, #20] ; 3000a7d8 <IMFS_find_match_in_dir+0xb0><== NOT EXECUTED 3000a7c0: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED 3000a7c4: e59f2010 ldr r2, [pc, #16] ; 3000a7dc <IMFS_find_match_in_dir+0xb4><== NOT EXECUTED 3000a7c8: e59f3010 ldr r3, [pc, #16] ; 3000a7e0 <IMFS_find_match_in_dir+0xb8><== NOT EXECUTED 3000a7cc: eb00009e bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000a670 <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
)
{
3000a670: 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;
3000a674: e1a0c000 mov ip, r0 3000a678: e5bc401c ldr r4, [ip, #28]!
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
3000a67c: 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;
loc = temp_mt_entry->mt_fs_root;
3000a680: e1a0600d mov r6, sp
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
3000a684: e1a0e000 mov lr, 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;
3000a688: e8bc000f ldm ip!, {r0, r1, r2, r3}
3000a68c: e8a6000f stmia r6!, {r0, r1, r2, r3}
3000a690: e59c2000 ldr r2, [ip]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
3000a694: e3a03000 mov r3, #0
* 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;
3000a698: e5862000 str r2, [r6] 3000a69c: e1a0500d mov r5, sp
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
3000a6a0: e58e301c str r3, [lr, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
3000a6a4: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
3000a6a8: e58d4000 str r4, [sp]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
3000a6ac: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
3000a6b0: ebfffd68 bl 30009c58 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
3000a6b4: e594304c ldr r3, [r4, #76] ; 0x4c
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000a6b8: e2842054 add r2, r4, #84 ; 0x54 3000a6bc: e3530001 cmp r3, #1
3000a6c0: 1a000010 bne 3000a708 <IMFS_fsunmount+0x98>
3000a6c4: e5943050 ldr r3, [r4, #80] ; 0x50 3000a6c8: e1530002 cmp r3, r2
3000a6cc: 0a00000d beq 3000a708 <IMFS_fsunmount+0x98>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
3000a6d0: e3540000 cmp r4, #0
3000a6d4: 0a000008 beq 3000a6fc <IMFS_fsunmount+0x8c>
if ( jnode->type == IMFS_DIRECTORY ) {
3000a6d8: e594304c ldr r3, [r4, #76] ; 0x4c 3000a6dc: e3530001 cmp r3, #1
3000a6e0: 1affffef bne 3000a6a4 <IMFS_fsunmount+0x34>
3000a6e4: e5943050 ldr r3, [r4, #80] ; 0x50 3000a6e8: e2842054 add r2, r4, #84 ; 0x54 3000a6ec: e1530002 cmp r3, r2
3000a6f0: 0affffeb beq 3000a6a4 <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
3000a6f4: e2534000 subs r4, r3, #0
3000a6f8: 1affffe9 bne 3000a6a4 <IMFS_fsunmount+0x34>
3000a6fc: e3a00000 mov r0, #0
return 0;
}
3000a700: e28dd014 add sp, sp, #20
3000a704: e8bd8070 pop {r4, r5, r6, pc}
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
3000a708: e3a00000 mov r0, #0 3000a70c: e1a0100d mov r1, sp 3000a710: ebffdcf2 bl 30001ae0 <IMFS_unlink>
if (result != 0)
3000a714: e3500000 cmp r0, #0 3000a718: 01a04006 moveq r4, r6
3000a71c: 0affffeb beq 3000a6d0 <IMFS_fsunmount+0x60>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
3000a720: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000a724: eafffff5 b 3000a700 <IMFS_fsunmount+0x90> <== NOT EXECUTED
300016a8 <IMFS_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
300016a8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
300016ac: e1a04000 mov r4, r0
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
300016b0: e59f00d4 ldr r0, [pc, #212] ; 3000178c <IMFS_initialize_support+0xe4>
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
300016b4: e1a07001 mov r7, r1
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
300016b8: e5900000 ldr r0, [r0]
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
300016bc: e1a08002 mov r8, r2
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
300016c0: e3500010 cmp r0, #16
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
300016c4: e1a06003 mov r6, r3
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
300016c8: 0a000008 beq 300016f0 <IMFS_initialize_support+0x48>
300016cc: e3a03000 mov r3, #0 300016d0: e3a02020 mov r2, #32 300016d4: e1500002 cmp r0, r2 300016d8: e2833001 add r3, r3, #1
300016dc: 0a000003 beq 300016f0 <IMFS_initialize_support+0x48>
300016e0: e3530005 cmp r3, #5 300016e4: e1a02082 lsl r2, r2, #1
300016e8: 1afffff9 bne 300016d4 <IMFS_initialize_support+0x2c>
300016ec: e3a00080 mov r0, #128 ; 0x80 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
300016f0: e59f5098 ldr r5, [pc, #152] ; 30001790 <IMFS_initialize_support+0xe8> 300016f4: e5850000 str r0, [r5]
/* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
300016f8: eb0020f4 bl 30009ad0 <IMFS_create_root_node>
temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
300016fc: e59fe090 ldr lr, [pc, #144] ; 30001794 <IMFS_initialize_support+0xec> 30001700: e284c038 add ip, r4, #56 ; 0x38
/* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
30001704: e584001c str r0, [r4, #28]
temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
30001708: e8be000f ldm lr!, {r0, r1, r2, r3}
3000170c: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001710: e8be000f ldm lr!, {r0, r1, r2, r3}
30001714: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001718: e89e000f ldm lr, {r0, r1, r2, r3}
* * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table;
3000171c: e5847028 str r7, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
30001720: e88c000f stm ip, {r0, r1, r2, r3}
* Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers;
30001724: e5846024 str r6, [r4, #36] ; 0x24
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
30001728: e3a00001 mov r0, #1 3000172c: e3a01010 mov r1, #16 30001730: eb0001d4 bl 30001e88 <calloc>
if ( !fs_info ) {
30001734: e3500000 cmp r0, #0
30001738: 0a00000c beq 30001770 <IMFS_initialize_support+0xc8>
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
3000173c: e5952004 ldr r2, [r5, #4]
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
30001740: e594101c ldr r1, [r4, #28]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
30001744: e3a03001 mov r3, #1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
30001748: e880000c stm r0, {r2, r3}
fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers;
3000174c: e580600c str r6, [r0, #12]
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
30001750: e5808008 str r8, [r0, #8]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
30001754: e0822003 add r2, r2, r3
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
30001758: e5840034 str r0, [r4, #52] ; 0x34
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
3000175c: e5813038 str r3, [r1, #56] ; 0x38
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
30001760: e5852004 str r2, [r5, #4]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
30001764: eb001e51 bl 300090b0 <rtems_pipe_initialize> 30001768: e3a00000 mov r0, #0
return 0;
}
3000176c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
30001770: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 30001774: eb000259 bl 300020e0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
30001778: eb00330f bl 3000e3bc <__errno> <== NOT EXECUTED
3000177c: e3a0300c mov r3, #12 <== NOT EXECUTED
30001780: e5803000 str r3, [r0] <== NOT EXECUTED
30001784: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001788: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
30001798 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001798: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
3000179c: e5903000 ldr r3, [r0]
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
300017a0: e24dd048 sub sp, sp, #72 ; 0x48
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
300017a4: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
300017a8: e1d333b4 ldrh r3, [r3, #52] ; 0x34
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
300017ac: e1a05001 mov r5, r1
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
300017b0: e3530007 cmp r3, #7
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
300017b4: e1a06002 mov r6, r2
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
300017b8: 8a00001d bhi 30001834 <IMFS_link+0x9c>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
300017bc: e1a00002 mov r0, r2 300017c0: eb003702 bl 3000f3d0 <strlen> 300017c4: e28d4004 add r4, sp, #4 300017c8: e1a01000 mov r1, r0 300017cc: e1a02004 mov r2, r4 300017d0: e28d3044 add r3, sp, #68 ; 0x44 300017d4: e1a00006 mov r0, r6 300017d8: eb002401 bl 3000a7e4 <IMFS_get_token>
* was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node(
300017dc: e28dc028 add ip, sp, #40 ; 0x28 300017e0: e1a00005 mov r0, r5 300017e4: e1a02004 mov r2, r4 300017e8: e3a01003 mov r1, #3 300017ec: e59f3068 ldr r3, [pc, #104] ; 3000185c <IMFS_link+0xc4> 300017f0: e58dc000 str ip, [sp] 300017f4: eb0020c5 bl 30009b10 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
300017f8: e3500000 cmp r0, #0
300017fc: 0a000011 beq 30001848 <IMFS_link+0xb0>
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001800: e59d3028 ldr r3, [sp, #40] ; 0x28
IMFS_update_ctime( info.hard_link.link_node );
30001804: e28d003c add r0, sp, #60 ; 0x3c
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001808: e1d323b4 ldrh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
3000180c: e3a01000 mov r1, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001810: e2822001 add r2, r2, #1 30001814: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
30001818: eb000259 bl 30002184 <gettimeofday> 3000181c: e59d203c ldr r2, [sp, #60] ; 0x3c 30001820: e59d3028 ldr r3, [sp, #40] ; 0x28 30001824: e3a00000 mov r0, #0 30001828: e5832048 str r2, [r3, #72] ; 0x48
return 0;
}
3000182c: e28dd048 add sp, sp, #72 ; 0x48
30001830: e8bd8070 pop {r4, r5, r6, pc}
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
30001834: eb0032e0 bl 3000e3bc <__errno> 30001838: e3a0301f mov r3, #31 3000183c: e5803000 str r3, [r0] 30001840: e3e00000 mvn r0, #0 30001844: eafffff8 b 3000182c <IMFS_link+0x94>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
30001848: eb0032db bl 3000e3bc <__errno> <== NOT EXECUTED 3000184c: e3a0300c mov r3, #12 <== NOT EXECUTED 30001850: e5803000 str r3, [r0] <== NOT EXECUTED 30001854: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001858: eafffff3 b 3000182c <IMFS_link+0x94> <== NOT EXECUTED
3000caa4 <IMFS_memfile_addblock>:
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
3000caa4: e2503000 subs r3, r0, #0
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
3000caa8: e92d4030 push {r4, r5, lr}
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
3000caac: 0a00000f beq 3000caf0 <IMFS_memfile_addblock+0x4c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000cab0: e593304c ldr r3, [r3, #76] ; 0x4c 3000cab4: e3530005 cmp r3, #5
3000cab8: 1a000011 bne 3000cb04 <IMFS_memfile_addblock+0x60>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
3000cabc: e3a02001 mov r2, #1 3000cac0: ebfffe99 bl 3000c52c <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
3000cac4: e5904000 ldr r4, [r0]
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
3000cac8: e1a05000 mov r5, r0
if ( *block_entry_ptr )
3000cacc: e3540000 cmp r4, #0
3000cad0: 13a00000 movne r0, #0
3000cad4: 18bd8030 popne {r4, r5, pc}
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
3000cad8: ebfffe86 bl 3000c4f8 <memfile_alloc_block>
if ( !memory )
3000cadc: e3500000 cmp r0, #0
return 1;
*block_entry_ptr = memory;
3000cae0: 15850000 strne r0, [r5]
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
3000cae4: 03a00001 moveq r0, #1
return 1;
*block_entry_ptr = memory;
3000cae8: 11a00004 movne r0, r4
return 0;
}
3000caec: e8bd8030 pop {r4, r5, pc}
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
3000caf0: e59f0020 ldr r0, [pc, #32] ; 3000cb18 <IMFS_memfile_addblock+0x74><== NOT EXECUTED 3000caf4: e59f1020 ldr r1, [pc, #32] ; 3000cb1c <IMFS_memfile_addblock+0x78><== NOT EXECUTED 3000caf8: e59f2020 ldr r2, [pc, #32] ; 3000cb20 <IMFS_memfile_addblock+0x7c><== NOT EXECUTED 3000cafc: e59f3020 ldr r3, [pc, #32] ; 3000cb24 <IMFS_memfile_addblock+0x80><== NOT EXECUTED 3000cb00: ebfff7d1 bl 3000aa4c <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000cb04: e59f000c ldr r0, [pc, #12] ; 3000cb18 <IMFS_memfile_addblock+0x74><== NOT EXECUTED 3000cb08: e59f1018 ldr r1, [pc, #24] ; 3000cb28 <IMFS_memfile_addblock+0x84><== NOT EXECUTED 3000cb0c: e59f200c ldr r2, [pc, #12] ; 3000cb20 <IMFS_memfile_addblock+0x7c><== NOT EXECUTED 3000cb10: e59f3014 ldr r3, [pc, #20] ; 3000cb2c <IMFS_memfile_addblock+0x88><== NOT EXECUTED 3000cb14: ebfff7cc bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000cb30 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000cb30: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000cb34: e2504000 subs r4, r0, #0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000cb38: e24dd004 sub sp, sp, #4 3000cb3c: e1a08001 mov r8, r1 3000cb40: e1a06002 mov r6, r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000cb44: 0a00004e beq 3000cc84 <IMFS_memfile_extend+0x154>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000cb48: e594304c ldr r3, [r4, #76] ; 0x4c 3000cb4c: e3530005 cmp r3, #5
3000cb50: 1a000046 bne 3000cc70 <IMFS_memfile_extend+0x140>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000cb54: e59f313c ldr r3, [pc, #316] ; 3000cc98 <IMFS_memfile_extend+0x168> 3000cb58: e593b000 ldr fp, [r3] 3000cb5c: e3a03000 mov r3, #0 3000cb60: e1530002 cmp r3, r2 3000cb64: e1a0312b lsr r3, fp, #2 3000cb68: e0213393 mla r1, r3, r3, r3 3000cb6c: e0223391 mla r2, r1, r3, r3 3000cb70: e2423001 sub r3, r2, #1 3000cb74: e002039b mul r2, fp, r3
3000cb78: da000034 ble 3000cc50 <IMFS_memfile_extend+0x120>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
3000cb7c: e5947054 ldr r7, [r4, #84] ; 0x54 3000cb80: e594a050 ldr sl, [r4, #80] ; 0x50 3000cb84: e1560007 cmp r6, r7
3000cb88: da000027 ble 3000cc2c <IMFS_memfile_extend+0xfc>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000cb8c: e1a0cfcb asr ip, fp, #31 3000cb90: e1a0300c mov r3, ip 3000cb94: e1a0200b mov r2, fp 3000cb98: e1a00008 mov r0, r8 3000cb9c: e1a01006 mov r1, r6 3000cba0: e58dc000 str ip, [sp] 3000cba4: eb002e94 bl 300185fc <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000cba8: e59dc000 ldr ip, [sp]
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000cbac: e1a05000 mov r5, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000cbb0: e1a01007 mov r1, r7 3000cbb4: e1a0000a mov r0, sl 3000cbb8: e1a0200b mov r2, fp 3000cbbc: e1a0300c mov r3, ip 3000cbc0: eb002e8d bl 300185fc <__divdi3>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000cbc4: e1550000 cmp r5, r0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000cbc8: e1a0a000 mov sl, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000cbcc: 3a00001b bcc 3000cc40 <IMFS_memfile_extend+0x110>
3000cbd0: e1a07000 mov r7, r0 3000cbd4: ea000002 b 3000cbe4 <IMFS_memfile_extend+0xb4> 3000cbd8: e2877001 add r7, r7, #1 3000cbdc: e1550007 cmp r5, r7
3000cbe0: 3a000016 bcc 3000cc40 <IMFS_memfile_extend+0x110>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
3000cbe4: e1a00004 mov r0, r4 3000cbe8: e1a01007 mov r1, r7 3000cbec: ebffffac bl 3000caa4 <IMFS_memfile_addblock> 3000cbf0: e3500000 cmp r0, #0
3000cbf4: 0afffff7 beq 3000cbd8 <IMFS_memfile_extend+0xa8>
3000cbf8: ea000003 b 3000cc0c <IMFS_memfile_extend+0xdc> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
3000cbfc: e1a01007 mov r1, r7 <== NOT EXECUTED 3000cc00: e1a00004 mov r0, r4 <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
3000cc04: e2477001 sub r7, r7, #1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
3000cc08: ebfffef5 bl 3000c7e4 <IMFS_memfile_remove_block> <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
3000cc0c: e15a0007 cmp sl, r7 <== NOT EXECUTED 3000cc10: 9afffff9 bls 3000cbfc <IMFS_memfile_extend+0xcc> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
3000cc14: eb0005e8 bl 3000e3bc <__errno> <== NOT EXECUTED 3000cc18: e3a0301c mov r3, #28 <== NOT EXECUTED 3000cc1c: e5803000 str r3, [r0] <== NOT EXECUTED 3000cc20: e3e00000 mvn r0, #0 <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
3000cc24: e28dd004 add sp, sp, #4
3000cc28: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc}
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
3000cc2c: 1a000001 bne 3000cc38 <IMFS_memfile_extend+0x108>
3000cc30: e158000a cmp r8, sl
3000cc34: 8affffd4 bhi 3000cb8c <IMFS_memfile_extend+0x5c>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
3000cc38: e3a00000 mov r0, #0
return 0;
3000cc3c: eafffff8 b 3000cc24 <IMFS_memfile_extend+0xf4>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
3000cc40: e5846054 str r6, [r4, #84] ; 0x54 3000cc44: e5848050 str r8, [r4, #80] ; 0x50 3000cc48: e3a00000 mov r0, #0 3000cc4c: eafffff4 b 3000cc24 <IMFS_memfile_extend+0xf4>
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000cc50: 1a000001 bne 3000cc5c <IMFS_memfile_extend+0x12c>
3000cc54: e1520008 cmp r2, r8
3000cc58: 8affffc7 bhi 3000cb7c <IMFS_memfile_extend+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
3000cc5c: eb0005d6 bl 3000e3bc <__errno> <== NOT EXECUTED 3000cc60: e3a03016 mov r3, #22 <== NOT EXECUTED 3000cc64: e5803000 str r3, [r0] <== NOT EXECUTED 3000cc68: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000cc6c: eaffffec b 3000cc24 <IMFS_memfile_extend+0xf4> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000cc70: e59f0024 ldr r0, [pc, #36] ; 3000cc9c <IMFS_memfile_extend+0x16c><== NOT EXECUTED 3000cc74: e59f1024 ldr r1, [pc, #36] ; 3000cca0 <IMFS_memfile_extend+0x170><== NOT EXECUTED 3000cc78: e59f2024 ldr r2, [pc, #36] ; 3000cca4 <IMFS_memfile_extend+0x174><== NOT EXECUTED 3000cc7c: e59f3024 ldr r3, [pc, #36] ; 3000cca8 <IMFS_memfile_extend+0x178><== NOT EXECUTED 3000cc80: ebfff771 bl 3000aa4c <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000cc84: e59f0010 ldr r0, [pc, #16] ; 3000cc9c <IMFS_memfile_extend+0x16c><== NOT EXECUTED 3000cc88: e59f101c ldr r1, [pc, #28] ; 3000ccac <IMFS_memfile_extend+0x17c><== NOT EXECUTED 3000cc8c: e59f2010 ldr r2, [pc, #16] ; 3000cca4 <IMFS_memfile_extend+0x174><== NOT EXECUTED 3000cc90: e59f3018 ldr r3, [pc, #24] ; 3000ccb0 <IMFS_memfile_extend+0x180><== NOT EXECUTED 3000cc94: ebfff76c bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000c52c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000c52c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000c530: e2504000 subs r4, r0, #0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000c534: e24dd004 sub sp, sp, #4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000c538: 0a000073 beq 3000c70c <IMFS_memfile_get_block_pointer+0x1e0>
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000c53c: e594304c ldr r3, [r4, #76] ; 0x4c 3000c540: e3530005 cmp r3, #5
3000c544: 1a00006b bne 3000c6f8 <IMFS_memfile_get_block_pointer+0x1cc>
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000c548: e59f31f8 ldr r3, [pc, #504] ; 3000c748 <IMFS_memfile_get_block_pointer+0x21c> 3000c54c: e5935000 ldr r5, [r3] 3000c550: e1a05125 lsr r5, r5, #2 3000c554: e2453001 sub r3, r5, #1 3000c558: e1510003 cmp r1, r3
3000c55c: 9a000019 bls 3000c5c8 <IMFS_memfile_get_block_pointer+0x9c>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
3000c560: e0265595 mla r6, r5, r5, r5 <== NOT EXECUTED 3000c564: e2463001 sub r3, r6, #1 <== NOT EXECUTED 3000c568: e1510003 cmp r1, r3 <== NOT EXECUTED 3000c56c: 8a000025 bhi 3000c608 <IMFS_memfile_get_block_pointer+0xdc><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
3000c570: e0656001 rsb r6, r5, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c574: e1a00006 mov r0, r6 <== NOT EXECUTED 3000c578: e1a01005 mov r1, r5 <== NOT EXECUTED 3000c57c: e58d2000 str r2, [sp] <== NOT EXECUTED 3000c580: eb002d5b bl 30017af4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c584: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c588: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c58c: e1a00006 mov r0, r6 <== NOT EXECUTED 3000c590: eb002d13 bl 300179e4 <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
3000c594: e59d2000 ldr r2, [sp] <== NOT EXECUTED
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c598: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
3000c59c: e3520000 cmp r2, #0 <== NOT EXECUTED
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
3000c5a0: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( malloc_it ) {
3000c5a4: 0a000047 beq 3000c6c8 <IMFS_memfile_get_block_pointer+0x19c><== NOT EXECUTED
if ( !p ) {
3000c5a8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c5ac: 0a00004c beq 3000c6e4 <IMFS_memfile_get_block_pointer+0x1b8><== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
3000c5b0: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED 3000c5b4: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
3000c5b8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000c5bc: 0a000034 beq 3000c694 <IMFS_memfile_get_block_pointer+0x168><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
3000c5c0: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 3000c5c4: ea000005 b 3000c5e0 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
3000c5c8: e3520000 cmp r2, #0
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
3000c5cc: e5940058 ldr r0, [r4, #88] ; 0x58
if ( malloc_it ) {
3000c5d0: 0a000035 beq 3000c6ac <IMFS_memfile_get_block_pointer+0x180>
if ( !p ) {
3000c5d4: e3500000 cmp r0, #0
3000c5d8: 0a000002 beq 3000c5e8 <IMFS_memfile_get_block_pointer+0xbc>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
3000c5dc: e0800101 add r0, r0, r1, lsl #2
/*
* This means the requested block number is out of range.
*/
return 0;
}
3000c5e0: e28dd004 add sp, sp, #4
3000c5e4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000c5e8: e58d1000 str r1, [sp] 3000c5ec: ebffffc1 bl 3000c4f8 <memfile_alloc_block>
if ( !p )
3000c5f0: e3500000 cmp r0, #0 3000c5f4: e59d1000 ldr r1, [sp]
return 0;
info->indirect = p;
3000c5f8: 15840058 strne r0, [r4, #88] ; 0x58
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
3000c5fc: 1afffff6 bne 3000c5dc <IMFS_memfile_get_block_pointer+0xb0>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
3000c600: e3a00000 mov r0, #0 <== NOT EXECUTED 3000c604: eafffff5 b 3000c5e0 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000c608: e0235596 mla r3, r6, r5, r5 <== NOT EXECUTED 3000c60c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000c610: e1510003 cmp r1, r3 <== NOT EXECUTED 3000c614: 8afffff9 bhi 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
3000c618: e0666001 rsb r6, r6, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c61c: e1a00006 mov r0, r6 <== NOT EXECUTED 3000c620: e1a01005 mov r1, r5 <== NOT EXECUTED 3000c624: e58d2000 str r2, [sp] <== NOT EXECUTED 3000c628: eb002d31 bl 30017af4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c62c: e1a01005 mov r1, r5 <== NOT EXECUTED
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c630: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c634: e1a00006 mov r0, r6 <== NOT EXECUTED 3000c638: eb002ce9 bl 300179e4 <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000c63c: e1a01005 mov r1, r5 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c640: e1a08000 mov r8, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000c644: eb002ce6 bl 300179e4 <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000c648: e1a01005 mov r1, r5 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000c64c: e1a06000 mov r6, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000c650: e1a00008 mov r0, r8 <== NOT EXECUTED 3000c654: eb002d26 bl 30017af4 <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
3000c658: e59d2000 ldr r2, [sp] <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000c65c: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
3000c660: e3520000 cmp r2, #0 <== NOT EXECUTED
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;
p = info->triply_indirect;
3000c664: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if ( malloc_it ) {
3000c668: 0a000013 beq 3000c6bc <IMFS_memfile_get_block_pointer+0x190><== NOT EXECUTED
if ( !p ) {
3000c66c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c670: 0a00002f beq 3000c734 <IMFS_memfile_get_block_pointer+0x208><== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
3000c674: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED 3000c678: e0836106 add r6, r3, r6, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
3000c67c: e3520000 cmp r2, #0 <== NOT EXECUTED 3000c680: 0a000026 beq 3000c720 <IMFS_memfile_get_block_pointer+0x1f4><== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
3000c684: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED 3000c688: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED
if ( !p2 ) {
3000c68c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000c690: 1affffca bne 3000c5c0 <IMFS_memfile_get_block_pointer+0x94><== NOT EXECUTED
p2 = memfile_alloc_block();
3000c694: ebffff97 bl 3000c4f8 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
3000c698: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
3000c69c: 15850000 strne r0, [r5] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
3000c6a0: 0affffd6 beq 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
3000c6a4: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 3000c6a8: eaffffcc b 3000c5e0 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
3000c6ac: e3500000 cmp r0, #0
3000c6b0: 1affffc9 bne 3000c5dc <IMFS_memfile_get_block_pointer+0xb0>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
3000c6b4: e3a00000 mov r0, #0 <== NOT EXECUTED 3000c6b8: eaffffc8 b 3000c5e0 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
3000c6bc: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c6c0: 0affffce beq 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
3000c6c4: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p1 )
3000c6c8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c6cc: 0affffcb beq 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
3000c6d0: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
if ( !p2 )
3000c6d4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000c6d8: 0affffc8 beq 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
return 0;
return (block_p *)&p2[ singly ];
3000c6dc: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 3000c6e0: eaffffbe b 3000c5e0 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000c6e4: ebffff83 bl 3000c4f8 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
3000c6e8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000c6ec: 0affffc3 beq 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
3000c6f0: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED 3000c6f4: eaffffad b 3000c5b0 <IMFS_memfile_get_block_pointer+0x84> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000c6f8: e59f004c ldr r0, [pc, #76] ; 3000c74c <IMFS_memfile_get_block_pointer+0x220><== NOT EXECUTED 3000c6fc: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED 3000c700: e59f2048 ldr r2, [pc, #72] ; 3000c750 <IMFS_memfile_get_block_pointer+0x224><== NOT EXECUTED 3000c704: e59f3048 ldr r3, [pc, #72] ; 3000c754 <IMFS_memfile_get_block_pointer+0x228><== NOT EXECUTED 3000c708: ebfff8cf bl 3000aa4c <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000c70c: e59f0038 ldr r0, [pc, #56] ; 3000c74c <IMFS_memfile_get_block_pointer+0x220><== NOT EXECUTED 3000c710: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED 3000c714: e59f2034 ldr r2, [pc, #52] ; 3000c750 <IMFS_memfile_get_block_pointer+0x224><== NOT EXECUTED 3000c718: e59f3038 ldr r3, [pc, #56] ; 3000c758 <IMFS_memfile_get_block_pointer+0x22c><== NOT EXECUTED 3000c71c: ebfff8ca bl 3000aa4c <__assert_func> <== NOT EXECUTED
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
3000c720: ebffff74 bl 3000c4f8 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
3000c724: e2502000 subs r2, r0, #0 <== NOT EXECUTED 3000c728: 0affffb4 beq 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
3000c72c: e5862000 str r2, [r6] <== NOT EXECUTED 3000c730: eaffffd3 b 3000c684 <IMFS_memfile_get_block_pointer+0x158> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000c734: ebffff6f bl 3000c4f8 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
3000c738: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000c73c: 0affffaf beq 3000c600 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
return 0;
info->triply_indirect = p;
3000c740: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3000c744: eaffffca b 3000c674 <IMFS_memfile_get_block_pointer+0x148> <== NOT EXECUTED
3000d144 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000d144: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000d148: e2509000 subs r9, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000d14c: e24dd014 sub sp, sp, #20 3000d150: e1a08003 mov r8, r3 3000d154: e1a0a001 mov sl, r1 3000d158: e1a0b002 mov fp, r2 3000d15c: e59d5038 ldr r5, [sp, #56] ; 0x38
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000d160: 0a000088 beq 3000d388 <IMFS_memfile_read+0x244>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
3000d164: e599304c ldr r3, [r9, #76] ; 0x4c 3000d168: e2432005 sub r2, r3, #5 3000d16c: e3520001 cmp r2, #1
3000d170: 8a000093 bhi 3000d3c4 <IMFS_memfile_read+0x280>
/*
* Error checks on arguments
*/
assert( dest );
3000d174: e3580000 cmp r8, #0
3000d178: 0a00008c beq 3000d3b0 <IMFS_memfile_read+0x26c>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
3000d17c: e3550000 cmp r5, #0
3000d180: 0a000076 beq 3000d360 <IMFS_memfile_read+0x21c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000d184: e3530006 cmp r3, #6
3000d188: 0a00005a beq 3000d2f8 <IMFS_memfile_read+0x1b4>
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
3000d18c: e5993054 ldr r3, [r9, #84] ; 0x54 3000d190: e3a02000 mov r2, #0 3000d194: e1520003 cmp r2, r3
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
3000d198: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
3000d19c: e5992050 ldr r2, [r9, #80] ; 0x50 3000d1a0: e0851001 add r1, r5, r1
3000d1a4: da00004f ble 3000d2e8 <IMFS_memfile_read+0x1a4>
my_length = the_jnode->info.file.size - start;
3000d1a8: e0635002 rsb r5, r3, r2
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000d1ac: e59f6238 ldr r6, [pc, #568] ; 3000d3ec <IMFS_memfile_read+0x2a8>
3000d1b0: e1a0000a mov r0, sl
3000d1b4: e5964000 ldr r4, [r6]
3000d1b8: e1a0100b mov r1, fp
3000d1bc: e1a02004 mov r2, r4
3000d1c0: e1a03fc2 asr r3, r2, #31
3000d1c4: e98d000c stmib sp, {r2, r3}
3000d1c8: eb002e35 bl 30018aa4 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000d1cc: e99d000c ldmib sp, {r2, r3}
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000d1d0: e1a0c000 mov ip, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000d1d4: e1a0100b mov r1, fp 3000d1d8: e1a0000a mov r0, sl 3000d1dc: e58dc000 str ip, [sp] 3000d1e0: eb002d05 bl 300185fc <__divdi3>
if ( start_offset ) {
3000d1e4: e59dc000 ldr ip, [sp]
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000d1e8: e1a07000 mov r7, r0
if ( start_offset ) {
3000d1ec: e35c0000 cmp ip, #0 3000d1f0: 01a0a00c moveq sl, ip
3000d1f4: 0a000013 beq 3000d248 <IMFS_memfile_read+0x104>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000d1f8: e1a00009 mov r0, r9 3000d1fc: e1a01007 mov r1, r7 3000d200: e3a02000 mov r2, #0 3000d204: e58dc000 str ip, [sp] 3000d208: ebfffcc7 bl 3000c52c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
3000d20c: e3500000 cmp r0, #0 3000d210: e59dc000 ldr ip, [sp]
3000d214: 0a00006f beq 3000d3d8 <IMFS_memfile_read+0x294>
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
3000d218: e06ca004 rsb sl, ip, r4
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
3000d21c: e5901000 ldr r1, [r0]
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
3000d220: e155000a cmp r5, sl 3000d224: 31a0a005 movcc sl, r5
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
3000d228: e1a00008 mov r0, r8 3000d22c: e081100c add r1, r1, ip 3000d230: e1a0200a mov r2, sl 3000d234: eb00066e bl 3000ebf4 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
3000d238: e5964000 ldr r4, [r6]
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
3000d23c: e088800a add r8, r8, sl
block++;
3000d240: e2877001 add r7, r7, #1
my_length -= to_copy;
3000d244: e06a5005 rsb r5, sl, r5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000d248: e1550004 cmp r5, r4
3000d24c: 3a000010 bcc 3000d294 <IMFS_memfile_read+0x150>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000d250: e1a00009 mov r0, r9 3000d254: e1a01007 mov r1, r7 3000d258: e3a02000 mov r2, #0 3000d25c: ebfffcb2 bl 3000c52c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
3000d260: e3500000 cmp r0, #0
3000d264: 0a000042 beq 3000d374 <IMFS_memfile_read+0x230>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000d268: e5901000 ldr r1, [r0] 3000d26c: e1a02004 mov r2, r4 3000d270: e1a00008 mov r0, r8 3000d274: eb00065e bl 3000ebf4 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000d278: e5963000 ldr r3, [r6]
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
3000d27c: e0645005 rsb r5, r4, r5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000d280: e1530005 cmp r3, r5
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
3000d284: e0888004 add r8, r8, r4
block++;
3000d288: e2877001 add r7, r7, #1
my_length -= to_copy;
copied += to_copy;
3000d28c: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000d290: 9affffee bls 3000d250 <IMFS_memfile_read+0x10c>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
3000d294: e3550000 cmp r5, #0
3000d298: 0a00000a beq 3000d2c8 <IMFS_memfile_read+0x184>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000d29c: e1a01007 mov r1, r7 3000d2a0: e1a00009 mov r0, r9 3000d2a4: e3a02000 mov r2, #0 3000d2a8: ebfffc9f bl 3000c52c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
3000d2ac: e2503000 subs r3, r0, #0
3000d2b0: 0a000039 beq 3000d39c <IMFS_memfile_read+0x258>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
3000d2b4: e1a00008 mov r0, r8 3000d2b8: e5931000 ldr r1, [r3] 3000d2bc: e1a02005 mov r2, r5 3000d2c0: eb00064b bl 3000ebf4 <memcpy>
copied += my_length;
3000d2c4: e08aa005 add sl, sl, r5
}
IMFS_update_atime( the_jnode );
3000d2c8: e28d000c add r0, sp, #12 3000d2cc: e3a01000 mov r1, #0 3000d2d0: ebffd3ab bl 30002184 <gettimeofday> 3000d2d4: e59d300c ldr r3, [sp, #12]
return copied;
3000d2d8: e1a0000a mov r0, sl
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
3000d2dc: e5893040 str r3, [r9, #64] ; 0x40
return copied;
}
3000d2e0: e28dd014 add sp, sp, #20
3000d2e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
3000d2e8: 1affffaf bne 3000d1ac <IMFS_memfile_read+0x68>
3000d2ec: e1510002 cmp r1, r2
3000d2f0: 9affffad bls 3000d1ac <IMFS_memfile_read+0x68>
3000d2f4: eaffffab b 3000d1a8 <IMFS_memfile_read+0x64>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
3000d2f8: e2894050 add r4, r9, #80 ; 0x50 <== NOT EXECUTED
3000d2fc: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
3000d300: e1a00003 mov r0, r3 <== NOT EXECUTED
3000d304: e1a01004 mov r1, r4 <== NOT EXECUTED
3000d308: e3a02000 mov r2, #0 <== NOT EXECUTED
3000d30c: e050000a subs r0, r0, sl <== NOT EXECUTED
3000d310: e0c1100b sbc r1, r1, fp <== NOT EXECUTED
3000d314: e1520001 cmp r2, r1 <== NOT EXECUTED
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
3000d318: e5992058 ldr r2, [r9, #88] ; 0x58 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
3000d31c: da00000b ble 3000d350 <IMFS_memfile_read+0x20c> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
3000d320: e06a5003 rsb r5, sl, r3 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
3000d324: e082100a add r1, r2, sl <== NOT EXECUTED 3000d328: e1a00008 mov r0, r8 <== NOT EXECUTED 3000d32c: e1a02005 mov r2, r5 <== NOT EXECUTED 3000d330: eb00062f bl 3000ebf4 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
3000d334: e28d000c add r0, sp, #12 <== NOT EXECUTED 3000d338: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d33c: ebffd390 bl 30002184 <gettimeofday> <== NOT EXECUTED 3000d340: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
return my_length;
3000d344: e1a00005 mov r0, r5 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
IMFS_update_atime( the_jnode );
3000d348: e5893040 str r3, [r9, #64] ; 0x40 <== NOT EXECUTED
return my_length;
3000d34c: eaffffe3 b 3000d2e0 <IMFS_memfile_read+0x19c> <== NOT EXECUTED
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
3000d350: 1afffff3 bne 3000d324 <IMFS_memfile_read+0x1e0> <== NOT EXECUTED 3000d354: e1550000 cmp r5, r0 <== NOT EXECUTED 3000d358: 8afffff0 bhi 3000d320 <IMFS_memfile_read+0x1dc> <== NOT EXECUTED 3000d35c: eafffff0 b 3000d324 <IMFS_memfile_read+0x1e0> <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
3000d360: eb000415 bl 3000e3bc <__errno> <== NOT EXECUTED 3000d364: e3a03016 mov r3, #22 <== NOT EXECUTED 3000d368: e5803000 str r3, [r0] <== NOT EXECUTED 3000d36c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d370: eaffffda b 3000d2e0 <IMFS_memfile_read+0x19c> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
3000d374: e59f0074 ldr r0, [pc, #116] ; 3000d3f0 <IMFS_memfile_read+0x2ac><== NOT EXECUTED 3000d378: e59f1074 ldr r1, [pc, #116] ; 3000d3f4 <IMFS_memfile_read+0x2b0><== NOT EXECUTED 3000d37c: e59f2074 ldr r2, [pc, #116] ; 3000d3f8 <IMFS_memfile_read+0x2b4><== NOT EXECUTED 3000d380: e59f3074 ldr r3, [pc, #116] ; 3000d3fc <IMFS_memfile_read+0x2b8><== NOT EXECUTED 3000d384: ebfff5b0 bl 3000aa4c <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000d388: e59f0060 ldr r0, [pc, #96] ; 3000d3f0 <IMFS_memfile_read+0x2ac><== NOT EXECUTED 3000d38c: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED 3000d390: e59f2060 ldr r2, [pc, #96] ; 3000d3f8 <IMFS_memfile_read+0x2b4><== NOT EXECUTED 3000d394: e59f3064 ldr r3, [pc, #100] ; 3000d400 <IMFS_memfile_read+0x2bc><== NOT EXECUTED 3000d398: ebfff5ab bl 3000aa4c <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
3000d39c: e59f004c ldr r0, [pc, #76] ; 3000d3f0 <IMFS_memfile_read+0x2ac><== NOT EXECUTED 3000d3a0: e59f105c ldr r1, [pc, #92] ; 3000d404 <IMFS_memfile_read+0x2c0><== NOT EXECUTED 3000d3a4: e59f204c ldr r2, [pc, #76] ; 3000d3f8 <IMFS_memfile_read+0x2b4><== NOT EXECUTED 3000d3a8: e59f304c ldr r3, [pc, #76] ; 3000d3fc <IMFS_memfile_read+0x2b8><== NOT EXECUTED 3000d3ac: ebfff5a6 bl 3000aa4c <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
3000d3b0: e59f0038 ldr r0, [pc, #56] ; 3000d3f0 <IMFS_memfile_read+0x2ac><== NOT EXECUTED 3000d3b4: e59f104c ldr r1, [pc, #76] ; 3000d408 <IMFS_memfile_read+0x2c4><== NOT EXECUTED 3000d3b8: e59f2038 ldr r2, [pc, #56] ; 3000d3f8 <IMFS_memfile_read+0x2b4><== NOT EXECUTED 3000d3bc: e59f3048 ldr r3, [pc, #72] ; 3000d40c <IMFS_memfile_read+0x2c8><== NOT EXECUTED 3000d3c0: ebfff5a1 bl 3000aa4c <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
3000d3c4: e59f0024 ldr r0, [pc, #36] ; 3000d3f0 <IMFS_memfile_read+0x2ac><== NOT EXECUTED 3000d3c8: e59f1040 ldr r1, [pc, #64] ; 3000d410 <IMFS_memfile_read+0x2cc><== NOT EXECUTED 3000d3cc: e59f2024 ldr r2, [pc, #36] ; 3000d3f8 <IMFS_memfile_read+0x2b4><== NOT EXECUTED 3000d3d0: e59f303c ldr r3, [pc, #60] ; 3000d414 <IMFS_memfile_read+0x2d0><== NOT EXECUTED 3000d3d4: ebfff59c bl 3000aa4c <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
3000d3d8: e59f0010 ldr r0, [pc, #16] ; 3000d3f0 <IMFS_memfile_read+0x2ac><== NOT EXECUTED 3000d3dc: e59f1034 ldr r1, [pc, #52] ; 3000d418 <IMFS_memfile_read+0x2d4><== NOT EXECUTED 3000d3e0: e59f2010 ldr r2, [pc, #16] ; 3000d3f8 <IMFS_memfile_read+0x2b4><== NOT EXECUTED 3000d3e4: e59f3010 ldr r3, [pc, #16] ; 3000d3fc <IMFS_memfile_read+0x2b8><== NOT EXECUTED 3000d3e8: ebfff597 bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000c834 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
3000c834: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000c838: e250a000 subs sl, r0, #0
3000c83c: 0a00004f beq 3000c980 <IMFS_memfile_remove+0x14c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000c840: e59a304c ldr r3, [sl, #76] ; 0x4c 3000c844: e3530005 cmp r3, #5
3000c848: 1a000051 bne 3000c994 <IMFS_memfile_remove+0x160>
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000c84c: e59f6154 ldr r6, [pc, #340] ; 3000c9a8 <IMFS_memfile_remove+0x174>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
3000c850: e59a3058 ldr r3, [sl, #88] ; 0x58
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000c854: e5967000 ldr r7, [r6]
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
3000c858: e3530000 cmp r3, #0
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000c85c: e1a07127 lsr r7, r7, #2
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
3000c860: 128a0058 addne r0, sl, #88 ; 0x58 3000c864: 11a01007 movne r1, r7 3000c868: 1bffffbb blne 3000c75c <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
3000c86c: e59a305c ldr r3, [sl, #92] ; 0x5c 3000c870: e3530000 cmp r3, #0
3000c874: 0a000014 beq 3000c8cc <IMFS_memfile_remove+0x98>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000c878: e5962000 ldr r2, [r6] <== NOT EXECUTED 3000c87c: e1b02122 lsrs r2, r2, #2 <== NOT EXECUTED 3000c880: 0a00000e beq 3000c8c0 <IMFS_memfile_remove+0x8c> <== NOT EXECUTED 3000c884: e3a02000 mov r2, #0 <== NOT EXECUTED 3000c888: e1a04002 mov r4, r2 <== NOT EXECUTED 3000c88c: ea000000 b 3000c894 <IMFS_memfile_remove+0x60> <== NOT EXECUTED 3000c890: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
3000c894: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED 3000c898: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED 3000c89c: e3510000 cmp r1, #0 <== NOT EXECUTED
memfile_free_blocks_in_table(
3000c8a0: 10830002 addne r0, r3, r2 <== NOT EXECUTED 3000c8a4: 11a01007 movne r1, r7 <== NOT EXECUTED 3000c8a8: 1bffffab blne 3000c75c <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000c8ac: e5963000 ldr r3, [r6] <== NOT EXECUTED 3000c8b0: e2844001 add r4, r4, #1 <== NOT EXECUTED 3000c8b4: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED 3000c8b8: e1a02004 mov r2, r4 <== NOT EXECUTED 3000c8bc: 3afffff3 bcc 3000c890 <IMFS_memfile_remove+0x5c> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
3000c8c0: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 3000c8c4: e1a01007 mov r1, r7 <== NOT EXECUTED 3000c8c8: ebffffa3 bl 3000c75c <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
3000c8cc: e59a0060 ldr r0, [sl, #96] ; 0x60 3000c8d0: e3500000 cmp r0, #0
3000c8d4: 0a000027 beq 3000c978 <IMFS_memfile_remove+0x144>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000c8d8: e5963000 ldr r3, [r6] <== NOT EXECUTED 3000c8dc: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED 3000c8e0: 0a000021 beq 3000c96c <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
3000c8e4: e5905000 ldr r5, [r0] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000c8e8: e3550000 cmp r5, #0 <== NOT EXECUTED 3000c8ec: 13a09000 movne r9, #0 <== NOT EXECUTED 3000c8f0: 11a08009 movne r8, r9 <== NOT EXECUTED 3000c8f4: 0a00001c beq 3000c96c <IMFS_memfile_remove+0x138> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
3000c8f8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c8fc: 0a00000d beq 3000c938 <IMFS_memfile_remove+0x104> <== NOT EXECUTED 3000c900: e3a00000 mov r0, #0 <== NOT EXECUTED 3000c904: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( p[j] ) {
3000c908: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED 3000c90c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED 3000c910: e3530000 cmp r3, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
3000c914: 10850000 addne r0, r5, r0 <== NOT EXECUTED 3000c918: 11a01007 movne r1, r7 <== NOT EXECUTED 3000c91c: 1bffff8e blne 3000c75c <memfile_free_blocks_in_table> <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
3000c920: e5963000 ldr r3, [r6] <== NOT EXECUTED 3000c924: e2844001 add r4, r4, #1 <== NOT EXECUTED 3000c928: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED 3000c92c: e1a00004 mov r0, r4 <== NOT EXECUTED 3000c930: 3afffff4 bcc 3000c908 <IMFS_memfile_remove+0xd4> <== NOT EXECUTED 3000c934: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
3000c938: e0800009 add r0, r0, r9 <== NOT EXECUTED 3000c93c: e1a01007 mov r1, r7 <== NOT EXECUTED 3000c940: ebffff85 bl 3000c75c <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000c944: e5963000 ldr r3, [r6] <== NOT EXECUTED 3000c948: e2888001 add r8, r8, #1 <== NOT EXECUTED 3000c94c: e1a03123 lsr r3, r3, #2 <== NOT EXECUTED 3000c950: e1530008 cmp r3, r8 <== NOT EXECUTED 3000c954: 9a000004 bls 3000c96c <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
3000c958: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000c95c: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
3000c960: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000c964: e3550000 cmp r5, #0 <== NOT EXECUTED 3000c968: 1affffe2 bne 3000c8f8 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
3000c96c: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED 3000c970: e1a01007 mov r1, r7 <== NOT EXECUTED 3000c974: ebffff78 bl 3000c75c <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
3000c978: e3a00000 mov r0, #0
3000c97c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000c980: e59f0024 ldr r0, [pc, #36] ; 3000c9ac <IMFS_memfile_remove+0x178><== NOT EXECUTED 3000c984: e59f1024 ldr r1, [pc, #36] ; 3000c9b0 <IMFS_memfile_remove+0x17c><== NOT EXECUTED 3000c988: e59f2024 ldr r2, [pc, #36] ; 3000c9b4 <IMFS_memfile_remove+0x180><== NOT EXECUTED 3000c98c: e59f3024 ldr r3, [pc, #36] ; 3000c9b8 <IMFS_memfile_remove+0x184><== NOT EXECUTED 3000c990: ebfff82d bl 3000aa4c <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000c994: e59f0010 ldr r0, [pc, #16] ; 3000c9ac <IMFS_memfile_remove+0x178><== NOT EXECUTED 3000c998: e59f101c ldr r1, [pc, #28] ; 3000c9bc <IMFS_memfile_remove+0x188><== NOT EXECUTED 3000c99c: e59f2010 ldr r2, [pc, #16] ; 3000c9b4 <IMFS_memfile_remove+0x180><== NOT EXECUTED 3000c9a0: e59f3018 ldr r3, [pc, #24] ; 3000c9c0 <IMFS_memfile_remove+0x18c><== NOT EXECUTED 3000c9a4: ebfff828 bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000c7e4 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
3000c7e4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000c7e8: e3a02000 mov r2, #0 <== NOT EXECUTED 3000c7ec: ebffff4e bl 3000c52c <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
3000c7f0: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000c7f4: 0a000005 beq 3000c810 <IMFS_memfile_remove_block+0x2c> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
*block_ptr = 0;
3000c7f8: e3a02000 mov r2, #0 <== NOT EXECUTED
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( block_ptr ) {
ptr = *block_ptr;
3000c7fc: e5930000 ldr r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
3000c800: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
3000c804: ebffff33 bl 3000c4d8 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
3000c808: e3a00001 mov r0, #1 <== NOT EXECUTED
3000c80c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
3000c810: e59f000c ldr r0, [pc, #12] ; 3000c824 <IMFS_memfile_remove_block+0x40><== NOT EXECUTED 3000c814: e59f100c ldr r1, [pc, #12] ; 3000c828 <IMFS_memfile_remove_block+0x44><== NOT EXECUTED 3000c818: e59f200c ldr r2, [pc, #12] ; 3000c82c <IMFS_memfile_remove_block+0x48><== NOT EXECUTED 3000c81c: e59f300c ldr r3, [pc, #12] ; 3000c830 <IMFS_memfile_remove_block+0x4c><== NOT EXECUTED 3000c820: ebfff889 bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000cdc8 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000cdc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000cdcc: e2509000 subs r9, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000cdd0: e24dd014 sub sp, sp, #20 3000cdd4: e1a06001 mov r6, r1 3000cdd8: e1a07002 mov r7, r2 3000cddc: e1a08003 mov r8, r3 3000cde0: e59da038 ldr sl, [sp, #56] ; 0x38
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000cde4: 0a000078 beq 3000cfcc <IMFS_memfile_write+0x204>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000cde8: e599304c ldr r3, [r9, #76] ; 0x4c 3000cdec: e3530005 cmp r3, #5
3000cdf0: 1a000070 bne 3000cfb8 <IMFS_memfile_write+0x1f0>
/*
* Error check arguments
*/
assert( source );
3000cdf4: e3580000 cmp r8, #0
3000cdf8: 0a000082 beq 3000d008 <IMFS_memfile_write+0x240>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
3000cdfc: e35a0000 cmp sl, #0
3000ce00: 0a000062 beq 3000cf90 <IMFS_memfile_write+0x1c8>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
3000ce04: e5993054 ldr r3, [r9, #84] ; 0x54 3000ce08: e08a1001 add r1, sl, r1 3000ce0c: e3530000 cmp r3, #0
3000ce10: ba000054 blt 3000cf68 <IMFS_memfile_write+0x1a0>
3000ce14: 0a000050 beq 3000cf5c <IMFS_memfile_write+0x194>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000ce18: e59f51fc ldr r5, [pc, #508] ; 3000d01c <IMFS_memfile_write+0x254>
3000ce1c: e1a00006 mov r0, r6
3000ce20: e5954000 ldr r4, [r5]
3000ce24: e1a01007 mov r1, r7
3000ce28: e1a02004 mov r2, r4
3000ce2c: e1a03fc2 asr r3, r2, #31
3000ce30: e98d000c stmib sp, {r2, r3}
3000ce34: eb002f1a bl 30018aa4 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000ce38: e99d000c ldmib sp, {r2, r3}
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000ce3c: e1a0b000 mov fp, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000ce40: e1a01007 mov r1, r7 3000ce44: e1a00006 mov r0, r6 3000ce48: eb002deb bl 300185fc <__divdi3>
if ( start_offset ) {
3000ce4c: e35b0000 cmp fp, #0 3000ce50: 01a0700a moveq r7, sl
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000ce54: e1a06000 mov r6, r0
if ( start_offset ) {
3000ce58: 01a0a00b moveq sl, fp
3000ce5c: 1a000028 bne 3000cf04 <IMFS_memfile_write+0x13c>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000ce60: e1570004 cmp r7, r4
3000ce64: 3a000010 bcc 3000ceac <IMFS_memfile_write+0xe4>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000ce68: e1a00009 mov r0, r9 3000ce6c: e1a01006 mov r1, r6 3000ce70: e3a02000 mov r2, #0 3000ce74: ebfffdac bl 3000c52c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
3000ce78: e3500000 cmp r0, #0
3000ce7c: 0a000048 beq 3000cfa4 <IMFS_memfile_write+0x1dc>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
3000ce80: e1a01008 mov r1, r8 3000ce84: e5900000 ldr r0, [r0] 3000ce88: e1a02004 mov r2, r4 3000ce8c: eb000758 bl 3000ebf4 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000ce90: e5953000 ldr r3, [r5]
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
3000ce94: e0647007 rsb r7, r4, r7
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000ce98: e1530007 cmp r3, r7
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
3000ce9c: e0888004 add r8, r8, r4
block++;
3000cea0: e2866001 add r6, r6, #1
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
3000cea4: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000cea8: 9affffee bls 3000ce68 <IMFS_memfile_write+0xa0>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
3000ceac: e3570000 cmp r7, #0
3000ceb0: 0a00000a beq 3000cee0 <IMFS_memfile_write+0x118>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000ceb4: e1a01006 mov r1, r6 3000ceb8: e1a00009 mov r0, r9 3000cebc: e3a02000 mov r2, #0 3000cec0: ebfffd99 bl 3000c52c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
3000cec4: e3500000 cmp r0, #0
3000cec8: 0a000049 beq 3000cff4 <IMFS_memfile_write+0x22c>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
3000cecc: e5900000 ldr r0, [r0] 3000ced0: e1a01008 mov r1, r8 3000ced4: e1a02007 mov r2, r7 3000ced8: eb000745 bl 3000ebf4 <memcpy>
my_length = 0;
copied += to_copy;
3000cedc: e08aa007 add sl, sl, r7
}
IMFS_mtime_ctime_update( the_jnode );
3000cee0: e28d000c add r0, sp, #12 3000cee4: e3a01000 mov r1, #0 3000cee8: ebffd4a5 bl 30002184 <gettimeofday> 3000ceec: e59d300c ldr r3, [sp, #12] 3000cef0: e5893048 str r3, [r9, #72] ; 0x48 3000cef4: e5893044 str r3, [r9, #68] ; 0x44
return copied;
}
3000cef8: e1a0000a mov r0, sl
3000cefc: e28dd014 add sp, sp, #20
3000cf00: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000cf04: e1a00009 mov r0, r9 3000cf08: e1a01006 mov r1, r6 3000cf0c: e3a02000 mov r2, #0 3000cf10: ebfffd85 bl 3000c52c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
3000cf14: e3500000 cmp r0, #0
3000cf18: 0a000030 beq 3000cfe0 <IMFS_memfile_write+0x218>
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
3000cf1c: e06b3004 rsb r3, fp, r4
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000cf20: e5900000 ldr r0, [r0]
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
3000cf24: e153000a cmp r3, sl 3000cf28: 21a0300a movcs r3, sl
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000cf2c: e1a01008 mov r1, r8 3000cf30: e1a02003 mov r2, r3 3000cf34: e080000b add r0, r0, fp 3000cf38: e58d3000 str r3, [sp] 3000cf3c: eb00072c bl 3000ebf4 <memcpy>
src += to_copy;
3000cf40: e59d3000 ldr r3, [sp]
block++;
my_length -= to_copy;
copied += to_copy;
3000cf44: e5954000 ldr r4, [r5]
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
3000cf48: e063700a rsb r7, r3, sl
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
3000cf4c: e0888003 add r8, r8, r3
block++;
3000cf50: e2866001 add r6, r6, #1
my_length -= to_copy;
copied += to_copy;
3000cf54: e1a0a003 mov sl, r3 3000cf58: eaffffc0 b 3000ce60 <IMFS_memfile_write+0x98>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
3000cf5c: e5993050 ldr r3, [r9, #80] ; 0x50 3000cf60: e1530001 cmp r3, r1
3000cf64: 2affffab bcs 3000ce18 <IMFS_memfile_write+0x50>
status = IMFS_memfile_extend( the_jnode, last_byte );
3000cf68: e1a00009 mov r0, r9 3000cf6c: e3a02000 mov r2, #0 3000cf70: ebfffeee bl 3000cb30 <IMFS_memfile_extend>
if ( status )
3000cf74: e3500000 cmp r0, #0
3000cf78: 0affffa6 beq 3000ce18 <IMFS_memfile_write+0x50>
rtems_set_errno_and_return_minus_one( ENOSPC );
3000cf7c: eb00050e bl 3000e3bc <__errno> <== NOT EXECUTED 3000cf80: e3a0301c mov r3, #28 <== NOT EXECUTED 3000cf84: e5803000 str r3, [r0] <== NOT EXECUTED 3000cf88: e3e0a000 mvn sl, #0 <== NOT EXECUTED 3000cf8c: eaffffd9 b 3000cef8 <IMFS_memfile_write+0x130> <== NOT EXECUTED
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
3000cf90: eb000509 bl 3000e3bc <__errno> <== NOT EXECUTED 3000cf94: e3a03016 mov r3, #22 <== NOT EXECUTED 3000cf98: e5803000 str r3, [r0] <== NOT EXECUTED 3000cf9c: e3e0a000 mvn sl, #0 <== NOT EXECUTED 3000cfa0: eaffffd4 b 3000cef8 <IMFS_memfile_write+0x130> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
3000cfa4: e59f0074 ldr r0, [pc, #116] ; 3000d020 <IMFS_memfile_write+0x258><== NOT EXECUTED 3000cfa8: e3a01e33 mov r1, #816 ; 0x330 <== NOT EXECUTED 3000cfac: e59f2070 ldr r2, [pc, #112] ; 3000d024 <IMFS_memfile_write+0x25c><== NOT EXECUTED 3000cfb0: e59f3070 ldr r3, [pc, #112] ; 3000d028 <IMFS_memfile_write+0x260><== NOT EXECUTED 3000cfb4: ebfff6a4 bl 3000aa4c <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
3000cfb8: e59f0060 ldr r0, [pc, #96] ; 3000d020 <IMFS_memfile_write+0x258><== NOT EXECUTED 3000cfbc: e59f1068 ldr r1, [pc, #104] ; 3000d02c <IMFS_memfile_write+0x264><== NOT EXECUTED 3000cfc0: e59f205c ldr r2, [pc, #92] ; 3000d024 <IMFS_memfile_write+0x25c><== NOT EXECUTED 3000cfc4: e59f3064 ldr r3, [pc, #100] ; 3000d030 <IMFS_memfile_write+0x268><== NOT EXECUTED 3000cfc8: ebfff69f bl 3000aa4c <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
3000cfcc: e59f004c ldr r0, [pc, #76] ; 3000d020 <IMFS_memfile_write+0x258><== NOT EXECUTED 3000cfd0: e59f105c ldr r1, [pc, #92] ; 3000d034 <IMFS_memfile_write+0x26c><== NOT EXECUTED 3000cfd4: e59f2048 ldr r2, [pc, #72] ; 3000d024 <IMFS_memfile_write+0x25c><== NOT EXECUTED 3000cfd8: e59f3058 ldr r3, [pc, #88] ; 3000d038 <IMFS_memfile_write+0x270><== NOT EXECUTED 3000cfdc: ebfff69a bl 3000aa4c <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
3000cfe0: e59f0038 ldr r0, [pc, #56] ; 3000d020 <IMFS_memfile_write+0x258><== NOT EXECUTED 3000cfe4: e3a01fc7 mov r1, #796 ; 0x31c <== NOT EXECUTED 3000cfe8: e59f2034 ldr r2, [pc, #52] ; 3000d024 <IMFS_memfile_write+0x25c><== NOT EXECUTED 3000cfec: e59f3034 ldr r3, [pc, #52] ; 3000d028 <IMFS_memfile_write+0x260><== NOT EXECUTED 3000cff0: ebfff695 bl 3000aa4c <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
3000cff4: e59f0024 ldr r0, [pc, #36] ; 3000d020 <IMFS_memfile_write+0x258><== NOT EXECUTED 3000cff8: e59f103c ldr r1, [pc, #60] ; 3000d03c <IMFS_memfile_write+0x274><== NOT EXECUTED 3000cffc: e59f2020 ldr r2, [pc, #32] ; 3000d024 <IMFS_memfile_write+0x25c><== NOT EXECUTED 3000d000: e59f3020 ldr r3, [pc, #32] ; 3000d028 <IMFS_memfile_write+0x260><== NOT EXECUTED 3000d004: ebfff690 bl 3000aa4c <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
3000d008: e59f0010 ldr r0, [pc, #16] ; 3000d020 <IMFS_memfile_write+0x258><== NOT EXECUTED 3000d00c: e59f102c ldr r1, [pc, #44] ; 3000d040 <IMFS_memfile_write+0x278><== NOT EXECUTED 3000d010: e59f200c ldr r2, [pc, #12] ; 3000d024 <IMFS_memfile_write+0x25c><== NOT EXECUTED 3000d014: e59f3028 ldr r3, [pc, #40] ; 3000d044 <IMFS_memfile_write+0x27c><== NOT EXECUTED 3000d018: ebfff68b bl 3000aa4c <__assert_func> <== NOT EXECUTED
30001860 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30001860: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30001864: e24dd040 sub sp, sp, #64 ; 0x40
30001868: e1a04001 mov r4, r1
3000186c: e1a07002 mov r7, r2
30001870: e1a06003 mov r6, r3
30001874: e1a08000 mov r8, r0
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
30001878: eb0036d4 bl 3000f3d0 <strlen> 3000187c: e28d5004 add r5, sp, #4 30001880: e1a01000 mov r1, r0 30001884: e28d303c add r3, sp, #60 ; 0x3c 30001888: e1a00008 mov r0, r8 3000188c: e1a02005 mov r2, r5 30001890: eb0023d3 bl 3000a7e4 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
30001894: e2043a0f and r3, r4, #61440 ; 0xf000 30001898: e3530901 cmp r3, #16384 ; 0x4000
3000189c: 0a00001b beq 30001910 <IMFS_mknod+0xb0>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
300018a0: e3530902 cmp r3, #32768 ; 0x8000 300018a4: 03a01005 moveq r1, #5
300018a8: 0a000005 beq 300018c4 <IMFS_mknod+0x64>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
300018ac: e3530a06 cmp r3, #24576 ; 0x6000 300018b0: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
300018b4: 058d7028 streq r7, [sp, #40] ; 0x28 300018b8: 058d602c streq r6, [sp, #44] ; 0x2c 300018bc: 03a01002 moveq r1, #2
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
300018c0: 1a00000a bne 300018f0 <IMFS_mknod+0x90>
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
300018c4: e28dc028 add ip, sp, #40 ; 0x28 300018c8: e59d0058 ldr r0, [sp, #88] ; 0x58 300018cc: e1a02005 mov r2, r5 300018d0: e1a03004 mov r3, r4 300018d4: e58dc000 str ip, [sp] 300018d8: eb00208c bl 30009b10 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
300018dc: e3500000 cmp r0, #0 300018e0: 13a00000 movne r0, #0
300018e4: 0a00000b beq 30001918 <IMFS_mknod+0xb8>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
300018e8: e28dd040 add sp, sp, #64 ; 0x40
300018ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
300018f0: e3530a01 cmp r3, #4096 ; 0x1000 300018f4: 03a01007 moveq r1, #7
300018f8: 0afffff1 beq 300018c4 <IMFS_mknod+0x64>
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
300018fc: eb0032ae bl 3000e3bc <__errno> <== NOT EXECUTED 30001900: e3a03016 mov r3, #22 <== NOT EXECUTED 30001904: e5803000 str r3, [r0] <== NOT EXECUTED 30001908: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000190c: eafffff5 b 300018e8 <IMFS_mknod+0x88> <== NOT EXECUTED
30001910: e3a01001 mov r1, #1 30001914: eaffffea b 300018c4 <IMFS_mknod+0x64>
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
30001918: eb0032a7 bl 3000e3bc <__errno> <== NOT EXECUTED 3000191c: e3a0300c mov r3, #12 <== NOT EXECUTED 30001920: e5803000 str r3, [r0] <== NOT EXECUTED 30001924: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001928: eaffffee b 300018e8 <IMFS_mknod+0x88> <== NOT EXECUTED
3000192c <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
3000192c: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
30001930: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001934: e593204c ldr r2, [r3, #76] ; 0x4c 30001938: e3520001 cmp r2, #1
3000193c: 1a000002 bne 3000194c <IMFS_mount+0x20>
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
30001940: e583005c str r0, [r3, #92] ; 0x5c 30001944: e3a00000 mov r0, #0
return 0; }
30001948: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000194c: eb00329a bl 3000e3bc <__errno> <== NOT EXECUTED
30001950: e3a03014 mov r3, #20 <== NOT EXECUTED
30001954: e5803000 str r3, [r0] <== NOT EXECUTED
30001958: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000195c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30004120 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30004120: e92d4030 push {r4, r5, lr}
assert( the_jnode );
30004124: e2504000 subs r4, r0, #0
30004128: 0a000055 beq 30004284 <IMFS_print_jnode+0x164>
fprintf(stdout, "%s", the_jnode->name );
3000412c: e59f5164 ldr r5, [pc, #356] ; 30004298 <IMFS_print_jnode+0x178> 30004130: e284000c add r0, r4, #12 30004134: e5953000 ldr r3, [r5] 30004138: e5931008 ldr r1, [r3, #8] 3000413c: eb003ad3 bl 30012c90 <fputs>
switch( the_jnode->type ) {
30004140: e594204c ldr r2, [r4, #76] ; 0x4c 30004144: e2423001 sub r3, r2, #1 30004148: e3530006 cmp r3, #6 3000414c: 979ff103 ldrls pc, [pc, r3, lsl #2]
30004150: ea000011 b 3000419c <IMFS_print_jnode+0x7c> <== NOT EXECUTED 30004154: 300041c0 .word 0x300041c0 <== NOT EXECUTED 30004158: 300041dc .word 0x300041dc <== NOT EXECUTED 3000415c: 300041f8 .word 0x300041f8 <== NOT EXECUTED 30004160: 30004224 .word 0x30004224 <== NOT EXECUTED 30004164: 30004250 .word 0x30004250 <== NOT EXECUTED 30004168: 30004268 .word 0x30004268 <== NOT EXECUTED 3000416c: 30004170 .word 0x30004170 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30004170: e5953000 ldr r3, [r5] <== NOT EXECUTED 30004174: e3a01001 mov r1, #1 <== NOT EXECUTED 30004178: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3000417c: e3a02012 mov r2, #18 <== NOT EXECUTED 30004180: e59f0114 ldr r0, [pc, #276] ; 3000429c <IMFS_print_jnode+0x17c><== NOT EXECUTED 30004184: eb003dd6 bl 300138e4 <fwrite> <== NOT EXECUTED
assert(0);
30004188: e59f0110 ldr r0, [pc, #272] ; 300042a0 <IMFS_print_jnode+0x180><== NOT EXECUTED 3000418c: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 30004190: e59f210c ldr r2, [pc, #268] ; 300042a4 <IMFS_print_jnode+0x184><== NOT EXECUTED 30004194: e59f310c ldr r3, [pc, #268] ; 300042a8 <IMFS_print_jnode+0x188><== NOT EXECUTED 30004198: eb000295 bl 30004bf4 <__assert_func> <== NOT EXECUTED
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
3000419c: e5953000 ldr r3, [r5] <== NOT EXECUTED 300041a0: e59f1104 ldr r1, [pc, #260] ; 300042ac <IMFS_print_jnode+0x18c><== NOT EXECUTED 300041a4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 300041a8: eb003a57 bl 30012b0c <fprintf> <== NOT EXECUTED
assert(0);
300041ac: e59f00ec ldr r0, [pc, #236] ; 300042a0 <IMFS_print_jnode+0x180><== NOT EXECUTED 300041b0: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 300041b4: e59f20e8 ldr r2, [pc, #232] ; 300042a4 <IMFS_print_jnode+0x184><== NOT EXECUTED 300041b8: e59f30e8 ldr r3, [pc, #232] ; 300042a8 <IMFS_print_jnode+0x188><== NOT EXECUTED 300041bc: eb00028c bl 30004bf4 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
300041c0: e5953000 ldr r3, [r5] 300041c4: e3a0002f mov r0, #47 ; 0x2f 300041c8: e5931008 ldr r1, [r3, #8] 300041cc: eb003a6a bl 30012b7c <fputc>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
300041d0: e59f00d8 ldr r0, [pc, #216] ; 300042b0 <IMFS_print_jnode+0x190>
}
300041d4: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
300041d8: ea0041b3 b 300148ac <puts>
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
300041dc: e5952000 ldr r2, [r5] 300041e0: e5943054 ldr r3, [r4, #84] ; 0x54 300041e4: e5920008 ldr r0, [r2, #8] 300041e8: e59f10c4 ldr r1, [pc, #196] ; 300042b4 <IMFS_print_jnode+0x194> 300041ec: e5942050 ldr r2, [r4, #80] ; 0x50 300041f0: eb003a45 bl 30012b0c <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
300041f4: eafffff5 b 300041d0 <IMFS_print_jnode+0xb0>
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
300041f8: e5953000 ldr r3, [r5] <== NOT EXECUTED 300041fc: e3a01001 mov r1, #1 <== NOT EXECUTED 30004200: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 30004204: e3a02013 mov r2, #19 <== NOT EXECUTED 30004208: e59f00a8 ldr r0, [pc, #168] ; 300042b8 <IMFS_print_jnode+0x198><== NOT EXECUTED 3000420c: eb003db4 bl 300138e4 <fwrite> <== NOT EXECUTED
assert(0);
30004210: e59f0088 ldr r0, [pc, #136] ; 300042a0 <IMFS_print_jnode+0x180><== NOT EXECUTED 30004214: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 30004218: e59f2084 ldr r2, [pc, #132] ; 300042a4 <IMFS_print_jnode+0x184><== NOT EXECUTED 3000421c: e59f3084 ldr r3, [pc, #132] ; 300042a8 <IMFS_print_jnode+0x188><== NOT EXECUTED 30004220: eb000273 bl 30004bf4 <__assert_func> <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
30004224: e5953000 ldr r3, [r5] <== NOT EXECUTED 30004228: e3a01001 mov r1, #1 <== NOT EXECUTED 3000422c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 30004230: e3a02013 mov r2, #19 <== NOT EXECUTED 30004234: e59f007c ldr r0, [pc, #124] ; 300042b8 <IMFS_print_jnode+0x198><== NOT EXECUTED 30004238: eb003da9 bl 300138e4 <fwrite> <== NOT EXECUTED
assert(0);
3000423c: e59f005c ldr r0, [pc, #92] ; 300042a0 <IMFS_print_jnode+0x180><== NOT EXECUTED 30004240: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 30004244: e59f2058 ldr r2, [pc, #88] ; 300042a4 <IMFS_print_jnode+0x184><== NOT EXECUTED 30004248: e59f3058 ldr r3, [pc, #88] ; 300042a8 <IMFS_print_jnode+0x188><== NOT EXECUTED 3000424c: eb000268 bl 30004bf4 <__assert_func> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
30004250: e5953000 ldr r3, [r5] 30004254: e5942050 ldr r2, [r4, #80] ; 0x50 30004258: e5930008 ldr r0, [r3, #8] 3000425c: e59f1058 ldr r1, [pc, #88] ; 300042bc <IMFS_print_jnode+0x19c> 30004260: eb003a29 bl 30012b0c <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
30004264: eaffffd9 b 300041d0 <IMFS_print_jnode+0xb0>
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
30004268: e5952000 ldr r2, [r5] <== NOT EXECUTED 3000426c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 30004270: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 30004274: e59f1044 ldr r1, [pc, #68] ; 300042c0 <IMFS_print_jnode+0x1a0><== NOT EXECUTED 30004278: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 3000427c: eb003a22 bl 30012b0c <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
30004280: eaffffd2 b 300041d0 <IMFS_print_jnode+0xb0> <== NOT EXECUTED
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
30004284: e59f0014 ldr r0, [pc, #20] ; 300042a0 <IMFS_print_jnode+0x180><== NOT EXECUTED 30004288: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED 3000428c: e59f2010 ldr r2, [pc, #16] ; 300042a4 <IMFS_print_jnode+0x184><== NOT EXECUTED 30004290: e59f302c ldr r3, [pc, #44] ; 300042c4 <IMFS_print_jnode+0x1a4><== NOT EXECUTED 30004294: eb000256 bl 30004bf4 <__assert_func> <== NOT EXECUTED
3000196c <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
int i;
node = loc->node_access;
3000196c: e5903000 ldr r3, [r0]
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
30001970: e92d4010 push {r4, lr}
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
30001974: e593004c ldr r0, [r3, #76] ; 0x4c 30001978: e3500004 cmp r0, #4
3000197c: 1a000013 bne 300019d0 <IMFS_readlink+0x64>
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
30001980: e3520000 cmp r2, #0
30001984: 0a00000f beq 300019c8 <IMFS_readlink+0x5c>
30001988: e5930050 ldr r0, [r3, #80] ; 0x50 3000198c: e5d0c000 ldrb ip, [r0] 30001990: e35c0000 cmp ip, #0
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
30001994: 13a04000 movne r4, #0 30001998: 11a00004 movne r0, r4
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
3000199c: 0a000009 beq 300019c8 <IMFS_readlink+0x5c>
300019a0: e2800001 add r0, r0, #1 300019a4: e1520000 cmp r2, r0
buf[i] = node->info.sym_link.name[i];
300019a8: e7c1c004 strb ip, [r1, r4]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
300019ac: e1a04000 mov r4, r0
300019b0: 98bd8010 popls {r4, pc}
300019b4: e593c050 ldr ip, [r3, #80] ; 0x50
300019b8: e7dcc000 ldrb ip, [ip, r0]
300019bc: e35c0000 cmp ip, #0
300019c0: 1afffff6 bne 300019a0 <IMFS_readlink+0x34>
300019c4: e8bd8010 pop {r4, pc}
300019c8: e3a00000 mov r0, #0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
300019cc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
300019d0: eb003279 bl 3000e3bc <__errno> <== NOT EXECUTED
300019d4: e3a03016 mov r3, #22 <== NOT EXECUTED
300019d8: e5803000 str r3, [r0] <== NOT EXECUTED
300019dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
300019e0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
3000a96c <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
3000a96c: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3000a970: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
3000a974: e593204c ldr r2, [r3, #76] ; 0x4c 3000a978: e2422002 sub r2, r2, #2 3000a97c: e3520005 cmp r2, #5 3000a980: 979ff102 ldrls pc, [pc, r2, lsl #2]
3000a984: ea000025 b 3000aa20 <IMFS_stat+0xb4> <== NOT EXECUTED 3000a988: 3000aa0c .word 0x3000aa0c <== NOT EXECUTED 3000a98c: 3000aa20 .word 0x3000aa20 <== NOT EXECUTED 3000a990: 3000a9a0 .word 0x3000a9a0 <== NOT EXECUTED 3000a994: 3000aa34 .word 0x3000aa34 <== NOT EXECUTED 3000a998: 3000aa34 .word 0x3000aa34 <== NOT EXECUTED 3000a99c: 3000a9a0 .word 0x3000a9a0 <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
3000a9a0: e3a0b000 mov fp, #0 <== NOT EXECUTED 3000a9a4: e3a0c000 mov ip, #0 <== NOT EXECUTED 3000a9a8: e581b020 str fp, [r1, #32] <== NOT EXECUTED 3000a9ac: e581c024 str ip, [r1, #36] ; 0x24 <== NOT EXECUTED
*/
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;
3000a9b0: e593c030 ldr ip, [r3, #48] ; 0x30
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
3000a9b4: e5902010 ldr r2, [r0, #16]
buf->st_mode = the_jnode->st_mode;
3000a9b8: e581c00c str ip, [r1, #12]
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
3000a9bc: e5930038 ldr r0, [r3, #56] ; 0x38
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;
buf->st_nlink = the_jnode->st_nlink;
3000a9c0: e1d3c3b4 ldrh ip, [r3, #52] ; 0x34
buf->st_ino = the_jnode->st_ino;
3000a9c4: e5810008 str r0, [r1, #8]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
3000a9c8: e5930040 ldr r0, [r3, #64] ; 0x40
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;
buf->st_nlink = the_jnode->st_nlink;
3000a9cc: e1c1c1b0 strh ip, [r1, #16]
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;
3000a9d0: e5810028 str r0, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
3000a9d4: e5930044 ldr r0, [r3, #68] ; 0x44
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
3000a9d8: e1d3c3bc ldrh ip, [r3, #60] ; 0x3c
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
3000a9dc: e5810030 str r0, [r1, #48] ; 0x30
buf->st_ctime = the_jnode->stat_ctime;
3000a9e0: e5930048 ldr r0, [r3, #72] ; 0x48
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
3000a9e4: e5922034 ldr r2, [r2, #52] ; 0x34
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
3000a9e8: e1c1c1b2 strh ip, [r1, #18]
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
3000a9ec: e5922000 ldr r2, [r2]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
3000a9f0: e5810038 str r0, [r1, #56] ; 0x38
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
3000a9f4: e1d333be ldrh r3, [r3, #62] ; 0x3e
/* * 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 =
3000a9f8: e59f0048 ldr r0, [pc, #72] ; 3000aa48 <IMFS_stat+0xdc>
3000a9fc: e8810005 stm r1, {r0, r2}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
3000aa00: e1c131b4 strh r3, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
3000aa04: e3a00000 mov r0, #0
return 0;
}
3000aa08: e8bd8800 pop {fp, pc}
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
3000aa0c: e593c054 ldr ip, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
3000aa10: e5932050 ldr r2, [r3, #80] ; 0x50 3000aa14: e581c01c str ip, [r1, #28] 3000aa18: e5812018 str r2, [r1, #24]
break;
3000aa1c: eaffffe3 b 3000a9b0 <IMFS_stat+0x44>
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000aa20: eb000e65 bl 3000e3bc <__errno> <== NOT EXECUTED
3000aa24: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3000aa28: e5803000 str r3, [r0] <== NOT EXECUTED
3000aa2c: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000aa30: e8bd8800 pop {fp, pc} <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
3000aa34: e283c050 add ip, r3, #80 ; 0x50
3000aa38: e89c1800 ldm ip, {fp, ip}
3000aa3c: e581b020 str fp, [r1, #32]
3000aa40: e581c024 str ip, [r1, #36] ; 0x24
break;
3000aa44: eaffffd9 b 3000a9b0 <IMFS_stat+0x44>
30001a48 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
30001a48: e92d40f0 push {r4, r5, r6, r7, lr}
30001a4c: e1a06000 mov r6, r0
30001a50: e24dd040 sub sp, sp, #64 ; 0x40
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
30001a54: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
30001a58: e1a07002 mov r7, r2 30001a5c: e1a05001 mov r5, r1
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
30001a60: eb00365a bl 3000f3d0 <strlen> 30001a64: e28d4004 add r4, sp, #4 30001a68: e1a01000 mov r1, r0 30001a6c: e1a02004 mov r2, r4 30001a70: e28d303c add r3, sp, #60 ; 0x3c 30001a74: e1a00007 mov r0, r7 30001a78: eb002359 bl 3000a7e4 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001a7c: e1a00005 mov r0, r5 30001a80: eb00363e bl 3000f380 <strdup>
if (info.sym_link.name == NULL) {
30001a84: e3500000 cmp r0, #0
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001a88: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
30001a8c: 0a00000d beq 30001ac8 <IMFS_symlink+0x80>
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
30001a90: e28dc028 add ip, sp, #40 ; 0x28 30001a94: e1a00006 mov r0, r6 30001a98: e1a02004 mov r2, r4 30001a9c: e3a01004 mov r1, #4 30001aa0: e59f3034 ldr r3, [pc, #52] ; 30001adc <IMFS_symlink+0x94> 30001aa4: e58dc000 str ip, [sp] 30001aa8: eb002018 bl 30009b10 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
30001aac: e3500000 cmp r0, #0 30001ab0: 13a00000 movne r0, #0
30001ab4: 0a000001 beq 30001ac0 <IMFS_symlink+0x78>
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
30001ab8: e28dd040 add sp, sp, #64 ; 0x40
30001abc: e8bd80f0 pop {r4, r5, r6, r7, pc}
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
30001ac0: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 30001ac4: eb000185 bl 300020e0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
30001ac8: eb00323b bl 3000e3bc <__errno> <== NOT EXECUTED 30001acc: e3a0300c mov r3, #12 <== NOT EXECUTED 30001ad0: e5803000 str r3, [r0] <== NOT EXECUTED 30001ad4: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001ad8: eafffff6 b 30001ab8 <IMFS_symlink+0x70> <== NOT EXECUTED
30001ae0 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001ae0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
30001ae4: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001ae8: e24dd01c sub sp, sp, #28
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001aec: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001af0: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001af4: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001af8: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001afc: 0a000006 beq 30001b1c <IMFS_unlink+0x3c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
30001b00: e1a00006 mov r0, r6 30001b04: e1a01004 mov r1, r4 30001b08: e5943008 ldr r3, [r4, #8] 30001b0c: e1a0e00f mov lr, pc 30001b10: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
}
30001b14: e28dd01c add sp, sp, #28
30001b18: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
30001b1c: e595e050 ldr lr, [r5, #80] ; 0x50 30001b20: e35e0000 cmp lr, #0
30001b24: 0a00001f beq 30001ba8 <IMFS_unlink+0xc8>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
30001b28: e1a0c00d mov ip, sp
30001b2c: e1a07001 mov r7, r1
30001b30: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001b34: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
30001b38: e28d801c add r8, sp, #28 30001b3c: e528e01c str lr, [r8, #-28]!
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
30001b40: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
30001b44: 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;
30001b48: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
30001b4c: eb002041 bl 30009c58 <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)
30001b50: e5953050 ldr r3, [r5, #80] ; 0x50 30001b54: e1d323b4 ldrh r2, [r3, #52] ; 0x34 30001b58: e3520001 cmp r2, #1
30001b5c: 0a000008 beq 30001b84 <IMFS_unlink+0xa4>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
30001b60: e2422001 sub r2, r2, #1 30001b64: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
30001b68: e28d0014 add r0, sp, #20 30001b6c: e3a01000 mov r1, #0 30001b70: eb000183 bl 30002184 <gettimeofday> 30001b74: e5953050 ldr r3, [r5, #80] ; 0x50 30001b78: e59d2014 ldr r2, [sp, #20] 30001b7c: e5832048 str r2, [r3, #72] ; 0x48 30001b80: eaffffde b 30001b00 <IMFS_unlink+0x20>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
30001b84: e1a0100d mov r1, sp 30001b88: e1a00006 mov r0, r6 30001b8c: e59d3008 ldr r3, [sp, #8] 30001b90: e1a0e00f mov lr, pc 30001b94: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
30001b98: e3500000 cmp r0, #0 30001b9c: 13e00000 mvnne r0, #0
30001ba0: 0affffd6 beq 30001b00 <IMFS_unlink+0x20>
30001ba4: eaffffda b 30001b14 <IMFS_unlink+0x34>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
30001ba8: eb003203 bl 3000e3bc <__errno> <== NOT EXECUTED 30001bac: e3a03016 mov r3, #22 <== NOT EXECUTED 30001bb0: e5803000 str r3, [r0] <== NOT EXECUTED 30001bb4: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001bb8: eaffffd5 b 30001b14 <IMFS_unlink+0x34> <== NOT EXECUTED
30001bbc <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001bbc: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
30001bc0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001bc4: e593204c ldr r2, [r3, #76] ; 0x4c 30001bc8: e3520001 cmp r2, #1
30001bcc: 1a000005 bne 30001be8 <IMFS_unmount+0x2c>
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
30001bd0: e593205c ldr r2, [r3, #92] ; 0x5c 30001bd4: e3520000 cmp r2, #0
30001bd8: 0a000007 beq 30001bfc <IMFS_unmount+0x40>
/*
* 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;
30001bdc: e3a00000 mov r0, #0 30001be0: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
30001be4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
30001be8: eb0031f3 bl 3000e3bc <__errno> <== NOT EXECUTED
30001bec: e3a03014 mov r3, #20 <== NOT EXECUTED
30001bf0: e5803000 str r3, [r0] <== NOT EXECUTED
30001bf4: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001bf8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
30001bfc: eb0031ee bl 3000e3bc <__errno> <== NOT EXECUTED
30001c00: e3a03016 mov r3, #22 <== NOT EXECUTED
30001c04: e5803000 str r3, [r0] <== NOT EXECUTED
30001c08: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001c0c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30002350 <RTEMS_Malloc_Initialize>:
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
30002350: e59f30d0 ldr r3, [pc, #208] ; 30002428 <RTEMS_Malloc_Initialize+0xd8>
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
30002354: e92d4070 push {r4, r5, r6, lr}
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
30002358: e5933000 ldr r3, [r3]
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
3000235c: e1a05000 mov r5, r0
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
30002360: e3530000 cmp r3, #0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
30002364: e1a06001 mov r6, r1 30002368: e1a04002 mov r4, r2
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
(*rtems_malloc_statistics_helpers->initialize)();
3000236c: 11a0e00f movne lr, pc 30002370: 1593f000 ldrne pc, [r3]
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
30002374: ebffffe1 bl 30002300 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
30002378: e59f30ac ldr r3, [pc, #172] ; 3000242c <RTEMS_Malloc_Initialize+0xdc> 3000237c: e5933000 ldr r3, [r3] 30002380: e3530000 cmp r3, #0
30002384: 0a000006 beq 300023a4 <RTEMS_Malloc_Initialize+0x54>
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
30002388: e1a00005 mov r0, r5 <== NOT EXECUTED 3000238c: e1a01004 mov r1, r4 <== NOT EXECUTED 30002390: e1a0e00f mov lr, pc <== NOT EXECUTED 30002394: e593f000 ldr pc, [r3] <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
30002398: e0856006 add r6, r5, r6 <== NOT EXECUTED 3000239c: e0606006 rsb r6, r0, r6 <== NOT EXECUTED 300023a0: e1a05000 mov r5, r0 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if (
300023a4: e59f4084 ldr r4, [pc, #132] ; 30002430 <RTEMS_Malloc_Initialize+0xe0> 300023a8: e5d41000 ldrb r1, [r4] 300023ac: e3510000 cmp r1, #0
300023b0: 1a000018 bne 30002418 <RTEMS_Malloc_Initialize+0xc8>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
300023b4: e59f3078 ldr r3, [pc, #120] ; 30002434 <RTEMS_Malloc_Initialize+0xe4> 300023b8: e5d33028 ldrb r3, [r3, #40] ; 0x28 300023bc: e3530000 cmp r3, #0
300023c0: 1a00000e bne 30002400 <RTEMS_Malloc_Initialize+0xb0>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
300023c4: e59f406c ldr r4, [pc, #108] ; 30002438 <RTEMS_Malloc_Initialize+0xe8> 300023c8: e1a01005 mov r1, r5 300023cc: e1a02006 mov r2, r6 300023d0: e5940000 ldr r0, [r4] 300023d4: e3a03004 mov r3, #4 300023d8: eb001097 bl 3000663c <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
300023dc: e3500000 cmp r0, #0
300023e0: 0a00000e beq 30002420 <RTEMS_Malloc_Initialize+0xd0>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
300023e4: e59f5050 ldr r5, [pc, #80] ; 3000243c <RTEMS_Malloc_Initialize+0xec> 300023e8: e5940000 ldr r0, [r4] 300023ec: e5954000 ldr r4, [r5] 300023f0: eb00139a bl 30007260 <_Protected_heap_Get_size> 300023f4: e0800004 add r0, r0, r4 300023f8: e5850000 str r0, [r5]
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
300023fc: e8bd8070 pop {r4, r5, r6, pc}
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
30002400: e1a00005 mov r0, r5 30002404: e1a02006 mov r2, r6 30002408: eb003235 bl 3000ece4 <memset>
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
3000240c: e5d43000 ldrb r3, [r4] 30002410: e3530000 cmp r3, #0
30002414: 0affffea beq 300023c4 <RTEMS_Malloc_Initialize+0x74>
30002418: e59f4018 ldr r4, [pc, #24] ; 30002438 <RTEMS_Malloc_Initialize+0xe8> 3000241c: eafffff0 b 300023e4 <RTEMS_Malloc_Initialize+0x94>
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
30002420: e280001a add r0, r0, #26 <== NOT EXECUTED 30002424: eb000e74 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
3000172c <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
3000172c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
30001730: e250a000 subs sl, r0, #0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
30001734: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
30001738: 0a000031 beq 30001804 <Stack_check_Dump_threads_usage+0xd8><== NOT EXECUTED
return;
if ( !print_handler )
3000173c: e59f4110 ldr r4, [pc, #272] ; 30001854 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED 30001740: e5947004 ldr r7, [r4, #4] <== NOT EXECUTED 30001744: e3570000 cmp r7, #0 <== NOT EXECUTED 30001748: 0a00002d beq 30001804 <Stack_check_Dump_threads_usage+0xd8><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
3000174c: e37a0001 cmn sl, #1 <== NOT EXECUTED 30001750: 0a000032 beq 30001820 <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
30001754: e59a80f0 ldr r8, [sl, #240] ; 0xf0 <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
30001758: e28a50c0 add r5, sl, #192 ; 0xc0 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
3000175c: e8950240 ldm r5, {r6, r9} <== NOT EXECUTED
30001760: e2899010 add r9, r9, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
30001764: e2466010 sub r6, r6, #16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
30001768: e1a00009 mov r0, r9 <== NOT EXECUTED 3000176c: e1a01006 mov r1, r6 <== NOT EXECUTED 30001770: ebffffd8 bl 300016d8 <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
30001774: e250b000 subs fp, r0, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
30001778: 10899006 addne r9, r9, r6 <== NOT EXECUTED 3000177c: 106bb009 rsbne fp, fp, r9 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
30001780: e35a0000 cmp sl, #0 <== NOT EXECUTED 30001784: 0a00002c beq 3000183c <Stack_check_Dump_threads_usage+0x110><== NOT EXECUTED
(*print_handler)(
30001788: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 3000178c: e28d2008 add r2, sp, #8 <== NOT EXECUTED 30001790: e3a01005 mov r1, #5 <== NOT EXECUTED 30001794: e1a0000a mov r0, sl <== NOT EXECUTED 30001798: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED 3000179c: eb001075 bl 30005978 <rtems_object_get_name> <== NOT EXECUTED 300017a0: e1a0200a mov r2, sl <== NOT EXECUTED 300017a4: e1a03000 mov r3, r0 <== NOT EXECUTED 300017a8: e59f10a8 ldr r1, [pc, #168] ; 30001858 <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED 300017ac: e1a00009 mov r0, r9 <== NOT EXECUTED 300017b0: e1a0e00f mov lr, pc <== NOT EXECUTED 300017b4: e12fff17 bx r7 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
300017b8: e5953000 ldr r3, [r5] <== NOT EXECUTED 300017bc: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 300017c0: e2433001 sub r3, r3, #1 <== NOT EXECUTED 300017c4: e0823003 add r3, r2, r3 <== NOT EXECUTED 300017c8: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 300017cc: e58d8000 str r8, [sp] <== NOT EXECUTED 300017d0: e58d6004 str r6, [sp, #4] <== NOT EXECUTED 300017d4: e59f1080 ldr r1, [pc, #128] ; 3000185c <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED 300017d8: e1a0e00f mov lr, pc <== NOT EXECUTED 300017dc: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
300017e0: e5942000 ldr r2, [r4] <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
300017e4: e59f3068 ldr r3, [pc, #104] ; 30001854 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
300017e8: e3520000 cmp r2, #0 <== NOT EXECUTED 300017ec: 0a000006 beq 3000180c <Stack_check_Dump_threads_usage+0xe0><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
300017f0: e1a0200b mov r2, fp <== NOT EXECUTED 300017f4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 300017f8: e59f1060 ldr r1, [pc, #96] ; 30001860 <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED 300017fc: e1a0e00f mov lr, pc <== NOT EXECUTED 30001800: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
}
}
30001804: e28dd010 add sp, sp, #16 <== NOT EXECUTED
30001808: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
3000180c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30001810: e59f104c ldr r1, [pc, #76] ; 30001864 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED 30001814: e1a0e00f mov lr, pc <== NOT EXECUTED 30001818: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED 3000181c: eafffff8 b 30001804 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
30001820: e59f5040 ldr r5, [pc, #64] ; 30001868 <Stack_check_Dump_threads_usage+0x13c><== NOT EXECUTED 30001824: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 30001828: e3530000 cmp r3, #0 <== NOT EXECUTED 3000182c: 13a08000 movne r8, #0 <== NOT EXECUTED 30001830: 11a0a008 movne sl, r8 <== NOT EXECUTED 30001834: 1affffc8 bne 3000175c <Stack_check_Dump_threads_usage+0x30><== NOT EXECUTED 30001838: eafffff1 b 30001804 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
"0x%08" PRIx32 " %4s",
the_thread->Object.id,
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
3000183c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 30001840: e59f1024 ldr r1, [pc, #36] ; 3000186c <Stack_check_Dump_threads_usage+0x140><== NOT EXECUTED 30001844: e3e02000 mvn r2, #0 <== NOT EXECUTED 30001848: e1a0e00f mov lr, pc <== NOT EXECUTED 3000184c: e12fff17 bx r7 <== NOT EXECUTED 30001850: eaffffd8 b 300017b8 <Stack_check_Dump_threads_usage+0x8c> <== NOT EXECUTED
300016d8 <Stack_check_find_high_water_mark>:
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
300016d8: e2803010 add r3, r0, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
300016dc: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 300016e0: e0831001 add r1, r3, r1 <== NOT EXECUTED 300016e4: e1530001 cmp r3, r1 <== NOT EXECUTED 300016e8: 2a00000a bcs 30001718 <Stack_check_find_high_water_mark+0x40><== NOT EXECUTED
if (*base != U32_PATTERN)
300016ec: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 300016f0: e59f2030 ldr r2, [pc, #48] ; 30001728 <Stack_check_find_high_water_mark+0x50><== NOT EXECUTED 300016f4: e1500002 cmp r0, r2 <== NOT EXECUTED 300016f8: 0a000003 beq 3000170c <Stack_check_find_high_water_mark+0x34><== NOT EXECUTED 300016fc: ea000007 b 30001720 <Stack_check_find_high_water_mark+0x48><== NOT EXECUTED 30001700: e5932000 ldr r2, [r3] <== NOT EXECUTED 30001704: e1520000 cmp r2, r0 <== NOT EXECUTED 30001708: 1a000004 bne 30001720 <Stack_check_find_high_water_mark+0x48><== 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++)
3000170c: e2833004 add r3, r3, #4 <== NOT EXECUTED 30001710: e1510003 cmp r1, r3 <== NOT EXECUTED 30001714: 8afffff9 bhi 30001700 <Stack_check_find_high_water_mark+0x28><== NOT EXECUTED 30001718: e3a00000 mov r0, #0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
3000171c: e12fff1e bx lr <== NOT EXECUTED
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;
30001720: e1a00003 mov r0, r3 <== NOT EXECUTED 30001724: e12fff1e bx lr <== NOT EXECUTED
300018e4 <Stack_check_report_blown_task>:
*
* NOTE: The system is in a questionable state... we may not get
* the following message out.
*/
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
300018e4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
300018e8: e1a06000 mov r6, r0 <== NOT EXECUTED
300018ec: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
300018f0: e59f0084 ldr r0, [pc, #132] ; 3000197c <Stack_check_report_blown_task+0x98><== NOT EXECUTED
*
* NOTE: The system is in a questionable state... we may not get
* the following message out.
*/
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
300018f4: e20140ff and r4, r1, #255 ; 0xff <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack);
300018f8: e59650c4 ldr r5, [r6, #196] ; 0xc4 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
300018fc: eb0006ad bl 300033b8 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
30001900: e59f0078 ldr r0, [pc, #120] ; 30001980 <Stack_check_report_blown_task+0x9c><== NOT EXECUTED 30001904: e1a01006 mov r1, r6 <== NOT EXECUTED 30001908: eb0006aa bl 300033b8 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
3000190c: e59f0070 ldr r0, [pc, #112] ; 30001984 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED 30001910: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED 30001914: eb0006a7 bl 300033b8 <printk> <== NOT EXECUTED
printk(
30001918: e59f0068 ldr r0, [pc, #104] ; 30001988 <Stack_check_report_blown_task+0xa4><== NOT EXECUTED 3000191c: e596100c ldr r1, [r6, #12] <== NOT EXECUTED 30001920: eb0006a4 bl 300033b8 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
30001924: e1a0200d mov r2, sp <== NOT EXECUTED 30001928: e3a01020 mov r1, #32 <== NOT EXECUTED 3000192c: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED 30001930: eb001010 bl 30005978 <rtems_object_get_name> <== NOT EXECUTED 30001934: e1a01000 mov r1, r0 <== NOT EXECUTED 30001938: e59f004c ldr r0, [pc, #76] ; 3000198c <Stack_check_report_blown_task+0xa8><== NOT EXECUTED 3000193c: eb00069d bl 300033b8 <printk> <== NOT EXECUTED
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
30001940: e59610c0 ldr r1, [r6, #192] ; 0xc0 <== NOT EXECUTED 30001944: e59620c4 ldr r2, [r6, #196] ; 0xc4 <== NOT EXECUTED 30001948: e59f0040 ldr r0, [pc, #64] ; 30001990 <Stack_check_report_blown_task+0xac><== NOT EXECUTED 3000194c: e0823001 add r3, r2, r1 <== NOT EXECUTED 30001950: eb000698 bl 300033b8 <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) {
30001954: e3540000 cmp r4, #0 <== NOT EXECUTED 30001958: 0a000001 beq 30001964 <Stack_check_report_blown_task+0x80> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
3000195c: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED 30001960: eb00122a bl 30006210 <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
30001964: e2853018 add r3, r5, #24 <== NOT EXECUTED 30001968: e59f0024 ldr r0, [pc, #36] ; 30001994 <Stack_check_report_blown_task+0xb0><== NOT EXECUTED 3000196c: e3a01010 mov r1, #16 <== NOT EXECUTED 30001970: e2852008 add r2, r5, #8 <== NOT EXECUTED 30001974: eb00068f bl 300033b8 <printk> <== NOT EXECUTED 30001978: eafffff7 b 3000195c <Stack_check_report_blown_task+0x78> <== NOT EXECUTED
3000ba84 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
3000ba84: e59f3154 ldr r3, [pc, #340] ; 3000bbe0 <_CORE_mutex_Seize_interrupt_trylock+0x15c>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
3000ba88: e3a02000 mov r2, #0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
3000ba8c: e5933000 ldr r3, [r3]
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
3000ba90: e92d4070 push {r4, r5, r6, lr}
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
3000ba94: e5832034 str r2, [r3, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
3000ba98: e590c050 ldr ip, [r0, #80] ; 0x50 3000ba9c: e15c0002 cmp ip, r2
3000baa0: 0a00000e beq 3000bae0 <_CORE_mutex_Seize_interrupt_trylock+0x5c>
the_mutex->lock = CORE_MUTEX_LOCKED;
3000baa4: e5802050 str r2, [r0, #80] ; 0x50
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
3000baa8: e590c048 ldr ip, [r0, #72] ; 0x48
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
3000baac: e5935008 ldr r5, [r3, #8]
the_mutex->nest_count = 1;
3000bab0: e3a04001 mov r4, #1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
3000bab4: e35c0002 cmp ip, #2
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
3000bab8: e5805060 str r5, [r0, #96] ; 0x60
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
3000babc: e580305c str r3, [r0, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
3000bac0: e5804054 str r4, [r0, #84] ; 0x54
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
3000bac4: 0a00000a beq 3000baf4 <_CORE_mutex_Seize_interrupt_trylock+0x70>
3000bac8: e35c0003 cmp ip, #3
3000bacc: 0a000019 beq 3000bb38 <_CORE_mutex_Seize_interrupt_trylock+0xb4>
3000bad0: e5913000 ldr r3, [r1]
3000bad4: e129f003 msr CPSR_fc, r3
3000bad8: e3a00000 mov r0, #0
3000badc: e8bd8070 pop {r4, r5, r6, pc}
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
3000bae0: e590205c ldr r2, [r0, #92] ; 0x5c 3000bae4: e1530002 cmp r3, r2
3000bae8: 0a000008 beq 3000bb10 <_CORE_mutex_Seize_interrupt_trylock+0x8c>
3000baec: e3a00001 mov r0, #1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
3000baf0: e8bd8070 pop {r4, r5, r6, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000baf4: e593201c ldr r2, [r3, #28]
3000baf8: e2822001 add r2, r2, #1
3000bafc: e583201c str r2, [r3, #28]
3000bb00: e5913000 ldr r3, [r1]
3000bb04: e129f003 msr CPSR_fc, r3
3000bb08: e3a00000 mov r0, #0
3000bb0c: e8bd8070 pop {r4, r5, r6, pc}
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
3000bb10: e5902040 ldr r2, [r0, #64] ; 0x40 3000bb14: e3520000 cmp r2, #0
3000bb18: 1a000017 bne 3000bb7c <_CORE_mutex_Seize_interrupt_trylock+0xf8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
3000bb1c: e5903054 ldr r3, [r0, #84] ; 0x54
3000bb20: e2833001 add r3, r3, #1
3000bb24: e5803054 str r3, [r0, #84] ; 0x54
3000bb28: e5913000 ldr r3, [r1]
3000bb2c: e129f003 msr CPSR_fc, r3
3000bb30: e3a00000 mov r0, #0
3000bb34: e8bd8070 pop {r4, r5, r6, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000bb38: e593c01c ldr ip, [r3, #28]
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
3000bb3c: e5935014 ldr r5, [r3, #20]
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000bb40: e08c6004 add r6, ip, r4 3000bb44: e583601c str r6, [r3, #28]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
3000bb48: e590604c ldr r6, [r0, #76] ; 0x4c
current = executing->current_priority;
if ( current == ceiling ) {
3000bb4c: e1560005 cmp r6, r5
3000bb50: 0a00001e beq 3000bbd0 <_CORE_mutex_Seize_interrupt_trylock+0x14c>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
3000bb54: 3a000010 bcc 3000bb9c <_CORE_mutex_Seize_interrupt_trylock+0x118>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
3000bb58: e3a05006 mov r5, #6 3000bb5c: e5835034 str r5, [r3, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
3000bb60: e5802054 str r2, [r0, #84] ; 0x54
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
3000bb64: e5804050 str r4, [r0, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
3000bb68: e583c01c str ip, [r3, #28]
3000bb6c: e5913000 ldr r3, [r1]
3000bb70: e129f003 msr CPSR_fc, r3
3000bb74: e3a00000 mov r0, #0
3000bb78: e8bd8070 pop {r4, r5, r6, pc}
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
3000bb7c: e3520001 cmp r2, #1
3000bb80: 1affffd9 bne 3000baec <_CORE_mutex_Seize_interrupt_trylock+0x68>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
3000bb84: e3a02002 mov r2, #2 <== NOT EXECUTED
3000bb88: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
3000bb8c: e5913000 ldr r3, [r1] <== NOT EXECUTED
3000bb90: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
3000bb94: e3a00000 mov r0, #0 <== NOT EXECUTED
3000bb98: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
3000bb9c: e59f3040 ldr r3, [pc, #64] ; 3000bbe4 <_CORE_mutex_Seize_interrupt_trylock+0x160> 3000bba0: e5932000 ldr r2, [r3] 3000bba4: e2822001 add r2, r2, #1 3000bba8: e5832000 str r2, [r3] 3000bbac: e5913000 ldr r3, [r1] 3000bbb0: e129f003 msr CPSR_fc, r3
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
3000bbb4: e3a02000 mov r2, #0 3000bbb8: e590104c ldr r1, [r0, #76] ; 0x4c 3000bbbc: e590005c ldr r0, [r0, #92] ; 0x5c 3000bbc0: ebffedbe bl 300072c0 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
3000bbc4: ebffef27 bl 30007868 <_Thread_Enable_dispatch>
3000bbc8: e3a00000 mov r0, #0
3000bbcc: e8bd8070 pop {r4, r5, r6, pc}
3000bbd0: e5913000 ldr r3, [r1]
3000bbd4: e129f003 msr CPSR_fc, r3
3000bbd8: e3a00000 mov r0, #0
3000bbdc: e8bd8070 pop {r4, r5, r6, pc}
3000bc5c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000bc5c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000bc60: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
3000bc64: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000bc68: e24dd01c sub sp, sp, #28 3000bc6c: e1a05001 mov r5, r1
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000bc70: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000bc74: e1a07000 mov r7, r0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000bc78: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000bc7c: e1a0b003 mov fp, r3
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
3000bc80: e590a008 ldr sl, [r0, #8]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
3000bc84: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000bc88: 2a000074 bcs 3000be60 <_Heap_Allocate_aligned_with_boundary+0x204>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
3000bc8c: e3530000 cmp r3, #0
3000bc90: 1a000070 bne 3000be58 <_Heap_Allocate_aligned_with_boundary+0x1fc>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000bc94: e157000a cmp r7, sl 3000bc98: 03a06000 moveq r6, #0
3000bc9c: 0a000072 beq 3000be6c <_Heap_Allocate_aligned_with_boundary+0x210>
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000bca0: e59d300c ldr r3, [sp, #12]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000bca4: e2651004 rsb r1, r5, #4
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000bca8: e2833007 add r3, r3, #7
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000bcac: e3a06000 mov r6, #0
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000bcb0: e58d3010 str r3, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000bcb4: e58d1014 str r1, [sp, #20] 3000bcb8: ea000004 b 3000bcd0 <_Heap_Allocate_aligned_with_boundary+0x74>
boundary
);
}
}
if ( alloc_begin != 0 ) {
3000bcbc: e3540000 cmp r4, #0
3000bcc0: 1a000057 bne 3000be24 <_Heap_Allocate_aligned_with_boundary+0x1c8>
break;
}
block = block->next;
3000bcc4: e59aa008 ldr sl, [sl, #8]
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000bcc8: e157000a cmp r7, sl
3000bccc: 0a000066 beq 3000be6c <_Heap_Allocate_aligned_with_boundary+0x210>
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
3000bcd0: e59a9004 ldr r9, [sl, #4] 3000bcd4: e59d2000 ldr r2, [sp]
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
3000bcd8: e2866001 add r6, r6, #1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
3000bcdc: e1520009 cmp r2, r9
3000bce0: 2afffff7 bcs 3000bcc4 <_Heap_Allocate_aligned_with_boundary+0x68>
if ( alignment == 0 ) {
3000bce4: e3580000 cmp r8, #0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
3000bce8: 028a4008 addeq r4, sl, #8
3000bcec: 0afffff2 beq 3000bcbc <_Heap_Allocate_aligned_with_boundary+0x60>
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000bcf0: e59d1014 ldr r1, [sp, #20]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
3000bcf4: e3c99001 bic r9, r9, #1 3000bcf8: e08a9009 add r9, sl, r9
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
3000bcfc: e5973014 ldr r3, [r7, #20]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000bd00: e59d2010 ldr r2, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000bd04: e0814009 add r4, r1, r9
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
3000bd08: e58d3004 str r3, [sp, #4]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000bd0c: e1a00004 mov r0, r4
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000bd10: e0633002 rsb r3, r3, r2 3000bd14: e1a01008 mov r1, r8 3000bd18: e0839009 add r9, r3, r9 3000bd1c: eb002f74 bl 30017af4 <__umodsi3> 3000bd20: e0604004 rsb r4, r0, r4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
3000bd24: e28a3008 add r3, sl, #8
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
3000bd28: e1590004 cmp r9, r4 3000bd2c: e58d3008 str r3, [sp, #8]
3000bd30: 2a000003 bcs 3000bd44 <_Heap_Allocate_aligned_with_boundary+0xe8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000bd34: e1a00009 mov r0, r9 3000bd38: e1a01008 mov r1, r8 3000bd3c: eb002f6c bl 30017af4 <__umodsi3> 3000bd40: e0604009 rsb r4, r0, r9
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
3000bd44: e35b0000 cmp fp, #0
3000bd48: 0a000025 beq 3000bde4 <_Heap_Allocate_aligned_with_boundary+0x188>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
3000bd4c: e0849005 add r9, r4, r5 3000bd50: e1a00009 mov r0, r9 3000bd54: e1a0100b mov r1, fp 3000bd58: eb002f65 bl 30017af4 <__umodsi3> 3000bd5c: e0600009 rsb r0, r0, r9
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
3000bd60: e1590000 cmp r9, r0 3000bd64: 93a03000 movls r3, #0 3000bd68: 83a03001 movhi r3, #1 3000bd6c: e1540000 cmp r4, r0 3000bd70: 23a03000 movcs r3, #0 3000bd74: e3530000 cmp r3, #0
3000bd78: 0a000019 beq 3000bde4 <_Heap_Allocate_aligned_with_boundary+0x188>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
3000bd7c: e59d1008 ldr r1, [sp, #8] 3000bd80: e0819005 add r9, r1, r5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
3000bd84: e1590000 cmp r9, r0 3000bd88: 958d6018 strls r6, [sp, #24]
3000bd8c: 9a000002 bls 3000bd9c <_Heap_Allocate_aligned_with_boundary+0x140>
3000bd90: eaffffcb b 3000bcc4 <_Heap_Allocate_aligned_with_boundary+0x68> 3000bd94: e1590000 cmp r9, r0
3000bd98: 8a000035 bhi 3000be74 <_Heap_Allocate_aligned_with_boundary+0x218>
return 0;
}
alloc_begin = boundary_line - alloc_size;
3000bd9c: e0654000 rsb r4, r5, r0 3000bda0: e1a01008 mov r1, r8 3000bda4: e1a00004 mov r0, r4 3000bda8: eb002f51 bl 30017af4 <__umodsi3> 3000bdac: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
3000bdb0: e0846005 add r6, r4, r5 3000bdb4: e1a00006 mov r0, r6 3000bdb8: e1a0100b mov r1, fp 3000bdbc: eb002f4c bl 30017af4 <__umodsi3> 3000bdc0: e0600006 rsb r0, r0, r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
3000bdc4: e1560000 cmp r6, r0 3000bdc8: 93a03000 movls r3, #0 3000bdcc: 83a03001 movhi r3, #1 3000bdd0: e1540000 cmp r4, r0 3000bdd4: 23a03000 movcs r3, #0 3000bdd8: e3530000 cmp r3, #0
3000bddc: 1affffec bne 3000bd94 <_Heap_Allocate_aligned_with_boundary+0x138>
3000bde0: e59d6018 ldr r6, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
3000bde4: e59d2008 ldr r2, [sp, #8] 3000bde8: e1520004 cmp r2, r4
3000bdec: 8affffb4 bhi 3000bcc4 <_Heap_Allocate_aligned_with_boundary+0x68>
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
3000bdf0: e59d100c ldr r1, [sp, #12] 3000bdf4: e1a00004 mov r0, r4 3000bdf8: eb002f3d bl 30017af4 <__umodsi3> 3000bdfc: e3e09007 mvn r9, #7 3000be00: e06a9009 rsb r9, sl, r9 3000be04: e0899004 add r9, r9, r4
if ( free_size >= min_block_size || free_size == 0 ) {
3000be08: e59d1004 ldr r1, [sp, #4] 3000be0c: e0603009 rsb r3, r0, r9 3000be10: e1590000 cmp r9, r0 3000be14: 11510003 cmpne r1, r3
3000be18: 8affffa9 bhi 3000bcc4 <_Heap_Allocate_aligned_with_boundary+0x68>
boundary
);
}
}
if ( alloc_begin != 0 ) {
3000be1c: e3540000 cmp r4, #0
3000be20: 0affffa7 beq 3000bcc4 <_Heap_Allocate_aligned_with_boundary+0x68>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
3000be24: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
3000be28: e1a0100a mov r1, sl
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
3000be2c: e0833006 add r3, r3, r6 3000be30: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
3000be34: e1a00007 mov r0, r7 3000be38: e1a03005 mov r3, r5 3000be3c: e1a02004 mov r2, r4 3000be40: ebffea96 bl 300068a0 <_Heap_Block_allocate> 3000be44: e1a00004 mov r0, r4
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
3000be48: e5973044 ldr r3, [r7, #68] ; 0x44 3000be4c: e1530006 cmp r3, r6
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
3000be50: 35876044 strcc r6, [r7, #68] ; 0x44 3000be54: ea000002 b 3000be64 <_Heap_Allocate_aligned_with_boundary+0x208>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
3000be58: e1550003 cmp r5, r3
3000be5c: 9a000006 bls 3000be7c <_Heap_Allocate_aligned_with_boundary+0x220>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
3000be60: e3a00000 mov r0, #0
}
return (void *) alloc_begin;
}
3000be64: e28dd01c add sp, sp, #28
3000be68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000be6c: e3a00000 mov r0, #0 3000be70: eafffff4 b 3000be48 <_Heap_Allocate_aligned_with_boundary+0x1ec>
3000be74: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED 3000be78: eaffff91 b 3000bcc4 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
3000be7c: e3580000 cmp r8, #0 3000be80: 01a08002 moveq r8, r2 3000be84: eaffff82 b 3000bc94 <_Heap_Allocate_aligned_with_boundary+0x38>
30007628 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30007628: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
3000762c: e59f35dc ldr r3, [pc, #1500] ; 30007c10 <_Heap_Walk+0x5e8>
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30007630: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30007634: e5933000 ldr r3, [r3]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30007638: e59f25d4 ldr r2, [pc, #1492] ; 30007c14 <_Heap_Walk+0x5ec> 3000763c: e59fa5d4 ldr sl, [pc, #1492] ; 30007c18 <_Heap_Walk+0x5f0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30007640: e24dd03c sub sp, sp, #60 ; 0x3c
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30007644: 01a0a002 moveq sl, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30007648: e3530003 cmp r3, #3
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
3000764c: e5902010 ldr r2, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block;
30007650: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30007654: e1a04000 mov r4, r0 30007658: e1a08001 mov r8, r1
uintptr_t const page_size = heap->page_size;
3000765c: e58d2020 str r2, [sp, #32]
uintptr_t const min_block_size = heap->min_block_size;
30007660: e590b014 ldr fp, [r0, #20]
Heap_Block *const last_block = heap->last_block;
30007664: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *block = heap->first_block;
30007668: e5905020 ldr r5, [r0, #32]
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
3000766c: 0a000002 beq 3000767c <_Heap_Walk+0x54>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
30007670: e3a00001 mov r0, #1
block = next_block;
}
return true;
}
30007674: e28dd03c add sp, sp, #60 ; 0x3c
30007678: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
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)(
3000767c: e5900018 ldr r0, [r0, #24]
30007680: e594101c ldr r1, [r4, #28]
30007684: e5942008 ldr r2, [r4, #8]
30007688: e594300c ldr r3, [r4, #12]
3000768c: e59dc024 ldr ip, [sp, #36] ; 0x24
30007690: e98d0003 stmib sp, {r0, r1}
30007694: e58d2014 str r2, [sp, #20]
30007698: e58d3018 str r3, [sp, #24]
3000769c: e59f2578 ldr r2, [pc, #1400] ; 30007c1c <_Heap_Walk+0x5f4>
300076a0: e58db000 str fp, [sp]
300076a4: e58d500c str r5, [sp, #12]
300076a8: e58dc010 str ip, [sp, #16]
300076ac: e1a00008 mov r0, r8
300076b0: e3a01000 mov r1, #0
300076b4: e59d3020 ldr r3, [sp, #32]
300076b8: e1a0e00f mov lr, pc
300076bc: e12fff1a bx sl
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
300076c0: e59d2020 ldr r2, [sp, #32] 300076c4: e3520000 cmp r2, #0
300076c8: 0a000032 beq 30007798 <_Heap_Walk+0x170>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
300076cc: e59d3020 ldr r3, [sp, #32] 300076d0: e2139003 ands r9, r3, #3
300076d4: 1a000036 bne 300077b4 <_Heap_Walk+0x18c>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
300076d8: e1a0000b mov r0, fp 300076dc: e59d1020 ldr r1, [sp, #32] 300076e0: ebffe54a bl 30000c10 <__umodsi3> 300076e4: e2506000 subs r6, r0, #0
300076e8: 1a000038 bne 300077d0 <_Heap_Walk+0x1a8>
);
return false;
}
if (
300076ec: e2850008 add r0, r5, #8 300076f0: e59d1020 ldr r1, [sp, #32] 300076f4: ebffe545 bl 30000c10 <__umodsi3> 300076f8: e2509000 subs r9, r0, #0
300076fc: 1a00003b bne 300077f0 <_Heap_Walk+0x1c8>
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;
30007700: e5957004 ldr r7, [r5, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
30007704: e2176001 ands r6, r7, #1
30007708: 0a000040 beq 30007810 <_Heap_Walk+0x1e8>
);
return false;
}
if ( first_block->prev_size != page_size ) {
3000770c: e5953000 ldr r3, [r5] 30007710: e59dc020 ldr ip, [sp, #32] 30007714: e15c0003 cmp ip, r3
30007718: 1a000016 bne 30007778 <_Heap_Walk+0x150>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
3000771c: e59d2024 ldr r2, [sp, #36] ; 0x24 30007720: e5923004 ldr r3, [r2, #4] 30007724: e3c33001 bic r3, r3, #1 30007728: e0823003 add r3, r2, r3 3000772c: e5939004 ldr r9, [r3, #4] 30007730: e2199001 ands r9, r9, #1
30007734: 0a000114 beq 30007b8c <_Heap_Walk+0x564>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
30007738: e5949008 ldr r9, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
3000773c: e5943010 ldr r3, [r4, #16]
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 ) {
30007740: e1540009 cmp r4, r9
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
30007744: e58d3028 str r3, [sp, #40] ; 0x28
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 ) {
30007748: 0a00006e beq 30007908 <_Heap_Walk+0x2e0>
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;
3000774c: e5942020 ldr r2, [r4, #32]
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
30007750: e1520009 cmp r2, r9
30007754: 9a000034 bls 3000782c <_Heap_Walk+0x204>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
30007758: e1a00008 mov r0, r8 3000775c: e1a03009 mov r3, r9 30007760: e3a01001 mov r1, #1 30007764: e59f24b4 ldr r2, [pc, #1204] ; 30007c20 <_Heap_Walk+0x5f8> 30007768: e1a0e00f mov lr, pc 3000776c: e12fff1a bx sl 30007770: e3a00000 mov r0, #0 30007774: eaffffbe b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
30007778: e1a00008 mov r0, r8 3000777c: e58dc000 str ip, [sp] 30007780: e3a01001 mov r1, #1 30007784: e59f2498 ldr r2, [pc, #1176] ; 30007c24 <_Heap_Walk+0x5fc> 30007788: e1a0e00f mov lr, pc 3000778c: e12fff1a bx sl 30007790: e1a00009 mov r0, r9 30007794: eaffffb6 b 30007674 <_Heap_Walk+0x4c>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
30007798: e1a00008 mov r0, r8 3000779c: e3a01001 mov r1, #1 300077a0: e59f2480 ldr r2, [pc, #1152] ; 30007c28 <_Heap_Walk+0x600> 300077a4: e1a0e00f mov lr, pc 300077a8: e12fff1a bx sl 300077ac: e59d0020 ldr r0, [sp, #32] 300077b0: eaffffaf b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
300077b4: e1a00008 mov r0, r8 300077b8: e3a01001 mov r1, #1 300077bc: e59f2468 ldr r2, [pc, #1128] ; 30007c2c <_Heap_Walk+0x604> 300077c0: e1a0e00f mov lr, pc 300077c4: e12fff1a bx sl 300077c8: e3a00000 mov r0, #0 300077cc: eaffffa8 b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
300077d0: e1a00008 mov r0, r8 300077d4: e1a0300b mov r3, fp 300077d8: e3a01001 mov r1, #1 300077dc: e59f244c ldr r2, [pc, #1100] ; 30007c30 <_Heap_Walk+0x608> 300077e0: e1a0e00f mov lr, pc 300077e4: e12fff1a bx sl 300077e8: e1a00009 mov r0, r9 300077ec: eaffffa0 b 30007674 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
300077f0: e1a00008 mov r0, r8 300077f4: e1a03005 mov r3, r5 300077f8: e3a01001 mov r1, #1 300077fc: e59f2430 ldr r2, [pc, #1072] ; 30007c34 <_Heap_Walk+0x60c> 30007800: e1a0e00f mov lr, pc 30007804: e12fff1a bx sl 30007808: e1a00006 mov r0, r6 3000780c: eaffff98 b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
30007810: e1a00008 mov r0, r8 30007814: e3a01001 mov r1, #1 30007818: e59f2418 ldr r2, [pc, #1048] ; 30007c38 <_Heap_Walk+0x610> 3000781c: e1a0e00f mov lr, pc 30007820: e12fff1a bx sl 30007824: e1a00006 mov r0, r6 30007828: eaffff91 b 30007674 <_Heap_Walk+0x4c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
3000782c: e594c024 ldr ip, [r4, #36] ; 0x24
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
30007830: e159000c cmp r9, ip
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
30007834: e58dc02c str ip, [sp, #44] ; 0x2c
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
30007838: 8affffc6 bhi 30007758 <_Heap_Walk+0x130>
);
return false;
}
if (
3000783c: e2890008 add r0, r9, #8 30007840: e1a01003 mov r1, r3 30007844: e58d201c str r2, [sp, #28] 30007848: ebffe4f0 bl 30000c10 <__umodsi3> 3000784c: e3500000 cmp r0, #0 30007850: e59d201c ldr r2, [sp, #28]
30007854: 1a0000d3 bne 30007ba8 <_Heap_Walk+0x580>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007858: e5993004 ldr r3, [r9, #4] 3000785c: e3c33001 bic r3, r3, #1 30007860: e0893003 add r3, r9, r3 30007864: e5933004 ldr r3, [r3, #4] 30007868: e3130001 tst r3, #1
3000786c: 1a0000df bne 30007bf0 <_Heap_Walk+0x5c8>
);
return false;
}
if ( free_block->prev != prev_block ) {
30007870: e599c00c ldr ip, [r9, #12] 30007874: e15c0004 cmp ip, r4
30007878: 1a0000d3 bne 30007bcc <_Heap_Walk+0x5a4>
3000787c: e58d7030 str r7, [sp, #48] ; 0x30 30007880: e58db034 str fp, [sp, #52] ; 0x34 30007884: e59d702c ldr r7, [sp, #44] ; 0x2c 30007888: e59db028 ldr fp, [sp, #40] ; 0x28 3000788c: e58d502c str r5, [sp, #44] ; 0x2c 30007890: e58d6038 str r6, [sp, #56] ; 0x38 30007894: e1a0500c mov r5, ip 30007898: e58d4028 str r4, [sp, #40] ; 0x28 3000789c: e1a06002 mov r6, r2 300078a0: ea000011 b 300078ec <_Heap_Walk+0x2c4> 300078a4: e1560009 cmp r6, r9
300078a8: 8affffaa bhi 30007758 <_Heap_Walk+0x130>
300078ac: e1590007 cmp r9, r7
);
return false;
}
if (
300078b0: e2890008 add r0, r9, #8 300078b4: e1a0100b mov r1, fp
300078b8: 8affffa6 bhi 30007758 <_Heap_Walk+0x130>
300078bc: ebffe4d3 bl 30000c10 <__umodsi3> 300078c0: e3500000 cmp r0, #0
300078c4: 1a0000b7 bne 30007ba8 <_Heap_Walk+0x580>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
300078c8: e5993004 ldr r3, [r9, #4] 300078cc: e3c33001 bic r3, r3, #1 300078d0: e0833009 add r3, r3, r9 300078d4: e5933004 ldr r3, [r3, #4] 300078d8: e3130001 tst r3, #1
300078dc: 1a0000c3 bne 30007bf0 <_Heap_Walk+0x5c8>
);
return false;
}
if ( free_block->prev != prev_block ) {
300078e0: e599200c ldr r2, [r9, #12] 300078e4: e1540002 cmp r4, r2
300078e8: 1a0000b6 bne 30007bc8 <_Heap_Walk+0x5a0>
(*printer)(
300078ec: e1a04009 mov r4, r9
return false;
}
prev_block = free_block;
free_block = free_block->next;
300078f0: e5999008 ldr r9, [r9, #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 ) {
300078f4: e1550009 cmp r5, r9
300078f8: 1affffe9 bne 300078a4 <_Heap_Walk+0x27c>
300078fc: e28d4028 add r4, sp, #40 ; 0x28
30007900: e89408b0 ldm r4, {r4, r5, r7, fp}
30007904: e59d6038 ldr r6, [sp, #56] ; 0x38
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
30007908: e59d3024 ldr r3, [sp, #36] ; 0x24 3000790c: e1530005 cmp r3, r5
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
30007910: 158db028 strne fp, [sp, #40] ; 0x28
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
30007914: 0affff55 beq 30007670 <_Heap_Walk+0x48>
- 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;
30007918: e3c77001 bic r7, r7, #1
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;
if ( prev_used ) {
3000791c: e21610ff ands r1, r6, #255 ; 0xff
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
30007920: e0876005 add r6, r7, r5
30007924: 0a000012 beq 30007974 <_Heap_Walk+0x34c>
(*printer)(
30007928: e1a03005 mov r3, r5 3000792c: e58d7000 str r7, [sp] 30007930: e1a00008 mov r0, r8 30007934: e3a01000 mov r1, #0 30007938: e59f22fc ldr r2, [pc, #764] ; 30007c3c <_Heap_Walk+0x614> 3000793c: e1a0e00f mov lr, pc 30007940: e12fff1a bx sl
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
30007944: e5943020 ldr r3, [r4, #32] 30007948: e1530006 cmp r3, r6
3000794c: 9a000013 bls 300079a0 <_Heap_Walk+0x378>
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
30007950: e1a00008 mov r0, r8 30007954: e58d6000 str r6, [sp] 30007958: e1a03005 mov r3, r5 3000795c: e3a01001 mov r1, #1 30007960: e59f22d8 ldr r2, [pc, #728] ; 30007c40 <_Heap_Walk+0x618> 30007964: e1a0e00f mov lr, pc 30007968: e12fff1a bx sl 3000796c: e3a00000 mov r0, #0
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
30007970: eaffff3f b 30007674 <_Heap_Walk+0x4c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
30007974: e58d7000 str r7, [sp] 30007978: e5953000 ldr r3, [r5] 3000797c: e1a00008 mov r0, r8 30007980: e58d3004 str r3, [sp, #4] 30007984: e59f22b8 ldr r2, [pc, #696] ; 30007c44 <_Heap_Walk+0x61c> 30007988: e1a03005 mov r3, r5 3000798c: e1a0e00f mov lr, pc 30007990: e12fff1a bx sl 30007994: e5943020 ldr r3, [r4, #32] 30007998: e1530006 cmp r3, r6
3000799c: 8affffeb bhi 30007950 <_Heap_Walk+0x328>
300079a0: e5943024 ldr r3, [r4, #36] ; 0x24 300079a4: e1530006 cmp r3, r6
300079a8: 3affffe8 bcc 30007950 <_Heap_Walk+0x328>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
300079ac: e1a00007 mov r0, r7 300079b0: e59d1020 ldr r1, [sp, #32] 300079b4: ebffe495 bl 30000c10 <__umodsi3> 300079b8: e2509000 subs r9, r0, #0
300079bc: 1a000055 bne 30007b18 <_Heap_Walk+0x4f0>
);
return false;
}
if ( block_size < min_block_size ) {
300079c0: e59d2028 ldr r2, [sp, #40] ; 0x28 300079c4: e1520007 cmp r2, r7
300079c8: 8a00005b bhi 30007b3c <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin ) {
300079cc: e1550006 cmp r5, r6
300079d0: 2a000064 bcs 30007b68 <_Heap_Walk+0x540>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
300079d4: e5963004 ldr r3, [r6, #4] 300079d8: e3130001 tst r3, #1
300079dc: 1a000036 bne 30007abc <_Heap_Walk+0x494>
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;
300079e0: e595b004 ldr fp, [r5, #4]
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)(
300079e4: e595200c ldr r2, [r5, #12]
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
300079e8: e5943008 ldr r3, [r4, #8]
- 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;
300079ec: e3cb7001 bic r7, fp, #1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
300079f0: e1530002 cmp r3, r2
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
300079f4: e594100c ldr r1, [r4, #12]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
300079f8: e0859007 add r9, r5, r7
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
300079fc: 059f0244 ldreq r0, [pc, #580] ; 30007c48 <_Heap_Walk+0x620>
30007a00: 0a000003 beq 30007a14 <_Heap_Walk+0x3ec>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
30007a04: e59f3240 ldr r3, [pc, #576] ; 30007c4c <_Heap_Walk+0x624> 30007a08: e1520004 cmp r2, r4 30007a0c: e59f023c ldr r0, [pc, #572] ; 30007c50 <_Heap_Walk+0x628> 30007a10: 11a00003 movne r0, r3
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)(
30007a14: e5953008 ldr r3, [r5, #8] 30007a18: e1510003 cmp r1, r3 30007a1c: 059f1230 ldreq r1, [pc, #560] ; 30007c54 <_Heap_Walk+0x62c>
30007a20: 0a000003 beq 30007a34 <_Heap_Walk+0x40c>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
30007a24: e59fc220 ldr ip, [pc, #544] ; 30007c4c <_Heap_Walk+0x624> 30007a28: e1530004 cmp r3, r4 30007a2c: e59f1224 ldr r1, [pc, #548] ; 30007c58 <_Heap_Walk+0x630> 30007a30: 11a0100c movne 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)(
30007a34: e58d2000 str r2, [sp]
30007a38: e98d0009 stmib sp, {r0, r3}
30007a3c: e58d100c str r1, [sp, #12]
30007a40: e1a03005 mov r3, r5
30007a44: e1a00008 mov r0, r8
30007a48: e3a01000 mov r1, #0
30007a4c: e59f2208 ldr r2, [pc, #520] ; 30007c5c <_Heap_Walk+0x634>
30007a50: e1a0e00f mov lr, pc
30007a54: e12fff1a bx sl
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
30007a58: e5993000 ldr r3, [r9] 30007a5c: e1570003 cmp r7, r3
30007a60: 0a00000a beq 30007a90 <_Heap_Walk+0x468>
(*printer)(
30007a64: e58d3004 str r3, [sp, #4] 30007a68: e1a00008 mov r0, r8 30007a6c: e58d7000 str r7, [sp] 30007a70: e58d9008 str r9, [sp, #8] 30007a74: e1a03005 mov r3, r5 30007a78: e3a01001 mov r1, #1 30007a7c: e59f21dc ldr r2, [pc, #476] ; 30007c60 <_Heap_Walk+0x638> 30007a80: e1a0e00f mov lr, pc 30007a84: e12fff1a bx sl 30007a88: e3a00000 mov r0, #0 30007a8c: eafffef8 b 30007674 <_Heap_Walk+0x4c>
);
return false;
}
if ( !prev_used ) {
30007a90: e21b9001 ands r9, fp, #1
30007a94: 0a000017 beq 30007af8 <_Heap_Walk+0x4d0>
30007a98: e5943008 ldr r3, [r4, #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 ) {
30007a9c: e1530004 cmp r3, r4
30007aa0: 1a000003 bne 30007ab4 <_Heap_Walk+0x48c>
30007aa4: ea00000b b 30007ad8 <_Heap_Walk+0x4b0> <== NOT EXECUTED
if ( free_block == block ) {
return true;
}
free_block = free_block->next;
30007aa8: 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 ) {
30007aac: e1530004 cmp r3, r4
30007ab0: 0a000008 beq 30007ad8 <_Heap_Walk+0x4b0>
if ( free_block == block ) {
30007ab4: e1530005 cmp r3, r5
30007ab8: 1afffffa bne 30007aa8 <_Heap_Walk+0x480>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
30007abc: e59d2024 ldr r2, [sp, #36] ; 0x24 30007ac0: e1520006 cmp r2, r6
30007ac4: 0afffee9 beq 30007670 <_Heap_Walk+0x48>
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 ) {
30007ac8: e5967004 ldr r7, [r6, #4] 30007acc: e1a05006 mov r5, r6 30007ad0: e2076001 and r6, r7, #1 30007ad4: eaffff8f b 30007918 <_Heap_Walk+0x2f0>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
30007ad8: e1a00008 mov r0, r8 30007adc: e1a03005 mov r3, r5 30007ae0: e3a01001 mov r1, #1 30007ae4: e59f2178 ldr r2, [pc, #376] ; 30007c64 <_Heap_Walk+0x63c> 30007ae8: e1a0e00f mov lr, pc 30007aec: e12fff1a bx sl 30007af0: e3a00000 mov r0, #0 30007af4: eafffede b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( !prev_used ) {
(*printer)(
30007af8: e1a00008 mov r0, r8 30007afc: e1a03005 mov r3, r5 30007b00: e3a01001 mov r1, #1 30007b04: e59f215c ldr r2, [pc, #348] ; 30007c68 <_Heap_Walk+0x640> 30007b08: e1a0e00f mov lr, pc 30007b0c: e12fff1a bx sl 30007b10: e1a00009 mov r0, r9 30007b14: eafffed6 b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
30007b18: e1a00008 mov r0, r8 30007b1c: e58d7000 str r7, [sp] 30007b20: e1a03005 mov r3, r5 30007b24: e3a01001 mov r1, #1 30007b28: e59f213c ldr r2, [pc, #316] ; 30007c6c <_Heap_Walk+0x644> 30007b2c: e1a0e00f mov lr, pc 30007b30: e12fff1a bx sl 30007b34: e3a00000 mov r0, #0
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
30007b38: eafffecd b 30007674 <_Heap_Walk+0x4c>
}
if ( block_size < min_block_size ) {
(*printer)(
30007b3c: e58d2004 str r2, [sp, #4] 30007b40: e1a00008 mov r0, r8 30007b44: e1a0b002 mov fp, r2 30007b48: e58d7000 str r7, [sp] 30007b4c: e1a03005 mov r3, r5 30007b50: e3a01001 mov r1, #1 30007b54: e59f2114 ldr r2, [pc, #276] ; 30007c70 <_Heap_Walk+0x648> 30007b58: e1a0e00f mov lr, pc 30007b5c: e12fff1a bx sl 30007b60: e1a00009 mov r0, r9
block,
block_size,
min_block_size
);
return false;
30007b64: eafffec2 b 30007674 <_Heap_Walk+0x4c>
}
if ( next_block_begin <= block_begin ) {
(*printer)(
30007b68: e1a00008 mov r0, r8 30007b6c: e58d6000 str r6, [sp] 30007b70: e1a03005 mov r3, r5 30007b74: e3a01001 mov r1, #1 30007b78: e59f20f4 ldr r2, [pc, #244] ; 30007c74 <_Heap_Walk+0x64c> 30007b7c: e1a0e00f mov lr, pc 30007b80: e12fff1a bx sl 30007b84: e1a00009 mov r0, r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
30007b88: eafffeb9 b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
30007b8c: e1a00008 mov r0, r8 30007b90: e3a01001 mov r1, #1 30007b94: e59f20dc ldr r2, [pc, #220] ; 30007c78 <_Heap_Walk+0x650> 30007b98: e1a0e00f mov lr, pc 30007b9c: e12fff1a bx sl 30007ba0: e1a00009 mov r0, r9 30007ba4: eafffeb2 b 30007674 <_Heap_Walk+0x4c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
30007ba8: e1a00008 mov r0, r8 30007bac: e1a03009 mov r3, r9 30007bb0: e3a01001 mov r1, #1 30007bb4: e59f20c0 ldr r2, [pc, #192] ; 30007c7c <_Heap_Walk+0x654> 30007bb8: e1a0e00f mov lr, pc 30007bbc: e12fff1a bx sl 30007bc0: e3a00000 mov r0, #0 30007bc4: eafffeaa b 30007674 <_Heap_Walk+0x4c>
);
return false;
}
if ( free_block->prev != prev_block ) {
30007bc8: e1a0c002 mov ip, r2
(*printer)(
30007bcc: e1a00008 mov r0, r8 30007bd0: e58dc000 str ip, [sp] 30007bd4: e1a03009 mov r3, r9 30007bd8: e3a01001 mov r1, #1 30007bdc: e59f209c ldr r2, [pc, #156] ; 30007c80 <_Heap_Walk+0x658> 30007be0: e1a0e00f mov lr, pc 30007be4: e12fff1a bx sl 30007be8: e3a00000 mov r0, #0 30007bec: eafffea0 b 30007674 <_Heap_Walk+0x4c>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
30007bf0: e1a00008 mov r0, r8 30007bf4: e1a03009 mov r3, r9 30007bf8: e3a01001 mov r1, #1 30007bfc: e59f2080 ldr r2, [pc, #128] ; 30007c84 <_Heap_Walk+0x65c> 30007c00: e1a0e00f mov lr, pc 30007c04: e12fff1a bx sl 30007c08: e3a00000 mov r0, #0 30007c0c: eafffe98 b 30007674 <_Heap_Walk+0x4c>
30006b10 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006b10: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006b14: e5908034 ldr r8, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006b18: e24dd014 sub sp, sp, #20
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006b1c: e3580000 cmp r8, #0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006b20: e1a05000 mov r5, r0
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
30006b24: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006b28: 0a00009c beq 30006da0 <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
30006b2c: e1d091b4 ldrh r9, [r0, #20] 30006b30: e1d0a1b0 ldrh sl, [r0, #16] 30006b34: e1a01009 mov r1, r9 30006b38: e1a0000a mov r0, sl 30006b3c: eb0043a8 bl 300179e4 <__aeabi_uidiv> 30006b40: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
30006b44: e1b03823 lsrs r3, r3, #16 30006b48: 01a01009 moveq r1, r9 30006b4c: 01a06007 moveq r6, r7 30006b50: 01a04003 moveq r4, r3
30006b54: 0a00000f beq 30006b98 <_Objects_Extend_information+0x88>
if ( information->object_blocks[ block ] == NULL )
30006b58: e5984000 ldr r4, [r8] 30006b5c: e3540000 cmp r4, #0 30006b60: 11a01009 movne r1, r9 30006b64: 11a06007 movne r6, r7 30006b68: 13a04000 movne r4, #0 30006b6c: 01a01009 moveq r1, r9 30006b70: 01a06007 moveq r6, r7
30006b74: 1a000003 bne 30006b88 <_Objects_Extend_information+0x78>
30006b78: ea000006 b 30006b98 <_Objects_Extend_information+0x88> <== NOT EXECUTED
30006b7c: e7982104 ldr r2, [r8, r4, lsl #2] 30006b80: e3520000 cmp r2, #0
30006b84: 0a000003 beq 30006b98 <_Objects_Extend_information+0x88>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006b88: e2844001 add r4, r4, #1 30006b8c: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
30006b90: e0866009 add r6, r6, r9
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006b94: 8afffff8 bhi 30006b7c <_Objects_Extend_information+0x6c>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
30006b98: e08aa001 add sl, sl, r1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
30006b9c: e35a0801 cmp sl, #65536 ; 0x10000
30006ba0: 2a000064 bcs 30006d38 <_Objects_Extend_information+0x228>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
30006ba4: e5d50012 ldrb r0, [r5, #18]
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
30006ba8: e5952018 ldr r2, [r5, #24]
if ( information->auto_extend ) {
30006bac: e3500000 cmp r0, #0
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
30006bb0: e0000192 mul r0, r2, r1
if ( information->auto_extend ) {
30006bb4: 1a000061 bne 30006d40 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
30006bb8: e58d3000 str r3, [sp] 30006bbc: eb000811 bl 30008c08 <_Workspace_Allocate_or_fatal_error> 30006bc0: e59d3000 ldr r3, [sp] 30006bc4: e1a09000 mov r9, r0
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
30006bc8: e1d521b0 ldrh r2, [r5, #16] 30006bcc: e1560002 cmp r6, r2
30006bd0: 3a000038 bcc 30006cb8 <_Objects_Extend_information+0x1a8>
*/
/*
* Up the block count and maximum
*/
block_count++;
30006bd4: e283c001 add ip, r3, #1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
30006bd8: e08c008c add r0, ip, ip, lsl #1
30006bdc: e08a0000 add r0, sl, r0
30006be0: e0800007 add r0, r0, r7
30006be4: e1a00100 lsl r0, r0, #2
30006be8: e88d1008 stm sp, {r3, ip}
30006bec: eb000811 bl 30008c38 <_Workspace_Allocate>
if ( !object_blocks ) {
30006bf0: e250b000 subs fp, r0, #0
30006bf4: e89d1008 ldm sp, {r3, ip}
30006bf8: 0a00006e beq 30006db8 <_Objects_Extend_information+0x2a8>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
30006bfc: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
30006c00: e08b818c add r8, fp, ip, lsl #3 30006c04: e1570002 cmp r7, r2 30006c08: e08bc10c add ip, fp, ip, lsl #2
30006c0c: 3a000051 bcc 30006d58 <_Objects_Extend_information+0x248>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006c10: e3570000 cmp r7, #0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
30006c14: 13a02000 movne r2, #0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
30006c18: 11a01002 movne r1, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006c1c: 0a000003 beq 30006c30 <_Objects_Extend_information+0x120>
local_table[ index ] = NULL;
30006c20: e7881102 str r1, [r8, r2, lsl #2]
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006c24: e2822001 add r2, r2, #1 30006c28: e1570002 cmp r7, r2
30006c2c: 8afffffb bhi 30006c20 <_Objects_Extend_information+0x110>
30006c30: e1a03103 lsl r3, r3, #2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
30006c34: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
30006c38: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
30006c3c: e0861001 add r1, r6, r1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c40: e1560001 cmp r6, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
30006c44: e78c0003 str r0, [ip, r3]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
30006c48: e78b0003 str r0, [fp, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c4c: 2a000005 bcs 30006c68 <_Objects_Extend_information+0x158>
30006c50: e0882106 add r2, r8, r6, lsl #2 30006c54: e1a03006 mov r3, r6
index < ( information->allocation_size + index_base );
index++ ) {
30006c58: e2833001 add r3, r3, #1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c5c: e1510003 cmp r1, r3
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
30006c60: e4820004 str r0, [r2], #4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c64: 8afffffb bhi 30006c58 <_Objects_Extend_information+0x148>
30006c68: e10f3000 mrs r3, CPSR 30006c6c: e3832080 orr r2, r3, #128 ; 0x80 30006c70: e129f002 msr CPSR_fc, r2
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
30006c74: e5952000 ldr r2, [r5] 30006c78: e1d510b4 ldrh r1, [r5, #4] 30006c7c: e1a02c02 lsl r2, r2, #24
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
30006c80: e1a0a80a lsl sl, sl, #16
information->maximum_id = _Objects_Build_id(
30006c84: e3822801 orr r2, r2, #65536 ; 0x10000
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
30006c88: e1a0a82a lsr sl, sl, #16
information->maximum_id = _Objects_Build_id(
30006c8c: e1822d81 orr r2, r2, r1, lsl #27 30006c90: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
30006c94: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
30006c98: e585c030 str ip, [r5, #48] ; 0x30
information->local_table = local_table;
30006c9c: e585801c str r8, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
30006ca0: e585200c str r2, [r5, #12]
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
30006ca4: e1c5a1b0 strh sl, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
30006ca8: e585b034 str fp, [r5, #52] ; 0x34
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30006cac: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
30006cb0: e3500000 cmp r0, #0
_Workspace_Free( old_tables );
30006cb4: 1b0007e5 blne 30008c50 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006cb8: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
30006cbc: e28d7008 add r7, sp, #8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006cc0: e7839104 str r9, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
30006cc4: e1a01009 mov r1, r9 30006cc8: e1a00007 mov r0, r7 30006ccc: e1d521b4 ldrh r2, [r5, #20] 30006cd0: e5953018 ldr r3, [r5, #24] 30006cd4: eb001322 bl 3000b964 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006cd8: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
30006cdc: e2858020 add r8, r5, #32
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
30006ce0: ea000008 b 30006d08 <_Objects_Extend_information+0x1f8>
the_object->id = _Objects_Build_id(
30006ce4: e5952000 ldr r2, [r5] 30006ce8: e1d5c0b4 ldrh ip, [r5, #4] 30006cec: e1a02c02 lsl r2, r2, #24 30006cf0: e3822801 orr r2, r2, #65536 ; 0x10000 30006cf4: e1822d8c orr r2, r2, ip, lsl #27 30006cf8: e1822006 orr r2, r2, r6 30006cfc: e5832008 str r2, [r3, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
30006d00: ebfffcf3 bl 300060d4 <_Chain_Append>
index++;
30006d04: e2866001 add r6, r6, #1
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
30006d08: e1a00007 mov r0, r7 30006d0c: ebfffd04 bl 30006124 <_Chain_Get> 30006d10: e2503000 subs r3, r0, #0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
30006d14: e1a01003 mov r1, r3 30006d18: e1a00008 mov r0, r8
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
30006d1c: 1afffff0 bne 30006ce4 <_Objects_Extend_information+0x1d4>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
30006d20: e1d531b4 ldrh r3, [r5, #20]
information->inactive =
30006d24: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
30006d28: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
30006d2c: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
30006d30: e7813004 str r3, [r1, r4]
information->inactive =
30006d34: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
30006d38: e28dd014 add sp, sp, #20
30006d3c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
30006d40: e58d3000 str r3, [sp] 30006d44: eb0007bb bl 30008c38 <_Workspace_Allocate>
if ( !new_object_block )
30006d48: e2509000 subs r9, r0, #0 30006d4c: e59d3000 ldr r3, [sp]
30006d50: 1affff9c bne 30006bc8 <_Objects_Extend_information+0xb8>
30006d54: eafffff7 b 30006d38 <_Objects_Extend_information+0x228>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
30006d58: e1a03103 lsl r3, r3, #2
30006d5c: e1a02003 mov r2, r3
30006d60: e5951034 ldr r1, [r5, #52] ; 0x34
30006d64: e88d1008 stm sp, {r3, ip}
30006d68: eb001fa1 bl 3000ebf4 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
30006d6c: e89d1008 ldm sp, {r3, ip}
30006d70: e1a0000c mov r0, ip
30006d74: e1a02003 mov r2, r3
30006d78: e5951030 ldr r1, [r5, #48] ; 0x30
30006d7c: eb001f9c bl 3000ebf4 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
30006d80: e1d521b0 ldrh r2, [r5, #16]
30006d84: e1a00008 mov r0, r8
30006d88: e0872002 add r2, r7, r2
30006d8c: e1a02102 lsl r2, r2, #2
30006d90: e595101c ldr r1, [r5, #28]
30006d94: eb001f96 bl 3000ebf4 <memcpy>
30006d98: e89d1008 ldm sp, {r3, ip}
30006d9c: eaffffa4 b 30006c34 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006da0: e1a04008 mov r4, r8 30006da4: e1d0a1b0 ldrh sl, [r0, #16] 30006da8: e1d011b4 ldrh r1, [r0, #20] 30006dac: e1a06007 mov r6, r7 30006db0: e1a03008 mov r3, r8 30006db4: eaffff77 b 30006b98 <_Objects_Extend_information+0x88>
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
30006db8: e1a00009 mov r0, r9 30006dbc: eb0007a3 bl 30008c50 <_Workspace_Free>
return;
30006dc0: eaffffdc b 30006d38 <_Objects_Extend_information+0x228>
30007de0 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
30007de0: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
30007de4: e92d05f0 push {r4, r5, r6, r7, r8, sl}
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
30007de8: e1a0c323 lsr ip, r3, #6
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30007dec: e281503c add r5, r1, #60 ; 0x3c 30007df0: e08cc08c add ip, ip, ip, lsl #1
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
30007df4: e3130020 tst r3, #32
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
30007df8: e2814038 add r4, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30007dfc: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
30007e00: e3a05000 mov r5, #0 30007e04: e581503c str r5, [r1, #60] ; 0x3c
the_chain->last = _Chain_Head(the_chain);
30007e08: e5814040 str r4, [r1, #64] ; 0x40
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
30007e0c: e080c10c add ip, r0, ip, lsl #2
block_state = the_thread_queue->state;
30007e10: e5906038 ldr r6, [r0, #56] ; 0x38 30007e14: 159fa178 ldrne sl, [pc, #376] ; 30007f94 <_Thread_queue_Enqueue_priority+0x1b4>
if ( _Thread_queue_Is_reverse_search( priority ) )
30007e18: 1a00001c bne 30007e90 <_Thread_queue_Enqueue_priority+0xb0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30007e1c: e28ca004 add sl, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007e20: e10f8000 mrs r8, CPSR 30007e24: e3884080 orr r4, r8, #128 ; 0x80 30007e28: e129f004 msr CPSR_fc, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
30007e2c: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007e30: e154000a cmp r4, sl
30007e34: 1a000009 bne 30007e60 <_Thread_queue_Enqueue_priority+0x80>
30007e38: ea000052 b 30007f88 <_Thread_queue_Enqueue_priority+0x1a8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
30007e3c: e10f7000 mrs r7, CPSR 30007e40: e129f008 msr CPSR_fc, r8 30007e44: e129f007 msr CPSR_fc, r7
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
30007e48: e5947010 ldr r7, [r4, #16] 30007e4c: e1160007 tst r6, r7
30007e50: 0a000033 beq 30007f24 <_Thread_queue_Enqueue_priority+0x144>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
30007e54: e5944000 ldr r4, [r4]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007e58: e154000a cmp r4, sl
30007e5c: 0a000002 beq 30007e6c <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
30007e60: e5945014 ldr r5, [r4, #20]
if ( priority <= search_priority )
30007e64: e1530005 cmp r3, r5
30007e68: 8afffff3 bhi 30007e3c <_Thread_queue_Enqueue_priority+0x5c>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007e6c: e1a06008 mov r6, r8
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
30007e70: e590c030 ldr ip, [r0, #48] ; 0x30 30007e74: e35c0001 cmp ip, #1
30007e78: 0a00002b beq 30007f2c <_Thread_queue_Enqueue_priority+0x14c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level;
30007e7c: e5826000 str r6, [r2]
return the_thread_queue->sync_state;
30007e80: e1a0000c mov r0, ip
}
30007e84: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
30007e88: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007e8c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
30007e90: e5da5000 ldrb r5, [sl] 30007e94: e2855001 add r5, r5, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007e98: e10f8000 mrs r8, CPSR 30007e9c: e3884080 orr r4, r8, #128 ; 0x80 30007ea0: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
30007ea4: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
30007ea8: e154000c cmp r4, ip
30007eac: 1a000009 bne 30007ed8 <_Thread_queue_Enqueue_priority+0xf8>
30007eb0: ea00000b b 30007ee4 <_Thread_queue_Enqueue_priority+0x104>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
30007eb4: e10f7000 mrs r7, CPSR 30007eb8: e129f008 msr CPSR_fc, r8 30007ebc: e129f007 msr CPSR_fc, r7
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
30007ec0: e5947010 ldr r7, [r4, #16] 30007ec4: e1160007 tst r6, r7
30007ec8: 0affffef beq 30007e8c <_Thread_queue_Enqueue_priority+0xac>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
30007ecc: e5944004 ldr r4, [r4, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
30007ed0: e154000c cmp r4, ip
30007ed4: 0a000002 beq 30007ee4 <_Thread_queue_Enqueue_priority+0x104>
search_priority = search_thread->current_priority;
30007ed8: e5945014 ldr r5, [r4, #20]
if ( priority >= search_priority )
30007edc: e1530005 cmp r3, r5
30007ee0: 3afffff3 bcc 30007eb4 <_Thread_queue_Enqueue_priority+0xd4>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
30007ee4: e590c030 ldr ip, [r0, #48] ; 0x30
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
30007ee8: e1a06008 mov r6, r8
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
30007eec: e35c0001 cmp ip, #1
30007ef0: 1affffe1 bne 30007e7c <_Thread_queue_Enqueue_priority+0x9c>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
30007ef4: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007ef8: e3a03000 mov r3, #0 30007efc: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
30007f00: 0a000016 beq 30007f60 <_Thread_queue_Enqueue_priority+0x180>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
30007f04: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
30007f08: e8810018 stm r1, {r3, r4}
search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
30007f0c: e5810044 str r0, [r1, #68] ; 0x44
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
30007f10: e5841000 str r1, [r4]
next_node->previous = the_node;
30007f14: e5831004 str r1, [r3, #4]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007f18: e129f008 msr CPSR_fc, r8 30007f1c: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007f20: eaffffd7 b 30007e84 <_Thread_queue_Enqueue_priority+0xa4>
30007f24: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 30007f28: eaffffbc b 30007e20 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
30007f2c: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007f30: e3a03000 mov r3, #0 30007f34: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
30007f38: 0a000008 beq 30007f60 <_Thread_queue_Enqueue_priority+0x180>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
30007f3c: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007f40: e5814000 str r4, [r1]
the_node->previous = previous_node;
30007f44: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
30007f48: e5810044 str r0, [r1, #68] ; 0x44
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
30007f4c: e5831000 str r1, [r3]
search_node->previous = the_node;
30007f50: e5841004 str r1, [r4, #4] 30007f54: e129f008 msr CPSR_fc, r8 30007f58: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007f5c: eaffffc8 b 30007e84 <_Thread_queue_Enqueue_priority+0xa4> 30007f60: e284403c add r4, r4, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
30007f64: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007f68: e5814000 str r4, [r1]
the_node->previous = previous_node;
30007f6c: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
30007f70: e5810044 str r0, [r1, #68] ; 0x44
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
30007f74: e5831000 str r1, [r3]
search_node->previous = the_node;
30007f78: e5841004 str r1, [r4, #4] 30007f7c: e129f006 msr CPSR_fc, r6 30007f80: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007f84: eaffffbe b 30007e84 <_Thread_queue_Enqueue_priority+0xa4>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007f88: e1a06008 mov r6, r8 30007f8c: e3e05000 mvn r5, #0 30007f90: eaffffb6 b 30007e70 <_Thread_queue_Enqueue_priority+0x90>
300169a4 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
300169a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
300169a8: e24dd024 sub sp, sp, #36 ; 0x24
300169ac: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
300169b0: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300169b4: e28d0018 add r0, sp, #24 300169b8: e28d700c add r7, sp, #12 300169bc: e280a004 add sl, r0, #4 300169c0: e2872004 add r2, r7, #4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
300169c4: e58d301c str r3, [sp, #28]
the_chain->last = _Chain_Head(the_chain);
300169c8: e58d0020 str r0, [sp, #32]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
300169cc: e58d3010 str r3, [sp, #16]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
300169d0: e2840040 add r0, r4, #64 ; 0x40
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
300169d4: e2843008 add r3, r4, #8 300169d8: e59f91ac ldr r9, [pc, #428] ; 30016b8c <_Timer_server_Body+0x1e8> 300169dc: e59fb1ac ldr fp, [pc, #428] ; 30016b90 <_Timer_server_Body+0x1ec>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300169e0: e58d2000 str r2, [sp]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
300169e4: e58da018 str sl, [sp, #24] 300169e8: e58d200c str r2, [sp, #12]
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
300169ec: e58d7014 str r7, [sp, #20]
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
300169f0: e2846030 add r6, r4, #48 ; 0x30
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
300169f4: e2848068 add r8, r4, #104 ; 0x68
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
300169f8: e98d0009 stmib sp, {r0, r3}
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
300169fc: e28d2018 add r2, sp, #24 30016a00: e5842078 str r2, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
30016a04: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
30016a08: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30016a0c: e1a00006 mov r0, r6 30016a10: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
30016a14: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30016a18: e1a02007 mov r2, r7 30016a1c: eb0010a8 bl 3001acc4 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
30016a20: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
30016a24: e5941074 ldr r1, [r4, #116] ; 0x74
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
30016a28: e1550001 cmp r5, r1
30016a2c: 8a000022 bhi 30016abc <_Timer_server_Body+0x118>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
30016a30: 3a000018 bcc 30016a98 <_Timer_server_Body+0xf4>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
30016a34: e5845074 str r5, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
30016a38: e5940078 ldr r0, [r4, #120] ; 0x78 30016a3c: eb000251 bl 30017388 <_Chain_Get>
if ( timer == NULL ) {
30016a40: e3500000 cmp r0, #0
30016a44: 0a00000b beq 30016a78 <_Timer_server_Body+0xd4>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
30016a48: e5903038 ldr r3, [r0, #56] ; 0x38 30016a4c: e3530001 cmp r3, #1
30016a50: 0a000015 beq 30016aac <_Timer_server_Body+0x108>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
30016a54: e3530003 cmp r3, #3
30016a58: 1afffff6 bne 30016a38 <_Timer_server_Body+0x94>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
30016a5c: e2801010 add r1, r0, #16 30016a60: e1a00008 mov r0, r8 30016a64: eb0010c5 bl 3001ad80 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
30016a68: e5940078 ldr r0, [r4, #120] ; 0x78 30016a6c: eb000245 bl 30017388 <_Chain_Get>
if ( timer == NULL ) {
30016a70: e3500000 cmp r0, #0
30016a74: 1afffff3 bne 30016a48 <_Timer_server_Body+0xa4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30016a78: e10f2000 mrs r2, CPSR 30016a7c: e3823080 orr r3, r2, #128 ; 0x80 30016a80: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
30016a84: e59d3018 ldr r3, [sp, #24] 30016a88: e15a0003 cmp sl, r3
30016a8c: 0a00000f beq 30016ad0 <_Timer_server_Body+0x12c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30016a90: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 30016a94: eaffffda b 30016a04 <_Timer_server_Body+0x60> <== NOT EXECUTED
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
30016a98: e0652001 rsb r2, r5, r1 30016a9c: e1a00008 mov r0, r8 30016aa0: e3a01001 mov r1, #1 30016aa4: eb001057 bl 3001ac08 <_Watchdog_Adjust> 30016aa8: eaffffe1 b 30016a34 <_Timer_server_Body+0x90>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
30016aac: e2801010 add r1, r0, #16 30016ab0: e1a00006 mov r0, r6 30016ab4: eb0010b1 bl 3001ad80 <_Watchdog_Insert> 30016ab8: eaffffde b 30016a38 <_Timer_server_Body+0x94>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30016abc: e0611005 rsb r1, r1, r5 30016ac0: e1a00008 mov r0, r8 30016ac4: e1a02007 mov r2, r7 30016ac8: eb00107d bl 3001acc4 <_Watchdog_Adjust_to_chain> 30016acc: eaffffd8 b 30016a34 <_Timer_server_Body+0x90>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
30016ad0: e5840078 str r0, [r4, #120] ; 0x78 30016ad4: e129f002 msr CPSR_fc, r2
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
30016ad8: e59d300c ldr r3, [sp, #12] 30016adc: e59d0000 ldr r0, [sp] 30016ae0: e1500003 cmp r0, r3 30016ae4: 159d5000 ldrne r5, [sp]
30016ae8: 1a00000a bne 30016b18 <_Timer_server_Body+0x174>
30016aec: ea000011 b 30016b38 <_Timer_server_Body+0x194>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
30016af0: e5932000 ldr r2, [r3]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
30016af4: e3a00000 mov r0, #0
the_chain->first = new_first;
30016af8: e58d200c str r2, [sp, #12] 30016afc: e5830008 str r0, [r3, #8]
new_first->previous = _Chain_Head(the_chain);
30016b00: e5827004 str r7, [r2, #4] 30016b04: e129f001 msr CPSR_fc, r1
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
30016b08: e5930020 ldr r0, [r3, #32] 30016b0c: e5931024 ldr r1, [r3, #36] ; 0x24 30016b10: e1a0e00f mov lr, pc 30016b14: e593f01c ldr pc, [r3, #28]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30016b18: e10f1000 mrs r1, CPSR 30016b1c: e3813080 orr r3, r1, #128 ; 0x80 30016b20: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
30016b24: e59d300c ldr r3, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
30016b28: e1550003 cmp r5, r3
30016b2c: 1affffef bne 30016af0 <_Timer_server_Body+0x14c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30016b30: e129f001 msr CPSR_fc, r1 30016b34: eaffffb0 b 300169fc <_Timer_server_Body+0x58> 30016b38: e59f0054 ldr r0, [pc, #84] ; 30016b94 <_Timer_server_Body+0x1f0>
}
} else {
ts->active = false;
30016b3c: e3a02000 mov r2, #0 30016b40: e5c4207c strb r2, [r4, #124] ; 0x7c 30016b44: e5903000 ldr r3, [r0] 30016b48: e2833001 add r3, r3, #1 30016b4c: e5803000 str r3, [r0]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
30016b50: e3a01008 mov r1, #8 30016b54: e5940000 ldr r0, [r4] 30016b58: eb000dbe bl 3001a258 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
30016b5c: e1a00004 mov r0, r4 30016b60: ebffff63 bl 300168f4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
30016b64: e1a00004 mov r0, r4 30016b68: ebffff77 bl 3001694c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
30016b6c: eb000b10 bl 300197b4 <_Thread_Enable_dispatch>
ts->active = true;
30016b70: e3a02001 mov r2, #1 30016b74: e5c4207c strb r2, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
30016b78: e59d0008 ldr r0, [sp, #8] 30016b7c: eb0010ec bl 3001af34 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
30016b80: e59d0004 ldr r0, [sp, #4] 30016b84: eb0010ea bl 3001af34 <_Watchdog_Remove> 30016b88: eaffff9b b 300169fc <_Timer_server_Body+0x58>
3000a810 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
3000a810: e92d41f0 push {r4, r5, r6, r7, r8, lr}
3000a814: e1a04000 mov r4, r0
3000a818: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a81c: e10f3000 mrs r3, CPSR 3000a820: e3832080 orr r2, r3, #128 ; 0x80 3000a824: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
3000a828: e1a07000 mov r7, r0 3000a82c: e4972004 ldr r2, [r7], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
3000a830: e1520007 cmp r2, r7
3000a834: 0a000018 beq 3000a89c <_Watchdog_Adjust+0x8c>
switch ( direction ) {
3000a838: e3510000 cmp r1, #0
3000a83c: 1a000018 bne 3000a8a4 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
3000a840: e3550000 cmp r5, #0
3000a844: 0a000014 beq 3000a89c <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a848: e5926010 ldr r6, [r2, #16] 3000a84c: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
3000a850: 23a08001 movcs r8, #1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a854: 2a000005 bcs 3000a870 <_Watchdog_Adjust+0x60>
3000a858: ea000018 b 3000a8c0 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
3000a85c: e0555006 subs r5, r5, r6
3000a860: 0a00000d beq 3000a89c <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a864: e5926010 ldr r6, [r2, #16] 3000a868: e1560005 cmp r6, r5
3000a86c: 8a000013 bhi 3000a8c0 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
3000a870: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a874: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
3000a878: e1a00004 mov r0, r4 3000a87c: eb0000aa bl 3000ab2c <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a880: e10f3000 mrs r3, CPSR 3000a884: e3832080 orr r2, r3, #128 ; 0x80 3000a888: e129f002 msr CPSR_fc, r2 3000a88c: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
3000a890: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
3000a894: e1a02001 mov r2, r1
3000a898: 1affffef bne 3000a85c <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a89c: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
3000a8a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
3000a8a4: e3510001 cmp r1, #1
3000a8a8: 1afffffb bne 3000a89c <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
3000a8ac: e5921010 ldr r1, [r2, #16] 3000a8b0: e0815005 add r5, r1, r5 3000a8b4: e5825010 str r5, [r2, #16] 3000a8b8: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
3000a8bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
3000a8c0: e0655006 rsb r5, r5, r6 3000a8c4: e5825010 str r5, [r2, #16]
break;
3000a8c8: eafffff3 b 3000a89c <_Watchdog_Adjust+0x8c>
30021fc0 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
30021fc0: e3a00000 mov r0, #0 <== NOT EXECUTED 30021fc4: e12fff1e bx lr <== NOT EXECUTED
30019d18 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
30019d18: e24dd004 sub sp, sp, #4 30019d1c: e58d0000 str r0, [sp] 30019d20: eb0001f3 bl 3001a4f4 <_fini>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
30019d24: ebffffe1 bl 30019cb0 <libc_wrapup>
rtems_shutdown_executive(status);
30019d28: e59d0000 ldr r0, [sp] 30019d2c: eb00003e bl 30019e2c <rtems_shutdown_executive>
30019d30: eafffffe b 30019d30 <_exit+0x18> <== NOT EXECUTED
30002c54 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
30002c54: e1a00001 mov r0, r1 <== NOT EXECUTED 30002c58: e1a01002 mov r1, r2 <== NOT EXECUTED 30002c5c: e1a02003 mov r2, r3 <== NOT EXECUTED 30002c60: eaffff82 b 30002a70 <fcntl> <== NOT EXECUTED
30021fa0 <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
30021fa0: e3a00001 mov r0, #1 <== NOT EXECUTED 30021fa4: e12fff1e bx lr <== NOT EXECUTED
300021e8 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
300021e8: eaffffe5 b 30002184 <gettimeofday> <== NOT EXECUTED
30021fb8 <_kill_r>:
#include <reent.h>
int _kill_r( struct _reent *ptr, pid_t pid, int sig )
{
return 0;
}
30021fb8: e3a00000 mov r0, #0 <== NOT EXECUTED 30021fbc: e12fff1e bx lr <== NOT EXECUTED
300039b4 <_link_r>:
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
300039b4: e1a00001 mov r0, r1 <== NOT EXECUTED 300039b8: e1a01002 mov r1, r2 <== NOT EXECUTED 300039bc: eaffff75 b 30003798 <link> <== NOT EXECUTED
30019e10 <_realloc_r>:
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
30019e10: e1a00001 mov r0, r1 <== NOT EXECUTED 30019e14: e1a01002 mov r1, r2 <== NOT EXECUTED 30019e18: ea00000e b 30019e58 <realloc> <== NOT EXECUTED
300067d8 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
300067d8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
300067dc: e1a00001 mov r0, r1
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
300067e0: e24dd048 sub sp, sp, #72 ; 0x48 300067e4: e1a05001 mov r5, r1 300067e8: e1a06002 mov r6, r2
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
300067ec: ebfff9f3 bl 30004fc0 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
300067f0: e2507000 subs r7, r0, #0
300067f4: 1a00008b bne 30006a28 <_rename_r+0x250>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
300067f8: e28d4018 add r4, sp, #24 300067fc: e1a00005 mov r0, r5 30006800: e28d1044 add r1, sp, #68 ; 0x44 30006804: e1a02004 mov r2, r4 30006808: eb0001a1 bl 30006e94 <rtems_filesystem_get_start_loc> 3000680c: e1a08007 mov r8, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30006810: e28dc02c add ip, sp, #44 ; 0x2c
30006814: e1a0e004 mov lr, r4
30006818: e8be000f ldm lr!, {r0, r1, r2, r3}
3000681c: e8ac000f stmia ip!, {r0, r1, r2, r3}
30006820: e59e3000 ldr r3, [lr]
name = old + old_parent_pathlen;
30006824: e0855007 add r5, r5, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30006828: e58c3000 str r3, [ip]
name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
3000682c: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
30006830: e58d5040 str r5, [sp, #64] ; 0x40
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30006834: eb003b66 bl 300155d4 <strlen> 30006838: e1a01000 mov r1, r0 3000683c: e1a00005 mov r0, r5 30006840: ebfff9c9 bl 30004f6c <rtems_filesystem_prefix_separators> 30006844: e0855000 add r5, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30006848: e1a00005 mov r0, r5
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
3000684c: e58d5040 str r5, [sp, #64] ; 0x40
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30006850: eb003b5f bl 300155d4 <strlen> 30006854: e28d702c add r7, sp, #44 ; 0x2c 30006858: e3a0c000 mov ip, #0 3000685c: e1a01000 mov r1, r0 30006860: e1a0200c mov r2, ip 30006864: e1a00005 mov r0, r5 30006868: e1a03007 mov r3, r7 3000686c: e58dc000 str ip, [sp] 30006870: ebfff9e3 bl 30005004 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
30006874: e3500000 cmp r0, #0
30006878: 1a00005b bne 300069ec <_rename_r+0x214>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
3000687c: e28d5004 add r5, sp, #4 30006880: e1a00006 mov r0, r6 30006884: e28d1044 add r1, sp, #68 ; 0x44 30006888: e1a02005 mov r2, r5 3000688c: eb000180 bl 30006e94 <rtems_filesystem_get_start_loc>
if ( !new_parent_loc.ops->evalformake_h ) {
30006890: e59d3010 ldr r3, [sp, #16] 30006894: e5933004 ldr r3, [r3, #4] 30006898: e3530000 cmp r3, #0
3000689c: 0a00008f beq 30006ae0 <_rename_r+0x308>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
300068a0: e59d0044 ldr r0, [sp, #68] ; 0x44 300068a4: e1a01005 mov r1, r5 300068a8: e0860000 add r0, r6, r0 300068ac: e28d2040 add r2, sp, #64 ; 0x40 300068b0: e1a0e00f mov lr, pc 300068b4: e12fff13 bx r3
if ( result != 0 ) {
300068b8: e3500000 cmp r0, #0
300068bc: 1a000065 bne 30006a58 <_rename_r+0x280>
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
300068c0: e59d3014 ldr r3, [sp, #20] 300068c4: e59d2028 ldr r2, [sp, #40] ; 0x28 300068c8: e1520003 cmp r2, r3
300068cc: 1a000027 bne 30006970 <_rename_r+0x198>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
300068d0: e59d3010 ldr r3, [sp, #16] 300068d4: e593c040 ldr ip, [r3, #64] ; 0x40 300068d8: e35c0000 cmp ip, #0
300068dc: 0a00007a beq 30006acc <_rename_r+0x2f4>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
300068e0: e59d3040 ldr r3, [sp, #64] ; 0x40 300068e4: e1a00004 mov r0, r4 300068e8: e1a01007 mov r1, r7 300068ec: e1a02005 mov r2, r5 300068f0: e1a0e00f mov lr, pc 300068f4: e12fff1c bx ip
rtems_filesystem_freenode( &new_parent_loc );
300068f8: e59d3010 ldr r3, [sp, #16]
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
300068fc: e1a06000 mov r6, r0
rtems_filesystem_freenode( &new_parent_loc );
30006900: e3530000 cmp r3, #0
30006904: 0a000004 beq 3000691c <_rename_r+0x144>
30006908: e593301c ldr r3, [r3, #28] 3000690c: e3530000 cmp r3, #0 30006910: 11a00005 movne r0, r5 30006914: 11a0e00f movne lr, pc 30006918: 112fff13 bxne r3
if ( free_old_parentloc )
3000691c: e3580000 cmp r8, #0
30006920: 0a000007 beq 30006944 <_rename_r+0x16c>
rtems_filesystem_freenode( &old_parent_loc );
30006924: e59d3024 ldr r3, [sp, #36] ; 0x24 30006928: e3530000 cmp r3, #0
3000692c: 0a000004 beq 30006944 <_rename_r+0x16c>
30006930: e593301c ldr r3, [r3, #28] 30006934: e3530000 cmp r3, #0 30006938: 11a00004 movne r0, r4 3000693c: 11a0e00f movne lr, pc 30006940: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
30006944: e59d3038 ldr r3, [sp, #56] ; 0x38 30006948: e3530000 cmp r3, #0
3000694c: 0a000004 beq 30006964 <_rename_r+0x18c>
30006950: e593301c ldr r3, [r3, #28] 30006954: e3530000 cmp r3, #0 30006958: 11a00007 movne r0, r7 3000695c: 11a0e00f movne lr, pc 30006960: 112fff13 bxne r3
return result;
}
30006964: e1a00006 mov r0, r6
30006968: e28dd048 add sp, sp, #72 ; 0x48
3000696c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
30006970: e59d3010 ldr r3, [sp, #16] 30006974: e3530000 cmp r3, #0
30006978: 0a000004 beq 30006990 <_rename_r+0x1b8>
3000697c: e593301c ldr r3, [r3, #28] 30006980: e3530000 cmp r3, #0 30006984: 11a00005 movne r0, r5 30006988: 11a0e00f movne lr, pc 3000698c: 112fff13 bxne r3
if ( free_old_parentloc )
30006990: e3580000 cmp r8, #0
30006994: 0a000007 beq 300069b8 <_rename_r+0x1e0>
rtems_filesystem_freenode( &old_parent_loc );
30006998: e59d3024 ldr r3, [sp, #36] ; 0x24 3000699c: e3530000 cmp r3, #0
300069a0: 0a000004 beq 300069b8 <_rename_r+0x1e0>
300069a4: e593301c ldr r3, [r3, #28] 300069a8: e3530000 cmp r3, #0 300069ac: 11a00004 movne r0, r4 300069b0: 11a0e00f movne lr, pc 300069b4: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
300069b8: e59d3038 ldr r3, [sp, #56] ; 0x38 300069bc: e3530000 cmp r3, #0
300069c0: 0a000004 beq 300069d8 <_rename_r+0x200>
300069c4: e593301c ldr r3, [r3, #28] 300069c8: e3530000 cmp r3, #0 300069cc: 11a00007 movne r0, r7 300069d0: 11a0e00f movne lr, pc 300069d4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
300069d8: eb002dec bl 30012190 <__errno> 300069dc: e3a03012 mov r3, #18 300069e0: e5803000 str r3, [r0] 300069e4: e3e06000 mvn r6, #0 300069e8: eaffffdd b 30006964 <_rename_r+0x18c>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
300069ec: e3580000 cmp r8, #0
300069f0: 1a000001 bne 300069fc <_rename_r+0x224>
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
300069f4: e3e06000 mvn r6, #0 <== NOT EXECUTED 300069f8: eaffffd9 b 30006964 <_rename_r+0x18c> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
300069fc: e59d3024 ldr r3, [sp, #36] ; 0x24 30006a00: e3530000 cmp r3, #0
30006a04: 0afffffa beq 300069f4 <_rename_r+0x21c>
30006a08: e593301c ldr r3, [r3, #28] 30006a0c: e3530000 cmp r3, #0
30006a10: 0afffff7 beq 300069f4 <_rename_r+0x21c>
30006a14: e1a00004 mov r0, r4 30006a18: e1a0e00f mov lr, pc 30006a1c: e12fff13 bx r3 30006a20: e3e06000 mvn r6, #0 30006a24: eaffffce b 30006964 <_rename_r+0x18c>
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
30006a28: e28d4018 add r4, sp, #24 30006a2c: e3a0c000 mov ip, #0 30006a30: e1a00005 mov r0, r5 30006a34: e1a01007 mov r1, r7 30006a38: e3a02002 mov r2, #2 30006a3c: e1a03004 mov r3, r4 30006a40: e58dc000 str ip, [sp] 30006a44: ebfff9aa bl 300050f4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
30006a48: e3500000 cmp r0, #0
30006a4c: 1affffe8 bne 300069f4 <_rename_r+0x21c>
30006a50: e3a08001 mov r8, #1 30006a54: eaffff6d b 30006810 <_rename_r+0x38>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
30006a58: e59d3010 ldr r3, [sp, #16] 30006a5c: e3530000 cmp r3, #0
30006a60: 0a000004 beq 30006a78 <_rename_r+0x2a0>
30006a64: e593301c ldr r3, [r3, #28] 30006a68: e3530000 cmp r3, #0 30006a6c: 11a00005 movne r0, r5 30006a70: 11a0e00f movne lr, pc 30006a74: 112fff13 bxne r3
if ( free_old_parentloc )
30006a78: e3580000 cmp r8, #0
30006a7c: 0a000007 beq 30006aa0 <_rename_r+0x2c8>
rtems_filesystem_freenode( &old_parent_loc );
30006a80: e59d3024 ldr r3, [sp, #36] ; 0x24 30006a84: e3530000 cmp r3, #0
30006a88: 0a000004 beq 30006aa0 <_rename_r+0x2c8>
30006a8c: e593301c ldr r3, [r3, #28] 30006a90: e3530000 cmp r3, #0 30006a94: 11a00004 movne r0, r4 30006a98: 11a0e00f movne lr, pc 30006a9c: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
30006aa0: e59d3038 ldr r3, [sp, #56] ; 0x38 30006aa4: e3530000 cmp r3, #0
30006aa8: 0affffd1 beq 300069f4 <_rename_r+0x21c>
30006aac: e593301c ldr r3, [r3, #28] 30006ab0: e3530000 cmp r3, #0
30006ab4: 0affffce beq 300069f4 <_rename_r+0x21c>
30006ab8: e1a00007 mov r0, r7 30006abc: e1a0e00f mov lr, pc 30006ac0: e12fff13 bx r3 30006ac4: e3e06000 mvn r6, #0 30006ac8: eaffffa5 b 30006964 <_rename_r+0x18c>
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
30006acc: e593301c ldr r3, [r3, #28] 30006ad0: e3530000 cmp r3, #0 30006ad4: 11a00005 movne r0, r5 30006ad8: 11a0e00f movne lr, pc 30006adc: 112fff13 bxne r3
if ( free_old_parentloc )
30006ae0: e3580000 cmp r8, #0
30006ae4: 0a000007 beq 30006b08 <_rename_r+0x330>
rtems_filesystem_freenode( &old_parent_loc );
30006ae8: e59d3024 ldr r3, [sp, #36] ; 0x24 30006aec: e3530000 cmp r3, #0
30006af0: 0a000004 beq 30006b08 <_rename_r+0x330>
30006af4: e593301c ldr r3, [r3, #28] 30006af8: e3530000 cmp r3, #0 30006afc: 11a00004 movne r0, r4 30006b00: 11a0e00f movne lr, pc 30006b04: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
30006b08: e59d3038 ldr r3, [sp, #56] ; 0x38 30006b0c: e3530000 cmp r3, #0
30006b10: 0a000004 beq 30006b28 <_rename_r+0x350>
30006b14: e593301c ldr r3, [r3, #28] 30006b18: e3530000 cmp r3, #0 30006b1c: 11a00007 movne r0, r7 30006b20: 11a0e00f movne lr, pc 30006b24: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTSUP );
30006b28: eb002d98 bl 30012190 <__errno> 30006b2c: e3a03086 mov r3, #134 ; 0x86 30006b30: e5803000 str r3, [r0] 30006b34: e3e06000 mvn r6, #0 30006b38: eaffff89 b 30006964 <_rename_r+0x18c>
300043a0 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
300043a0: e1a00001 mov r0, r1 <== NOT EXECUTED 300043a4: e1a01002 mov r1, r2 <== NOT EXECUTED 300043a8: eaffffc2 b 300042b8 <stat> <== NOT EXECUTED
3000de64 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
3000de64: e1a00001 mov r0, r1 <== NOT EXECUTED 3000de68: eaffff6c b 3000dc20 <unlink> <== NOT EXECUTED
3000b778 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
3000b778: e92d4030 push {r4, r5, lr}
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
3000b77c: e2505000 subs r5, r0, #0
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
3000b780: e24dd018 sub sp, sp, #24
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
3000b784: 0a000031 beq 3000b850 <chdir+0xd8>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
3000b788: eb001141 bl 3000fc94 <strlen> 3000b78c: e28d4004 add r4, sp, #4 3000b790: e3a0c001 mov ip, #1 3000b794: e1a01000 mov r1, r0 3000b798: e1a0200c mov r2, ip 3000b79c: e1a00005 mov r0, r5 3000b7a0: e1a03004 mov r3, r4 3000b7a4: e58dc000 str ip, [sp] 3000b7a8: ebffdb2b bl 3000245c <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
3000b7ac: e3500000 cmp r0, #0
3000b7b0: 1a000024 bne 3000b848 <chdir+0xd0>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
3000b7b4: e59d2010 ldr r2, [sp, #16] 3000b7b8: e5923010 ldr r3, [r2, #16] 3000b7bc: e3530000 cmp r3, #0
3000b7c0: 0a000018 beq 3000b828 <chdir+0xb0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
3000b7c4: e1a00004 mov r0, r4 3000b7c8: e1a0e00f mov lr, pc 3000b7cc: e12fff13 bx r3 3000b7d0: e3500001 cmp r0, #1
3000b7d4: 1a000022 bne 3000b864 <chdir+0xec>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
3000b7d8: e59f50b8 ldr r5, [pc, #184] ; 3000b898 <chdir+0x120> 3000b7dc: e595c000 ldr ip, [r5] 3000b7e0: e59c3010 ldr r3, [ip, #16] 3000b7e4: e3530000 cmp r3, #0
3000b7e8: 0a000006 beq 3000b808 <chdir+0x90>
3000b7ec: e593301c ldr r3, [r3, #28] 3000b7f0: e3530000 cmp r3, #0
3000b7f4: 0a000003 beq 3000b808 <chdir+0x90>
3000b7f8: e28c0004 add r0, ip, #4 3000b7fc: e1a0e00f mov lr, pc 3000b800: e12fff13 bx r3 3000b804: e595c000 ldr ip, [r5]
rtems_filesystem_current = loc;
3000b808: e28cc004 add ip, ip, #4
3000b80c: e8b4000f ldm r4!, {r0, r1, r2, r3}
3000b810: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000b814: e5943000 ldr r3, [r4]
3000b818: e3a00000 mov r0, #0
3000b81c: e58c3000 str r3, [ip]
return 0;
}
3000b820: e28dd018 add sp, sp, #24
3000b824: e8bd8030 pop {r4, r5, pc}
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
3000b828: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3000b82c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000b830: 11a00004 movne r0, r4 <== NOT EXECUTED 3000b834: 11a0e00f movne lr, pc <== NOT EXECUTED 3000b838: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000b83c: eb000d3b bl 3000ed30 <__errno> <== NOT EXECUTED 3000b840: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000b844: e5803000 str r3, [r0] <== NOT EXECUTED
3000b848: e3e00000 mvn r0, #0 3000b84c: eafffff3 b 3000b820 <chdir+0xa8>
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
3000b850: eb000d36 bl 3000ed30 <__errno> 3000b854: e3a0300e mov r3, #14 3000b858: e5803000 str r3, [r0] 3000b85c: e3e00000 mvn r0, #0 3000b860: eaffffee b 3000b820 <chdir+0xa8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
3000b864: e59d3010 ldr r3, [sp, #16] 3000b868: e3530000 cmp r3, #0
3000b86c: 0a000004 beq 3000b884 <chdir+0x10c>
3000b870: e593301c ldr r3, [r3, #28] 3000b874: e3530000 cmp r3, #0 3000b878: 11a00004 movne r0, r4 3000b87c: 11a0e00f movne lr, pc 3000b880: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000b884: eb000d29 bl 3000ed30 <__errno> 3000b888: e3a03014 mov r3, #20 3000b88c: e5803000 str r3, [r0] 3000b890: e3e00000 mvn r0, #0 3000b894: eaffffe1 b 3000b820 <chdir+0xa8>
300040d0 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
300040d0: e92d4070 push {r4, r5, r6, lr}
300040d4: e24dd018 sub sp, sp, #24
300040d8: e1a05001 mov r5, r1
300040dc: e1a06000 mov r6, r0
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
300040e0: eb003c55 bl 3001323c <strlen> 300040e4: e28d4004 add r4, sp, #4 300040e8: e1a01000 mov r1, r0 300040ec: e3a0c001 mov ip, #1 300040f0: e1a00006 mov r0, r6 300040f4: e3a02000 mov r2, #0 300040f8: e1a03004 mov r3, r4 300040fc: e58dc000 str ip, [sp] 30004100: eb0000c4 bl 30004418 <rtems_filesystem_evaluate_path>
if ( status != 0 )
30004104: e3500000 cmp r0, #0
30004108: 1a000020 bne 30004190 <chmod+0xc0>
return -1;
if ( !loc.handlers ){
3000410c: e59d300c ldr r3, [sp, #12] 30004110: e3530000 cmp r3, #0
30004114: 0a000012 beq 30004164 <chmod+0x94>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
30004118: e593301c ldr r3, [r3, #28] 3000411c: e3530000 cmp r3, #0
30004120: 0a00001c beq 30004198 <chmod+0xc8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
30004124: e1a01005 mov r1, r5 30004128: e1a00004 mov r0, r4 3000412c: e1a0e00f mov lr, pc 30004130: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
30004134: e59d3010 ldr r3, [sp, #16]
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
30004138: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
3000413c: e3530000 cmp r3, #0
30004140: 0a000004 beq 30004158 <chmod+0x88>
30004144: e593301c ldr r3, [r3, #28] 30004148: e3530000 cmp r3, #0 3000414c: 11a00004 movne r0, r4 30004150: 11a0e00f movne lr, pc 30004154: 112fff13 bxne r3
return result;
}
30004158: e1a00005 mov r0, r5
3000415c: e28dd018 add sp, sp, #24
30004160: e8bd8070 pop {r4, r5, r6, pc}
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
30004164: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30004168: e3530000 cmp r3, #0 <== NOT EXECUTED 3000416c: 0a000004 beq 30004184 <chmod+0xb4> <== NOT EXECUTED 30004170: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30004174: e3530000 cmp r3, #0 <== NOT EXECUTED 30004178: 11a00004 movne r0, r4 <== NOT EXECUTED 3000417c: 11a0e00f movne lr, pc <== NOT EXECUTED 30004180: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
30004184: eb0034eb bl 30011538 <__errno> <== NOT EXECUTED 30004188: e3a03009 mov r3, #9 <== NOT EXECUTED 3000418c: e5803000 str r3, [r0] <== NOT EXECUTED
30004190: e3e05000 mvn r5, #0 30004194: eaffffef b 30004158 <chmod+0x88>
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
30004198: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3000419c: e3530000 cmp r3, #0 <== NOT EXECUTED 300041a0: 0a000004 beq 300041b8 <chmod+0xe8> <== NOT EXECUTED 300041a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 300041a8: e3530000 cmp r3, #0 <== NOT EXECUTED 300041ac: 11a00004 movne r0, r4 <== NOT EXECUTED 300041b0: 11a0e00f movne lr, pc <== NOT EXECUTED 300041b4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
300041b8: eb0034de bl 30011538 <__errno> <== NOT EXECUTED 300041bc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300041c0: e5803000 str r3, [r0] <== NOT EXECUTED 300041c4: e3e05000 mvn r5, #0 <== NOT EXECUTED 300041c8: eaffffe2 b 30004158 <chmod+0x88> <== NOT EXECUTED
300041cc <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
300041cc: e92d40f0 push {r4, r5, r6, r7, lr}
300041d0: e1a01801 lsl r1, r1, #16
300041d4: e24dd018 sub sp, sp, #24
300041d8: e1a02802 lsl r2, r2, #16
300041dc: e1a06821 lsr r6, r1, #16
300041e0: e1a05822 lsr r5, r2, #16
300041e4: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
300041e8: eb003c13 bl 3001323c <strlen> 300041ec: e28d4004 add r4, sp, #4 300041f0: e1a01000 mov r1, r0 300041f4: e3a0c001 mov ip, #1 300041f8: e1a00007 mov r0, r7 300041fc: e3a02000 mov r2, #0 30004200: e1a03004 mov r3, r4 30004204: e58dc000 str ip, [sp] 30004208: eb000082 bl 30004418 <rtems_filesystem_evaluate_path> 3000420c: e3500000 cmp r0, #0
30004210: 1a00001c bne 30004288 <chown+0xbc>
return -1;
if ( !loc.ops->chown_h ) {
30004214: e59d2010 ldr r2, [sp, #16] 30004218: e5923018 ldr r3, [r2, #24] 3000421c: e3530000 cmp r3, #0
30004220: 0a000010 beq 30004268 <chown+0x9c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
30004224: e1a02005 mov r2, r5 30004228: e1a01006 mov r1, r6 3000422c: e1a00004 mov r0, r4 30004230: e1a0e00f mov lr, pc 30004234: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
30004238: e59d3010 ldr r3, [sp, #16]
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
3000423c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
30004240: e3530000 cmp r3, #0
30004244: 0a000004 beq 3000425c <chown+0x90>
30004248: e593301c ldr r3, [r3, #28] 3000424c: e3530000 cmp r3, #0 30004250: 11a00004 movne r0, r4 30004254: 11a0e00f movne lr, pc 30004258: 112fff13 bxne r3
return result;
}
3000425c: e1a00005 mov r0, r5
30004260: e28dd018 add sp, sp, #24
30004264: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
30004268: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3000426c: e3530000 cmp r3, #0 <== NOT EXECUTED 30004270: 11a00004 movne r0, r4 <== NOT EXECUTED 30004274: 11a0e00f movne lr, pc <== NOT EXECUTED 30004278: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000427c: eb0034ad bl 30011538 <__errno> <== NOT EXECUTED 30004280: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30004284: e5803000 str r3, [r0] <== NOT EXECUTED
30004288: e3e05000 mvn r5, #0 3000428c: eafffff2 b 3000425c <chown+0x90>
30002140 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30002140: e92d4070 push {r4, r5, r6, lr}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
30002144: e59f50d8 ldr r5, [pc, #216] ; 30002224 <chroot+0xe4> 30002148: e59f30d8 ldr r3, [pc, #216] ; 30002228 <chroot+0xe8> 3000214c: e5954000 ldr r4, [r5]
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30002150: e24dd018 sub sp, sp, #24
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
30002154: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30002158: e1a06000 mov r6, r0
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
3000215c: 0a000020 beq 300021e4 <chroot+0xa4>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
30002160: e1a00006 mov r0, r6 30002164: eb002583 bl 3000b778 <chdir>
if (result) {
30002168: e250c000 subs ip, r0, #0
3000216c: 1a000025 bne 30002208 <chroot+0xc8>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
30002170: e28d4004 add r4, sp, #4 30002174: e1a0200c mov r2, ip 30002178: e59f00ac ldr r0, [pc, #172] ; 3000222c <chroot+0xec> 3000217c: e3a01001 mov r1, #1 30002180: e1a03004 mov r3, r4 30002184: e58dc000 str ip, [sp] 30002188: eb0000b3 bl 3000245c <rtems_filesystem_evaluate_path> 3000218c: e3500000 cmp r0, #0
30002190: 1a00001c bne 30002208 <chroot+0xc8>
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
30002194: e595c000 ldr ip, [r5] 30002198: e59c3024 ldr r3, [ip, #36] ; 0x24 3000219c: e3530000 cmp r3, #0
300021a0: 0a000007 beq 300021c4 <chroot+0x84>
300021a4: e593301c ldr r3, [r3, #28] 300021a8: e3530000 cmp r3, #0
300021ac: 0a000004 beq 300021c4 <chroot+0x84>
300021b0: e28c0018 add r0, ip, #24 300021b4: e1a0e00f mov lr, pc 300021b8: e12fff13 bx r3 300021bc: e59f3060 ldr r3, [pc, #96] ; 30002224 <chroot+0xe4> 300021c0: e593c000 ldr ip, [r3]
rtems_filesystem_root = loc;
300021c4: e28cc018 add ip, ip, #24
300021c8: e8b4000f ldm r4!, {r0, r1, r2, r3}
300021cc: e8ac000f stmia ip!, {r0, r1, r2, r3}
300021d0: e5943000 ldr r3, [r4]
300021d4: e3a00000 mov r0, #0
300021d8: e58c3000 str r3, [ip]
return 0;
}
300021dc: e28dd018 add sp, sp, #24
300021e0: e8bd8070 pop {r4, r5, r6, pc}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
300021e4: eb000566 bl 30003784 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
300021e8: e5953000 ldr r3, [r5] 300021ec: e1530004 cmp r3, r4
300021f0: 1affffda bne 30002160 <chroot+0x20>
rtems_set_errno_and_return_minus_one( ENOTSUP );
300021f4: eb0032cd bl 3000ed30 <__errno> <== NOT EXECUTED 300021f8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300021fc: e5803000 str r3, [r0] <== NOT EXECUTED 30002200: e3e00000 mvn r0, #0 <== NOT EXECUTED 30002204: eafffff4 b 300021dc <chroot+0x9c> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
30002208: eb0032c8 bl 3000ed30 <__errno> <== NOT EXECUTED 3000220c: e1a04000 mov r4, r0 <== NOT EXECUTED 30002210: eb0032c6 bl 3000ed30 <__errno> <== NOT EXECUTED 30002214: e5903000 ldr r3, [r0] <== NOT EXECUTED 30002218: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000221c: e5843000 str r3, [r4] <== NOT EXECUTED 30002220: eaffffed b 300021dc <chroot+0x9c> <== NOT EXECUTED
30008d48 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008d48: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
30008d4c: e3d2a007 bics sl, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008d50: e1a09000 mov r9, r0 30008d54: e1a04001 mov r4, r1 30008d58: e1a0b003 mov fp, r3
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
30008d5c: 1a000027 bne 30008e00 <devFS_evaluate_path+0xb8>
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
30008d60: e5937000 ldr r7, [r3]
if (!device_name_table)
30008d64: e3570000 cmp r7, #0
30008d68: 0a000029 beq 30008e14 <devFS_evaluate_path+0xcc>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
30008d6c: e59f30b4 ldr r3, [pc, #180] ; 30008e28 <devFS_evaluate_path+0xe0> 30008d70: e5938000 ldr r8, [r3] 30008d74: e3580000 cmp r8, #0
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
30008d78: 11a0500a movne r5, sl
for (i = 0; i < rtems_device_table_size; i++) {
30008d7c: 0a000010 beq 30008dc4 <devFS_evaluate_path+0x7c>
if (!device_name_table[i].device_name)
30008d80: e08aa10a add sl, sl, sl, lsl #2 30008d84: e797610a ldr r6, [r7, sl, lsl #2]
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30008d88: e1a00009 mov r0, r9
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
30008d8c: e2561000 subs r1, r6, #0
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30008d90: e1a02004 mov r2, r4
/* 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++) {
30008d94: e2855001 add r5, r5, #1
if (!device_name_table[i].device_name)
30008d98: e087a10a add sl, r7, sl, lsl #2
30008d9c: 0a000005 beq 30008db8 <devFS_evaluate_path+0x70>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30008da0: eb000af4 bl 3000b978 <strncmp> 30008da4: e3500000 cmp r0, #0
30008da8: 1a000002 bne 30008db8 <devFS_evaluate_path+0x70>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
30008dac: e7d60004 ldrb r0, [r6, r4] 30008db0: e3500000 cmp r0, #0
30008db4: 0a000007 beq 30008dd8 <devFS_evaluate_path+0x90>
/* 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++) {
30008db8: e1580005 cmp r8, r5 30008dbc: e1a0a005 mov sl, r5
30008dc0: 8affffee bhi 30008d80 <devFS_evaluate_path+0x38>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
30008dc4: eb000735 bl 3000aaa0 <__errno> 30008dc8: e3a03002 mov r3, #2 30008dcc: e5803000 str r3, [r0] 30008dd0: e3e00000 mvn r0, #0
}
30008dd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30008dd8: e59f304c ldr r3, [pc, #76] ; 30008e2c <devFS_evaluate_path+0xe4>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
30008ddc: e58ba000 str sl, [fp]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30008de0: e5933000 ldr r3, [r3] 30008de4: e5933028 ldr r3, [r3, #40] ; 0x28 30008de8: e58b3010 str r3, [fp, #16]
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
30008dec: e59f303c ldr r3, [pc, #60] ; 30008e30 <devFS_evaluate_path+0xe8> 30008df0: e58b3008 str r3, [fp, #8]
pathloc->ops = &devFS_ops;
30008df4: e59f3038 ldr r3, [pc, #56] ; 30008e34 <devFS_evaluate_path+0xec> 30008df8: e58b300c str r3, [fp, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
30008dfc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
30008e00: eb000726 bl 3000aaa0 <__errno> <== NOT EXECUTED
30008e04: e3a03001 mov r3, #1 <== NOT EXECUTED
30008e08: e5803000 str r3, [r0] <== NOT EXECUTED
30008e0c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30008e10: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* 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 );
30008e14: eb000721 bl 3000aaa0 <__errno> <== NOT EXECUTED
30008e18: e3a0300e mov r3, #14 <== NOT EXECUTED
30008e1c: e5803000 str r3, [r0] <== NOT EXECUTED
30008e20: e3e00000 mvn r0, #0 <== NOT EXECUTED
30008e24: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
300015f8 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
300015f8: e92d4070 push {r4, r5, r6, lr}
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
300015fc: e59f605c ldr r6, [pc, #92] ; 30001660 <devFS_initialize+0x68>
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
30001600: e1a04000 mov r4, r0
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
30001604: e5960000 ldr r0, [r6] 30001608: e0800100 add r0, r0, r0, lsl #2 3000160c: e1a00100 lsl r0, r0, #2 30001610: eb001c9c bl 30008888 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
30001614: e2505000 subs r5, r0, #0
30001618: 0a00000b beq 3000164c <devFS_initialize+0x54>
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
3000161c: e5962000 ldr r2, [r6] 30001620: e3a01000 mov r1, #0 30001624: e0822102 add r2, r2, r2, lsl #2 30001628: e1a02102 lsl r2, r2, #2 3000162c: eb002749 bl 3000b358 <memset>
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
30001630: e59f302c ldr r3, [pc, #44] ; 30001664 <devFS_initialize+0x6c>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
30001634: e584501c str r5, [r4, #28]
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
30001638: e2832038 add r2, r3, #56 ; 0x38 3000163c: e5842028 str r2, [r4, #40] ; 0x28
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
30001640: e5843024 str r3, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
30001644: e3a00000 mov r0, #0
return 0;
}
30001648: e8bd8070 pop {r4, r5, r6, pc}
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
3000164c: eb002513 bl 3000aaa0 <__errno> <== NOT EXECUTED
30001650: e3a0300c mov r3, #12 <== NOT EXECUTED
30001654: e5803000 str r3, [r0] <== NOT EXECUTED
30001658: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000165c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
300017d4 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
300017d4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
300017d8: e1a03000 mov r3, r0
300017dc: e24dd010 sub sp, sp, #16
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
300017e0: e5900038 ldr r0, [r0, #56] ; 0x38
args.iop = iop;
args.command = command;
300017e4: e98d0006 stmib sp, {r1, r2}
args.buffer = buffer;
status = rtems_io_control(
300017e8: e590100c ldr r1, [r0, #12] 300017ec: e1a0200d mov r2, sp 300017f0: e5900008 ldr r0, [r0, #8]
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
300017f4: e58d3000 str r3, [sp]
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
300017f8: eb00108f bl 30005a3c <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
300017fc: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
30001800: 059d000c ldreq r0, [sp, #12]
np->major,
np->minor,
(void *) &args
);
if ( status )
30001804: 1a000001 bne 30001810 <devFS_ioctl+0x3c>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
30001808: e28dd010 add sp, sp, #16
3000180c: e8bd8000 pop {pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
30001810: eb001d88 bl 30008e38 <rtems_deviceio_errno> <== NOT EXECUTED 30001814: eafffffb b 30001808 <devFS_ioctl+0x34> <== NOT EXECUTED
30001668 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
30001668: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000166c: e1a04000 mov r4, r0
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001670: e5d00000 ldrb r0, [r0]
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
30001674: e1a05001 mov r5, r1
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001678: e3500064 cmp r0, #100 ; 0x64
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
3000167c: e1a06002 mov r6, r2 30001680: e1a0b003 mov fp, r3
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001684: 0a000036 beq 30001764 <devFS_mknod+0xfc>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
30001688: e2053a0f and r3, r5, #61440 ; 0xf000 3000168c: e3530a02 cmp r3, #8192 ; 0x2000 30001690: 13530a06 cmpne r3, #24576 ; 0x6000 30001694: 03a03000 moveq r3, #0 30001698: 13a03001 movne r3, #1
3000169c: 1a00003a bne 3000178c <devFS_mknod+0x124>
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
300016a0: e59d2024 ldr r2, [sp, #36] ; 0x24 300016a4: e5928000 ldr r8, [r2]
if (!device_name_table)
300016a8: e3580000 cmp r8, #0
300016ac: 0a000040 beq 300017b4 <devFS_mknod+0x14c>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
300016b0: e59f2110 ldr r2, [pc, #272] ; 300017c8 <devFS_mknod+0x160> 300016b4: e592a000 ldr sl, [r2] 300016b8: e35a0000 cmp sl, #0
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in 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 );
300016bc: 13e09000 mvnne r9, #0 300016c0: 11a07003 movne r7, r3
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
300016c4: 1a000007 bne 300016e8 <devFS_mknod+0x80>
300016c8: ea000034 b 300017a0 <devFS_mknod+0x138> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
300016cc: eb0027c9 bl 3000b5f8 <strcmp> <== NOT EXECUTED 300016d0: e3500000 cmp r0, #0 <== NOT EXECUTED 300016d4: 0a00001d beq 30001750 <devFS_mknod+0xe8> <== NOT EXECUTED
/* Find an empty slot in 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 (slot = -1, i = 0; i < rtems_device_table_size; i++){
300016d8: e2877001 add r7, r7, #1 <== NOT EXECUTED 300016dc: e157000a cmp r7, sl <== NOT EXECUTED 300016e0: e1a03007 mov r3, r7 <== NOT EXECUTED 300016e4: 2a000009 bcs 30001710 <devFS_mknod+0xa8> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
300016e8: e0833103 add r3, r3, r3, lsl #2 300016ec: e7983103 ldr r3, [r8, r3, lsl #2]
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
300016f0: e1a00004 mov r0, r4
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
300016f4: e2531000 subs r1, r3, #0
300016f8: 1afffff3 bne 300016cc <devFS_mknod+0x64>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
300016fc: e1a09007 mov r9, r7
/* Find an empty slot in 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 (slot = -1, i = 0; i < rtems_device_table_size; i++){
30001700: e2877001 add r7, r7, #1 30001704: e157000a cmp r7, sl 30001708: e1a03007 mov r3, r7
3000170c: 3afffff5 bcc 300016e8 <devFS_mknod+0x80>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
30001710: e3790001 cmn r9, #1
30001714: 0a000021 beq 300017a0 <devFS_mknod+0x138>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30001718: e10f7000 mrs r7, CPSR 3000171c: e3873080 orr r3, r7, #128 ; 0x80 30001720: e129f003 msr CPSR_fc, r3
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
30001724: e0899109 add r9, r9, r9, lsl #2 30001728: e1a09109 lsl r9, r9, #2 3000172c: e7884009 str r4, [r8, r9]
device_name_table[slot].device_name_length = strlen(path);
30001730: e1a00004 mov r0, r4 30001734: eb002877 bl 3000b918 <strlen>
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
30001738: e0888009 add r8, r8, r9
device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode;
3000173c: e5885010 str r5, [r8, #16]
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
device_name_table[slot].device_name_length = strlen(path);
30001740: e9880841 stmib r8, {r0, r6, fp}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30001744: e129f007 msr CPSR_fc, r7 30001748: e3a00000 mov r0, #0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
3000174c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
30001750: eb0024d2 bl 3000aaa0 <__errno> <== NOT EXECUTED
30001754: e3a03011 mov r3, #17 <== NOT EXECUTED
30001758: e5803000 str r3, [r0] <== NOT EXECUTED
3000175c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001760: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001764: e5d43001 ldrb r3, [r4, #1] 30001768: e3530065 cmp r3, #101 ; 0x65
3000176c: 1affffc5 bne 30001688 <devFS_mknod+0x20>
(path[2] == 'v') && (path[3] == '\0'))
30001770: e5d43002 ldrb r3, [r4, #2] 30001774: e3530076 cmp r3, #118 ; 0x76
30001778: 1affffc2 bne 30001688 <devFS_mknod+0x20>
3000177c: e5d40003 ldrb r0, [r4, #3] 30001780: e3500000 cmp r0, #0
30001784: 1affffbf bne 30001688 <devFS_mknod+0x20>
30001788: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
3000178c: eb0024c3 bl 3000aaa0 <__errno> <== NOT EXECUTED
30001790: e3a03016 mov r3, #22 <== NOT EXECUTED
30001794: e5803000 str r3, [r0] <== NOT EXECUTED
30001798: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000179c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
300017a0: eb0024be bl 3000aaa0 <__errno> <== NOT EXECUTED
300017a4: e3a0300c mov r3, #12 <== NOT EXECUTED
300017a8: e5803000 str r3, [r0] <== NOT EXECUTED
300017ac: e3e00000 mvn r0, #0 <== NOT EXECUTED
300017b0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in 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 );
300017b4: eb0024b9 bl 3000aaa0 <__errno> <== NOT EXECUTED
300017b8: e3a0300e mov r3, #14 <== NOT EXECUTED
300017bc: e5803000 str r3, [r0] <== NOT EXECUTED
300017c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
300017c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30001858 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
30001858: e92d4010 push {r4, lr} <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
3000185c: e590c014 ldr ip, [r0, #20] <== NOT EXECUTED
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
30001860: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
30001864: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
30001868: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
3000186c: e3a02000 mov r2, #0 <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
30001870: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
30001874: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
30001878: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
3000187c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
30001880: e1a0200d mov r2, sp <== NOT EXECUTED 30001884: e590100c ldr r1, [r0, #12] <== NOT EXECUTED 30001888: e5900008 ldr r0, [r0, #8] <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
3000188c: e58d3000 str r3, [sp] <== NOT EXECUTED
args.offset = iop->offset;
30001890: e283400c add r4, r3, #12 <== NOT EXECUTED
30001894: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
30001898: e98d0018 stmib sp, {r3, r4} <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
3000189c: eb0010c7 bl 30005bc0 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
300018a0: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
300018a4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
300018a8: 1a000001 bne 300018b4 <devFS_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
300018ac: e28dd01c add sp, sp, #28 <== NOT EXECUTED
300018b0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
300018b4: eb001d5f bl 30008e38 <rtems_deviceio_errno> <== NOT EXECUTED 300018b8: eafffffb b 300018ac <devFS_read+0x54> <== NOT EXECUTED
300018bc <devFS_stat>:
struct stat *buf
)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
300018bc: e5903000 ldr r3, [r0]
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
300018c0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
300018c4: e3530000 cmp r3, #0
300018c8: 0a000007 beq 300018ec <devFS_stat+0x30>
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
300018cc: e5930010 ldr r0, [r3, #16]
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
300018d0: e593200c ldr r2, [r3, #12]
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
300018d4: e5933008 ldr r3, [r3, #8] 300018d8: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
300018dc: e581000c str r0, [r1, #12]
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
300018e0: e5813018 str r3, [r1, #24]
buf->st_mode = the_dev->mode;
300018e4: e3a00000 mov r0, #0
return 0;
}
300018e8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
300018ec: eb00246b bl 3000aaa0 <__errno> <== NOT EXECUTED
300018f0: e3a0300e mov r3, #14 <== NOT EXECUTED
300018f4: e5803000 str r3, [r0] <== NOT EXECUTED
300018f8: e3e00000 mvn r0, #0 <== NOT EXECUTED
300018fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30001900 <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
30001900: e92d4010 push {r4, lr}
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
30001904: e590c014 ldr ip, [r0, #20]
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
30001908: e24dd01c sub sp, sp, #28
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
3000190c: e58d2010 str r2, [sp, #16]
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
30001910: e1a03000 mov r3, r0
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
30001914: e3a02000 mov r2, #0
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
30001918: e5900038 ldr r0, [r0, #56] ; 0x38
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
3000191c: e58d2018 str r2, [sp, #24]
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
30001920: e58dc014 str ip, [sp, #20]
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
30001924: e58d100c str r1, [sp, #12]
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
30001928: e1a0200d mov r2, sp 3000192c: e590100c ldr r1, [r0, #12] 30001930: e5900008 ldr r0, [r0, #8]
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
30001934: e58d3000 str r3, [sp]
args.offset = iop->offset;
30001938: e283400c add r4, r3, #12
3000193c: e8940018 ldm r4, {r3, r4}
30001940: e98d0018 stmib sp, {r3, r4}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
30001944: eb0010b1 bl 30005c10 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
30001948: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
3000194c: 059d0018 ldreq r0, [sp, #24]
np->major,
np->minor,
(void *) &args
);
if ( status )
30001950: 1a000001 bne 3000195c <devFS_write+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
30001954: e28dd01c add sp, sp, #28
30001958: e8bd8010 pop {r4, pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000195c: eb001d35 bl 30008e38 <rtems_deviceio_errno> <== NOT EXECUTED 30001960: eafffffb b 30001954 <devFS_write+0x54> <== NOT EXECUTED
3000d5e8 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000d5e8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
3000d5ec: e5903038 ldr r3, [r0, #56] ; 0x38
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000d5f0: e24dd010 sub sp, sp, #16
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
args.buffer = buffer;
3000d5f4: e88d0007 stm sp, {r0, r1, r2}
the_jnode = iop->file_info;
status = rtems_io_control(
3000d5f8: e5931054 ldr r1, [r3, #84] ; 0x54 3000d5fc: e5930050 ldr r0, [r3, #80] ; 0x50 3000d600: e1a0200d mov r2, sp 3000d604: eb000289 bl 3000e030 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000d608: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
3000d60c: 059d000c ldreq r0, [sp, #12]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000d610: 1a000001 bne 3000d61c <device_ioctl+0x34>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
3000d614: e28dd010 add sp, sp, #16
3000d618: e8bd8000 pop {pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000d61c: eb000330 bl 3000e2e4 <rtems_deviceio_errno> <== NOT EXECUTED 3000d620: eafffffb b 3000d614 <device_ioctl+0x2c> <== NOT EXECUTED
3000d684 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000d684: e92d4010 push {r4, lr} <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
3000d688: e280400c add r4, r0, #12 <== NOT EXECUTED
3000d68c: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000d690: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
3000d694: e590c014 ldr ip, [r0, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
3000d698: e98d0018 stmib sp, {r3, r4} <== NOT EXECUTED
args.buffer = buffer; args.count = count;
3000d69c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
3000d6a0: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
3000d6a4: e3a02000 mov r2, #0 <== NOT EXECUTED 3000d6a8: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
3000d6ac: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count; args.flags = iop->flags;
3000d6b0: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
3000d6b4: e58d0000 str r0, [sp] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
3000d6b8: e5931054 ldr r1, [r3, #84] ; 0x54 <== NOT EXECUTED 3000d6bc: e5930050 ldr r0, [r3, #80] ; 0x50 <== NOT EXECUTED 3000d6c0: e1a0200d mov r2, sp <== NOT EXECUTED 3000d6c4: eb000281 bl 3000e0d0 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000d6c8: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
3000d6cc: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000d6d0: 1a000001 bne 3000d6dc <device_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
3000d6d4: e28dd01c add sp, sp, #28 <== NOT EXECUTED
3000d6d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000d6dc: eb000300 bl 3000e2e4 <rtems_deviceio_errno> <== NOT EXECUTED 3000d6e0: eafffffb b 3000d6d4 <device_read+0x50> <== NOT EXECUTED
3000d624 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000d624: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
3000d628: e280400c add r4, r0, #12
3000d62c: e8940018 ldm r4, {r3, r4}
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000d630: e24dd01c sub sp, sp, #28
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
3000d634: e590c014 ldr ip, [r0, #20]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
3000d638: e98d0018 stmib sp, {r3, r4}
args.buffer = (void *) buffer; args.count = count;
3000d63c: e58d2010 str r2, [sp, #16]
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
3000d640: e5903038 ldr r3, [r0, #56] ; 0x38
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
3000d644: e3a02000 mov r2, #0 3000d648: e58d2018 str r2, [sp, #24]
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
3000d64c: e58d100c str r1, [sp, #12]
args.count = count; args.flags = iop->flags;
3000d650: e58dc014 str ip, [sp, #20]
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
3000d654: e58d0000 str r0, [sp]
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
3000d658: e5931054 ldr r1, [r3, #84] ; 0x54 3000d65c: e5930050 ldr r0, [r3, #80] ; 0x50 3000d660: e1a0200d mov r2, sp 3000d664: eb0002ad bl 3000e120 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000d668: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
3000d66c: 059d0018 ldreq r0, [sp, #24]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000d670: 1a000001 bne 3000d67c <device_write+0x58>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
3000d674: e28dd01c add sp, sp, #28
3000d678: e8bd8010 pop {r4, pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000d67c: eb000318 bl 3000e2e4 <rtems_deviceio_errno> <== NOT EXECUTED 3000d680: eafffffb b 3000d674 <device_write+0x50> <== NOT EXECUTED
30003e28 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30003e28: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30003e2c: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30003e30: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30003e34: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30003e38: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003e3c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30003e40: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30003e44: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
30003e48: e5901084 ldr r1, [r0, #132] ; 0x84 <== NOT EXECUTED 30003e4c: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 30003e50: e1510002 cmp r1, r2 <== NOT EXECUTED 30003e54: 0a00000f beq 30003e98 <drainOutput+0x70> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
30003e58: e3a05002 mov r5, #2 <== NOT EXECUTED 30003e5c: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003e60: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
30003e64: e3a01000 mov r1, #0 <== NOT EXECUTED 30003e68: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 30003e6c: e1a02001 mov r2, r1 <== NOT EXECUTED 30003e70: eb000642 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
30003e74: e3500000 cmp r0, #0 <== NOT EXECUTED 30003e78: 1a000008 bne 30003ea0 <drainOutput+0x78> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003e7c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30003e80: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30003e84: e129f002 msr CPSR_fc, r2 <== 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) {
30003e88: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 30003e8c: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 30003e90: e1510002 cmp r1, r2 <== NOT EXECUTED 30003e94: 1afffff0 bne 30003e5c <drainOutput+0x34> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003e98: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
30003e9c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
30003ea0: eb0007d5 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
300027fc <dup2>:
int dup2(
int fildes,
int fildes2
)
{
300027fc: e92d4070 push {r4, r5, r6, lr}
30002800: e24dd048 sub sp, sp, #72 ; 0x48
30002804: e1a05001 mov r5, r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
30002808: e1a0100d mov r1, sp
int dup2(
int fildes,
int fildes2
)
{
3000280c: e1a06000 mov r6, r0
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
30002810: eb0001a7 bl 30002eb4 <fstat>
if ( status == -1 )
30002814: e3700001 cmn r0, #1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
30002818: e1a0400d mov r4, sp
if ( status == -1 )
3000281c: 1a000002 bne 3000282c <dup2+0x30>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
30002820: e3e00000 mvn r0, #0
}
30002824: e28dd048 add sp, sp, #72 ; 0x48
30002828: e8bd8070 pop {r4, r5, r6, pc}
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
3000282c: e1a0100d mov r1, sp 30002830: e1a00005 mov r0, r5 30002834: eb00019e bl 30002eb4 <fstat>
if ( status == -1 )
30002838: e3700001 cmn r0, #1
3000283c: 0afffff7 beq 30002820 <dup2+0x24>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
30002840: e1a00006 mov r0, r6 <== NOT EXECUTED 30002844: e1a02005 mov r2, r5 <== NOT EXECUTED 30002848: e3a01000 mov r1, #0 <== NOT EXECUTED 3000284c: eb000087 bl 30002a70 <fcntl> <== NOT EXECUTED 30002850: eafffff3 b 30002824 <dup2+0x28> <== NOT EXECUTED
3000389c <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
3000389c: e92d4010 push {r4, lr} <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
300038a0: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
300038a4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
300038a8: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
300038ac: e1a04001 mov r4, r1 <== NOT EXECUTED 300038b0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
300038b4: 0a000007 beq 300038d8 <echo+0x3c> <== NOT EXECUTED 300038b8: e59f2060 ldr r2, [pc, #96] ; 30003920 <echo+0x84> <== NOT EXECUTED 300038bc: e2503009 subs r3, r0, #9 <== NOT EXECUTED 300038c0: 13a03001 movne r3, #1 <== NOT EXECUTED 300038c4: e5922000 ldr r2, [r2] <== NOT EXECUTED 300038c8: e0822000 add r2, r2, r0 <== NOT EXECUTED 300038cc: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 300038d0: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 300038d4: 1a000003 bne 300038e8 <echo+0x4c> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
300038d8: e1a01004 mov r1, r4 <== NOT EXECUTED 300038dc: ebffff92 bl 3000372c <oproc> <== NOT EXECUTED
} }
300038e0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
300038e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
300038e8: e350000a cmp r0, #10 <== NOT EXECUTED 300038ec: 0afffff9 beq 300038d8 <echo+0x3c> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
300038f0: e2203040 eor r3, r0, #64 ; 0x40 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
300038f4: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
300038f8: e1a0000d mov r0, sp <== NOT EXECUTED 300038fc: e3a01002 mov r1, #2 <== NOT EXECUTED 30003900: e1a02004 mov r2, r4 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
30003904: e5cd3001 strb r3, [sp, #1] <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
30003908: e5cdc000 strb ip, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
3000390c: ebffff3e bl 3000360c <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
30003910: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003914: e2833002 add r3, r3, #2 <== NOT EXECUTED 30003918: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
3000391c: eaffffef b 300038e0 <echo+0x44> <== NOT EXECUTED
300022f4 <endgrent>:
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
if (group_fp != NULL)
300022f4: e59f300c ldr r3, [pc, #12] ; 30002308 <endgrent+0x14> <== NOT EXECUTED 300022f8: e5930000 ldr r0, [r3] <== NOT EXECUTED 300022fc: e3500000 cmp r0, #0 <== NOT EXECUTED 30002300: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
30002304: ea003318 b 3000ef6c <fclose> <== NOT EXECUTED
3000230c <endpwent>:
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
if (passwd_fp != NULL)
3000230c: e59f300c ldr r3, [pc, #12] ; 30002320 <endpwent+0x14> <== NOT EXECUTED 30002310: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 30002314: e3500000 cmp r0, #0 <== NOT EXECUTED 30002318: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
3000231c: ea003312 b 3000ef6c <fclose> <== NOT EXECUTED
30003924 <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)
30003924: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
* 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)
{
30003928: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
if (tty->ccount == 0)
3000392c: e3530000 cmp r3, #0 <== NOT EXECUTED
* 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)
{
30003930: e1a04000 mov r4, r0 <== NOT EXECUTED 30003934: e1a06001 mov r6, r1 <== NOT EXECUTED
if (tty->ccount == 0)
30003938: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
return;
if (lineFlag) {
3000393c: e3510000 cmp r1, #0 <== NOT EXECUTED 30003940: 0590203c ldreq r2, [r0, #60] ; 0x3c <== NOT EXECUTED 30003944: 1a000025 bne 300039e0 <erase+0xbc> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003948: e59f71d4 ldr r7, [pc, #468] ; 30003b24 <erase+0x200> <== NOT EXECUTED 3000394c: ea000007 b 30003970 <erase+0x4c> <== NOT EXECUTED 30003950: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 30003954: 1a00005a bne 30003ac4 <erase+0x1a0> <== NOT EXECUTED
if (tty->column) tty->column--; } } } if (!lineFlag)
30003958: e3560000 cmp r6, #0 <== NOT EXECUTED
3000395c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
30003960: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30003964: e3530000 cmp r3, #0 <== NOT EXECUTED
30003968: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
3000396c: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED
unsigned char c = tty->cbuf[--tty->ccount];
30003970: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30003974: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 30003978: e5843020 str r3, [r4, #32] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3000397c: e3120008 tst r2, #8 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
30003980: e7d05003 ldrb r5, [r0, r3] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
30003984: 0afffff3 beq 30003958 <erase+0x34> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
30003988: e3560000 cmp r6, #0 <== NOT EXECUTED 3000398c: 1a000001 bne 30003998 <erase+0x74> <== NOT EXECUTED 30003990: e3120010 tst r2, #16 <== NOT EXECUTED 30003994: 0a000046 beq 30003ab4 <erase+0x190> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
30003998: e3550009 cmp r5, #9 <== NOT EXECUTED 3000399c: 0a000020 beq 30003a24 <erase+0x100> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
300039a0: e5973000 ldr r3, [r7] <== NOT EXECUTED 300039a4: e2855001 add r5, r5, #1 <== NOT EXECUTED 300039a8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 300039ac: e3130020 tst r3, #32 <== NOT EXECUTED 300039b0: 1affffe6 bne 30003950 <erase+0x2c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
300039b4: e59f016c ldr r0, [pc, #364] ; 30003b28 <erase+0x204> <== NOT EXECUTED 300039b8: e3a01003 mov r1, #3 <== NOT EXECUTED 300039bc: e1a02004 mov r2, r4 <== NOT EXECUTED 300039c0: ebffff11 bl 3000360c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
300039c4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 300039c8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
300039cc: 12433001 subne r3, r3, #1 <== NOT EXECUTED 300039d0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} } } if (!lineFlag)
300039d4: e3560000 cmp r6, #0 <== NOT EXECUTED
300039d8: 1affffe0 bne 30003960 <erase+0x3c> <== NOT EXECUTED
300039dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
300039e0: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED 300039e4: e2121008 ands r1, r2, #8 <== NOT EXECUTED
tty->ccount = 0;
300039e8: 05801020 streq r1, [r0, #32] <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
300039ec: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
300039f0: e2121010 ands r1, r2, #16 <== NOT EXECUTED 300039f4: 1affffd3 bne 30003948 <erase+0x24> <== NOT EXECUTED
tty->ccount = 0;
300039f8: e5801020 str r1, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
300039fc: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 30003a00: e1a01004 mov r1, r4 <== NOT EXECUTED 30003a04: ebffffa4 bl 3000389c <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
30003a08: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003a0c: e3130020 tst r3, #32 <== NOT EXECUTED
30003a10: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
echo ('\n', tty);
30003a14: e1a01004 mov r1, r4 <== NOT EXECUTED 30003a18: e3a0000a mov r0, #10 <== NOT EXECUTED
} } if (!lineFlag) break; } }
30003a1c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
30003a20: eaffff9d b 3000389c <echo> <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003a24: e3530000 cmp r3, #0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
int col = tty->read_start_column;
30003a28: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003a2c: 0a000011 beq 30003a78 <erase+0x154> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
30003a30: e5978000 ldr r8, [r7] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
30003a34: e202ac02 and sl, r2, #512 ; 0x200 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
30003a38: e3a02000 mov r2, #0 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
30003a3c: e7d01002 ldrb r1, [r0, r2] <== NOT EXECUTED 30003a40: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (c == '\t') {
30003a44: e3510009 cmp r1, #9 <== NOT EXECUTED
col = (col | 7) + 1;
30003a48: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
}
else if (iscntrl (c)) {
30003a4c: e088c001 add ip, r8, r1 <== NOT EXECUTED
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
30003a50: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
30003a54: 0a000005 beq 30003a70 <erase+0x14c> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
30003a58: e5dc1001 ldrb r1, [ip, #1] <== NOT EXECUTED 30003a5c: e3110020 tst r1, #32 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
30003a60: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
30003a64: 0a000001 beq 30003a70 <erase+0x14c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
30003a68: e35a0000 cmp sl, #0 <== NOT EXECUTED
col += 2;
30003a6c: 12855002 addne r5, r5, #2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003a70: e1530002 cmp r3, r2 <== NOT EXECUTED 30003a74: 1afffff0 bne 30003a3c <erase+0x118> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003a78: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003a7c: e1550003 cmp r5, r3 <== NOT EXECUTED 30003a80: aaffffb4 bge 30003958 <erase+0x34> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
30003a84: e59f00a0 ldr r0, [pc, #160] ; 30003b2c <erase+0x208> <== NOT EXECUTED 30003a88: e3a01001 mov r1, #1 <== NOT EXECUTED 30003a8c: e1a02004 mov r2, r4 <== NOT EXECUTED 30003a90: ebfffedd bl 3000360c <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
30003a94: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003a98: e2433001 sub r3, r3, #1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003a9c: e1550003 cmp r5, r3 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
30003aa0: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003aa4: bafffff6 blt 30003a84 <erase+0x160> <== NOT EXECUTED
if (tty->column) tty->column--; } } } if (!lineFlag)
30003aa8: e3560000 cmp r6, #0 <== NOT EXECUTED
30003aac: 1affffab bne 30003960 <erase+0x3c> <== NOT EXECUTED
30003ab0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== 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);
30003ab4: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 30003ab8: e1a01004 mov r1, r4 <== NOT EXECUTED
} } if (!lineFlag) break; } }
30003abc: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, 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);
30003ac0: eaffff75 b 3000389c <echo> <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
30003ac4: e59f005c ldr r0, [pc, #92] ; 30003b28 <erase+0x204> <== NOT EXECUTED 30003ac8: e3a01003 mov r1, #3 <== NOT EXECUTED 30003acc: e1a02004 mov r2, r4 <== NOT EXECUTED 30003ad0: ebfffecd bl 3000360c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003ad4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003ad8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003adc: 12433001 subne r3, r3, #1 <== NOT EXECUTED 30003ae0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
30003ae4: e5973000 ldr r3, [r7] <== NOT EXECUTED 30003ae8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 30003aec: e3130020 tst r3, #32 <== NOT EXECUTED 30003af0: 0affffaf beq 300039b4 <erase+0x90> <== NOT EXECUTED 30003af4: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 30003af8: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 30003afc: 0affff95 beq 30003958 <erase+0x34> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003b00: e59f0020 ldr r0, [pc, #32] ; 30003b28 <erase+0x204> <== NOT EXECUTED 30003b04: e3a01003 mov r1, #3 <== NOT EXECUTED 30003b08: e1a02004 mov r2, r4 <== NOT EXECUTED 30003b0c: ebfffebe bl 3000360c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003b10: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003b14: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003b18: 12433001 subne r3, r3, #1 <== NOT EXECUTED 30003b1c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003b20: eaffffab b 300039d4 <erase+0xb0> <== NOT EXECUTED
30002a70 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
30002a70: e92d000e push {r1, r2, r3}
30002a74: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002a78: e59f31c8 ldr r3, [pc, #456] ; 30002c48 <fcntl+0x1d8>
int fcntl(
int fd,
int cmd,
...
)
{
30002a7c: e24dd004 sub sp, sp, #4
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002a80: e5932000 ldr r2, [r3]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002a84: e28d3028 add r3, sp, #40 ; 0x28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002a88: e1500002 cmp r0, r2
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002a8c: e58d3000 str r3, [sp]
int fcntl(
int fd,
int cmd,
...
)
{
30002a90: e59d4024 ldr r4, [sp, #36] ; 0x24
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002a94: 2a00005f bcs 30002c18 <fcntl+0x1a8>
iop = rtems_libio_iop( fd );
30002a98: e59f61ac ldr r6, [pc, #428] ; 30002c4c <fcntl+0x1dc> 30002a9c: e5967000 ldr r7, [r6] 30002aa0: e0875300 add r5, r7, r0, lsl #6
rtems_libio_check_is_open(iop);
30002aa4: e595c014 ldr ip, [r5, #20] 30002aa8: e31c0c01 tst ip, #256 ; 0x100
30002aac: 0a000059 beq 30002c18 <fcntl+0x1a8>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
30002ab0: e3540009 cmp r4, #9 30002ab4: 979ff104 ldrls pc, [pc, r4, lsl #2] 30002ab8: ea00002a b 30002b68 <fcntl+0xf8> 30002abc: 30002b7c .word 0x30002b7c 30002ac0: 30002bdc .word 0x30002bdc 30002ac4: 30002be8 .word 0x30002be8 30002ac8: 30002c08 .word 0x30002c08 30002acc: 30002b08 .word 0x30002b08 30002ad0: 30002ae4 .word 0x30002ae4 30002ad4: 30002ae4 .word 0x30002ae4 30002ad8: 30002ae4 .word 0x30002ae4 30002adc: 30002ae4 .word 0x30002ae4 30002ae0: 30002ae4 .word 0x30002ae4
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
30002ae4: eb003298 bl 3000f54c <__errno> 30002ae8: e3a03086 mov r3, #134 ; 0x86 30002aec: e5803000 str r3, [r0] 30002af0: e3e07000 mvn r7, #0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
30002af4: e1a00007 mov r0, r7
30002af8: e28dd004 add sp, sp, #4
30002afc: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
30002b00: e28dd00c add sp, sp, #12
30002b04: e12fff1e bx lr
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
30002b08: e5930000 ldr r0, [r3] 30002b0c: eb000233 bl 300033e0 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
30002b10: e5953014 ldr r3, [r5, #20] 30002b14: e59f2134 ldr r2, [pc, #308] ; 30002c50 <fcntl+0x1e0> 30002b18: e3c33c02 bic r3, r3, #512 ; 0x200 30002b1c: e0002002 and r2, r0, r2 30002b20: e3c33001 bic r3, r3, #1 30002b24: e1823003 orr r3, r2, r3 30002b28: e5853014 str r3, [r5, #20] 30002b2c: e3a07000 mov r7, #0
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
30002b30: e595303c ldr r3, [r5, #60] ; 0x3c 30002b34: e5933030 ldr r3, [r3, #48] ; 0x30 30002b38: e3530000 cmp r3, #0
30002b3c: 0affffec beq 30002af4 <fcntl+0x84>
int err = (*iop->handlers->fcntl_h)( cmd, iop );
30002b40: e1a00004 mov r0, r4 30002b44: e1a01005 mov r1, r5 30002b48: e1a0e00f mov lr, pc 30002b4c: e12fff13 bx r3
if (err) {
30002b50: e2504000 subs r4, r0, #0
30002b54: 0affffe6 beq 30002af4 <fcntl+0x84>
errno = err;
30002b58: eb00327b bl 3000f54c <__errno> <== NOT EXECUTED 30002b5c: e5804000 str r4, [r0] <== NOT EXECUTED 30002b60: e3e07000 mvn r7, #0 <== NOT EXECUTED 30002b64: eaffffe2 b 30002af4 <fcntl+0x84> <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
30002b68: eb003277 bl 3000f54c <__errno> 30002b6c: e3a03016 mov r3, #22 30002b70: e5803000 str r3, [r0] 30002b74: e3e07000 mvn r7, #0 30002b78: eaffffdd b 30002af4 <fcntl+0x84>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
30002b7c: e5938000 ldr r8, [r3]
if ( fd2 )
30002b80: e3580000 cmp r8, #0
30002b84: 0a000028 beq 30002c2c <fcntl+0x1bc>
diop = rtems_libio_iop( fd2 );
30002b88: e1520008 cmp r2, r8 <== NOT EXECUTED 30002b8c: 93a09000 movls r9, #0 <== NOT EXECUTED 30002b90: 80878308 addhi r8, r7, r8, lsl #6 <== NOT EXECUTED 30002b94: 91a08009 movls r8, r9 <== NOT EXECUTED 30002b98: 81a09008 movhi r9, r8 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002b9c: e288a018 add sl, r8, #24
30002ba0: e2856018 add r6, r5, #24
30002ba4: e8b6000f ldm r6!, {r0, r1, r2, r3}
30002ba8: e8aa000f stmia sl!, {r0, r1, r2, r3}
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
30002bac: e595203c ldr r2, [r5, #60] ; 0x3c
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002bb0: e5961000 ldr r1, [r6]
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
30002bb4: e5953038 ldr r3, [r5, #56] ; 0x38
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
30002bb8: e0677009 rsb r7, r7, r9
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002bbc: e58a1000 str r1, [sl]
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
30002bc0: e588203c str r2, [r8, #60] ; 0x3c
diop->file_info = iop->file_info;
30002bc4: e5883038 str r3, [r8, #56] ; 0x38
diop->flags = iop->flags;
30002bc8: e588c014 str ip, [r8, #20]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
30002bcc: e1a07347 asr r7, r7, #6
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
30002bd0: e3570000 cmp r7, #0
30002bd4: aaffffd5 bge 30002b30 <fcntl+0xc0>
30002bd8: eaffffc5 b 30002af4 <fcntl+0x84> <== NOT EXECUTED
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
30002bdc: e1a0c5ac lsr ip, ip, #11 30002be0: e20c7001 and r7, ip, #1 30002be4: eaffffd1 b 30002b30 <fcntl+0xc0>
* 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 ) )
30002be8: e5937000 ldr r7, [r3] 30002bec: e3570000 cmp r7, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
30002bf0: 138ccb02 orrne ip, ip, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002bf4: 03cccb02 biceq ip, ip, #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;
30002bf8: 1585c014 strne ip, [r5, #20] 30002bfc: 13a07000 movne r7, #0
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002c00: 0585c014 streq ip, [r5, #20] 30002c04: eaffffc9 b 30002b30 <fcntl+0xc0>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
30002c08: e1a0000c mov r0, ip 30002c0c: eb000153 bl 30003160 <rtems_libio_to_fcntl_flags> 30002c10: e1a07000 mov r7, r0 30002c14: eaffffed b 30002bd0 <fcntl+0x160>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
30002c18: eb00324b bl 3000f54c <__errno> <== NOT EXECUTED 30002c1c: e3a03009 mov r3, #9 <== NOT EXECUTED 30002c20: e5803000 str r3, [r0] <== NOT EXECUTED 30002c24: e3e07000 mvn r7, #0 <== NOT EXECUTED 30002c28: eaffffb1 b 30002af4 <fcntl+0x84> <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
30002c2c: eb0001bd bl 30003328 <rtems_libio_allocate>
if ( diop == 0 ) {
30002c30: e2508000 subs r8, r0, #0
30002c34: 0affffc9 beq 30002b60 <fcntl+0xf0>
30002c38: e5967000 ldr r7, [r6] 30002c3c: e595c014 ldr ip, [r5, #20] 30002c40: e1a09008 mov r9, r8 30002c44: eaffffd4 b 30002b9c <fcntl+0x12c>
30009650 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
30009650: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
30009654: e59f53b0 ldr r5, [pc, #944] ; 30009a0c <fifo_open+0x3bc>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
30009658: e1a07001 mov r7, r1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
3000965c: e3a01000 mov r1, #0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
30009660: e24dd008 sub sp, sp, #8 30009664: e1a04000 mov r4, r0
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
30009668: e1a02001 mov r2, r1 3000966c: e5950000 ldr r0, [r5] 30009670: ebfff042 bl 30005780 <rtems_semaphore_obtain> 30009674: e2509000 subs r9, r0, #0 30009678: 13e08003 mvnne r8, #3
3000967c: 1a00001c bne 300096f4 <fifo_open+0xa4>
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
30009680: e5946000 ldr r6, [r4] <== NOT EXECUTED
if (pipe == NULL) {
30009684: e3560000 cmp r6, #0 <== NOT EXECUTED 30009688: 0a00001c beq 30009700 <fifo_open+0xb0> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000968c: e3a01000 mov r1, #0 <== NOT EXECUTED 30009690: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED 30009694: e1a02001 mov r2, r1 <== NOT EXECUTED 30009698: ebfff038 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
3000969c: e5943000 ldr r3, [r4] <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
300096a0: e3500000 cmp r0, #0 <== NOT EXECUTED 300096a4: 01a08000 moveq r8, r0 <== NOT EXECUTED 300096a8: 13e08003 mvnne r8, #3 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
300096ac: e3530000 cmp r3, #0 <== NOT EXECUTED 300096b0: 0a0000a8 beq 30009958 <fifo_open+0x308> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
300096b4: e5950000 ldr r0, [r5] <== NOT EXECUTED 300096b8: ebfff078 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
300096bc: e3580000 cmp r8, #0 <== NOT EXECUTED 300096c0: 1a00000b bne 300096f4 <fifo_open+0xa4> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
300096c4: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
300096c8: e5945000 ldr r5, [r4] <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
300096cc: e2033006 and r3, r3, #6 <== NOT EXECUTED 300096d0: e3530004 cmp r3, #4 <== NOT EXECUTED 300096d4: 0a00007f beq 300098d8 <fifo_open+0x288> <== NOT EXECUTED 300096d8: e3530006 cmp r3, #6 <== NOT EXECUTED 300096dc: 0a000069 beq 30009888 <fifo_open+0x238> <== NOT EXECUTED 300096e0: e3530002 cmp r3, #2 <== NOT EXECUTED 300096e4: 0a000043 beq 300097f8 <fifo_open+0x1a8> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
300096e8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 300096ec: ebfff06b bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 300096f0: e3a08000 mov r8, #0 <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
300096f4: e1a00008 mov r0, r8
300096f8: e28dd008 add sp, sp, #8
300096fc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
30009700: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED 30009704: ebffe34d bl 30002440 <malloc> <== NOT EXECUTED
if (pipe == NULL)
30009708: e3500000 cmp r0, #0 <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000970c: e1a06000 mov r6, r0 <== NOT EXECUTED 30009710: e1a0a000 mov sl, r0 <== NOT EXECUTED
if (pipe == NULL)
30009714: 0a0000ba beq 30009a04 <fifo_open+0x3b4> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
30009718: e1a02000 mov r2, r0 <== NOT EXECUTED 3000971c: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009720: e2822004 add r2, r2, #4 <== NOT EXECUTED 30009724: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009728: e4829004 str r9, [r2], #4 <== NOT EXECUTED 3000972c: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009730: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009734: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009738: e4829004 str r9, [r2], #4 <== NOT EXECUTED 3000973c: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009740: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009744: e4829004 str r9, [r2], #4 <== NOT EXECUTED 30009748: e4829004 str r9, [r2], #4 <== NOT EXECUTED
pipe->Size = PIPE_BUF;
3000974c: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
30009750: e5829000 str r9, [r2] <== NOT EXECUTED
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
30009754: e1a00003 mov r0, r3 <== NOT EXECUTED
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
30009758: e5863004 str r3, [r6, #4] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
3000975c: ebffe337 bl 30002440 <malloc> <== NOT EXECUTED
if (! pipe->Buffer)
30009760: e3500000 cmp r0, #0 <== NOT EXECUTED
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
30009764: e5860000 str r0, [r6] <== NOT EXECUTED
if (! pipe->Buffer)
30009768: 0a0000a3 beq 300099fc <fifo_open+0x3ac> <== NOT EXECUTED
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000976c: e59f829c ldr r8, [pc, #668] ; 30009a10 <fifo_open+0x3c0> <== NOT EXECUTED 30009770: e59f029c ldr r0, [pc, #668] ; 30009a14 <fifo_open+0x3c4> <== NOT EXECUTED 30009774: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 30009778: e1a01009 mov r1, r9 <== NOT EXECUTED 3000977c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30009780: e1a02009 mov r2, r9 <== NOT EXECUTED 30009784: e286302c add r3, r6, #44 ; 0x2c <== NOT EXECUTED 30009788: eb00068f bl 3000b1cc <rtems_barrier_create> <== NOT EXECUTED 3000978c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 30009790: 1a000097 bne 300099f4 <fifo_open+0x3a4> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
30009794: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 30009798: e59f0278 ldr r0, [pc, #632] ; 30009a18 <fifo_open+0x3c8> <== NOT EXECUTED 3000979c: e1a02001 mov r2, r1 <== NOT EXECUTED 300097a0: e1830000 orr r0, r3, r0 <== NOT EXECUTED 300097a4: e2863030 add r3, r6, #48 ; 0x30 <== NOT EXECUTED 300097a8: eb000687 bl 3000b1cc <rtems_barrier_create> <== NOT EXECUTED 300097ac: e2503000 subs r3, r0, #0 <== NOT EXECUTED 300097b0: 1a00008d bne 300099ec <fifo_open+0x39c> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
300097b4: e5d82000 ldrb r2, [r8] <== NOT EXECUTED 300097b8: e59f025c ldr r0, [pc, #604] ; 30009a1c <fifo_open+0x3cc> <== NOT EXECUTED 300097bc: e286c028 add ip, r6, #40 ; 0x28 <== NOT EXECUTED 300097c0: e1820000 orr r0, r2, r0 <== NOT EXECUTED 300097c4: e3a01001 mov r1, #1 <== NOT EXECUTED 300097c8: e3a02010 mov r2, #16 <== NOT EXECUTED 300097cc: e58dc000 str ip, [sp] <== NOT EXECUTED 300097d0: ebffef4f bl 30005514 <rtems_semaphore_create> <== NOT EXECUTED 300097d4: e3500000 cmp r0, #0 <== NOT EXECUTED 300097d8: 1a000081 bne 300099e4 <fifo_open+0x394> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
300097dc: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 300097e0: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED 300097e4: e2833001 add r3, r3, #1 <== NOT EXECUTED 300097e8: e5c83000 strb r3, [r8] <== NOT EXECUTED
c = 'a';
300097ec: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED 300097f0: 05c83000 strbeq r3, [r8] <== NOT EXECUTED 300097f4: eaffffa4 b 3000968c <fifo_open+0x3c> <== NOT EXECUTED
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
300097f8: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
300097fc: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
30009800: e3530000 cmp r3, #0 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
30009804: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
30009808: e2833001 add r3, r3, #1 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000980c: e5852020 str r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
30009810: e5853010 str r3, [r5, #16] <== NOT EXECUTED 30009814: 0a00006a beq 300099c4 <fifo_open+0x374> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
30009818: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 3000981c: e3530000 cmp r3, #0 <== NOT EXECUTED 30009820: 1affffb0 bne 300096e8 <fifo_open+0x98> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
30009824: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 30009828: e3130001 tst r3, #1 <== NOT EXECUTED 3000982c: 1affffad bne 300096e8 <fifo_open+0x98> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
30009830: e5956024 ldr r6, [r5, #36] ; 0x24 <== NOT EXECUTED 30009834: ea000006 b 30009854 <fifo_open+0x204> <== NOT EXECUTED
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
30009838: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 3000983c: ebffefcf bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED 30009840: e3500000 cmp r0, #0 <== NOT EXECUTED 30009844: 1a00000a bne 30009874 <fifo_open+0x224> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
30009848: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED 3000984c: e1530006 cmp r3, r6 <== NOT EXECUTED 30009850: 1affffa4 bne 300096e8 <fifo_open+0x98> <== NOT EXECUTED
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
30009854: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 30009858: ebfff010 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
3000985c: e3a01000 mov r1, #0 <== NOT EXECUTED 30009860: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 30009864: eb0006ce bl 3000b3a4 <rtems_barrier_wait> <== NOT EXECUTED 30009868: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
3000986c: e1a02001 mov r2, r1 <== NOT EXECUTED
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
30009870: 0afffff0 beq 30009838 <fifo_open+0x1e8> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
30009874: e3e08003 mvn r8, #3 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
30009878: e1a00004 mov r0, r4 <== NOT EXECUTED 3000987c: e1a01007 mov r1, r7 <== NOT EXECUTED 30009880: ebffff2c bl 30009538 <pipe_release> <== NOT EXECUTED
return err;
30009884: eaffff9a b 300096f4 <fifo_open+0xa4> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
30009888: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000988c: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
30009890: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
30009894: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
30009898: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000989c: e5852020 str r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
300098a0: e5853010 str r3, [r5, #16] <== NOT EXECUTED 300098a4: 0a00003e beq 300099a4 <fifo_open+0x354> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
300098a8: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
300098ac: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
300098b0: e3530000 cmp r3, #0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
300098b4: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
300098b8: e2833001 add r3, r3, #1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
300098bc: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
300098c0: e5853014 str r3, [r5, #20] <== NOT EXECUTED 300098c4: 1affff87 bne 300096e8 <fifo_open+0x98> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
300098c8: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 300098cc: e28d1004 add r1, sp, #4 <== NOT EXECUTED 300098d0: eb00069a bl 3000b340 <rtems_barrier_release> <== NOT EXECUTED 300098d4: eaffff83 b 300096e8 <fifo_open+0x98> <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
300098d8: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
300098dc: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
300098e0: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
300098e4: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
300098e8: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
300098ec: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
300098f0: e5853014 str r3, [r5, #20] <== NOT EXECUTED 300098f4: 0a00002e beq 300099b4 <fifo_open+0x364> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
300098f8: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 300098fc: e3530000 cmp r3, #0 <== NOT EXECUTED 30009900: 1affff78 bne 300096e8 <fifo_open+0x98> <== NOT EXECUTED 30009904: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 30009908: e3130001 tst r3, #1 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
3000990c: 05956020 ldreq r6, [r5, #32] <== NOT EXECUTED
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
30009910: 0a000007 beq 30009934 <fifo_open+0x2e4> <== NOT EXECUTED 30009914: ea00002e b 300099d4 <fifo_open+0x384> <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
30009918: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 3000991c: ebffef97 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED 30009920: e3500000 cmp r0, #0 <== NOT EXECUTED 30009924: 1affffd2 bne 30009874 <fifo_open+0x224> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
30009928: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 3000992c: e1530006 cmp r3, r6 <== NOT EXECUTED 30009930: 1affff6c bne 300096e8 <fifo_open+0x98> <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
30009934: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 30009938: ebffefd8 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
3000993c: e3a01000 mov r1, #0 <== NOT EXECUTED 30009940: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 30009944: eb000696 bl 3000b3a4 <rtems_barrier_wait> <== NOT EXECUTED 30009948: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
3000994c: e1a02001 mov r2, r1 <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
30009950: 0afffff0 beq 30009918 <fifo_open+0x2c8> <== NOT EXECUTED 30009954: eaffffc6 b 30009874 <fifo_open+0x224> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
30009958: e3580000 cmp r8, #0 <== NOT EXECUTED 3000995c: 1a000003 bne 30009970 <fifo_open+0x320> <== NOT EXECUTED
pipe_free(pipe);
else
*pipep = pipe;
30009960: e5846000 str r6, [r4] <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
30009964: e5950000 ldr r0, [r5] <== NOT EXECUTED 30009968: ebffefcc bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 3000996c: eaffff54 b 300096c4 <fifo_open+0x74> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
30009970: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED 30009974: eb000645 bl 3000b290 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
30009978: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED 3000997c: eb000643 bl 3000b290 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
30009980: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED 30009984: ebffef54 bl 300056dc <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
30009988: e5960000 ldr r0, [r6] <== NOT EXECUTED 3000998c: ebffe1d3 bl 300020e0 <free> <== NOT EXECUTED
free(pipe);
30009990: e1a00006 mov r0, r6 <== NOT EXECUTED 30009994: ebffe1d1 bl 300020e0 <free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
30009998: e5950000 ldr r0, [r5] <== NOT EXECUTED 3000999c: ebffefbf bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 300099a0: eaffff53 b 300096f4 <fifo_open+0xa4> <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
300099a4: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 300099a8: e28d1004 add r1, sp, #4 <== NOT EXECUTED 300099ac: eb000663 bl 3000b340 <rtems_barrier_release> <== NOT EXECUTED 300099b0: eaffffbc b 300098a8 <fifo_open+0x258> <== NOT EXECUTED
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
300099b4: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 300099b8: e28d1004 add r1, sp, #4 <== NOT EXECUTED 300099bc: eb00065f bl 3000b340 <rtems_barrier_release> <== NOT EXECUTED 300099c0: eaffffcc b 300098f8 <fifo_open+0x2a8> <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
300099c4: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 300099c8: e28d1004 add r1, sp, #4 <== NOT EXECUTED 300099cc: eb00065b bl 3000b340 <rtems_barrier_release> <== NOT EXECUTED 300099d0: eaffff90 b 30009818 <fifo_open+0x1c8> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
300099d4: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 300099d8: ebffefb0 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 300099dc: e3e08005 mvn r8, #5 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
300099e0: eaffffa4 b 30009878 <fifo_open+0x228> <== NOT EXECUTED
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
300099e4: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED 300099e8: eb000628 bl 3000b290 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
300099ec: e59a002c ldr r0, [sl, #44] ; 0x2c <== NOT EXECUTED 300099f0: eb000626 bl 3000b290 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
300099f4: e59a0000 ldr r0, [sl] <== NOT EXECUTED 300099f8: ebffe1b8 bl 300020e0 <free> <== NOT EXECUTED
err_buf: free(pipe);
300099fc: e1a0000a mov r0, sl <== NOT EXECUTED 30009a00: ebffe1b6 bl 300020e0 <free> <== NOT EXECUTED 30009a04: e3e0800b mvn r8, #11 <== NOT EXECUTED 30009a08: eaffffe2 b 30009998 <fifo_open+0x348> <== NOT EXECUTED
30002cf8 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002cf8: e59f3108 ldr r3, [pc, #264] ; 30002e08 <fpathconf+0x110>
long fpathconf(
int fd,
int name
)
{
30002cfc: 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);
30002d00: e5933000 ldr r3, [r3] 30002d04: e1500003 cmp r0, r3
30002d08: 2a000034 bcs 30002de0 <fpathconf+0xe8> iop = rtems_libio_iop(fd);
30002d0c: e59f30f8 ldr r3, [pc, #248] ; 30002e0c <fpathconf+0x114> 30002d10: e5933000 ldr r3, [r3] 30002d14: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
30002d18: e5903014 ldr r3, [r0, #20] 30002d1c: e3130c01 tst r3, #256 ; 0x100
30002d20: 0a00002e beq 30002de0 <fpathconf+0xe8> rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002d24: e3130002 tst r3, #2
30002d28: 0a000031 beq 30002df4 <fpathconf+0xfc>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
30002d2c: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
30002d30: e351000b cmp r1, #11 30002d34: 979ff101 ldrls pc, [pc, r1, lsl #2] 30002d38: ea00000d b 30002d74 <fpathconf+0x7c> 30002d3c: 30002d88 .word 0x30002d88 30002d40: 30002d90 .word 0x30002d90 30002d44: 30002d98 .word 0x30002d98 30002d48: 30002da0 .word 0x30002da0 30002d4c: 30002da8 .word 0x30002da8 30002d50: 30002db0 .word 0x30002db0 30002d54: 30002db8 .word 0x30002db8 30002d58: 30002dc0 .word 0x30002dc0 30002d5c: 30002dc8 .word 0x30002dc8 30002d60: 30002dd0 .word 0x30002dd0 30002d64: 30002dd8 .word 0x30002dd8 30002d68: 30002d6c .word 0x30002d6c
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
30002d6c: e5930060 ldr r0, [r3, #96] ; 0x60
break;
30002d70: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
30002d74: eb0031f4 bl 3000f54c <__errno> 30002d78: e3a03016 mov r3, #22 30002d7c: e5803000 str r3, [r0] 30002d80: e3e00000 mvn r0, #0
break;
}
return return_value;
}
30002d84: e49df004 pop {pc} ; (ldr pc, [sp], #4)
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
30002d88: e5930038 ldr r0, [r3, #56] ; 0x38
break;
30002d8c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
30002d90: e593003c ldr r0, [r3, #60] ; 0x3c
break;
30002d94: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
30002d98: e5930040 ldr r0, [r3, #64] ; 0x40
break;
30002d9c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
30002da0: e5930044 ldr r0, [r3, #68] ; 0x44
break;
30002da4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
30002da8: e5930048 ldr r0, [r3, #72] ; 0x48
break;
30002dac: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
30002db0: e593004c ldr r0, [r3, #76] ; 0x4c
break;
30002db4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
30002db8: e5930054 ldr r0, [r3, #84] ; 0x54
break;
30002dbc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
30002dc0: e5930058 ldr r0, [r3, #88] ; 0x58
break;
30002dc4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
30002dc8: e5930064 ldr r0, [r3, #100] ; 0x64
break;
30002dcc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
30002dd0: e5930050 ldr r0, [r3, #80] ; 0x50
break;
30002dd4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
30002dd8: e593005c ldr r0, [r3, #92] ; 0x5c
break;
30002ddc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
30002de0: eb0031d9 bl 3000f54c <__errno>
30002de4: e3a03009 mov r3, #9
30002de8: e5803000 str r3, [r0]
30002dec: e3e00000 mvn r0, #0
30002df0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002df4: eb0031d4 bl 3000f54c <__errno> <== NOT EXECUTED
30002df8: e3a03016 mov r3, #22 <== NOT EXECUTED
30002dfc: e5803000 str r3, [r0] <== NOT EXECUTED
30002e00: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002e04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
300020e0 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
300020e0: e59f3088 ldr r3, [pc, #136] ; 30002170 <free+0x90>
300020e4: e92d4030 push {r4, r5, lr}
300020e8: e593200c ldr r2, [r3, #12]
if ( !ptr )
300020ec: e2504000 subs r4, r0, #0
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
300020f0: e2822001 add r2, r2, #1 300020f4: e583200c str r2, [r3, #12]
if ( !ptr )
300020f8: 08bd8030 popeq {r4, r5, pc}
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
300020fc: e59f3070 ldr r3, [pc, #112] ; 30002174 <free+0x94> 30002100: e5933000 ldr r3, [r3] 30002104: e3530003 cmp r3, #3
30002108: 0a000012 beq 30002158 <free+0x78>
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
3000210c: e59f3064 ldr r3, [pc, #100] ; 30002178 <free+0x98> 30002110: e5933000 ldr r3, [r3] 30002114: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
30002118: 11a00004 movne r0, r4 3000211c: 11a0e00f movne lr, pc 30002120: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
30002124: e59f5050 ldr r5, [pc, #80] ; 3000217c <free+0x9c>
30002128: e1a01004 mov r1, r4
3000212c: e5950000 ldr r0, [r5]
30002130: eb00143b bl 30007224 <_Protected_heap_Free>
30002134: e3500000 cmp r0, #0
30002138: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
3000213c: e5952000 ldr r2, [r5] <== NOT EXECUTED
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
30002140: e59f0038 ldr r0, [pc, #56] ; 30002180 <free+0xa0> <== NOT EXECUTED 30002144: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30002148: e5922018 ldr r2, [r2, #24] <== NOT EXECUTED 3000214c: e1a01004 mov r1, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
30002150: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
30002154: ea00038b b 30002f88 <printk> <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
30002158: eb00005c bl 300022d0 <malloc_is_system_state_OK> 3000215c: e3500000 cmp r0, #0
30002160: 1affffe9 bne 3000210c <free+0x2c>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
30002164: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
30002168: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
3000216c: ea00006a b 3000231c <malloc_deferred_free> <== NOT EXECUTED
30003670 <free_user_env>:
static void
free_user_env(void *venv)
{
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
30003670: e59f3058 ldr r3, [pc, #88] ; 300036d0 <free_user_env+0x60> <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
30003674: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
30003678: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
3000367c: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
30003680: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
30003684: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 30003688: e3530000 cmp r3, #0 <== NOT EXECUTED 3000368c: 0a000004 beq 300036a4 <free_user_env+0x34> <== NOT EXECUTED 30003690: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30003694: e3530000 cmp r3, #0 <== NOT EXECUTED 30003698: 12800004 addne r0, r0, #4 <== NOT EXECUTED 3000369c: 11a0e00f movne lr, pc <== NOT EXECUTED 300036a0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
300036a4: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 300036a8: e3530000 cmp r3, #0 <== NOT EXECUTED 300036ac: 0a000004 beq 300036c4 <free_user_env+0x54> <== NOT EXECUTED 300036b0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 300036b4: e3530000 cmp r3, #0 <== NOT EXECUTED 300036b8: 12840018 addne r0, r4, #24 <== NOT EXECUTED 300036bc: 11a0e00f movne lr, pc <== NOT EXECUTED 300036c0: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
300036c4: e1a00004 mov r0, r4 <== NOT EXECUTED
} }
300036c8: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
300036cc: eafffb84 b 300024e4 <free> <== NOT EXECUTED
30019a84 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
30019a84: e92d4030 push {r4, r5, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
30019a88: e2515000 subs r5, r1, #0
30019a8c: 0a000023 beq 30019b20 <fstat+0x9c>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
30019a90: e59f309c ldr r3, [pc, #156] ; 30019b34 <fstat+0xb0> 30019a94: e5933000 ldr r3, [r3] 30019a98: e1500003 cmp r0, r3
30019a9c: 2a000015 bcs 30019af8 <fstat+0x74>
30019aa0: e59f3090 ldr r3, [pc, #144] ; 30019b38 <fstat+0xb4> 30019aa4: e5934000 ldr r4, [r3] 30019aa8: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
30019aac: e5943014 ldr r3, [r4, #20] 30019ab0: e3130c01 tst r3, #256 ; 0x100
30019ab4: 0a00000f beq 30019af8 <fstat+0x74>
if ( !iop->handlers )
30019ab8: e594303c ldr r3, [r4, #60] ; 0x3c 30019abc: e3530000 cmp r3, #0
30019ac0: 0a00000c beq 30019af8 <fstat+0x74>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
30019ac4: e5933018 ldr r3, [r3, #24] 30019ac8: e3530000 cmp r3, #0
30019acc: 0a00000e beq 30019b0c <fstat+0x88>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
30019ad0: e3a01000 mov r1, #0 30019ad4: e3a02048 mov r2, #72 ; 0x48 30019ad8: e1a00005 mov r0, r5 30019adc: ebffd480 bl 3000ece4 <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
30019ae0: e2840018 add r0, r4, #24 30019ae4: e1a01005 mov r1, r5 30019ae8: e594303c ldr r3, [r4, #60] ; 0x3c 30019aec: e1a0e00f mov lr, pc 30019af0: e593f018 ldr pc, [r3, #24]
}
30019af4: e8bd8030 pop {r4, r5, pc}
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
30019af8: ebffd22f bl 3000e3bc <__errno>
30019afc: e3a03009 mov r3, #9
30019b00: e5803000 str r3, [r0]
30019b04: e3e00000 mvn r0, #0
30019b08: e8bd8030 pop {r4, r5, pc}
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
30019b0c: ebffd22a bl 3000e3bc <__errno> <== NOT EXECUTED
30019b10: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
30019b14: e5803000 str r3, [r0] <== NOT EXECUTED
30019b18: e3e00000 mvn r0, #0 <== NOT EXECUTED
30019b1c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
30019b20: ebffd225 bl 3000e3bc <__errno>
30019b24: e3a0300e mov r3, #14
30019b28: e5803000 str r3, [r0]
30019b2c: e3e00000 mvn r0, #0
30019b30: e8bd8030 pop {r4, r5, pc}
30002f78 <fsync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30002f78: e59f308c ldr r3, [pc, #140] ; 3000300c <fsync+0x94>
#include <rtems/seterr.h>
int fsync(
int fd
)
{
30002f7c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30002f80: e5933000 ldr r3, [r3] 30002f84: e1500003 cmp r0, r3
30002f88: 2a000010 bcs 30002fd0 <fsync+0x58> iop = rtems_libio_iop( fd );
30002f8c: e59f307c ldr r3, [pc, #124] ; 30003010 <fsync+0x98> 30002f90: e5933000 ldr r3, [r3] 30002f94: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
30002f98: e5903014 ldr r3, [r0, #20] 30002f9c: e3130c01 tst r3, #256 ; 0x100
30002fa0: 0a00000a beq 30002fd0 <fsync+0x58> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30002fa4: e3130004 tst r3, #4
30002fa8: 0a00000d beq 30002fe4 <fsync+0x6c>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
30002fac: e590303c ldr r3, [r0, #60] ; 0x3c 30002fb0: e3530000 cmp r3, #0
30002fb4: 0a000005 beq 30002fd0 <fsync+0x58>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
30002fb8: e5933028 ldr r3, [r3, #40] ; 0x28 30002fbc: e3530000 cmp r3, #0
30002fc0: 0a00000c beq 30002ff8 <fsync+0x80>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
30002fc4: e1a0e00f mov lr, pc 30002fc8: e12fff13 bx r3
}
30002fcc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
30002fd0: eb00315d bl 3000f54c <__errno> <== NOT EXECUTED
30002fd4: e3a03009 mov r3, #9 <== NOT EXECUTED
30002fd8: e5803000 str r3, [r0] <== NOT EXECUTED
30002fdc: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002fe0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30002fe4: eb003158 bl 3000f54c <__errno>
30002fe8: e3a03016 mov r3, #22
30002fec: e5803000 str r3, [r0]
30002ff0: e3e00000 mvn r0, #0
30002ff4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
30002ff8: eb003153 bl 3000f54c <__errno>
30002ffc: e3a03086 mov r3, #134 ; 0x86
30003000: e5803000 str r3, [r0]
30003004: e3e00000 mvn r0, #0
30003008: e49df004 pop {pc} ; (ldr pc, [sp], #4)
3000ab3c <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
3000ab3c: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
3000ab40: e59f30f0 ldr r3, [pc, #240] ; 3000ac38 <ftruncate+0xfc>
int ftruncate(
int fd,
off_t length
)
{
3000ab44: e24dd014 sub sp, sp, #20
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
3000ab48: e5933000 ldr r3, [r3]
int ftruncate(
int fd,
off_t length
)
{
3000ab4c: e1a05001 mov r5, r1
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
3000ab50: e1500003 cmp r0, r3
int ftruncate(
int fd,
off_t length
)
{
3000ab54: e1a06002 mov r6, r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
3000ab58: 2a000022 bcs 3000abe8 <ftruncate+0xac>
iop = rtems_libio_iop( fd );
3000ab5c: e59f30d8 ldr r3, [pc, #216] ; 3000ac3c <ftruncate+0x100> 3000ab60: e5934000 ldr r4, [r3] 3000ab64: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
3000ab68: e5943014 ldr r3, [r4, #20] 3000ab6c: e3130c01 tst r3, #256 ; 0x100
3000ab70: 0a00001c beq 3000abe8 <ftruncate+0xac>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
3000ab74: e284c018 add ip, r4, #24
3000ab78: e1a0700d mov r7, sp
3000ab7c: e8bc000f ldm ip!, {r0, r1, r2, r3}
3000ab80: e8a7000f stmia r7!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
3000ab84: e59d100c ldr r1, [sp, #12]
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
3000ab88: e59c2000 ldr r2, [ip]
if ( !loc.ops->node_type_h )
3000ab8c: e591c010 ldr ip, [r1, #16]
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
3000ab90: e5872000 str r2, [r7]
if ( !loc.ops->node_type_h )
3000ab94: e35c0000 cmp ip, #0
3000ab98: 0a00001c beq 3000ac10 <ftruncate+0xd4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
3000ab9c: e1a0000d mov r0, sp 3000aba0: e1a0e00f mov lr, pc 3000aba4: e12fff1c bx ip 3000aba8: e3500001 cmp r0, #1
3000abac: 0a00001c beq 3000ac24 <ftruncate+0xe8>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
3000abb0: e5943014 ldr r3, [r4, #20] 3000abb4: e3130004 tst r3, #4
3000abb8: 0a00000f beq 3000abfc <ftruncate+0xc0>
if ( !iop->handlers->ftruncate_h )
3000abbc: e594303c ldr r3, [r4, #60] ; 0x3c 3000abc0: e5933020 ldr r3, [r3, #32] 3000abc4: e3530000 cmp r3, #0
3000abc8: 0a000010 beq 3000ac10 <ftruncate+0xd4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
3000abcc: e1a00004 mov r0, r4 3000abd0: e1a01005 mov r1, r5 3000abd4: e1a02006 mov r2, r6 3000abd8: e1a0e00f mov lr, pc 3000abdc: e12fff13 bx r3
}
3000abe0: e28dd014 add sp, sp, #20
3000abe4: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
3000abe8: eb000df3 bl 3000e3bc <__errno> <== NOT EXECUTED 3000abec: e3a03009 mov r3, #9 <== NOT EXECUTED 3000abf0: e5803000 str r3, [r0] <== NOT EXECUTED 3000abf4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000abf8: eafffff8 b 3000abe0 <ftruncate+0xa4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
3000abfc: eb000dee bl 3000e3bc <__errno> <== NOT EXECUTED 3000ac00: e3a03016 mov r3, #22 <== NOT EXECUTED 3000ac04: e5803000 str r3, [r0] <== NOT EXECUTED 3000ac08: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000ac0c: eafffff3 b 3000abe0 <ftruncate+0xa4> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000ac10: eb000de9 bl 3000e3bc <__errno> <== NOT EXECUTED 3000ac14: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000ac18: e5803000 str r3, [r0] <== NOT EXECUTED 3000ac1c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000ac20: eaffffee b 3000abe0 <ftruncate+0xa4> <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
3000ac24: eb000de4 bl 3000e3bc <__errno> 3000ac28: e3a03015 mov r3, #21 3000ac2c: e5803000 str r3, [r0] 3000ac30: e3e00000 mvn r0, #0 3000ac34: eaffffe9 b 3000abe0 <ftruncate+0xa4>
3001bf40 <getdents>:
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
3001bf40: e59f30b4 ldr r3, [pc, #180] ; 3001bffc <getdents+0xbc>
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
3001bf44: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
3001bf48: e5933000 ldr r3, [r3]
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
3001bf4c: e24dd014 sub sp, sp, #20
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
3001bf50: e1500003 cmp r0, r3 3001bf54: 359f30a4 ldrcc r3, [pc, #164] ; 3001c000 <getdents+0xc0> 3001bf58: 23a04000 movcs r4, #0 3001bf5c: 35934000 ldrcc r4, [r3]
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
3001bf60: e1a0700d mov r7, sp
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
3001bf64: 30844300 addcc r4, r4, r0, lsl #6
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
3001bf68: e284c018 add ip, r4, #24
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
3001bf6c: e1a06001 mov r6, r1 3001bf70: e1a05002 mov r5, r2
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
3001bf74: e8bc000f ldm ip!, {r0, r1, r2, r3}
3001bf78: e8a7000f stmia r7!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
3001bf7c: e59d100c ldr r1, [sp, #12]
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
3001bf80: e59c2000 ldr r2, [ip]
if ( !loc.ops->node_type_h )
3001bf84: e591c010 ldr ip, [r1, #16]
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
3001bf88: e5872000 str r2, [r7]
if ( !loc.ops->node_type_h )
3001bf8c: e35c0000 cmp ip, #0
3001bf90: 0a000014 beq 3001bfe8 <getdents+0xa8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
3001bf94: e1a0000d mov r0, sp 3001bf98: e1a0e00f mov lr, pc 3001bf9c: e12fff1c bx ip 3001bfa0: e3500001 cmp r0, #1
3001bfa4: 1a00000a bne 3001bfd4 <getdents+0x94>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
3001bfa8: e594303c ldr r3, [r4, #60] ; 0x3c 3001bfac: e5933008 ldr r3, [r3, #8] 3001bfb0: e3530000 cmp r3, #0
3001bfb4: 0a00000b beq 3001bfe8 <getdents+0xa8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
3001bfb8: e1a00004 mov r0, r4 3001bfbc: e1a01006 mov r1, r6 3001bfc0: e1a02005 mov r2, r5 3001bfc4: e1a0e00f mov lr, pc 3001bfc8: e12fff13 bx r3
}
3001bfcc: e28dd014 add sp, sp, #20
3001bfd0: e8bd80f0 pop {r4, r5, r6, r7, pc}
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
3001bfd4: ebffcea8 bl 3000fa7c <__errno> 3001bfd8: e3a03014 mov r3, #20 3001bfdc: e5803000 str r3, [r0] 3001bfe0: e3e00000 mvn r0, #0 3001bfe4: eafffff8 b 3001bfcc <getdents+0x8c>
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
3001bfe8: ebffcea3 bl 3000fa7c <__errno> <== NOT EXECUTED 3001bfec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001bff0: e5803000 str r3, [r0] <== NOT EXECUTED 3001bff4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3001bff8: eafffff3 b 3001bfcc <getdents+0x8c> <== NOT EXECUTED
30002924 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
30002924: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
30002928: e59d801c ldr r8, [sp, #28]
3000292c: e1a05000 mov r5, r0
30002930: e1a0a001 mov sl, r1
30002934: e1a04002 mov r4, r2
30002938: e1a07003 mov r7, r3
FILE *fp;
int match;
init_etc_passwd_group();
3000293c: ebffffb2 bl 3000280c <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
30002940: e59f00b0 ldr r0, [pc, #176] ; 300029f8 <getgr_r+0xd4> 30002944: e59f10b0 ldr r1, [pc, #176] ; 300029fc <getgr_r+0xd8> 30002948: eb00333f bl 3000f64c <fopen> 3000294c: e2506000 subs r6, r0, #0
30002950: 1a000006 bne 30002970 <getgr_r+0x4c>
30002954: ea000022 b 300029e4 <getgr_r+0xc0> <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
30002958: e5940000 ldr r0, [r4] 3000295c: eb00370f bl 300105a0 <strcmp> 30002960: e2700001 rsbs r0, r0, #1 30002964: 33a00000 movcc r0, #0
}
else {
match = (grp->gr_gid == gid);
}
if (match) {
30002968: e3500000 cmp r0, #0
3000296c: 1a00000f bne 300029b0 <getgr_r+0x8c>
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
30002970: e1a01004 mov r1, r4 30002974: e1a02007 mov r2, r7 30002978: e1a03008 mov r3, r8 3000297c: e1a00006 mov r0, r6 30002980: ebfffee1 bl 3000250c <scangr> 30002984: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
30002988: e1a01005 mov r1, r5
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
3000298c: 0a00000d beq 300029c8 <getgr_r+0xa4>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
30002990: e3550000 cmp r5, #0
30002994: 1affffef bne 30002958 <getgr_r+0x34>
match = (strcmp(grp->gr_name, name) == 0);
}
else {
match = (grp->gr_gid == gid);
30002998: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 3000299c: e150000a cmp r0, sl <== NOT EXECUTED 300029a0: 13a00000 movne r0, #0 <== NOT EXECUTED 300029a4: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
300029a8: e3500000 cmp r0, #0 <== NOT EXECUTED 300029ac: 0affffef beq 30002970 <getgr_r+0x4c> <== NOT EXECUTED
fclose(fp);
300029b0: e1a00006 mov r0, r6 300029b4: eb00316c bl 3000ef6c <fclose>
*result = grp;
300029b8: e59d3020 ldr r3, [sp, #32] 300029bc: e3a00000 mov r0, #0 300029c0: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
300029c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
300029c8: eb00311a bl 3000ee38 <__errno> <== NOT EXECUTED 300029cc: e3a03016 mov r3, #22 <== NOT EXECUTED 300029d0: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
300029d4: e1a00006 mov r0, r6 <== NOT EXECUTED 300029d8: eb003163 bl 3000ef6c <fclose> <== NOT EXECUTED 300029dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
300029e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
300029e4: eb003113 bl 3000ee38 <__errno> <== NOT EXECUTED 300029e8: e3a03016 mov r3, #22 <== NOT EXECUTED 300029ec: e5803000 str r3, [r0] <== NOT EXECUTED 300029f0: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
300029f4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
30002660 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
30002660: e92d4010 push {r4, lr} <== NOT EXECUTED
if (group_fp == NULL)
30002664: e59f4030 ldr r4, [pc, #48] ; 3000269c <getgrent+0x3c> <== NOT EXECUTED 30002668: e5940000 ldr r0, [r4] <== NOT EXECUTED 3000266c: e3500000 cmp r0, #0 <== NOT EXECUTED 30002670: 1a000001 bne 3000267c <getgrent+0x1c> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
30002674: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &grent;
}
30002678: e8bd8010 pop {r4, pc} <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
3000267c: e2841008 add r1, r4, #8 <== NOT EXECUTED
30002680: e2842018 add r2, r4, #24 <== NOT EXECUTED
30002684: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
30002688: ebffff9f bl 3000250c <scangr> <== NOT EXECUTED
3000268c: e3500000 cmp r0, #0 <== NOT EXECUTED
30002690: 12840008 addne r0, r4, #8 <== NOT EXECUTED
30002694: 18bd8010 popne {r4, pc} <== NOT EXECUTED
30002698: eafffff5 b 30002674 <getgrent+0x14> <== NOT EXECUTED
30002a3c <getgrgid>:
struct group *getgrgid(
gid_t gid
)
{
30002a3c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
30002a40: e59f1030 ldr r1, [pc, #48] ; 30002a78 <getgrgid+0x3c> <== NOT EXECUTED
}
struct group *getgrgid(
gid_t gid
)
{
30002a44: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 30002a48: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
30002a4c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 30002a50: e2812010 add r2, r1, #16 <== NOT EXECUTED 30002a54: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 30002a58: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 30002a5c: e58dc000 str ip, [sp] <== NOT EXECUTED 30002a60: ebffffe6 bl 30002a00 <getgrgid_r> <== NOT EXECUTED 30002a64: e3500000 cmp r0, #0 <== NOT EXECUTED 30002a68: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
30002a6c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
30002a70: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30002a74: e8bd8000 pop {pc} <== NOT EXECUTED
30002a00 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
30002a00: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
30002a04: e1a0c002 mov ip, r2 <== NOT EXECUTED
30002a08: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
30002a0c: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
30002a10: e58d3000 str r3, [sp] <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
30002a14: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
30002a18: e1a0300c mov r3, ip <== NOT EXECUTED 30002a1c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 30002a20: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 30002a24: e1a0200e mov r2, lr <== NOT EXECUTED 30002a28: e3a00000 mov r0, #0 <== NOT EXECUTED 30002a2c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30002a30: ebffffbb bl 30002924 <getgr_r> <== NOT EXECUTED
}
30002a34: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30002a38: e8bd8000 pop {pc} <== NOT EXECUTED
30021f98 <getpid>:
*/
pid_t getpid( void )
{
return _Objects_Local_node;
}
30021f98: e3a00001 mov r0, #1 <== NOT EXECUTED 30021f9c: e12fff1e bx lr <== NOT EXECUTED
30002b1c <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
30002b1c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
30002b20: e59d801c ldr r8, [sp, #28]
30002b24: e1a05000 mov r5, r0
30002b28: e1a0a001 mov sl, r1
30002b2c: e1a04002 mov r4, r2
30002b30: e1a07003 mov r7, r3
FILE *fp;
int match;
init_etc_passwd_group();
30002b34: ebffff34 bl 3000280c <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
30002b38: e59f00b0 ldr r0, [pc, #176] ; 30002bf0 <getpw_r+0xd4> 30002b3c: e59f10b0 ldr r1, [pc, #176] ; 30002bf4 <getpw_r+0xd8> 30002b40: eb0032c1 bl 3000f64c <fopen> 30002b44: e2506000 subs r6, r0, #0
30002b48: 1a000006 bne 30002b68 <getpw_r+0x4c>
30002b4c: ea000022 b 30002bdc <getpw_r+0xc0> <== NOT EXECUTED
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
30002b50: e5940000 ldr r0, [r4] 30002b54: eb003691 bl 300105a0 <strcmp> 30002b58: e2700001 rsbs r0, r0, #1 30002b5c: 33a00000 movcc r0, #0
}
else {
match = (pwd->pw_uid == uid);
}
if (match) {
30002b60: e3500000 cmp r0, #0
30002b64: 1a00000f bne 30002ba8 <getpw_r+0x8c>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
30002b68: e1a01004 mov r1, r4 30002b6c: e1a02007 mov r2, r7 30002b70: e1a03008 mov r3, r8 30002b74: e1a00006 mov r0, r6 30002b78: ebfffec8 bl 300026a0 <scanpw> 30002b7c: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
30002b80: e1a01005 mov r1, r5
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
30002b84: 0a00000d beq 30002bc0 <getpw_r+0xa4>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
30002b88: e3550000 cmp r5, #0
30002b8c: 1affffef bne 30002b50 <getpw_r+0x34>
match = (strcmp(pwd->pw_name, name) == 0);
}
else {
match = (pwd->pw_uid == uid);
30002b90: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 30002b94: e150000a cmp r0, sl <== NOT EXECUTED 30002b98: 13a00000 movne r0, #0 <== NOT EXECUTED 30002b9c: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
30002ba0: e3500000 cmp r0, #0 <== NOT EXECUTED 30002ba4: 0affffef beq 30002b68 <getpw_r+0x4c> <== NOT EXECUTED
fclose(fp);
30002ba8: e1a00006 mov r0, r6 30002bac: eb0030ee bl 3000ef6c <fclose>
*result = pwd;
30002bb0: e59d3020 ldr r3, [sp, #32] 30002bb4: e3a00000 mov r0, #0 30002bb8: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
30002bbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
30002bc0: eb00309c bl 3000ee38 <__errno> <== NOT EXECUTED 30002bc4: e3a03016 mov r3, #22 <== NOT EXECUTED 30002bc8: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
30002bcc: e1a00006 mov r0, r6 <== NOT EXECUTED 30002bd0: eb0030e5 bl 3000ef6c <fclose> <== NOT EXECUTED 30002bd4: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
30002bd8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
30002bdc: eb003095 bl 3000ee38 <__errno> <== NOT EXECUTED 30002be0: e3a03016 mov r3, #22 <== NOT EXECUTED 30002be4: e5803000 str r3, [r0] <== NOT EXECUTED 30002be8: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
30002bec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
300027cc <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
300027cc: e92d4010 push {r4, lr} <== NOT EXECUTED
if (passwd_fp == NULL)
300027d0: e59f4030 ldr r4, [pc, #48] ; 30002808 <getpwent+0x3c> <== NOT EXECUTED 300027d4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 300027d8: e3500000 cmp r0, #0 <== NOT EXECUTED 300027dc: 1a000001 bne 300027e8 <getpwent+0x1c> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
300027e0: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &pwent;
}
300027e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
300027e8: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED
300027ec: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED
300027f0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
300027f4: ebffffa9 bl 300026a0 <scanpw> <== NOT EXECUTED
300027f8: e3500000 cmp r0, #0 <== NOT EXECUTED
300027fc: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED
30002800: 18bd8010 popne {r4, pc} <== NOT EXECUTED
30002804: eafffff5 b 300027e0 <getpwent+0x14> <== NOT EXECUTED
30002c34 <getpwuid>:
struct passwd *getpwuid(
uid_t uid
)
{
30002c34: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
30002c38: e59f1030 ldr r1, [pc, #48] ; 30002c70 <getpwuid+0x3c> <== NOT EXECUTED
}
struct passwd *getpwuid(
uid_t uid
)
{
30002c3c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 30002c40: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
30002c44: e28dc004 add ip, sp, #4 <== NOT EXECUTED 30002c48: e281201c add r2, r1, #28 <== NOT EXECUTED 30002c4c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 30002c50: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 30002c54: e58dc000 str ip, [sp] <== NOT EXECUTED 30002c58: ebffffe6 bl 30002bf8 <getpwuid_r> <== NOT EXECUTED 30002c5c: e3500000 cmp r0, #0 <== NOT EXECUTED 30002c60: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
30002c64: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
30002c68: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30002c6c: e8bd8000 pop {pc} <== NOT EXECUTED
30002bf8 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
30002bf8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
30002bfc: e1a0c002 mov ip, r2 <== NOT EXECUTED
30002c00: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
30002c04: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
30002c08: e58d3000 str r3, [sp] <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
30002c0c: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
30002c10: e1a0300c mov r3, ip <== NOT EXECUTED 30002c14: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 30002c18: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 30002c1c: e1a0200e mov r2, lr <== NOT EXECUTED 30002c20: e3a00000 mov r0, #0 <== NOT EXECUTED 30002c24: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30002c28: ebffffbb bl 30002b1c <getpw_r> <== NOT EXECUTED
}
30002c2c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30002c30: e8bd8000 pop {pc} <== NOT EXECUTED
30002184 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
30002184: e92d4030 push {r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
30002188: e2504000 subs r4, r0, #0
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
3000218c: e24dd008 sub sp, sp, #8
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
30002190: 0a00000e beq 300021d0 <gettimeofday+0x4c>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30002194: e10f5000 mrs r5, CPSR 30002198: e3853080 orr r3, r5, #128 ; 0x80 3000219c: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
300021a0: e1a0000d mov r0, sp 300021a4: eb0010d7 bl 30006508 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300021a8: e129f005 msr CPSR_fc, r5
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
300021ac: e59f0030 ldr r0, [pc, #48] ; 300021e4 <gettimeofday+0x60>
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
300021b0: e89d000c ldm sp, {r2, r3}
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
300021b4: e0c1c390 smull ip, r1, r0, r3
300021b8: e1a03fc3 asr r3, r3, #31
300021bc: e0633341 rsb r3, r3, r1, asr #6
300021c0: e884000c stm r4, {r2, r3}
300021c4: e3a00000 mov r0, #0
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
300021c8: e28dd008 add sp, sp, #8
300021cc: e8bd8030 pop {r4, r5, pc}
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
300021d0: eb003079 bl 3000e3bc <__errno> <== NOT EXECUTED 300021d4: e3a0300e mov r3, #14 <== NOT EXECUTED 300021d8: e5803000 str r3, [r0] <== NOT EXECUTED 300021dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
300021e0: eafffff8 b 300021c8 <gettimeofday+0x44> <== NOT EXECUTED
300059e0 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
300059e0: e92d000e push {r1, r2, r3}
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
300059e4: e59f3090 ldr r3, [pc, #144] ; 30005a7c <ioctl+0x9c>
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
300059e8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
300059ec: e5933000 ldr r3, [r3]
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
300059f0: e24dd004 sub sp, sp, #4
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
300059f4: e1500003 cmp r0, r3
300059f8: 2a000015 bcs 30005a54 <ioctl+0x74> iop = rtems_libio_iop( fd );
300059fc: e59f307c ldr r3, [pc, #124] ; 30005a80 <ioctl+0xa0> 30005a00: e5933000 ldr r3, [r3] 30005a04: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
30005a08: e5903014 ldr r3, [r0, #20] 30005a0c: e3130c01 tst r3, #256 ; 0x100
30005a10: 0a00000f beq 30005a54 <ioctl+0x74>
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
30005a14: e590303c ldr r3, [r0, #60] ; 0x3c
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
30005a18: e28d2010 add r2, sp, #16
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
30005a1c: e3530000 cmp r3, #0
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
30005a20: e58d2000 str r2, [sp] 30005a24: e59d200c ldr r2, [sp, #12]
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
30005a28: 0a000009 beq 30005a54 <ioctl+0x74>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
30005a2c: e5933010 ldr r3, [r3, #16] 30005a30: e3530000 cmp r3, #0
30005a34: 0a00000b beq 30005a68 <ioctl+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
30005a38: e59d1008 ldr r1, [sp, #8] 30005a3c: e1a0e00f mov lr, pc 30005a40: e12fff13 bx r3
return rc;
}
30005a44: e28dd004 add sp, sp, #4
30005a48: e49de004 pop {lr} ; (ldr lr, [sp], #4)
30005a4c: e28dd00c add sp, sp, #12
30005a50: e12fff1e bx lr
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
30005a54: eb00343b bl 30012b48 <__errno> 30005a58: e3a03009 mov r3, #9 30005a5c: e5803000 str r3, [r0] 30005a60: e3e00000 mvn r0, #0 30005a64: eafffff6 b 30005a44 <ioctl+0x64>
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
30005a68: eb003436 bl 30012b48 <__errno> <== NOT EXECUTED 30005a6c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30005a70: e5803000 str r3, [r0] <== NOT EXECUTED 30005a74: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005a78: eafffff1 b 30005a44 <ioctl+0x64> <== NOT EXECUTED
30003b30 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
30003b30: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b34: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
30003b38: e3130020 tst r3, #32 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b3c: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f;
30003b40: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
30003b44: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b48: e1a05001 mov r5, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC)
30003b4c: 0a000007 beq 30003b70 <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
30003b50: e59f2198 ldr r2, [pc, #408] ; 30003cf0 <iproc+0x1c0> <== NOT EXECUTED 30003b54: e5922000 ldr r2, [r2] <== NOT EXECUTED 30003b58: e0822004 add r2, r2, r4 <== NOT EXECUTED 30003b5c: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30003b60: e2022003 and r2, r2, #3 <== NOT EXECUTED 30003b64: e3520001 cmp r2, #1 <== NOT EXECUTED 30003b68: 02844020 addeq r4, r4, #32 <== NOT EXECUTED 30003b6c: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
30003b70: e354000d cmp r4, #13 <== NOT EXECUTED 30003b74: 0a000012 beq 30003bc4 <iproc+0x94> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
30003b78: e354000a cmp r4, #10 <== NOT EXECUTED 30003b7c: 0a000034 beq 30003c54 <iproc+0x124> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30003b80: e3540000 cmp r4, #0 <== NOT EXECUTED 30003b84: 1a000015 bne 30003be0 <iproc+0xb0> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
30003b88: e59f2164 ldr r2, [pc, #356] ; 30003cf4 <iproc+0x1c4> <== NOT EXECUTED 30003b8c: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30003b90: e5922000 ldr r2, [r2] <== NOT EXECUTED 30003b94: e2422001 sub r2, r2, #1 <== NOT EXECUTED 30003b98: e1530002 cmp r3, r2 <== NOT EXECUTED 30003b9c: aa00000a bge 30003bcc <iproc+0x9c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
30003ba0: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED 30003ba4: e3120008 tst r2, #8 <== NOT EXECUTED 30003ba8: 1a00002c bne 30003c60 <iproc+0x130> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
30003bac: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
30003bb0: e2832001 add r2, r3, #1 <== NOT EXECUTED
30003bb4: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
30003bb8: e3a00000 mov r0, #0 <== NOT EXECUTED
30003bbc: e5852020 str r2, [r5, #32] <== NOT EXECUTED
30003bc0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
30003bc4: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 30003bc8: 0a000001 beq 30003bd4 <iproc+0xa4> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
30003bcc: e3a00000 mov r0, #0 <== NOT EXECUTED
} return 0; }
30003bd0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
30003bd4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 30003bd8: 03a0400d moveq r4, #13 <== NOT EXECUTED 30003bdc: 13a0400a movne r4, #10 <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30003be0: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED 30003be4: e3130002 tst r3, #2 <== NOT EXECUTED 30003be8: 0affffe6 beq 30003b88 <iproc+0x58> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
30003bec: e5d52043 ldrb r2, [r5, #67] ; 0x43 <== NOT EXECUTED 30003bf0: e1520004 cmp r2, r4 <== NOT EXECUTED 30003bf4: 0a000038 beq 30003cdc <iproc+0x1ac> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
30003bf8: e5d52044 ldrb r2, [r5, #68] ; 0x44 <== NOT EXECUTED 30003bfc: e1520004 cmp r2, r4 <== NOT EXECUTED 30003c00: 0a000030 beq 30003cc8 <iproc+0x198> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
30003c04: e5d52045 ldrb r2, [r5, #69] ; 0x45 <== NOT EXECUTED 30003c08: e1520004 cmp r2, r4 <== NOT EXECUTED 30003c0c: 0a000027 beq 30003cb0 <iproc+0x180> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
30003c10: e354000a cmp r4, #10 <== NOT EXECUTED 30003c14: 0a00001b beq 30003c88 <iproc+0x158> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL])
30003c18: e5d5204c ldrb r2, [r5, #76] ; 0x4c <== NOT EXECUTED 30003c1c: e1520004 cmp r2, r4 <== NOT EXECUTED 30003c20: 0a000002 beq 30003c30 <iproc+0x100> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
30003c24: e5d52051 ldrb r2, [r5, #81] ; 0x51 <== NOT EXECUTED 30003c28: e1520004 cmp r2, r4 <== NOT EXECUTED 30003c2c: 1affffd5 bne 30003b88 <iproc+0x58> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
30003c30: e3130008 tst r3, #8 <== NOT EXECUTED 30003c34: 1a00001f bne 30003cb8 <iproc+0x188> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
30003c38: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30003c3c: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 30003c40: e2832001 add r2, r3, #1 <== NOT EXECUTED 30003c44: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 30003c48: e3a00001 mov r0, #1 <== NOT EXECUTED 30003c4c: e5852020 str r2, [r5, #32] <== NOT EXECUTED
return 1;
30003c50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
30003c54: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 30003c58: 13a0400d movne r4, #13 <== NOT EXECUTED 30003c5c: eaffffdf b 30003be0 <iproc+0xb0> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
30003c60: e1a00004 mov r0, r4 <== NOT EXECUTED 30003c64: e1a01005 mov r1, r5 <== NOT EXECUTED 30003c68: ebffff0b bl 3000389c <echo> <== NOT EXECUTED 30003c6c: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
30003c70: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
30003c74: e2832001 add r2, r3, #1 <== NOT EXECUTED
30003c78: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
30003c7c: e3a00000 mov r0, #0 <== NOT EXECUTED
30003c80: e5852020 str r2, [r5, #32] <== NOT EXECUTED
30003c84: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
30003c88: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
30003c8c: 11a00004 movne r0, r4 <== NOT EXECUTED 30003c90: 11a01005 movne r1, r5 <== NOT EXECUTED 30003c94: 1bffff00 blne 3000389c <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
30003c98: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30003c9c: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 30003ca0: e2832001 add r2, r3, #1 <== NOT EXECUTED 30003ca4: e3a0000a mov r0, #10 <== NOT EXECUTED 30003ca8: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 30003cac: e5852020 str r2, [r5, #32] <== NOT EXECUTED 30003cb0: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
30003cb4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
30003cb8: e1a00004 mov r0, r4 <== NOT EXECUTED 30003cbc: e1a01005 mov r1, r5 <== NOT EXECUTED 30003cc0: ebfffef5 bl 3000389c <echo> <== NOT EXECUTED 30003cc4: eaffffdb b 30003c38 <iproc+0x108> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
30003cc8: e1a00005 mov r0, r5 <== NOT EXECUTED 30003ccc: e3a01001 mov r1, #1 <== NOT EXECUTED 30003cd0: ebffff13 bl 30003924 <erase> <== NOT EXECUTED 30003cd4: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
30003cd8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
30003cdc: e1a00005 mov r0, r5 <== NOT EXECUTED 30003ce0: e3a01000 mov r1, #0 <== NOT EXECUTED 30003ce4: ebffff0e bl 30003924 <erase> <== NOT EXECUTED 30003ce8: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
30003cec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
30021fb0 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
30021fb0: e3a00000 mov r0, #0 <== NOT EXECUTED 30021fb4: e12fff1e bx lr <== NOT EXECUTED
30003798 <link>:
int link(
const char *existing,
const char *new
)
{
30003798: e92d4070 push {r4, r5, r6, lr}
3000379c: e24dd034 sub sp, sp, #52 ; 0x34
300037a0: e1a05001 mov r5, r1
300037a4: e1a06000 mov r6, r0
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
300037a8: eb003645 bl 300110c4 <strlen> 300037ac: e28d4018 add r4, sp, #24 300037b0: e1a01000 mov r1, r0 300037b4: e3a0c001 mov ip, #1 300037b8: e1a00006 mov r0, r6 300037bc: e3a02000 mov r2, #0 300037c0: e1a03004 mov r3, r4 300037c4: e58dc000 str ip, [sp] 300037c8: ebfffea7 bl 3000326c <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
300037cc: e3500000 cmp r0, #0
300037d0: 0a000003 beq 300037e4 <link+0x4c>
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
300037d4: e3e05000 mvn r5, #0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
300037d8: e1a00005 mov r0, r5
300037dc: e28dd034 add sp, sp, #52 ; 0x34
300037e0: e8bd8070 pop {r4, r5, r6, pc}
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
300037e4: e28d6004 add r6, sp, #4 300037e8: e1a00005 mov r0, r5 300037ec: e28d1030 add r1, sp, #48 ; 0x30 300037f0: e1a02006 mov r2, r6 300037f4: eb0003e8 bl 3000479c <rtems_filesystem_get_start_loc>
if ( !parent_loc.ops->evalformake_h ) {
300037f8: e59d3010 ldr r3, [sp, #16] 300037fc: e5933004 ldr r3, [r3, #4] 30003800: e3530000 cmp r3, #0
30003804: 0a000048 beq 3000392c <link+0x194>
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
30003808: e59d0030 ldr r0, [sp, #48] ; 0x30 3000380c: e1a01006 mov r1, r6 30003810: e0850000 add r0, r5, r0 30003814: e28d202c add r2, sp, #44 ; 0x2c 30003818: e1a0e00f mov lr, pc 3000381c: e12fff13 bx r3
if ( result != 0 ) {
30003820: e2505000 subs r5, r0, #0
30003824: 1a000034 bne 300038fc <link+0x164>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
30003828: e59d3028 ldr r3, [sp, #40] ; 0x28 3000382c: e59d2014 ldr r2, [sp, #20] 30003830: e1520003 cmp r2, r3
30003834: 1a00001b bne 300038a8 <link+0x110>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
30003838: e59d2010 ldr r2, [sp, #16] 3000383c: e5923008 ldr r3, [r2, #8] 30003840: e3530000 cmp r3, #0
30003844: 0a000044 beq 3000395c <link+0x1c4>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
30003848: e1a00004 mov r0, r4 3000384c: e1a01006 mov r1, r6 30003850: e59d202c ldr r2, [sp, #44] ; 0x2c 30003854: e1a0e00f mov lr, pc 30003858: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
3000385c: e59d3024 ldr r3, [sp, #36] ; 0x24
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
30003860: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc );
30003864: e3530000 cmp r3, #0
30003868: 0a000004 beq 30003880 <link+0xe8>
3000386c: e593301c ldr r3, [r3, #28] 30003870: e3530000 cmp r3, #0 30003874: 11a00004 movne r0, r4 30003878: 11a0e00f movne lr, pc 3000387c: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
30003880: e59d3010 ldr r3, [sp, #16] 30003884: e3530000 cmp r3, #0
30003888: 0affffd2 beq 300037d8 <link+0x40>
3000388c: e593301c ldr r3, [r3, #28] 30003890: e3530000 cmp r3, #0
30003894: 0affffcf beq 300037d8 <link+0x40>
30003898: e1a00006 mov r0, r6 3000389c: e1a0e00f mov lr, pc 300038a0: e12fff13 bx r3 300038a4: eaffffcb b 300037d8 <link+0x40>
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
300038a8: e59d3024 ldr r3, [sp, #36] ; 0x24 300038ac: e3530000 cmp r3, #0
300038b0: 0a000004 beq 300038c8 <link+0x130>
300038b4: e593301c ldr r3, [r3, #28] 300038b8: e3530000 cmp r3, #0 300038bc: 11a00004 movne r0, r4 300038c0: 11a0e00f movne lr, pc 300038c4: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
300038c8: e59d3010 ldr r3, [sp, #16] 300038cc: e3530000 cmp r3, #0
300038d0: 0a000004 beq 300038e8 <link+0x150>
300038d4: e593301c ldr r3, [r3, #28] 300038d8: e3530000 cmp r3, #0 300038dc: 11a00006 movne r0, r6 300038e0: 11a0e00f movne lr, pc 300038e4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
300038e8: eb003063 bl 3000fa7c <__errno> 300038ec: e3a03012 mov r3, #18 300038f0: e5803000 str r3, [r0] 300038f4: e3e05000 mvn r5, #0 300038f8: eaffffb6 b 300037d8 <link+0x40>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
300038fc: e59d3024 ldr r3, [sp, #36] ; 0x24 30003900: e3530000 cmp r3, #0
30003904: 0a000004 beq 3000391c <link+0x184>
30003908: e593301c ldr r3, [r3, #28] 3000390c: e3530000 cmp r3, #0 30003910: 11a00004 movne r0, r4 30003914: 11a0e00f movne lr, pc 30003918: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
3000391c: eb003056 bl 3000fa7c <__errno> 30003920: e5805000 str r5, [r0] 30003924: e3e05000 mvn r5, #0 30003928: eaffffaa b 300037d8 <link+0x40>
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
3000392c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30003930: e3530000 cmp r3, #0 <== NOT EXECUTED 30003934: 0a000004 beq 3000394c <link+0x1b4> <== NOT EXECUTED 30003938: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000393c: e3530000 cmp r3, #0 <== NOT EXECUTED 30003940: 11a00004 movne r0, r4 <== NOT EXECUTED 30003944: 11a0e00f movne lr, pc <== NOT EXECUTED 30003948: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000394c: eb00304a bl 3000fa7c <__errno> <== NOT EXECUTED 30003950: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30003954: e5803000 str r3, [r0] <== NOT EXECUTED 30003958: eaffff9d b 300037d4 <link+0x3c> <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
3000395c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30003960: e3530000 cmp r3, #0 <== NOT EXECUTED 30003964: 0a000006 beq 30003984 <link+0x1ec> <== NOT EXECUTED 30003968: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000396c: e3530000 cmp r3, #0 <== NOT EXECUTED 30003970: 0a000003 beq 30003984 <link+0x1ec> <== NOT EXECUTED 30003974: e1a00004 mov r0, r4 <== NOT EXECUTED 30003978: e1a0e00f mov lr, pc <== NOT EXECUTED 3000397c: e12fff13 bx r3 <== NOT EXECUTED 30003980: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
30003984: e3520000 cmp r2, #0 <== NOT EXECUTED 30003988: 0a000004 beq 300039a0 <link+0x208> <== NOT EXECUTED 3000398c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30003990: e3530000 cmp r3, #0 <== NOT EXECUTED 30003994: 11a00006 movne r0, r6 <== NOT EXECUTED 30003998: 11a0e00f movne lr, pc <== NOT EXECUTED 3000399c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
300039a0: eb003035 bl 3000fa7c <__errno> <== NOT EXECUTED 300039a4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300039a8: e5803000 str r3, [r0] <== NOT EXECUTED 300039ac: e3e05000 mvn r5, #0 <== NOT EXECUTED 300039b0: eaffff88 b 300037d8 <link+0x40> <== NOT EXECUTED
30019b50 <lseek>:
{
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
30019b50: e59fc134 ldr ip, [pc, #308] ; 30019c8c <lseek+0x13c>
off_t lseek(
int fd,
off_t offset,
int whence
)
{
30019b54: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
30019b58: e59cc000 ldr ip, [ip] 30019b5c: e150000c cmp r0, ip
30019b60: 2a00003d bcs 30019c5c <lseek+0x10c> iop = rtems_libio_iop( fd );
30019b64: e59fc124 ldr ip, [pc, #292] ; 30019c90 <lseek+0x140> 30019b68: e59c4000 ldr r4, [ip] 30019b6c: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
30019b70: e5940014 ldr r0, [r4, #20] 30019b74: e3100c01 tst r0, #256 ; 0x100
30019b78: 0a000037 beq 30019c5c <lseek+0x10c>
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
30019b7c: e594c03c ldr ip, [r4, #60] ; 0x3c 30019b80: e59c0014 ldr r0, [ip, #20] 30019b84: e3500000 cmp r0, #0
30019b88: 0a000039 beq 30019c74 <lseek+0x124>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
30019b8c: e3530001 cmp r3, #1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
30019b90: e284600c add r6, r4, #12
30019b94: e8960060 ldm r6, {r5, r6}
switch ( whence ) {
30019b98: 0a00002a beq 30019c48 <lseek+0xf8>
30019b9c: e3530002 cmp r3, #2
30019ba0: 0a00000d beq 30019bdc <lseek+0x8c>
30019ba4: e3530000 cmp r3, #0
30019ba8: 1a00001e bne 30019c28 <lseek+0xd8>
case SEEK_SET:
iop->offset = offset;
30019bac: e584100c str r1, [r4, #12] 30019bb0: e5842010 str r2, [r4, #16]
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
30019bb4: e1a00004 mov r0, r4 30019bb8: e1a0e00f mov lr, pc 30019bbc: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
30019bc0: e3700001 cmn r0, #1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
30019bc4: e1a02000 mov r2, r0 30019bc8: e1a03001 mov r3, r1
if ( status == (off_t) -1 )
30019bcc: 0a00000e beq 30019c0c <lseek+0xbc>
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
30019bd0: e1a01003 mov r1, r3
30019bd4: e1a00002 mov r0, r2
30019bd8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
30019bdc: e9940180 ldmib r4, {r7, r8}
30019be0: e0977001 adds r7, r7, r1
30019be4: e0a88002 adc r8, r8, r2
30019be8: e584700c str r7, [r4, #12]
30019bec: e5848010 str r8, [r4, #16]
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
30019bf0: e1a00004 mov r0, r4 30019bf4: e1a0e00f mov lr, pc 30019bf8: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
30019bfc: e3700001 cmn r0, #1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
30019c00: e1a02000 mov r2, r0 30019c04: e1a03001 mov r3, r1
if ( status == (off_t) -1 ) 30019c08: 1afffff0 bne 30019bd0 <lseek+0x80>
30019c0c: e3710001 cmn r1, #1
30019c10: 1affffee bne 30019bd0 <lseek+0x80>
iop->offset = old_offset;
30019c14: e584500c str r5, [r4, #12] 30019c18: e5846010 str r6, [r4, #16]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
30019c1c: e1a01003 mov r1, r3
30019c20: e1a00002 mov r0, r2
30019c24: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
30019c28: ebffd1e3 bl 3000e3bc <__errno> 30019c2c: e3a03016 mov r3, #22 30019c30: e5803000 str r3, [r0] 30019c34: e3e02000 mvn r2, #0 30019c38: e3e03000 mvn r3, #0
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
30019c3c: e1a01003 mov r1, r3
30019c40: e1a00002 mov r0, r2
30019c44: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
30019c48: e0917005 adds r7, r1, r5 30019c4c: e0a28006 adc r8, r2, r6 30019c50: e584700c str r7, [r4, #12] 30019c54: e5848010 str r8, [r4, #16]
break;
30019c58: eaffffd5 b 30019bb4 <lseek+0x64>
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
30019c5c: ebffd1d6 bl 3000e3bc <__errno> <== NOT EXECUTED 30019c60: e3a03009 mov r3, #9 <== NOT EXECUTED 30019c64: e5803000 str r3, [r0] <== NOT EXECUTED 30019c68: e3e02000 mvn r2, #0 <== NOT EXECUTED 30019c6c: e3e03000 mvn r3, #0 <== NOT EXECUTED 30019c70: eaffffd6 b 30019bd0 <lseek+0x80> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
30019c74: ebffd1d0 bl 3000e3bc <__errno> <== NOT EXECUTED 30019c78: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30019c7c: e5803000 str r3, [r0] <== NOT EXECUTED 30019c80: e3e02000 mvn r2, #0 <== NOT EXECUTED 30019c84: e3e03000 mvn r3, #0 <== NOT EXECUTED 30019c88: eaffffd0 b 30019bd0 <lseek+0x80> <== NOT EXECUTED
30002440 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
30002440: e59f30dc ldr r3, [pc, #220] ; 30002524 <malloc+0xe4>
30002444: e92d4070 push {r4, r5, r6, lr}
30002448: e5932004 ldr r2, [r3, #4]
3000244c: e1a04000 mov r4, r0
30002450: e2822001 add r2, r2, #1
30002454: e5832004 str r2, [r3, #4]
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
30002458: ebffffb3 bl 3000232c <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
3000245c: e3540000 cmp r4, #0
30002460: 0a00001f beq 300024e4 <malloc+0xa4>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
30002464: e59f30bc ldr r3, [pc, #188] ; 30002528 <malloc+0xe8> 30002468: e5933000 ldr r3, [r3] 3000246c: e3530003 cmp r3, #3
30002470: 0a000018 beq 300024d8 <malloc+0x98>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
30002474: e59f30b0 ldr r3, [pc, #176] ; 3000252c <malloc+0xec> 30002478: e3a02000 mov r2, #0 3000247c: e5930000 ldr r0, [r3] 30002480: e1a01004 mov r1, r4 30002484: e1a03002 mov r3, r2 30002488: eb001352 bl 300071d8 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
3000248c: e2506000 subs r6, r0, #0
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
30002490: 11a05006 movne r5, r6
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
30002494: 0a000015 beq 300024f0 <malloc+0xb0>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
30002498: e59f3090 ldr r3, [pc, #144] ; 30002530 <malloc+0xf0> 3000249c: e5933000 ldr r3, [r3] 300024a0: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
300024a4: 11a01004 movne r1, r4 300024a8: 11a00005 movne r0, r5 300024ac: 11a0e00f movne lr, pc 300024b0: 112fff13 bxne r3
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
300024b4: e59f3078 ldr r3, [pc, #120] ; 30002534 <malloc+0xf4> 300024b8: e5933000 ldr r3, [r3] 300024bc: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
300024c0: 11a00005 movne r0, r5 300024c4: 11a0e00f movne lr, pc 300024c8: 1593f004 ldrne pc, [r3, #4] 300024cc: e1a06005 mov r6, r5
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
300024d0: e1a00006 mov r0, r6
300024d4: e8bd8070 pop {r4, r5, r6, pc}
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
300024d8: ebffff7c bl 300022d0 <malloc_is_system_state_OK> 300024dc: e3500000 cmp r0, #0
300024e0: 1affffe3 bne 30002474 <malloc+0x34>
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
300024e4: e3a06000 mov r6, #0 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
300024e8: e1a00006 mov r0, r6 <== NOT EXECUTED
300024ec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
300024f0: e59f3040 ldr r3, [pc, #64] ; 30002538 <malloc+0xf8> 300024f4: e5933000 ldr r3, [r3] 300024f8: e3530000 cmp r3, #0
300024fc: 0a000004 beq 30002514 <malloc+0xd4>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
30002500: e1a00004 mov r0, r4 <== NOT EXECUTED 30002504: e1a0e00f mov lr, pc <== NOT EXECUTED 30002508: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
3000250c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30002510: 1affffe0 bne 30002498 <malloc+0x58> <== NOT EXECUTED
errno = ENOMEM;
30002514: eb002fa8 bl 3000e3bc <__errno> 30002518: e3a0300c mov r3, #12 3000251c: e5803000 str r3, [r0]
return (void *) 0;
30002520: eaffffea b 300024d0 <malloc+0x90>
3000231c <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
3000231c: e1a01000 mov r1, r0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
30002320: e59f0000 ldr r0, [pc, #0] ; 30002328 <malloc_deferred_free+0xc><== NOT EXECUTED 30002324: ea000f6a b 300060d4 <_Chain_Append> <== NOT EXECUTED
3000232c <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
3000232c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
30002330: ea000000 b 30002338 <malloc_deferred_frees_process+0xc>
free(to_be_freed);
30002334: ebffff69 bl 300020e0 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
30002338: e59f000c ldr r0, [pc, #12] ; 3000234c <malloc_deferred_frees_process+0x20> 3000233c: eb000f78 bl 30006124 <_Chain_Get>
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
30002340: e3500000 cmp r0, #0
30002344: 1afffffa bne 30002334 <malloc_deferred_frees_process+0x8>
free(to_be_freed);
}
30002348: e49df004 pop {pc} ; (ldr pc, [sp], #4)
3000c75c <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
3000c75c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Perform internal consistency checks
*/
assert( block_table );
3000c760: e2504000 subs r4, r0, #0
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
3000c764: e1a08001 mov r8, r1
/*
* Perform internal consistency checks
*/
assert( block_table );
3000c768: 0a000014 beq 3000c7c0 <memfile_free_blocks_in_table+0x64>
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
3000c76c: e3510000 cmp r1, #0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
3000c770: e5947000 ldr r7, [r4]
for ( i=0 ; i<entries ; i++ ) {
3000c774: da00000c ble 3000c7ac <memfile_free_blocks_in_table+0x50>
3000c778: e3a05000 mov r5, #0 3000c77c: e1a06005 mov r6, r5
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
3000c780: e1a0a005 mov sl, r5
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
3000c784: e7970005 ldr r0, [r7, r5] 3000c788: e3500000 cmp r0, #0
3000c78c: 0a000001 beq 3000c798 <memfile_free_blocks_in_table+0x3c>
memfile_free_block( b[i] );
3000c790: ebffff50 bl 3000c4d8 <memfile_free_block>
b[i] = 0;
3000c794: e787a005 str sl, [r7, r5]
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
3000c798: e2866001 add r6, r6, #1 3000c79c: e1580006 cmp r8, r6 3000c7a0: e2855004 add r5, r5, #4
3000c7a4: cafffff6 bgt 3000c784 <memfile_free_blocks_in_table+0x28>
3000c7a8: e5947000 ldr r7, [r4]
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
3000c7ac: e1a00007 mov r0, r7 3000c7b0: ebffff48 bl 3000c4d8 <memfile_free_block>
*block_table = 0;
3000c7b4: e3a03000 mov r3, #0 3000c7b8: e5843000 str r3, [r4]
}
3000c7bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Perform internal consistency checks
*/
assert( block_table );
3000c7c0: e59f000c ldr r0, [pc, #12] ; 3000c7d4 <memfile_free_blocks_in_table+0x78><== NOT EXECUTED 3000c7c4: e59f100c ldr r1, [pc, #12] ; 3000c7d8 <memfile_free_blocks_in_table+0x7c><== NOT EXECUTED 3000c7c8: e59f200c ldr r2, [pc, #12] ; 3000c7dc <memfile_free_blocks_in_table+0x80><== NOT EXECUTED 3000c7cc: e59f300c ldr r3, [pc, #12] ; 3000c7e0 <memfile_free_blocks_in_table+0x84><== NOT EXECUTED 3000c7d0: ebfff89d bl 3000aa4c <__assert_func> <== NOT EXECUTED
3000ccb4 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000ccb4: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
3000ccb8: e5904038 ldr r4, [r0, #56] ; 0x38
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000ccbc: e24dd008 sub sp, sp, #8
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
3000ccc0: e5943054 ldr r3, [r4, #84] ; 0x54 3000ccc4: e1530002 cmp r3, r2
3000ccc8: ba00000e blt 3000cd08 <memfile_ftruncate+0x54>
3000cccc: 0a00000a beq 3000ccfc <memfile_ftruncate+0x48>
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
3000ccd0: e5841050 str r1, [r4, #80] ; 0x50 3000ccd4: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
3000ccd8: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
3000ccdc: e3a01000 mov r1, #0 3000cce0: e1a0000d mov r0, sp 3000cce4: ebffd526 bl 30002184 <gettimeofday> 3000cce8: e59d3000 ldr r3, [sp] 3000ccec: e3a00000 mov r0, #0 3000ccf0: e5843040 str r3, [r4, #64] ; 0x40
return 0;
}
3000ccf4: e28dd008 add sp, sp, #8
3000ccf8: e8bd8010 pop {r4, pc}
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
3000ccfc: e5943050 ldr r3, [r4, #80] ; 0x50 3000cd00: e1530001 cmp r3, r1
3000cd04: 2afffff1 bcs 3000ccd0 <memfile_ftruncate+0x1c>
return IMFS_memfile_extend( the_jnode, length );
3000cd08: e1a00004 mov r0, r4
3000cd0c: ebffff87 bl 3000cb30 <IMFS_memfile_extend> <== NOT EXECUTED 3000cd10: eafffff7 b 3000ccf4 <memfile_ftruncate+0x40> <== NOT EXECUTED
3000cd14 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000cd14: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
3000cd18: e5905038 ldr r5, [r0, #56] ; 0x38
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000cd1c: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000cd20: e595304c ldr r3, [r5, #76] ; 0x4c 3000cd24: e3530006 cmp r3, #6
3000cd28: 0a00000d beq 3000cd64 <memfile_lseek+0x50>
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
3000cd2c: e1a00005 mov r0, r5
3000cd30: e284200c add r2, r4, #12
3000cd34: e8920006 ldm r2, {r1, r2}
3000cd38: ebffff7c bl 3000cb30 <IMFS_memfile_extend>
3000cd3c: e3500000 cmp r0, #0
3000cd40: 1a00001a bne 3000cdb0 <memfile_lseek+0x9c>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
3000cd44: e2853050 add r3, r5, #80 ; 0x50
3000cd48: e893000c ldm r3, {r2, r3}
3000cd4c: e984000c stmib r4, {r2, r3}
3000cd50: e284300c add r3, r4, #12
3000cd54: e893000c ldm r3, {r2, r3}
} return iop->offset; }
3000cd58: e1a01003 mov r1, r3
3000cd5c: e1a00002 mov r0, r2
3000cd60: e8bd8030 pop {r4, r5, pc}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
3000cd64: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED
3000cd68: e2853050 add r3, r5, #80 ; 0x50 <== NOT EXECUTED
3000cd6c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
3000cd70: e1510003 cmp r1, r3 <== NOT EXECUTED
3000cd74: e590000c ldr r0, [r0, #12] <== NOT EXECUTED
3000cd78: ca000007 bgt 3000cd9c <memfile_lseek+0x88> <== NOT EXECUTED
3000cd7c: 0a000004 beq 3000cd94 <memfile_lseek+0x80> <== NOT EXECUTED
3000cd80: e1a02000 mov r2, r0 <== NOT EXECUTED
3000cd84: e1a03001 mov r3, r1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
3000cd88: e1a01003 mov r1, r3 <== NOT EXECUTED
3000cd8c: e1a00002 mov r0, r2 <== NOT EXECUTED
3000cd90: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
3000cd94: e1500002 cmp r0, r2 <== NOT EXECUTED 3000cd98: 9afffff8 bls 3000cd80 <memfile_lseek+0x6c> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
3000cd9c: e584200c str r2, [r4, #12] <== NOT EXECUTED 3000cda0: e5843010 str r3, [r4, #16] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
3000cda4: e1a01003 mov r1, r3 <== NOT EXECUTED
3000cda8: e1a00002 mov r0, r2 <== NOT EXECUTED
3000cdac: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
3000cdb0: eb000581 bl 3000e3bc <__errno> <== NOT EXECUTED 3000cdb4: e3a0301c mov r3, #28 <== NOT EXECUTED 3000cdb8: e5803000 str r3, [r0] <== NOT EXECUTED 3000cdbc: e3e02000 mvn r2, #0 <== NOT EXECUTED 3000cdc0: e3e03000 mvn r3, #0 <== NOT EXECUTED 3000cdc4: eaffffe3 b 3000cd58 <memfile_lseek+0x44> <== NOT EXECUTED
3000d084 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000d084: e92d4830 push {r4, r5, fp, lr}
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000d088: e5903014 ldr r3, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000d08c: e24dd004 sub sp, sp, #4
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000d090: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000d094: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
3000d098: e5905038 ldr r5, [r0, #56] ; 0x38
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000d09c: 0a000002 beq 3000d0ac <memfile_open+0x28>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
3000d0a0: e595204c ldr r2, [r5, #76] ; 0x4c 3000d0a4: e3520006 cmp r2, #6
3000d0a8: 0a00000b beq 3000d0dc <memfile_open+0x58>
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
3000d0ac: e5952050 ldr r2, [r5, #80] ; 0x50 3000d0b0: e5951054 ldr r1, [r5, #84] ; 0x54
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
3000d0b4: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
3000d0b8: 1584200c strne r2, [r4, #12] 3000d0bc: 15841010 strne r1, [r4, #16] 3000d0c0: 15951054 ldrne r1, [r5, #84] ; 0x54 3000d0c4: 15952050 ldrne r2, [r5, #80] ; 0x50
iop->size = the_jnode->info.file.size;
3000d0c8: e3a00000 mov r0, #0 3000d0cc: e5841008 str r1, [r4, #8] 3000d0d0: e5842004 str r2, [r4, #4]
return 0; }
3000d0d4: e28dd004 add sp, sp, #4
3000d0d8: e8bd8830 pop {r4, r5, fp, pc}
/*
* 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;
3000d0dc: e595c050 ldr ip, [r5, #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;
3000d0e0: 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;
3000d0e4: e3a03005 mov r3, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
3000d0e8: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d0ec: 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)
3000d0f0: e15c0000 cmp ip, r0 <== 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;
3000d0f4: e585304c str r3, [r5, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
3000d0f8: e5850060 str r0, [r5, #96] ; 0x60 <== 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;
3000d0fc: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
3000d100: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED 3000d104: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
3000d108: e585005c str r0, [r5, #92] ; 0x5c <== NOT EXECUTED
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
3000d10c: e5850058 str r0, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
3000d110: 1a000004 bne 3000d128 <memfile_open+0xa4> <== NOT EXECUTED 3000d114: e1a0b001 mov fp, r1 <== NOT EXECUTED 3000d118: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 3000d11c: e1a01002 mov r1, r2 <== NOT EXECUTED 3000d120: e1a0200b mov r2, fp <== NOT EXECUTED 3000d124: eaffffe2 b 3000d0b4 <memfile_open+0x30> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
3000d128: e1a00005 mov r0, r5 <== NOT EXECUTED 3000d12c: e58dc000 str ip, [sp] <== NOT EXECUTED 3000d130: ebffff24 bl 3000cdc8 <IMFS_memfile_write> <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
3000d134: e3700001 cmn r0, #1 <== NOT EXECUTED 3000d138: 0affffe5 beq 3000d0d4 <memfile_open+0x50> <== NOT EXECUTED 3000d13c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 3000d140: eaffffd9 b 3000d0ac <memfile_open+0x28> <== NOT EXECUTED
3000254c <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
3000254c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
30002550: e3110a0f tst r1, #61440 ; 0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
30002554: e24dd020 sub sp, sp, #32 30002558: e1a05001 mov r5, r1 3000255c: e1a06000 mov r6, r0 30002560: e1a07002 mov r7, r2 30002564: e1a08003 mov r8, r3
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
30002568: 0a000030 beq 30002630 <mknod+0xe4>
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
3000256c: e28d4004 add r4, sp, #4 30002570: e28d101c add r1, sp, #28 30002574: e1a02004 mov r2, r4 30002578: eb00028e bl 30002fb8 <rtems_filesystem_get_start_loc>
if ( !temp_loc.ops->evalformake_h ) {
3000257c: e59d3010 ldr r3, [sp, #16] 30002580: e5933004 ldr r3, [r3, #4] 30002584: e3530000 cmp r3, #0
30002588: 0a000023 beq 3000261c <mknod+0xd0>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
3000258c: e59d001c ldr r0, [sp, #28] 30002590: e1a01004 mov r1, r4 30002594: e0860000 add r0, r6, r0 30002598: e28d2018 add r2, sp, #24 3000259c: e1a0e00f mov lr, pc 300025a0: e12fff13 bx r3
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
300025a4: e3500000 cmp r0, #0
300025a8: 1a00001e bne 30002628 <mknod+0xdc>
return -1;
if ( !temp_loc.ops->mknod_h ) {
300025ac: e59d3010 ldr r3, [sp, #16] 300025b0: e593c014 ldr ip, [r3, #20] 300025b4: e35c0000 cmp ip, #0
300025b8: 0a000012 beq 30002608 <mknod+0xbc>
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
300025bc: e1a01005 mov r1, r5 300025c0: e1a03008 mov r3, r8 300025c4: e58d4000 str r4, [sp] 300025c8: e59d0018 ldr r0, [sp, #24] 300025cc: e1a02007 mov r2, r7 300025d0: e1a0e00f mov lr, pc 300025d4: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
300025d8: e59d3010 ldr r3, [sp, #16]
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
300025dc: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
300025e0: e3530000 cmp r3, #0
300025e4: 0a000004 beq 300025fc <mknod+0xb0>
300025e8: e593301c ldr r3, [r3, #28] 300025ec: e3530000 cmp r3, #0 300025f0: 11a00004 movne r0, r4 300025f4: 11a0e00f movne lr, pc 300025f8: 112fff13 bxne r3
return result;
}
300025fc: e1a00005 mov r0, r5
30002600: e28dd020 add sp, sp, #32
30002604: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
30002608: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000260c: e3530000 cmp r3, #0 <== NOT EXECUTED 30002610: 11a00004 movne r0, r4 <== NOT EXECUTED 30002614: 11a0e00f movne lr, pc <== NOT EXECUTED 30002618: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000261c: eb002f66 bl 3000e3bc <__errno> <== NOT EXECUTED 30002620: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30002624: e5803000 str r3, [r0] <== NOT EXECUTED
30002628: e3e05000 mvn r5, #0 3000262c: eafffff2 b 300025fc <mknod+0xb0>
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
30002630: eb002f61 bl 3000e3bc <__errno> <== NOT EXECUTED 30002634: e3a03016 mov r3, #22 <== NOT EXECUTED 30002638: e5803000 str r3, [r0] <== NOT EXECUTED 3000263c: e3e05000 mvn r5, #0 <== NOT EXECUTED 30002640: eaffffed b 300025fc <mknod+0xb0> <== NOT EXECUTED
300026d0 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
300026d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
300026d4: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
300026d8: e24dd028 sub sp, sp, #40 ; 0x28 300026dc: e58d3004 str r3, [sp, #4] 300026e0: e1a08000 mov r8, r0 300026e4: e1a07001 mov r7, r1 300026e8: e1a0a002 mov sl, r2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
300026ec: 8a00009e bhi 3000296c <mount+0x29c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
300026f0: e1a00002 mov r0, r2 300026f4: eb002266 bl 3000b094 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
300026f8: e3500000 cmp r0, #0 300026fc: e58d000c str r0, [sp, #12]
30002700: 0a000099 beq 3000296c <mount+0x29c>
{
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;
30002704: e2575000 subs r5, r7, #0 30002708: 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 : "/";
3000270c: e3550000 cmp r5, #0
30002710: 0a000090 beq 30002958 <mount+0x288>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
30002714: e1a00007 mov r0, r7 30002718: e58d7010 str r7, [sp, #16] 3000271c: eb00332b bl 3000f3d0 <strlen> 30002720: e58d0008 str r0, [sp, #8]
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;
30002724: e1a0000a mov r0, sl 30002728: eb003328 bl 3000f3d0 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
3000272c: e3580000 cmp r8, #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;
30002730: e2806001 add r6, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
30002734: 01a0b008 moveq fp, r8
30002738: 0a000002 beq 30002748 <mount+0x78>
3000273c: e1a00008 mov r0, r8 30002740: eb003322 bl 3000f3d0 <strlen> 30002744: e280b001 add fp, r0, #1
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
30002748: e59d3008 ldr r3, [sp, #8] 3000274c: e3a00001 mov r0, #1 30002750: e2831075 add r1, r3, #117 ; 0x75 30002754: e0811006 add r1, r1, r6 30002758: e081100b add r1, r1, fp 3000275c: ebfffdc9 bl 30001e88 <calloc>
if ( mt_entry != NULL ) {
30002760: e2504000 subs r4, r0, #0
30002764: 0a000076 beq 30002944 <mount+0x274>
char *str = (char *) mt_entry + sizeof( *mt_entry );
30002768: e2849074 add r9, r4, #116 ; 0x74
strcpy( str, filesystemtype );
3000276c: e1a0100a mov r1, sl 30002770: e1a00009 mov r0, r9 30002774: eb0032c5 bl 3000f290 <strcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
30002778: e3580000 cmp r8, #0
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
str += filesystemtype_size;
3000277c: e0896006 add r6, r9, r6
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
30002780: e584906c str r9, [r4, #108] ; 0x6c
str += filesystemtype_size;
if ( source_or_null != NULL ) {
30002784: 0a000004 beq 3000279c <mount+0xcc>
strcpy( str, source_or_null );
30002788: e1a00006 mov r0, r6 3000278c: e1a01008 mov r1, r8 30002790: eb0032be bl 3000f290 <strcpy>
mt_entry->dev = str;
30002794: e5846070 str r6, [r4, #112] ; 0x70
str += source_size;
30002798: e086600b add r6, r6, fp
}
strcpy( str, target );
3000279c: e59d1010 ldr r1, [sp, #16] 300027a0: e1a00006 mov r0, r6 300027a4: eb0032b9 bl 3000f290 <strcpy>
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
300027a8: e59fe24c ldr lr, [pc, #588] ; 300029fc <mount+0x32c>
300027ac: e284c038 add ip, r4, #56 ; 0x38
300027b0: e8be000f ldm lr!, {r0, r1, r2, r3}
300027b4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300027b8: e8be000f ldm lr!, {r0, r1, r2, r3}
300027bc: e8ac000f stmia ip!, {r0, r1, r2, r3}
300027c0: e89e000f ldm lr, {r0, r1, r2, r3}
300027c4: e88c000f stm ip, {r0, r1, r2, r3}
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
300027c8: e59d3004 ldr r3, [sp, #4]
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
300027cc: e3550000 cmp r5, #0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
300027d0: e5846068 str r6, [r4, #104] ; 0x68
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
300027d4: e5843030 str r3, [r4, #48] ; 0x30
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
300027d8: e584402c str r4, [r4, #44] ; 0x2c
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
300027dc: 1a000023 bne 30002870 <mount+0x1a0>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
300027e0: e59f3218 ldr r3, [pc, #536] ; 30002a00 <mount+0x330>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300027e4: e5932000 ldr r2, [r3] 300027e8: e2833004 add r3, r3, #4 300027ec: e1520003 cmp r2, r3 300027f0: 01a06005 moveq r6, r5
300027f4: 1a00006d bne 300029b0 <mount+0x2e0>
* 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 ) ) {
300027f8: e59d104c ldr r1, [sp, #76] ; 0x4c 300027fc: e1a00004 mov r0, r4 30002800: e59d300c ldr r3, [sp, #12] 30002804: e1a0e00f mov lr, pc 30002808: e12fff13 bx r3 3000280c: e2507000 subs r7, r0, #0
30002810: 1a00005a bne 30002980 <mount+0x2b0>
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 );
30002814: e59f61e8 ldr r6, [pc, #488] ; 30002a04 <mount+0x334> 30002818: e1a02007 mov r2, r7 3000281c: e1a01007 mov r1, r7 30002820: e5960000 ldr r0, [r6] 30002824: eb000bd5 bl 30005780 <rtems_semaphore_obtain>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
30002828: e1a01004 mov r1, r4 3000282c: e59f01cc ldr r0, [pc, #460] ; 30002a00 <mount+0x330> 30002830: eb000e27 bl 300060d4 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
30002834: e5960000 ldr r0, [r6] 30002838: eb000c18 bl 300058a0 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
3000283c: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
30002840: 059f31c0 ldreq r3, [pc, #448] ; 30002a08 <mount+0x338>
30002844: 0284401c addeq r4, r4, #28
30002848: 0593c000 ldreq ip, [r3]
3000284c: 08b4000f ldmeq r4!, {r0, r1, r2, r3}
30002850: 028cc018 addeq ip, ip, #24
30002854: 08ac000f stmiaeq ip!, {r0, r1, r2, r3}
30002858: 05943000 ldreq r3, [r4]
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
3000285c: 11a00007 movne r0, r7
rtems_filesystem_root = mt_entry->mt_fs_root;
30002860: 01a00005 moveq r0, r5 30002864: 058c3000 streq r3, [ip]
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
30002868: e28dd028 add sp, sp, #40 ; 0x28
3000286c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
30002870: e28d6014 add r6, sp, #20 30002874: e3a0c001 mov ip, #1 30002878: e1a00007 mov r0, r7 3000287c: e59d1008 ldr r1, [sp, #8] 30002880: e3a02007 mov r2, #7 30002884: e1a03006 mov r3, r6 30002888: e58dc000 str ip, [sp] 3000288c: ebfffdf1 bl 30002058 <rtems_filesystem_evaluate_path> 30002890: e3700001 cmn r0, #1
30002894: 0a000048 beq 300029bc <mount+0x2ec>
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
30002898: e59d3020 ldr r3, [sp, #32] 3000289c: e5933010 ldr r3, [r3, #16] 300028a0: e3530000 cmp r3, #0
300028a4: 0a000050 beq 300029ec <mount+0x31c>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
300028a8: e1a00006 mov r0, r6 300028ac: e1a0e00f mov lr, pc 300028b0: e12fff13 bx r3 300028b4: e3500001 cmp r0, #1
300028b8: 1a000043 bne 300029cc <mount+0x2fc>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
300028bc: e59f0148 ldr r0, [pc, #328] ; 30002a0c <mount+0x33c> 300028c0: e59d1014 ldr r1, [sp, #20] 300028c4: ebffff63 bl 30002658 <rtems_filesystem_mount_iterate> 300028c8: e3500000 cmp r0, #0
300028cc: 1a000042 bne 300029dc <mount+0x30c>
* 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;
300028d0: e59d1014 ldr r1, [sp, #20]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
300028d4: e59d2020 ldr r2, [sp, #32]
* 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;
300028d8: e5841008 str r1, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
300028dc: e59d101c ldr r1, [sp, #28]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
300028e0: e5923020 ldr r3, [r2, #32]
* 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;
300028e4: e5841010 str r1, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
300028e8: e59d1024 ldr r1, [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 ){
300028ec: e3530000 cmp r3, #0
*/
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;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
300028f0: e5841018 str r1, [r4, #24]
* 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;
300028f4: e5842014 str r2, [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 ){
300028f8: 0a00003b beq 300029ec <mount+0x31c>
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( mt_entry ) ) {
300028fc: e1a00004 mov r0, r4 30002900: e1a0e00f mov lr, pc 30002904: e12fff13 bx r3 30002908: e3500000 cmp r0, #0
3000290c: 0affffb9 beq 300027f8 <mount+0x128>
return 0;
cleanup_and_bail:
free( mt_entry );
30002910: e1a00004 mov r0, r4 30002914: ebfffdf1 bl 300020e0 <free>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
30002918: e596300c ldr r3, [r6, #12] 3000291c: e3530000 cmp r3, #0
30002920: 0a000020 beq 300029a8 <mount+0x2d8>
30002924: e593301c ldr r3, [r3, #28] 30002928: e3530000 cmp r3, #0
3000292c: 0a00001d beq 300029a8 <mount+0x2d8>
30002930: e1a00006 mov r0, r6 30002934: e1a0e00f mov lr, pc 30002938: e12fff13 bx r3 3000293c: e3e00000 mvn r0, #0 30002940: eaffffc8 b 30002868 <mount+0x198>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
30002944: eb002e9c bl 3000e3bc <__errno> <== NOT EXECUTED 30002948: e3a0300c mov r3, #12 <== NOT EXECUTED 3000294c: e5803000 str r3, [r0] <== NOT EXECUTED 30002950: e3e00000 mvn r0, #0 <== NOT EXECUTED 30002954: eaffffc3 b 30002868 <mount+0x198> <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
30002958: e3a03001 mov r3, #1 3000295c: e58d3008 str r3, [sp, #8] 30002960: e59f30a8 ldr r3, [pc, #168] ; 30002a10 <mount+0x340> 30002964: e58d3010 str r3, [sp, #16] 30002968: eaffff6d b 30002724 <mount+0x54>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
3000296c: eb002e92 bl 3000e3bc <__errno> 30002970: e3a03016 mov r3, #22 30002974: e5803000 str r3, [r0] 30002978: e3e00000 mvn r0, #0 3000297c: eaffffb9 b 30002868 <mount+0x198>
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
if ( loc.ops->unmount_h ) {
30002980: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 30002984: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 30002988: e3530000 cmp r3, #0 <== NOT EXECUTED
loc.ops->unmount_h( mt_entry );
3000298c: 11a00004 movne r0, r4 <== NOT EXECUTED 30002990: 11a0e00f movne lr, pc <== NOT EXECUTED 30002994: 112fff13 bxne r3 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
30002998: e1a00004 mov r0, r4 <== NOT EXECUTED 3000299c: ebfffdcf bl 300020e0 <free> <== NOT EXECUTED
if ( loc_to_free )
300029a0: e3560000 cmp r6, #0 <== NOT EXECUTED 300029a4: 1affffdb bne 30002918 <mount+0x248> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
300029a8: e3e00000 mvn r0, #0 <== NOT EXECUTED 300029ac: eaffffad b 30002868 <mount+0x198> <== NOT EXECUTED
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
300029b0: eb002e81 bl 3000e3bc <__errno> <== NOT EXECUTED 300029b4: e3a03016 mov r3, #22 <== NOT EXECUTED 300029b8: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
300029bc: e1a00004 mov r0, r4 <== NOT EXECUTED 300029c0: ebfffdc6 bl 300020e0 <free> <== NOT EXECUTED 300029c4: e3e00000 mvn r0, #0 <== NOT EXECUTED 300029c8: eaffffa6 b 30002868 <mount+0x198> <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
300029cc: eb002e7a bl 3000e3bc <__errno> 300029d0: e3a03014 mov r3, #20 300029d4: e5803000 str r3, [r0]
goto cleanup_and_bail;
300029d8: eaffffcc b 30002910 <mount+0x240>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
300029dc: eb002e76 bl 3000e3bc <__errno> 300029e0: e3a03010 mov r3, #16 300029e4: e5803000 str r3, [r0]
goto cleanup_and_bail;
300029e8: eaffffc8 b 30002910 <mount+0x240>
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
300029ec: eb002e72 bl 3000e3bc <__errno> <== NOT EXECUTED 300029f0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300029f4: e5803000 str r3, [r0] <== NOT EXECUTED
goto cleanup_and_bail;
300029f8: eaffffc4 b 30002910 <mount+0x240> <== NOT EXECUTED
30002a84 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
30002a84: e92d4010 push {r4, lr}
30002a88: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
30002a8c: eb002f49 bl 3000e7b8 <fileno> 30002a90: e3500002 cmp r0, #2
30002a94: 9a000003 bls 30002aa8 <newlib_free_buffers+0x24>
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
30002a98: e1a00004 mov r0, r4 <== NOT EXECUTED 30002a9c: eb002e93 bl 3000e4f0 <fclose> <== NOT EXECUTED
} return 0; }
30002aa0: e3a00000 mov r0, #0
30002aa4: e8bd8010 pop {r4, pc}
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
30002aa8: e1d430bc ldrh r3, [r4, #12] 30002aac: e3130080 tst r3, #128 ; 0x80
30002ab0: 0afffffa beq 30002aa0 <newlib_free_buffers+0x1c>
free( fp->_bf._base );
30002ab4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002ab8: ebfffd88 bl 300020e0 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
30002abc: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
30002ac0: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
30002ac4: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
30002ac8: e5843010 str r3, [r4, #16] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
30002acc: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
30002ad0: e5843000 str r3, [r4] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
30002ad4: e3a00000 mov r0, #0 <== NOT EXECUTED
30002ad8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
300025a0 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
300025a0: e92d4010 push {r4, lr}
rtems_device_driver status;
if ( !initialized ) {
300025a4: e59f3044 ldr r3, [pc, #68] ; 300025f0 <null_initialize+0x50>
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
300025a8: e1a04000 mov r4, r0
rtems_device_driver status;
if ( !initialized ) {
300025ac: e5d32000 ldrb r2, [r3] 300025b0: e3520000 cmp r2, #0
300025b4: 0a000001 beq 300025c0 <null_initialize+0x20>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
300025b8: e3a00000 mov r0, #0
300025bc: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
300025c0: e3a0c001 mov ip, #1
status = rtems_io_register_name(
300025c4: e59f0028 ldr r0, [pc, #40] ; 300025f4 <null_initialize+0x54> 300025c8: e1a01004 mov r1, r4
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
300025cc: e5c3c000 strb ip, [r3]
status = rtems_io_register_name(
300025d0: eb0001b7 bl 30002cb4 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
300025d4: e3500000 cmp r0, #0
300025d8: 1a000003 bne 300025ec <null_initialize+0x4c>
rtems_fatal_error_occurred(status);
NULL_major = major;
300025dc: e59f3014 ldr r3, [pc, #20] ; 300025f8 <null_initialize+0x58>
}
return RTEMS_SUCCESSFUL;
}
300025e0: e3a00000 mov r0, #0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
NULL_major = major;
300025e4: e5834000 str r4, [r3]
}
return RTEMS_SUCCESSFUL;
}
300025e8: e8bd8010 pop {r4, pc}
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
300025ec: eb00127b bl 30006fe0 <rtems_fatal_error_occurred> <== NOT EXECUTED
30002d1c <open>:
int open(
const char *pathname,
int flags,
...
)
{
30002d1c: e92d000e push {r1, r2, r3}
30002d20: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
30002d24: e24dd01c sub sp, sp, #28
30002d28: e59d503c ldr r5, [sp, #60] ; 0x3c
30002d2c: e1a06000 mov r6, r0
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
30002d30: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
30002d34: e2138001 ands r8, r3, #1 30002d38: 13a08004 movne r8, #4
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
30002d3c: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
30002d40: e28d3044 add r3, sp, #68 ; 0x44
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
30002d44: 13888002 orrne r8, r8, #2
va_start(ap, flags);
mode = va_arg( ap, int );
30002d48: e58d3018 str r3, [sp, #24] 30002d4c: e59da040 ldr sl, [sp, #64] ; 0x40
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
30002d50: eb00202c bl 3000ae08 <rtems_libio_allocate>
if ( iop == 0 ) {
30002d54: e2504000 subs r4, r0, #0 30002d58: 03a06017 moveq r6, #23
30002d5c: 0a00005d beq 30002ed8 <open+0x1bc>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
30002d60: e1a00006 mov r0, r6 30002d64: eb003199 bl 3000f3d0 <strlen> 30002d68: e28d7004 add r7, sp, #4 30002d6c: e1a01000 mov r1, r0 30002d70: e1a02008 mov r2, r8 30002d74: e1a00006 mov r0, r6 30002d78: e3a08001 mov r8, #1 30002d7c: e1a03007 mov r3, r7 30002d80: e58d8000 str r8, [sp] 30002d84: ebfffcb3 bl 30002058 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
30002d88: e3700001 cmn r0, #1
30002d8c: 0a000055 beq 30002ee8 <open+0x1cc>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
30002d90: e2053c0a and r3, r5, #2560 ; 0xa00 30002d94: e3530c0a cmp r3, #2560 ; 0xa00 30002d98: 03a06011 moveq r6, #17
30002d9c: 0a000040 beq 30002ea4 <open+0x188>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
30002da0: e59d300c ldr r3, [sp, #12]
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
30002da4: e1a00005 mov r0, r5
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
30002da8: e584303c str r3, [r4, #60] ; 0x3c
iop->file_info = loc.node_access;
30002dac: e59d3004 ldr r3, [sp, #4]
iop->flags |= rtems_libio_fcntl_flags( flags );
30002db0: e5948014 ldr r8, [r4, #20]
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
30002db4: e5843038 str r3, [r4, #56] ; 0x38
iop->flags |= rtems_libio_fcntl_flags( flags );
30002db8: eb002040 bl 3000aec0 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
30002dbc: e284c018 add ip, r4, #24 30002dc0: e1a0e007 mov lr, r7
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
30002dc4: e1808008 orr r8, r0, r8
iop->pathinfo = loc;
30002dc8: e8be000f ldm lr!, {r0, r1, r2, r3}
30002dcc: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !iop->handlers || !iop->handlers->open_h ) {
30002dd0: e594303c ldr r3, [r4, #60] ; 0x3c
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
30002dd4: e59e2000 ldr r2, [lr]
if ( !iop->handlers || !iop->handlers->open_h ) {
30002dd8: e3530000 cmp r3, #0
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
30002ddc: e58c2000 str r2, [ip]
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
30002de0: e5848014 str r8, [r4, #20]
iop->pathinfo = loc;
if ( !iop->handlers || !iop->handlers->open_h ) {
30002de4: 0a00002d beq 30002ea0 <open+0x184>
30002de8: e593c000 ldr ip, [r3] 30002dec: e35c0000 cmp ip, #0
30002df0: 0a00002a beq 30002ea0 <open+0x184>
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
30002df4: e1a01006 mov r1, r6 30002df8: e1a0300a mov r3, sl 30002dfc: e1a00004 mov r0, r4 30002e00: e1a02005 mov r2, r5 30002e04: e1a0e00f mov lr, pc 30002e08: e12fff1c bx ip
if ( rc ) {
30002e0c: e3500000 cmp r0, #0
30002e10: 1a000009 bne 30002e3c <open+0x120>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
30002e14: e3150b01 tst r5, #1024 ; 0x400
30002e18: 1a00000c bne 30002e50 <open+0x134>
30002e1c: e59f5150 ldr r5, [pc, #336] ; 30002f74 <open+0x258>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
30002e20: e5950000 ldr r0, [r5] 30002e24: e0604004 rsb r4, r0, r4 30002e28: e1a00344 asr r0, r4, #6
}
30002e2c: e28dd01c add sp, sp, #28
30002e30: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
30002e34: e28dd00c add sp, sp, #12
30002e38: e12fff1e bx lr
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
30002e3c: eb002d5e bl 3000e3bc <__errno> 30002e40: e5906000 ldr r6, [r0]
*/
done:
va_end(ap);
if ( rc ) {
30002e44: e3560000 cmp r6, #0
30002e48: 0afffff3 beq 30002e1c <open+0x100>
30002e4c: ea000014 b 30002ea4 <open+0x188>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
30002e50: e59f511c ldr r5, [pc, #284] ; 30002f74 <open+0x258> 30002e54: e3a01000 mov r1, #0 30002e58: e5950000 ldr r0, [r5] 30002e5c: e3a02000 mov r2, #0 30002e60: e0600004 rsb r0, r0, r4 30002e64: e1a00340 asr r0, r0, #6 30002e68: eb001f33 bl 3000ab3c <ftruncate>
if ( rc ) {
30002e6c: e2506000 subs r6, r0, #0
30002e70: 0affffea beq 30002e20 <open+0x104>
if(errno) rc = errno;
30002e74: eb002d50 bl 3000e3bc <__errno> <== NOT EXECUTED 30002e78: e5903000 ldr r3, [r0] <== NOT EXECUTED 30002e7c: e3530000 cmp r3, #0 <== NOT EXECUTED 30002e80: 1a000038 bne 30002f68 <open+0x24c> <== NOT EXECUTED
close( iop - rtems_libio_iops );
30002e84: e5950000 ldr r0, [r5] <== NOT EXECUTED 30002e88: e0600004 rsb r0, r0, r4 <== NOT EXECUTED 30002e8c: e1a00340 asr r0, r0, #6 <== NOT EXECUTED 30002e90: e3a04000 mov r4, #0 <== NOT EXECUTED 30002e94: eb001eff bl 3000aa98 <close> <== NOT EXECUTED 30002e98: e1a07004 mov r7, r4 <== NOT EXECUTED 30002e9c: eaffffe8 b 30002e44 <open+0x128> <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
30002ea0: e3a06086 mov r6, #134 ; 0x86 <== NOT EXECUTED
done:
va_end(ap);
if ( rc ) {
if ( iop )
30002ea4: e3540000 cmp r4, #0
rtems_libio_free( iop );
30002ea8: 11a00004 movne r0, r4 30002eac: 1b001fbf blne 3000adb0 <rtems_libio_free>
if ( loc_to_free )
30002eb0: e3570000 cmp r7, #0
30002eb4: 0a000007 beq 30002ed8 <open+0x1bc>
rtems_filesystem_freenode( loc_to_free );
30002eb8: e597300c ldr r3, [r7, #12] 30002ebc: e3530000 cmp r3, #0
30002ec0: 0a000004 beq 30002ed8 <open+0x1bc>
30002ec4: e593301c ldr r3, [r3, #28] 30002ec8: e3530000 cmp r3, #0 30002ecc: 11a00007 movne r0, r7 30002ed0: 11a0e00f movne lr, pc 30002ed4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
30002ed8: eb002d37 bl 3000e3bc <__errno> 30002edc: e5806000 str r6, [r0] 30002ee0: e3e00000 mvn r0, #0 30002ee4: eaffffd0 b 30002e2c <open+0x110>
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
30002ee8: eb002d33 bl 3000e3bc <__errno> 30002eec: e5903000 ldr r3, [r0] 30002ef0: e3530002 cmp r3, #2
30002ef4: 0a000003 beq 30002f08 <open+0x1ec>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
30002ef8: eb002d2f bl 3000e3bc <__errno> 30002efc: e3a07000 mov r7, #0 30002f00: e5906000 ldr r6, [r0]
goto done;
30002f04: eaffffce b 30002e44 <open+0x128>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
30002f08: e2159c02 ands r9, r5, #512 ; 0x200 30002f0c: 01a07009 moveq r7, r9 30002f10: 01a06003 moveq r6, r3
30002f14: 0affffe2 beq 30002ea4 <open+0x188>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
30002f18: e1a00006 mov r0, r6 30002f1c: e38a1902 orr r1, sl, #32768 ; 0x8000 30002f20: e3a02000 mov r2, #0 30002f24: e3a03000 mov r3, #0 30002f28: ebfffd87 bl 3000254c <mknod>
if ( rc ) {
30002f2c: e2509000 subs r9, r0, #0
30002f30: 1afffff0 bne 30002ef8 <open+0x1dc>
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
30002f34: e1a00006 mov r0, r6 30002f38: eb003124 bl 3000f3d0 <strlen> 30002f3c: e1a03007 mov r3, r7 30002f40: e1a01000 mov r1, r0 30002f44: e1a02009 mov r2, r9 30002f48: e1a00006 mov r0, r6 30002f4c: e58d8000 str r8, [sp] 30002f50: ebfffc40 bl 30002058 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
30002f54: e3500000 cmp r0, #0 30002f58: 11a07009 movne r7, r9 30002f5c: 13a0600d movne r6, #13
30002f60: 1affffcf bne 30002ea4 <open+0x188>
30002f64: eaffff8d b 30002da0 <open+0x84>
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
30002f68: eb002d13 bl 3000e3bc <__errno> <== NOT EXECUTED 30002f6c: e5906000 ldr r6, [r0] <== NOT EXECUTED 30002f70: eaffffc3 b 30002e84 <open+0x168> <== NOT EXECUTED
30002cb4 <open_dev_console>:
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
30002cb4: e3a01000 mov r1, #0
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
30002cb8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
30002cbc: e59f004c ldr r0, [pc, #76] ; 30002d10 <open_dev_console+0x5c>
30002cc0: e1a02001 mov r2, r1
30002cc4: eb000014 bl 30002d1c <open>
30002cc8: e3700001 cmn r0, #1
30002ccc: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
30002cd0: e59f0038 ldr r0, [pc, #56] ; 30002d10 <open_dev_console+0x5c> 30002cd4: e3a01001 mov r1, #1 30002cd8: e3a02000 mov r2, #0 30002cdc: eb00000e bl 30002d1c <open> 30002ce0: e3700001 cmn r0, #1
30002ce4: 0a000007 beq 30002d08 <open_dev_console+0x54>
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
30002ce8: e59f0020 ldr r0, [pc, #32] ; 30002d10 <open_dev_console+0x5c>
30002cec: e3a01001 mov r1, #1
30002cf0: e3a02000 mov r2, #0
30002cf4: eb000008 bl 30002d1c <open>
30002cf8: e3700001 cmn r0, #1
30002cfc: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
30002d00: e59f000c ldr r0, [pc, #12] ; 30002d14 <open_dev_console+0x60><== NOT EXECUTED 30002d04: eb000c3c bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
30002d08: e59f0008 ldr r0, [pc, #8] ; 30002d18 <open_dev_console+0x64><== NOT EXECUTED 30002d0c: eb000c3a bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
3000372c <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3000372c: e92d4010 push {r4, lr}
int i;
if (tty->termios.c_oflag & OPOST) {
30003730: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003734: e24dd004 sub sp, sp, #4
int i;
if (tty->termios.c_oflag & OPOST) {
30003738: e3130001 tst r3, #1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3000373c: e1a04001 mov r4, r1 30003740: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
30003744: 0a000014 beq 3000379c <oproc+0x70>
switch (c) {
30003748: e5dd1000 ldrb r1, [sp] 3000374c: e2412008 sub r2, r1, #8 30003750: e3520005 cmp r2, #5 30003754: 979ff102 ldrls pc, [pc, r2, lsl #2] 30003758: ea000005 b 30003774 <oproc+0x48> 3000375c: 3000380c .word 0x3000380c 30003760: 300037e8 .word 0x300037e8 30003764: 30003820 .word 0x30003820 30003768: 30003774 .word 0x30003774 3000376c: 30003774 .word 0x30003774 30003770: 300037b4 .word 0x300037b4
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
30003774: e3130002 tst r3, #2
30003778: 1a000034 bne 30003850 <oproc+0x124>
3000377c: e59f310c ldr r3, [pc, #268] ; 30003890 <oproc+0x164> 30003780: e5933000 ldr r3, [r3]
c = toupper(c); if (!iscntrl(c))
30003784: e0831001 add r1, r3, r1 30003788: e5d13001 ldrb r3, [r1, #1] 3000378c: e3130020 tst r3, #32
tty->column++;
30003790: 05943028 ldreq r3, [r4, #40] ; 0x28 30003794: 02833001 addeq r3, r3, #1 30003798: 05843028 streq r3, [r4, #40] ; 0x28
break; } } rtems_termios_puts (&c, 1, tty);
3000379c: e1a02004 mov r2, r4 300037a0: e1a0000d mov r0, sp 300037a4: e3a01001 mov r1, #1 300037a8: ebffff97 bl 3000360c <rtems_termios_puts>
}
300037ac: e28dd004 add sp, sp, #4
300037b0: e8bd8010 pop {r4, pc}
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
300037b4: e3130010 tst r3, #16 <== NOT EXECUTED 300037b8: 0a000002 beq 300037c8 <oproc+0x9c> <== NOT EXECUTED 300037bc: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 300037c0: e3520000 cmp r2, #0 <== NOT EXECUTED 300037c4: 0afffff8 beq 300037ac <oproc+0x80> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
300037c8: e2132008 ands r2, r3, #8 <== NOT EXECUTED 300037cc: 0a00000c beq 30003804 <oproc+0xd8> <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET)
300037d0: 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';
300037d4: e3a0300a mov r3, #10 <== NOT EXECUTED 300037d8: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET) tty->column = 0;
300037dc: 13a03000 movne r3, #0 <== NOT EXECUTED 300037e0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 300037e4: eaffffec b 3000379c <oproc+0x70> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
300037e8: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
300037ec: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
300037f0: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
300037f4: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
300037f8: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
300037fc: 10812002 addne r2, r1, r2
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003800: 0a00001c beq 30003878 <oproc+0x14c>
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
30003804: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
30003808: eaffffe3 b 3000379c <oproc+0x70> <== NOT EXECUTED
case '\b':
if (tty->column > 0)
3000380c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003810: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003814: c2433001 subgt r3, r3, #1 <== NOT EXECUTED 30003818: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3000381c: eaffffde b 3000379c <oproc+0x70> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
30003820: e3130020 tst r3, #32
tty->column = 0;
30003824: 13a02000 movne r2, #0 30003828: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
3000382c: e3130004 tst r3, #4
30003830: 0affffd9 beq 3000379c <oproc+0x70>
rtems_termios_puts ("\r", 1, tty);
30003834: e59f0058 ldr r0, [pc, #88] ; 30003894 <oproc+0x168> 30003838: e3a01001 mov r1, #1 3000383c: e1a02004 mov r2, r4 30003840: ebffff71 bl 3000360c <rtems_termios_puts>
tty->column = 0;
30003844: e3a03000 mov r3, #0 30003848: e5843028 str r3, [r4, #40] ; 0x28 3000384c: eaffffd2 b 3000379c <oproc+0x70>
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
30003850: e59f3038 ldr r3, [pc, #56] ; 30003890 <oproc+0x164> <== NOT EXECUTED 30003854: e5933000 ldr r3, [r3] <== NOT EXECUTED 30003858: e0832001 add r2, r3, r1 <== NOT EXECUTED 3000385c: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30003860: e2022003 and r2, r2, #3 <== NOT EXECUTED 30003864: e3520002 cmp r2, #2 <== NOT EXECUTED 30003868: 02411020 subeq r1, r1, #32 <== NOT EXECUTED 3000386c: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED 30003870: e5cd1000 strb r1, [sp] <== NOT EXECUTED 30003874: eaffffc2 b 30003784 <oproc+0x58> <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
30003878: e0812002 add r2, r1, r2 3000387c: e5842028 str r2, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
30003880: e59f0010 ldr r0, [pc, #16] ; 30003898 <oproc+0x16c> 30003884: e1a02004 mov r2, r4 30003888: ebffff5f bl 3000360c <rtems_termios_puts>
return;
3000388c: eaffffc6 b 300037ac <oproc+0x80>
3000d448 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
3000d448: e92d4070 push {r4, r5, r6, lr}
3000d44c: e24dd028 sub sp, sp, #40 ; 0x28
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
3000d450: e28d4004 add r4, sp, #4 3000d454: e3a0c001 mov ip, #1
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
3000d458: e1a05000 mov r5, r0
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
3000d45c: e3a01003 mov r1, #3 3000d460: e59f0150 ldr r0, [pc, #336] ; 3000d5b8 <pipe_create+0x170> 3000d464: e3a02007 mov r2, #7 3000d468: e1a03004 mov r3, r4 3000d46c: e58dc000 str ip, [sp] 3000d470: ebffd2f8 bl 30002058 <rtems_filesystem_evaluate_path> 3000d474: e3500000 cmp r0, #0
3000d478: 1a00003a bne 3000d568 <pipe_create+0x120>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
3000d47c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3000d480: e3530000 cmp r3, #0 <== NOT EXECUTED 3000d484: 0a000004 beq 3000d49c <pipe_create+0x54> <== NOT EXECUTED 3000d488: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000d48c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000d490: 11a00004 movne r0, r4 <== NOT EXECUTED 3000d494: 11a0e00f movne lr, pc <== NOT EXECUTED 3000d498: 112fff13 bxne r3 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
3000d49c: e28d4018 add r4, sp, #24
3000d4a0: e59f2114 ldr r2, [pc, #276] ; 3000d5bc <pipe_create+0x174>
3000d4a4: e1a0c004 mov ip, r4
3000d4a8: e8920007 ldm r2, {r0, r1, r2}
3000d4ac: e8ac0003 stmia ip!, {r0, r1}
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
3000d4b0: e59f3108 ldr r3, [pc, #264] ; 3000d5c0 <pipe_create+0x178>
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
3000d4b4: e1a0100c mov r1, ip
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
3000d4b8: e1d3c0b0 ldrh ip, [r3]
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
3000d4bc: e1c120b0 strh r2, [r1]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
3000d4c0: e1a0200c mov r2, ip 3000d4c4: e28cc001 add ip, ip, #1 3000d4c8: e59f10f4 ldr r1, [pc, #244] ; 3000d5c4 <pipe_create+0x17c> 3000d4cc: e1c3c0b0 strh ip, [r3] 3000d4d0: e284000a add r0, r4, #10 3000d4d4: eb00066c bl 3000ee8c <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
3000d4d8: e1a00004 mov r0, r4 3000d4dc: e3a01d06 mov r1, #384 ; 0x180 3000d4e0: eb0001ca bl 3000dc10 <mkfifo> 3000d4e4: e2506000 subs r6, r0, #0
3000d4e8: 1a00001c bne 3000d560 <pipe_create+0x118>
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
3000d4ec: e1a00004 mov r0, r4 3000d4f0: e3a01901 mov r1, #16384 ; 0x4000 3000d4f4: ebffd608 bl 30002d1c <open>
if (filsdes[0] < 0) {
3000d4f8: e3500000 cmp r0, #0
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
3000d4fc: e5850000 str r0, [r5]
if (filsdes[0] < 0) {
3000d500: ba000022 blt 3000d590 <pipe_create+0x148>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
3000d504: e59f30bc ldr r3, [pc, #188] ; 3000d5c8 <pipe_create+0x180> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
3000d508: e3a01001 mov r1, #1 <== NOT EXECUTED
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
3000d50c: e5933000 ldr r3, [r3] <== NOT EXECUTED 3000d510: e1500003 cmp r0, r3 <== NOT EXECUTED 3000d514: 359f30b0 ldrcc r3, [pc, #176] ; 3000d5cc <pipe_create+0x184><== NOT EXECUTED 3000d518: 35936000 ldrcc r6, [r3] <== NOT EXECUTED 3000d51c: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
3000d520: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
3000d524: e1a00004 mov r0, r4 <== NOT EXECUTED
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
3000d528: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 3000d52c: e5863014 str r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
3000d530: ebffd5f9 bl 30002d1c <open> <== NOT EXECUTED
if (filsdes[1] < 0) {
3000d534: e3500000 cmp r0, #0 <== NOT EXECUTED
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
3000d538: e5850004 str r0, [r5, #4] <== NOT EXECUTED
if (filsdes[1] < 0) {
3000d53c: a3a06000 movge r6, #0 <== NOT EXECUTED 3000d540: ba000017 blt 3000d5a4 <pipe_create+0x15c> <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
3000d544: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d548: eb0001b4 bl 3000dc20 <unlink> <== NOT EXECUTED
}
rtems_set_errno_and_return_minus_one(err);
3000d54c: eb00039a bl 3000e3bc <__errno> 3000d550: e5806000 str r6, [r0]
}
3000d554: e3e00000 mvn r0, #0
3000d558: e28dd028 add sp, sp, #40 ; 0x28
3000d55c: e8bd8070 pop {r4, r5, r6, pc}
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
3000d560: eb000395 bl 3000e3bc <__errno> <== NOT EXECUTED 3000d564: eafffffa b 3000d554 <pipe_create+0x10c> <== NOT EXECUTED
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
!= 0) {
if (errno != ENOENT)
3000d568: eb000393 bl 3000e3bc <__errno> 3000d56c: e5903000 ldr r3, [r0] 3000d570: e3530002 cmp r3, #2
3000d574: 1afffff6 bne 3000d554 <pipe_create+0x10c>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
3000d578: e59f0038 ldr r0, [pc, #56] ; 3000d5b8 <pipe_create+0x170> 3000d57c: e59f104c ldr r1, [pc, #76] ; 3000d5d0 <pipe_create+0x188> 3000d580: ebffd3ed bl 3000253c <mkdir> 3000d584: e3500000 cmp r0, #0
3000d588: 0affffc3 beq 3000d49c <pipe_create+0x54>
3000d58c: eafffff0 b 3000d554 <pipe_create+0x10c> <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
3000d590: eb000389 bl 3000e3bc <__errno> 3000d594: e5906000 ldr r6, [r0]
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
3000d598: e1a00004 mov r0, r4 3000d59c: eb00019f bl 3000dc20 <unlink> 3000d5a0: eaffffe9 b 3000d54c <pipe_create+0x104>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
3000d5a4: eb000384 bl 3000e3bc <__errno> <== NOT EXECUTED 3000d5a8: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
3000d5ac: e5950000 ldr r0, [r5] <== NOT EXECUTED 3000d5b0: ebfff538 bl 3000aa98 <close> <== NOT EXECUTED 3000d5b4: eaffffe2 b 3000d544 <pipe_create+0xfc> <== NOT EXECUTED
30009120 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
30009120: e59f3054 ldr r3, [pc, #84] ; 3000917c <pipe_ioctl+0x5c> <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
30009124: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if (cmd == FIONREAD) {
30009128: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000912c: e1a05000 mov r5, r0 <== NOT EXECUTED 30009130: e1a04002 mov r4, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
30009134: 13e00015 mvnne r0, #21 <== NOT EXECUTED
30009138: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
if (buffer == NULL)
3000913c: e3520000 cmp r2, #0 <== NOT EXECUTED
30009140: 03e0000d mvneq r0, #13 <== NOT EXECUTED
30009144: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
30009148: e3a01000 mov r1, #0 <== NOT EXECUTED
3000914c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
30009150: e1a02001 mov r2, r1 <== NOT EXECUTED
30009154: ebfff189 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
30009158: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3000915c: 13e00003 mvnne r0, #3 <== NOT EXECUTED
30009160: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
30009164: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
30009168: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000916c: e5843000 str r3, [r4] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
30009170: ebfff1ca bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 30009174: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
30009178: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
300090a8 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
300090a8: e3e0001c mvn r0, #28 <== NOT EXECUTED 300090ac: e12fff1e bx lr <== NOT EXECUTED
30009380 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
30009380: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
30009384: e1a09001 mov r9, r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
30009388: e3a01000 mov r1, #0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000938c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 30009390: e1a04000 mov r4, r0 <== NOT EXECUTED 30009394: e1a05002 mov r5, r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
30009398: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED 3000939c: e1a02001 mov r2, r1 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
300093a0: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
300093a4: ebfff0f5 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED 300093a8: e250a000 subs sl, r0, #0 <== NOT EXECUTED 300093ac: 13e07003 mvnne r7, #3 <== NOT EXECUTED 300093b0: 1a000027 bne 30009454 <pipe_read+0xd4> <== NOT EXECUTED
return -EINTR;
while (read < count) {
300093b4: e3550000 cmp r5, #0 <== NOT EXECUTED 300093b8: 01a07005 moveq r7, r5 <== NOT EXECUTED 300093bc: 01a06007 moveq r6, r7 <== NOT EXECUTED 300093c0: 0a00001f beq 30009444 <pipe_read+0xc4> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
300093c4: e1a0700a mov r7, sl <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
300093c8: e28db004 add fp, sp, #4 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
300093cc: e594200c ldr r2, [r4, #12] <== NOT EXECUTED 300093d0: e3520000 cmp r2, #0 <== NOT EXECUTED 300093d4: 1a000021 bne 30009460 <pipe_read+0xe0> <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
300093d8: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 300093dc: e3530000 cmp r3, #0 <== NOT EXECUTED 300093e0: 0a00003d beq 300094dc <pipe_read+0x15c> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
300093e4: e5986014 ldr r6, [r8, #20] <== NOT EXECUTED 300093e8: e2166001 ands r6, r6, #1 <== NOT EXECUTED 300093ec: 1a00003c bne 300094e4 <pipe_read+0x164> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
300093f0: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
300093f4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
300093f8: e2833001 add r3, r3, #1 <== NOT EXECUTED 300093fc: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
30009400: ebfff126 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
30009404: e1a01006 mov r1, r6 <== NOT EXECUTED 30009408: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000940c: eb0007e4 bl 3000b3a4 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
30009410: e1a01006 mov r1, r6 <== NOT EXECUTED 30009414: e1a02001 mov r2, r1 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
30009418: e2506000 subs r6, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000941c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
30009420: 13e06003 mvnne r6, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
30009424: ebfff0d5 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED 30009428: e3500000 cmp r0, #0 <== NOT EXECUTED 3000942c: 1a00002e bne 300094ec <pipe_read+0x16c> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
30009430: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
30009434: e3560000 cmp r6, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
30009438: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000943c: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
30009440: 0affffe1 beq 300093cc <pipe_read+0x4c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
30009444: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 30009448: ebfff114 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
if (read > 0)
3000944c: e3570000 cmp r7, #0 <== NOT EXECUTED 30009450: d1a07006 movle r7, r6 <== NOT EXECUTED
return read;
return ret;
}
30009454: e1a00007 mov r0, r7 <== NOT EXECUTED
30009458: e28dd008 add sp, sp, #8 <== NOT EXECUTED
3000945c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
30009460: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 30009464: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
30009468: e06a6005 rsb r6, sl, r5 <== NOT EXECUTED 3000946c: e1520006 cmp r2, r6 <== NOT EXECUTED 30009470: 31a06002 movcc r6, r2 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
30009474: e0613003 rsb r3, r1, r3 <== NOT EXECUTED
if (chunk > chunk1) {
30009478: e1560003 cmp r6, r3 <== NOT EXECUTED 3000947c: ca00001c bgt 300094f4 <pipe_read+0x174> <== NOT EXECUTED
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);
30009480: e5943000 ldr r3, [r4] <== NOT EXECUTED 30009484: e089000a add r0, r9, sl <== NOT EXECUTED 30009488: e0831001 add r1, r3, r1 <== NOT EXECUTED 3000948c: e1a02006 mov r2, r6 <== NOT EXECUTED 30009490: eb0015d7 bl 3000ebf4 <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
30009494: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
30009498: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
3000949c: e0860000 add r0, r6, r0 <== NOT EXECUTED 300094a0: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
300094a4: eb003992 bl 30017af4 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
300094a8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
300094ac: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
300094b0: e0663003 rsb r3, r6, r3 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
300094b4: e3530000 cmp r3, #0 <== NOT EXECUTED
pipe->Start = 0;
300094b8: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
300094bc: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
300094c0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 300094c4: e3530000 cmp r3, #0 <== NOT EXECUTED 300094c8: 1a000016 bne 30009528 <pipe_read+0x1a8> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
300094cc: e0877006 add r7, r7, r6 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
300094d0: e1570005 cmp r7, r5 <== NOT EXECUTED 300094d4: e1a0a007 mov sl, r7 <== NOT EXECUTED 300094d8: 3affffbb bcc 300093cc <pipe_read+0x4c> <== NOT EXECUTED 300094dc: e3a06000 mov r6, #0 <== NOT EXECUTED 300094e0: eaffffd7 b 30009444 <pipe_read+0xc4> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
300094e4: e3e0600a mvn r6, #10 <== NOT EXECUTED 300094e8: eaffffd5 b 30009444 <pipe_read+0xc4> <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
300094ec: e3e06003 mvn r6, #3 <== NOT EXECUTED 300094f0: eaffffd5 b 3000944c <pipe_read+0xcc> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
300094f4: e5940000 ldr r0, [r4] <== NOT EXECUTED 300094f8: e1a02003 mov r2, r3 <== NOT EXECUTED 300094fc: e0801001 add r1, r0, r1 <== NOT EXECUTED 30009500: e089000a add r0, r9, sl <== NOT EXECUTED 30009504: e58d3000 str r3, [sp] <== NOT EXECUTED 30009508: eb0015b9 bl 3000ebf4 <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
3000950c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30009510: e5941000 ldr r1, [r4] <== NOT EXECUTED 30009514: e08a0003 add r0, sl, r3 <== NOT EXECUTED 30009518: e0890000 add r0, r9, r0 <== NOT EXECUTED 3000951c: e0632006 rsb r2, r3, r6 <== NOT EXECUTED 30009520: eb0015b3 bl 3000ebf4 <memcpy> <== NOT EXECUTED 30009524: eaffffda b 30009494 <pipe_read+0x114> <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
30009528: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000952c: e1a0100b mov r1, fp <== NOT EXECUTED 30009530: eb000782 bl 3000b340 <rtems_barrier_release> <== NOT EXECUTED 30009534: eaffffe4 b 300094cc <pipe_read+0x14c> <== NOT EXECUTED
30009538 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
30009538: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
3000953c: e5904000 ldr r4, [r0] <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
30009540: e1a05001 mov r5, r1 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
30009544: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
30009548: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 3000954c: e1a07000 mov r7, r0 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
30009550: e1a02001 mov r2, r1 <== NOT EXECUTED 30009554: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 30009558: ebfff088 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
3000955c: e3500000 cmp r0, #0 <== NOT EXECUTED 30009560: 1a000038 bne 30009648 <pipe_release+0x110> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
30009564: e5956014 ldr r6, [r5, #20] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
30009568: e59f50dc ldr r5, [pc, #220] ; 3000964c <pipe_release+0x114><== NOT EXECUTED
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
3000956c: e3160002 tst r6, #2 <== NOT EXECUTED
pipe->Readers --;
30009570: 15943010 ldrne r3, [r4, #16] <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
30009574: e2066006 and r6, r6, #6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
30009578: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3000957c: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
30009580: e3160004 tst r6, #4 <== NOT EXECUTED
pipe->Writers --;
30009584: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
30009588: e3a01000 mov r1, #0 <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
3000958c: 12433001 subne r3, r3, #1 <== NOT EXECUTED 30009590: 15843014 strne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
30009594: e5950000 ldr r0, [r5] <== NOT EXECUTED 30009598: e1a02001 mov r2, r1 <== NOT EXECUTED 3000959c: ebfff077 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
300095a0: e3500000 cmp r0, #0 <== NOT EXECUTED 300095a4: 1a000027 bne 30009648 <pipe_release+0x110> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
300095a8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 300095ac: ebfff0bb bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
300095b0: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 300095b4: e3530000 cmp r3, #0 <== NOT EXECUTED 300095b8: 0a00000d beq 300095f4 <pipe_release+0xbc> <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
300095bc: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED 300095c0: e2723001 rsbs r3, r2, #1 <== NOT EXECUTED 300095c4: 33a03000 movcc r3, #0 <== NOT EXECUTED 300095c8: e3560002 cmp r6, #2 <== NOT EXECUTED 300095cc: 03a03000 moveq r3, #0 <== NOT EXECUTED 300095d0: e3530000 cmp r3, #0 <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
300095d4: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED 300095d8: 11a0100d movne r1, sp <== NOT EXECUTED 300095dc: 1b000757 blne 3000b340 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
300095e0: e5950000 ldr r0, [r5] <== NOT EXECUTED 300095e4: ebfff0ad bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
300095e8: e3a00000 mov r0, #0 <== NOT EXECUTED
300095ec: e28dd004 add sp, sp, #4 <== NOT EXECUTED
300095f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
300095f4: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED 300095f8: e3580000 cmp r8, #0 <== NOT EXECUTED 300095fc: 0a000005 beq 30009618 <pipe_release+0xe0> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
30009600: e3560004 cmp r6, #4 <== NOT EXECUTED 30009604: 0afffff5 beq 300095e0 <pipe_release+0xa8> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
30009608: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000960c: e1a0100d mov r1, sp <== NOT EXECUTED 30009610: eb00074a bl 3000b340 <rtems_barrier_release> <== NOT EXECUTED 30009614: eafffff1 b 300095e0 <pipe_release+0xa8> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
30009618: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000961c: eb00071b bl 3000b290 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
30009620: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 30009624: eb000719 bl 3000b290 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
30009628: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000962c: ebfff02a bl 300056dc <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
30009630: e5940000 ldr r0, [r4] <== NOT EXECUTED 30009634: ebffe2a9 bl 300020e0 <free> <== NOT EXECUTED
free(pipe);
30009638: e1a00004 mov r0, r4 <== NOT EXECUTED 3000963c: ebffe2a7 bl 300020e0 <free> <== NOT EXECUTED
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
30009640: e5878000 str r8, [r7] <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
30009644: eaffffe5 b 300095e0 <pipe_release+0xa8> <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
30009648: ebfff1eb bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
30009180 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
30009180: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
30009184: e2524000 subs r4, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
30009188: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 3000918c: e1a05000 mov r5, r0 <== NOT EXECUTED 30009190: e1a06001 mov r6, r1 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
30009194: 01a07004 moveq r7, r4 <== NOT EXECUTED 30009198: 1a000002 bne 300091a8 <pipe_write+0x28> <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
3000919c: e1a00007 mov r0, r7 <== NOT EXECUTED
300091a0: e28dd008 add sp, sp, #8 <== NOT EXECUTED
300091a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
300091a8: e3a01000 mov r1, #0 <== NOT EXECUTED 300091ac: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED 300091b0: e1a02001 mov r2, r1 <== NOT EXECUTED 300091b4: e58d3000 str r3, [sp] <== NOT EXECUTED 300091b8: ebfff170 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED 300091bc: e2509000 subs r9, r0, #0 <== NOT EXECUTED 300091c0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300091c4: 13e07003 mvnne r7, #3 <== NOT EXECUTED 300091c8: 1afffff3 bne 3000919c <pipe_write+0x1c> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
300091cc: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED 300091d0: e3570000 cmp r7, #0 <== NOT EXECUTED 300091d4: 0a00004f beq 30009318 <pipe_write+0x198> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
300091d8: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
300091dc: e1a07009 mov r7, r9 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
300091e0: e1540008 cmp r4, r8 <== NOT EXECUTED 300091e4: 91a0a004 movls sl, r4 <== NOT EXECUTED 300091e8: 83a0a001 movhi sl, #1 <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
300091ec: e28db004 add fp, sp, #4 <== NOT EXECUTED
/* 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) {
300091f0: e595100c ldr r1, [r5, #12] <== NOT EXECUTED 300091f4: e0612008 rsb r2, r1, r8 <== NOT EXECUTED 300091f8: e152000a cmp r2, sl <== NOT EXECUTED 300091fc: 2a000021 bcs 30009288 <pipe_write+0x108> <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
30009200: e5938014 ldr r8, [r3, #20] <== NOT EXECUTED 30009204: e2188001 ands r8, r8, #1 <== NOT EXECUTED 30009208: 1a00004a bne 30009338 <pipe_write+0x1b8> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000920c: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
30009210: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
30009214: e2822001 add r2, r2, #1 <== NOT EXECUTED 30009218: e585201c str r2, [r5, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
3000921c: e58d3000 str r3, [sp] <== NOT EXECUTED 30009220: ebfff19e bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
30009224: e1a01008 mov r1, r8 <== NOT EXECUTED 30009228: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 3000922c: eb00085c bl 3000b3a4 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
30009230: e1a01008 mov r1, r8 <== NOT EXECUTED 30009234: e1a02001 mov r2, r1 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
30009238: e2508000 subs r8, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000923c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
30009240: 13e08003 mvnne r8, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
30009244: ebfff14d bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED 30009248: e3500000 cmp r0, #0 <== NOT EXECUTED 3000924c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30009250: 1a000036 bne 30009330 <pipe_write+0x1b0> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
30009254: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
if (ret != 0)
30009258: e3580000 cmp r8, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000925c: e2422001 sub r2, r2, #1 <== NOT EXECUTED 30009260: e585201c str r2, [r5, #28] <== NOT EXECUTED
if (ret != 0)
30009264: 1a00002c bne 3000931c <pipe_write+0x19c> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
30009268: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED 3000926c: e3520000 cmp r2, #0 <== NOT EXECUTED 30009270: 0a000028 beq 30009318 <pipe_write+0x198> <== NOT EXECUTED 30009274: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED
/* 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) {
30009278: e595100c ldr r1, [r5, #12] <== NOT EXECUTED 3000927c: e0612008 rsb r2, r1, r8 <== NOT EXECUTED 30009280: e152000a cmp r2, sl <== NOT EXECUTED 30009284: 3affffdd bcc 30009200 <pipe_write+0x80> <== NOT EXECUTED
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
30009288: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000928c: e069a004 rsb sl, r9, r4 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
30009290: e0810000 add r0, r1, r0 <== NOT EXECUTED 30009294: e1a01008 mov r1, r8 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
30009298: e152000a cmp r2, sl <== NOT EXECUTED 3000929c: 31a0a002 movcc sl, r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
300092a0: e58d3000 str r3, [sp] <== NOT EXECUTED 300092a4: eb003a12 bl 30017af4 <__umodsi3> <== NOT EXECUTED 300092a8: e0608008 rsb r8, r0, r8 <== NOT EXECUTED
if (chunk > chunk1) {
300092ac: e15a0008 cmp sl, r8 <== NOT EXECUTED 300092b0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300092b4: da000021 ble 30009340 <pipe_write+0x1c0> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
300092b8: e5952000 ldr r2, [r5] <== NOT EXECUTED 300092bc: e0861009 add r1, r6, r9 <== NOT EXECUTED 300092c0: e0820000 add r0, r2, r0 <== NOT EXECUTED 300092c4: e1a02008 mov r2, r8 <== NOT EXECUTED 300092c8: eb001649 bl 3000ebf4 <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
300092cc: e0881009 add r1, r8, r9 <== NOT EXECUTED 300092d0: e0861001 add r1, r6, r1 <== NOT EXECUTED 300092d4: e068200a rsb r2, r8, sl <== NOT EXECUTED 300092d8: e5950000 ldr r0, [r5] <== NOT EXECUTED 300092dc: eb001644 bl 3000ebf4 <memcpy> <== NOT EXECUTED 300092e0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
300092e4: e595200c ldr r2, [r5, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
300092e8: e5951018 ldr r1, [r5, #24] <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
300092ec: e082200a add r2, r2, sl <== NOT EXECUTED
if (pipe->waitingReaders > 0)
300092f0: e3510000 cmp r1, #0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
300092f4: e585200c str r2, [r5, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
300092f8: 1a000018 bne 30009360 <pipe_write+0x1e0> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
written += chunk;
300092fc: e087700a add r7, r7, sl <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
30009300: e1540007 cmp r4, r7 <== NOT EXECUTED 30009304: e1a09007 mov r9, r7 <== NOT EXECUTED 30009308: 9a00001a bls 30009378 <pipe_write+0x1f8> <== NOT EXECUTED 3000930c: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED 30009310: e3a0a001 mov sl, #1 <== NOT EXECUTED 30009314: eaffffb5 b 300091f0 <pipe_write+0x70> <== NOT EXECUTED 30009318: e3e0801f mvn r8, #31 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
3000931c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 30009320: ebfff15e bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
30009324: e3570000 cmp r7, #0 <== NOT EXECUTED 30009328: d1a07008 movle r7, r8 <== NOT EXECUTED 3000932c: eaffff9a b 3000919c <pipe_write+0x1c> <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
30009330: e3e08003 mvn r8, #3 <== NOT EXECUTED 30009334: eafffffa b 30009324 <pipe_write+0x1a4> <== NOT EXECUTED
/* 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) {
if (LIBIO_NODELAY(iop)) {
30009338: e3e0800a mvn r8, #10 <== NOT EXECUTED 3000933c: eafffff6 b 3000931c <pipe_write+0x19c> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
30009340: e5952000 ldr r2, [r5] <== NOT EXECUTED 30009344: e0861009 add r1, r6, r9 <== NOT EXECUTED 30009348: e0820000 add r0, r2, r0 <== NOT EXECUTED 3000934c: e1a0200a mov r2, sl <== NOT EXECUTED 30009350: e58d3000 str r3, [sp] <== NOT EXECUTED 30009354: eb001626 bl 3000ebf4 <memcpy> <== NOT EXECUTED 30009358: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000935c: eaffffe0 b 300092e4 <pipe_write+0x164> <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
30009360: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 30009364: e1a0100b mov r1, fp <== NOT EXECUTED 30009368: e58d3000 str r3, [sp] <== NOT EXECUTED 3000936c: eb0007f3 bl 3000b340 <rtems_barrier_release> <== NOT EXECUTED 30009370: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30009374: eaffffe0 b 300092fc <pipe_write+0x17c> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
30009378: e3a08000 mov r8, #0 <== NOT EXECUTED 3000937c: eaffffe6 b 3000931c <pipe_write+0x19c> <== NOT EXECUTED
30019d34 <read>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30019d34: e59f30bc ldr r3, [pc, #188] ; 30019df8 <read+0xc4>
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
30019d38: e92d4810 push {r4, fp, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30019d3c: e5933000 ldr r3, [r3] 30019d40: e1500003 cmp r0, r3
30019d44: 2a00001c bcs 30019dbc <read+0x88> iop = rtems_libio_iop( fd );
30019d48: e59f40ac ldr r4, [pc, #172] ; 30019dfc <read+0xc8> 30019d4c: e5944000 ldr r4, [r4] 30019d50: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
30019d54: e5940014 ldr r0, [r4, #20] 30019d58: e3100c01 tst r0, #256 ; 0x100
30019d5c: 0a000016 beq 30019dbc <read+0x88> rtems_libio_check_buffer( buffer );
30019d60: e3510000 cmp r1, #0
30019d64: 0a000019 beq 30019dd0 <read+0x9c> rtems_libio_check_count( count );
30019d68: e3520000 cmp r2, #0
30019d6c: 01a00002 moveq r0, r2
30019d70: 08bd8810 popeq {r4, fp, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
30019d74: e3100002 tst r0, #2
30019d78: 0a000014 beq 30019dd0 <read+0x9c>
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
30019d7c: e594303c ldr r3, [r4, #60] ; 0x3c 30019d80: e5933008 ldr r3, [r3, #8] 30019d84: e3530000 cmp r3, #0
30019d88: 0a000015 beq 30019de4 <read+0xb0>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
30019d8c: e1a00004 mov r0, r4 30019d90: e1a0e00f mov lr, pc 30019d94: e12fff13 bx r3
if ( rc > 0 )
30019d98: e3500000 cmp r0, #0
30019d9c: d8bd8810 pople {r4, fp, pc}
iop->offset += rc;
30019da0: e284c00c add ip, r4, #12
30019da4: e89c1800 ldm ip, {fp, ip}
30019da8: e09b2000 adds r2, fp, r0
30019dac: e0ac3fc0 adc r3, ip, r0, asr #31
30019db0: e584200c str r2, [r4, #12]
30019db4: e5843010 str r3, [r4, #16]
return rc;
}
30019db8: e8bd8810 pop {r4, fp, pc}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
30019dbc: ebffd17e bl 3000e3bc <__errno>
30019dc0: e3a03009 mov r3, #9
30019dc4: e5803000 str r3, [r0]
30019dc8: e3e00000 mvn r0, #0
30019dcc: e8bd8810 pop {r4, fp, pc}
rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
30019dd0: ebffd179 bl 3000e3bc <__errno> <== NOT EXECUTED
30019dd4: e3a03016 mov r3, #22 <== NOT EXECUTED
30019dd8: e5803000 str r3, [r0] <== NOT EXECUTED
30019ddc: e3e00000 mvn r0, #0 <== NOT EXECUTED
30019de0: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
30019de4: ebffd174 bl 3000e3bc <__errno> <== NOT EXECUTED
30019de8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
30019dec: e5803000 str r3, [r0] <== NOT EXECUTED
30019df0: e3e00000 mvn r0, #0 <== NOT EXECUTED
30019df4: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
3000568c <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
3000568c: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
30005690: e2516000 subs r6, r1, #0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
30005694: e24dd018 sub sp, sp, #24 30005698: e1a05002 mov r5, r2 3000569c: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
300056a0: 0a000032 beq 30005770 <readlink+0xe4>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
300056a4: eb0036e4 bl 3001323c <strlen> 300056a8: e28d4004 add r4, sp, #4 300056ac: e3a0c000 mov ip, #0 300056b0: e1a01000 mov r1, r0 300056b4: e1a0200c mov r2, ip 300056b8: e1a00007 mov r0, r7 300056bc: e1a03004 mov r3, r4 300056c0: e58dc000 str ip, [sp] 300056c4: ebfffb53 bl 30004418 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
300056c8: e3500000 cmp r0, #0
300056cc: 1a000025 bne 30005768 <readlink+0xdc>
return -1;
if ( !loc.ops->node_type_h ){
300056d0: e59d2010 ldr r2, [sp, #16] 300056d4: e5923010 ldr r3, [r2, #16] 300056d8: e3530000 cmp r3, #0
300056dc: 0a000019 beq 30005748 <readlink+0xbc>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
300056e0: e1a00004 mov r0, r4 300056e4: e1a0e00f mov lr, pc 300056e8: e12fff13 bx r3 300056ec: e3500004 cmp r0, #4
300056f0: 1a000023 bne 30005784 <readlink+0xf8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
300056f4: e59d2010 ldr r2, [sp, #16] 300056f8: e592303c ldr r3, [r2, #60] ; 0x3c 300056fc: e3530000 cmp r3, #0
30005700: 0a00002c beq 300057b8 <readlink+0x12c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
30005704: e1a02005 mov r2, r5 30005708: e1a01006 mov r1, r6 3000570c: e1a00004 mov r0, r4 30005710: e1a0e00f mov lr, pc 30005714: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
30005718: e59d3010 ldr r3, [sp, #16]
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
3000571c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
30005720: e3530000 cmp r3, #0
30005724: 0a000004 beq 3000573c <readlink+0xb0>
30005728: e593301c ldr r3, [r3, #28] 3000572c: e3530000 cmp r3, #0 30005730: 11a00004 movne r0, r4 30005734: 11a0e00f movne lr, pc 30005738: 112fff13 bxne r3
return result;
}
3000573c: e1a00005 mov r0, r5
30005740: e28dd018 add sp, sp, #24
30005744: e8bd80f0 pop {r4, r5, r6, r7, pc}
0, &loc, false );
if ( result != 0 )
return -1;
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
30005748: e592301c ldr r3, [r2, #28]
3000574c: e3530000 cmp r3, #0 <== NOT EXECUTED 30005750: 11a00004 movne r0, r4 <== NOT EXECUTED 30005754: 11a0e00f movne lr, pc <== NOT EXECUTED 30005758: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000575c: eb002f75 bl 30011538 <__errno> <== NOT EXECUTED 30005760: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30005764: e5803000 str r3, [r0] <== NOT EXECUTED 30005768: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000576c: eafffff2 b 3000573c <readlink+0xb0> <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
30005770: eb002f70 bl 30011538 <__errno> <== NOT EXECUTED 30005774: e3a0300e mov r3, #14 <== NOT EXECUTED 30005778: e5803000 str r3, [r0] <== NOT EXECUTED 3000577c: e3e05000 mvn r5, #0 <== NOT EXECUTED 30005780: eaffffed b 3000573c <readlink+0xb0> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
30005784: e59d3010 ldr r3, [sp, #16] 30005788: e3530000 cmp r3, #0
3000578c: 0a000004 beq 300057a4 <readlink+0x118>
30005790: e593301c ldr r3, [r3, #28] 30005794: e3530000 cmp r3, #0 30005798: 11a00004 movne r0, r4 3000579c: 11a0e00f movne lr, pc 300057a0: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
300057a4: eb002f63 bl 30011538 <__errno> 300057a8: e3a03016 mov r3, #22 300057ac: e5803000 str r3, [r0] 300057b0: e3e05000 mvn r5, #0 300057b4: eaffffe0 b 3000573c <readlink+0xb0>
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
300057b8: e592301c ldr r3, [r2, #28]
300057bc: e3530000 cmp r3, #0 <== NOT EXECUTED 300057c0: 11a00004 movne r0, r4 <== NOT EXECUTED 300057c4: 11a0e00f movne lr, pc <== NOT EXECUTED 300057c8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
300057cc: eb002f59 bl 30011538 <__errno> <== NOT EXECUTED 300057d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300057d4: e5803000 str r3, [r0] <== NOT EXECUTED 300057d8: e3e05000 mvn r5, #0 <== NOT EXECUTED 300057dc: eaffffd6 b 3000573c <readlink+0xb0> <== NOT EXECUTED
30003d2c <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
30003d2c: e59f3160 ldr r3, [pc, #352] ; 30003e94 <readv+0x168>
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
30003d30: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
30003d34: e5933000 ldr r3, [r3]
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
30003d38: e1a04002 mov r4, r2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
30003d3c: e1500003 cmp r0, r3
30003d40: 2a000049 bcs 30003e6c <readv+0x140> iop = rtems_libio_iop( fd );
30003d44: e59f314c ldr r3, [pc, #332] ; 30003e98 <readv+0x16c> 30003d48: e5936000 ldr r6, [r3] 30003d4c: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
30003d50: e5963014 ldr r3, [r6, #20] 30003d54: e3130c01 tst r3, #256 ; 0x100
30003d58: 0a000043 beq 30003e6c <readv+0x140> rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
30003d5c: e3130002 tst r3, #2
30003d60: 0a00003b beq 30003e54 <readv+0x128>
/*
* Argument validation on IO vector
*/
if ( !iov )
30003d64: e3510000 cmp r1, #0
30003d68: 0a000039 beq 30003e54 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
30003d6c: e3520000 cmp r2, #0
30003d70: da000037 ble 30003e54 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
30003d74: e3520b01 cmp r2, #1024 ; 0x400
30003d78: ca000035 bgt 30003e54 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
30003d7c: e596303c ldr r3, [r6, #60] ; 0x3c 30003d80: e5933008 ldr r3, [r3, #8] 30003d84: e3530000 cmp r3, #0
30003d88: 0a00003c beq 30003e80 <readv+0x154>
rtems_set_errno_and_return_minus_one( ENOTSUP );
30003d8c: e1a05001 mov r5, r1 30003d90: e3a01000 mov r1, #0 30003d94: e1a02005 mov r2, r5 30003d98: e3a07001 mov r7, #1 30003d9c: e1a00001 mov r0, r1 30003da0: ea000000 b 30003da8 <readv+0x7c>
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003da4: e1a00008 mov r0, r8
ssize_t old;
if ( !iov[v].iov_base )
30003da8: e592c000 ldr ip, [r2]
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003dac: e2811001 add r1, r1, #1
ssize_t old;
if ( !iov[v].iov_base )
30003db0: e35c0000 cmp ip, #0
30003db4: 0a000026 beq 30003e54 <readv+0x128>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
30003db8: e592c004 ldr ip, [r2, #4]
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003dbc: e2822008 add r2, r2, #8
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
30003dc0: e080800c add r8, r0, ip
if ( total < old )
30003dc4: e1580000 cmp r8, r0
30003dc8: ba000021 blt 30003e54 <readv+0x128>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
30003dcc: e35c0000 cmp ip, #0 30003dd0: 13a07000 movne r7, #0
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003dd4: e1540001 cmp r4, r1
30003dd8: cafffff1 bgt 30003da4 <readv+0x78>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
30003ddc: e3570000 cmp r7, #0 <== NOT EXECUTED 30003de0: 13a08000 movne r8, #0 <== NOT EXECUTED 30003de4: 1a00001e bne 30003e64 <readv+0x138> <== NOT EXECUTED 30003de8: e1a08007 mov r8, r7 <== NOT EXECUTED 30003dec: ea00000f b 30003e30 <readv+0x104> <== NOT EXECUTED
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
30003df0: 0a000006 beq 30003e10 <readv+0xe4> <== NOT EXECUTED
iop->offset += bytes;
30003df4: e286c00c add ip, r6, #12 <== NOT EXECUTED
30003df8: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
30003dfc: e09b2000 adds r2, fp, r0 <== NOT EXECUTED
30003e00: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED
30003e04: e586200c str r2, [r6, #12] <== NOT EXECUTED
30003e08: e5863010 str r3, [r6, #16] <== NOT EXECUTED
total += bytes;
30003e0c: e0888000 add r8, r8, r0 <== NOT EXECUTED
}
if (bytes != iov[ v ].iov_len)
30003e10: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003e14: e2855008 add r5, r5, #8 <== NOT EXECUTED
if ( bytes > 0 ) {
iop->offset += bytes;
total += bytes;
}
if (bytes != iov[ v ].iov_len)
30003e18: e1500003 cmp r0, r3 <== NOT EXECUTED 30003e1c: 1a000010 bne 30003e64 <readv+0x138> <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003e20: e1540007 cmp r4, r7 <== NOT EXECUTED 30003e24: da00000e ble 30003e64 <readv+0x138> <== NOT EXECUTED 30003e28: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED 30003e2c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
30003e30: e8950006 ldm r5, {r1, r2} <== NOT EXECUTED
30003e34: e1a00006 mov r0, r6 <== NOT EXECUTED
30003e38: e1a0e00f mov lr, pc <== NOT EXECUTED
30003e3c: e12fff13 bx r3 <== NOT EXECUTED
if ( bytes < 0 )
30003e40: e3500000 cmp r0, #0 <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003e44: e2877001 add r7, r7, #1 <== NOT EXECUTED
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
30003e48: aaffffe8 bge 30003df0 <readv+0xc4> <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30003e4c: e3e08000 mvn r8, #0 <== NOT EXECUTED 30003e50: ea000003 b 30003e64 <readv+0x138> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
30003e54: eb002d3d bl 3000f350 <__errno> 30003e58: e3a03016 mov r3, #22 30003e5c: e5803000 str r3, [r0] 30003e60: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
30003e64: e1a00008 mov r0, r8
30003e68: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
30003e6c: eb002d37 bl 3000f350 <__errno> <== NOT EXECUTED 30003e70: e3a03009 mov r3, #9 <== NOT EXECUTED 30003e74: e5803000 str r3, [r0] <== NOT EXECUTED 30003e78: e3e08000 mvn r8, #0 <== NOT EXECUTED 30003e7c: eafffff8 b 30003e64 <readv+0x138> <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
30003e80: eb002d32 bl 3000f350 <__errno> <== NOT EXECUTED 30003e84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30003e88: e5803000 str r3, [r0] <== NOT EXECUTED 30003e8c: e3e08000 mvn r8, #0 <== NOT EXECUTED 30003e90: eafffff3 b 30003e64 <readv+0x138> <== NOT EXECUTED
30019e58 <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
30019e58: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30019e5c: e59f2118 ldr r2, [pc, #280] ; 30019f7c <realloc+0x124>
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
30019e60: e59f5118 ldr r5, [pc, #280] ; 30019f80 <realloc+0x128>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30019e64: e5922000 ldr r2, [r2]
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
30019e68: e5953010 ldr r3, [r5, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30019e6c: e3520003 cmp r2, #3
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
30019e70: e2833001 add r3, r3, #1 30019e74: e24dd004 sub sp, sp, #4 30019e78: e5853010 str r3, [r5, #16] 30019e7c: e1a04000 mov r4, r0 30019e80: e1a06001 mov r6, r1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30019e84: 0a000020 beq 30019f0c <realloc+0xb4>
}
/*
* Continue with realloc().
*/
if ( !ptr )
30019e88: e3540000 cmp r4, #0
30019e8c: 0a00001a beq 30019efc <realloc+0xa4>
return malloc( size );
if ( !size ) {
30019e90: e3560000 cmp r6, #0
30019e94: 0a00000f beq 30019ed8 <realloc+0x80>
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
30019e98: e59f70e4 ldr r7, [pc, #228] ; 30019f84 <realloc+0x12c> 30019e9c: e1a01004 mov r1, r4 30019ea0: e5970000 ldr r0, [r7] 30019ea4: e1a0200d mov r2, sp 30019ea8: eb00006b bl 3001a05c <_Protected_heap_Get_block_size> 30019eac: e2508000 subs r8, r0, #0
30019eb0: 0a00000c beq 30019ee8 <realloc+0x90>
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) {
30019eb4: e5970000 ldr r0, [r7] 30019eb8: e1a01004 mov r1, r4 30019ebc: e1a02006 mov r2, r6 30019ec0: eb000076 bl 3001a0a0 <_Protected_heap_Resize_block> 30019ec4: e3500000 cmp r0, #0
30019ec8: 0a00001b beq 30019f3c <realloc+0xe4>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
30019ecc: e1a00004 mov r0, r4
30019ed0: e28dd004 add sp, sp, #4
30019ed4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
30019ed8: e1a00004 mov r0, r4 <== NOT EXECUTED 30019edc: ebffa07f bl 300020e0 <free> <== NOT EXECUTED 30019ee0: e1a04006 mov r4, r6 <== NOT EXECUTED
return (void *) 0;
30019ee4: eafffff8 b 30019ecc <realloc+0x74> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
30019ee8: ebffd133 bl 3000e3bc <__errno> 30019eec: e3a03016 mov r3, #22 30019ef0: e5803000 str r3, [r0] 30019ef4: e1a04008 mov r4, r8
return (void *) 0;
30019ef8: eafffff3 b 30019ecc <realloc+0x74>
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
30019efc: e1a00006 mov r0, r6 30019f00: ebffa14e bl 30002440 <malloc> 30019f04: e1a04000 mov r4, r0 30019f08: eaffffef b 30019ecc <realloc+0x74>
/*
* 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)
30019f0c: e59f3074 ldr r3, [pc, #116] ; 30019f88 <realloc+0x130> 30019f10: e5933000 ldr r3, [r3] 30019f14: e3530000 cmp r3, #0
30019f18: 0a000001 beq 30019f24 <realloc+0xcc>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
30019f1c: e3a04000 mov r4, #0 30019f20: eaffffe9 b 30019ecc <realloc+0x74>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
30019f24: e59f3060 ldr r3, [pc, #96] ; 30019f8c <realloc+0x134> 30019f28: e5933000 ldr r3, [r3] 30019f2c: e3530000 cmp r3, #0
30019f30: 0affffd4 beq 30019e88 <realloc+0x30>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
30019f34: e3a04000 mov r4, #0 <== NOT EXECUTED 30019f38: eaffffe3 b 30019ecc <realloc+0x74> <== NOT EXECUTED
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
30019f3c: e1a00006 mov r0, r6 30019f40: ebffa13e bl 30002440 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
30019f44: e5953004 ldr r3, [r5, #4]
if ( !new_area ) {
30019f48: e2507000 subs r7, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
30019f4c: e2433001 sub r3, r3, #1 30019f50: e5853004 str r3, [r5, #4]
if ( !new_area ) {
30019f54: 0afffff0 beq 30019f1c <realloc+0xc4>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
30019f58: e59d2000 ldr r2, [sp] 30019f5c: e1a01004 mov r1, r4 30019f60: e1560002 cmp r6, r2 30019f64: 31a02006 movcc r2, r6 30019f68: ebffd321 bl 3000ebf4 <memcpy>
free( ptr );
30019f6c: e1a00004 mov r0, r4 30019f70: ebffa05a bl 300020e0 <free> 30019f74: e1a04007 mov r4, r7
return new_area;
30019f78: eaffffd3 b 30019ecc <realloc+0x74>
30006b3c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
30006b3c: e92d40f0 push {r4, r5, r6, r7, lr}
30006b40: e24dd030 sub sp, sp, #48 ; 0x30
30006b44: e1a07000 mov r7, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
30006b48: ebfff91c bl 30004fc0 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
30006b4c: e2505000 subs r5, r0, #0
30006b50: 1a00005c bne 30006cc8 <rmdir+0x18c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
30006b54: e28d4018 add r4, sp, #24 30006b58: e1a00007 mov r0, r7 30006b5c: e28d102c add r1, sp, #44 ; 0x2c 30006b60: e1a02004 mov r2, r4 30006b64: eb0000ca bl 30006e94 <rtems_filesystem_get_start_loc> 30006b68: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30006b6c: e28dc004 add ip, sp, #4
30006b70: e1a0e004 mov lr, r4
30006b74: e8be000f ldm lr!, {r0, r1, r2, r3}
30006b78: e8ac000f stmia ip!, {r0, r1, r2, r3}
30006b7c: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
30006b80: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30006b84: e58c3000 str r3, [ip]
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30006b88: e1a00005 mov r0, r5 30006b8c: eb003a90 bl 300155d4 <strlen> 30006b90: e1a01000 mov r1, r0 30006b94: e1a00005 mov r0, r5 30006b98: ebfff8f3 bl 30004f6c <rtems_filesystem_prefix_separators> 30006b9c: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30006ba0: e1a00007 mov r0, r7 30006ba4: eb003a8a bl 300155d4 <strlen> 30006ba8: e28d5004 add r5, sp, #4 30006bac: e3a0c000 mov ip, #0 30006bb0: e1a01000 mov r1, r0 30006bb4: e1a0200c mov r2, ip 30006bb8: e1a00007 mov r0, r7 30006bbc: e1a03005 mov r3, r5 30006bc0: e58dc000 str ip, [sp] 30006bc4: ebfff90e bl 30005004 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
30006bc8: e3500000 cmp r0, #0
30006bcc: 1a00004a bne 30006cfc <rmdir+0x1c0>
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
30006bd0: e59d2010 ldr r2, [sp, #16] 30006bd4: e5923010 ldr r3, [r2, #16] 30006bd8: e3530000 cmp r3, #0
30006bdc: 0a00006b beq 30006d90 <rmdir+0x254>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
30006be0: e1a00005 mov r0, r5 30006be4: e1a0e00f mov lr, pc 30006be8: e12fff13 bx r3 30006bec: e3500001 cmp r0, #1
30006bf0: 1a00001d bne 30006c6c <rmdir+0x130>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
30006bf4: e59d300c ldr r3, [sp, #12] 30006bf8: e5933034 ldr r3, [r3, #52] ; 0x34 30006bfc: e3530000 cmp r3, #0
30006c00: 0a00004a beq 30006d30 <rmdir+0x1f4>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
30006c04: e1a00004 mov r0, r4 30006c08: e1a01005 mov r1, r5 30006c0c: e1a0e00f mov lr, pc 30006c10: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
30006c14: e59d3010 ldr r3, [sp, #16]
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
30006c18: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
30006c1c: e3530000 cmp r3, #0
30006c20: 0a000004 beq 30006c38 <rmdir+0xfc>
30006c24: e593301c ldr r3, [r3, #28] 30006c28: e3530000 cmp r3, #0 30006c2c: 11a00005 movne r0, r5 30006c30: 11a0e00f movne lr, pc 30006c34: 112fff13 bxne r3
if ( free_parentloc )
30006c38: e3560000 cmp r6, #0
30006c3c: 0a000007 beq 30006c60 <rmdir+0x124>
rtems_filesystem_freenode( &parentloc );
30006c40: e59d3024 ldr r3, [sp, #36] ; 0x24 30006c44: e3530000 cmp r3, #0
30006c48: 0a000004 beq 30006c60 <rmdir+0x124>
30006c4c: e593301c ldr r3, [r3, #28] 30006c50: e3530000 cmp r3, #0 30006c54: 11a00004 movne r0, r4 30006c58: 11a0e00f movne lr, pc 30006c5c: 112fff13 bxne r3
return result;
}
30006c60: e1a00007 mov r0, r7
30006c64: e28dd030 add sp, sp, #48 ; 0x30
30006c68: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
30006c6c: e59d3010 ldr r3, [sp, #16] 30006c70: e3530000 cmp r3, #0
30006c74: 0a000004 beq 30006c8c <rmdir+0x150>
30006c78: e593301c ldr r3, [r3, #28] 30006c7c: e3530000 cmp r3, #0 30006c80: 11a00005 movne r0, r5 30006c84: 11a0e00f movne lr, pc 30006c88: 112fff13 bxne r3
if ( free_parentloc )
30006c8c: e3560000 cmp r6, #0
30006c90: 0a000007 beq 30006cb4 <rmdir+0x178>
rtems_filesystem_freenode( &parentloc );
30006c94: e59d3024 ldr r3, [sp, #36] ; 0x24 30006c98: e3530000 cmp r3, #0
30006c9c: 0a000004 beq 30006cb4 <rmdir+0x178>
30006ca0: e593301c ldr r3, [r3, #28] 30006ca4: e3530000 cmp r3, #0 30006ca8: 11a00004 movne r0, r4 30006cac: 11a0e00f movne lr, pc 30006cb0: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
30006cb4: eb002d35 bl 30012190 <__errno> 30006cb8: e3a03014 mov r3, #20 30006cbc: e5803000 str r3, [r0] 30006cc0: e3e07000 mvn r7, #0 30006cc4: eaffffe5 b 30006c60 <rmdir+0x124>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
30006cc8: e28d4018 add r4, sp, #24 30006ccc: e3a0c000 mov ip, #0 30006cd0: e1a00007 mov r0, r7 30006cd4: e1a01005 mov r1, r5 30006cd8: e3a02002 mov r2, #2 30006cdc: e1a03004 mov r3, r4 30006ce0: e58dc000 str ip, [sp] 30006ce4: ebfff902 bl 300050f4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
30006ce8: e3500000 cmp r0, #0 30006cec: 03a06001 moveq r6, #1
30006cf0: 0affff9d beq 30006b6c <rmdir+0x30>
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
30006cf4: e3e07000 mvn r7, #0 30006cf8: eaffffd8 b 30006c60 <rmdir+0x124>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
30006cfc: e3560000 cmp r6, #0
30006d00: 0afffffb beq 30006cf4 <rmdir+0x1b8>
rtems_filesystem_freenode( &parentloc );
30006d04: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30006d08: e3530000 cmp r3, #0 <== NOT EXECUTED 30006d0c: 0afffff8 beq 30006cf4 <rmdir+0x1b8> <== NOT EXECUTED 30006d10: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30006d14: e3530000 cmp r3, #0 <== NOT EXECUTED 30006d18: 0afffff5 beq 30006cf4 <rmdir+0x1b8> <== NOT EXECUTED 30006d1c: e1a00004 mov r0, r4 <== NOT EXECUTED 30006d20: e1a0e00f mov lr, pc <== NOT EXECUTED 30006d24: e12fff13 bx r3 <== NOT EXECUTED 30006d28: e3e07000 mvn r7, #0 <== NOT EXECUTED 30006d2c: eaffffcb b 30006c60 <rmdir+0x124> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
30006d30: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30006d34: e3530000 cmp r3, #0 <== NOT EXECUTED 30006d38: 0a000005 beq 30006d54 <rmdir+0x218> <== NOT EXECUTED 30006d3c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30006d40: e3530000 cmp r3, #0 <== NOT EXECUTED 30006d44: 0a000002 beq 30006d54 <rmdir+0x218> <== NOT EXECUTED 30006d48: e1a00005 mov r0, r5 <== NOT EXECUTED 30006d4c: e1a0e00f mov lr, pc <== NOT EXECUTED 30006d50: e12fff13 bx r3 <== NOT EXECUTED
if ( free_parentloc )
30006d54: e3560000 cmp r6, #0 <== NOT EXECUTED 30006d58: 0a000007 beq 30006d7c <rmdir+0x240> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
30006d5c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30006d60: e3530000 cmp r3, #0 <== NOT EXECUTED 30006d64: 0a000004 beq 30006d7c <rmdir+0x240> <== NOT EXECUTED 30006d68: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30006d6c: e3530000 cmp r3, #0 <== NOT EXECUTED 30006d70: 11a00004 movne r0, r4 <== NOT EXECUTED 30006d74: 11a0e00f movne lr, pc <== NOT EXECUTED 30006d78: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
30006d7c: eb002d03 bl 30012190 <__errno> <== NOT EXECUTED 30006d80: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30006d84: e5803000 str r3, [r0] <== NOT EXECUTED 30006d88: e3e07000 mvn r7, #0 <== NOT EXECUTED 30006d8c: eaffffb3 b 30006c60 <rmdir+0x124> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
30006d90: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30006d94: e3530000 cmp r3, #0 <== NOT EXECUTED 30006d98: 1affffea bne 30006d48 <rmdir+0x20c> <== NOT EXECUTED 30006d9c: eaffffec b 30006d54 <rmdir+0x218> <== NOT EXECUTED
3001358c <rtems_assoc_name_bad>:
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
3001358c: e59f0000 ldr r0, [pc, #0] ; 30013594 <rtems_assoc_name_bad+0x8><== NOT EXECUTED 30013590: e12fff1e bx lr <== NOT EXECUTED
30010240 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
30010240: e92d4010 push {r4, lr}
30010244: e1a04001 mov r4, r1
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
30010248: eb000006 bl 30010268 <rtems_assoc_ptr_by_local>
if (nap)
3001024c: e3500000 cmp r0, #0
30010250: 0a000001 beq 3001025c <rtems_assoc_name_by_local+0x1c>
return nap->name;
return rtems_assoc_name_bad(local_value);
}
30010254: e5900000 ldr r0, [r0]
30010258: e8bd8010 pop {r4, pc}
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
3001025c: e1a00004 mov r0, r4
}
30010260: e8bd4010 pop {r4, lr}
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
30010264: ea000cc8 b 3001358c <rtems_assoc_name_bad>
3000e324 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
3000e324: e92d4030 push {r4, r5, lr}
3000e328: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
3000e32c: e5900000 ldr r0, [r0]
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
3000e330: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
3000e334: e3500000 cmp r0, #0 3000e338: 01a04000 moveq r4, r0
3000e33c: 0a000013 beq 3000e390 <rtems_assoc_ptr_by_local+0x6c>
3000e340: e59f105c ldr r1, [pc, #92] ; 3000e3a4 <rtems_assoc_ptr_by_local+0x80> 3000e344: eb000345 bl 3000f060 <strcmp> 3000e348: e3500000 cmp r0, #0 3000e34c: 13a02000 movne r2, #0
3000e350: 1a00000b bne 3000e384 <rtems_assoc_ptr_by_local+0x60>
default_ap = ap++;
for ( ; ap->name; ap++)
3000e354: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
3000e358: e284300c add r3, r4, #12 <== NOT EXECUTED
for ( ; ap->name; ap++)
3000e35c: e3520000 cmp r2, #0 <== NOT EXECUTED 3000e360: 0a00000a beq 3000e390 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED 3000e364: e1a02004 mov r2, r4 <== NOT EXECUTED 3000e368: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->local_value == local_value)
3000e36c: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 3000e370: e1530005 cmp r3, r5 <== NOT EXECUTED 3000e374: 0a000005 beq 3000e390 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
3000e378: e5b4300c ldr r3, [r4, #12]! 3000e37c: e3530000 cmp r3, #0
3000e380: 0a000004 beq 3000e398 <rtems_assoc_ptr_by_local+0x74>
if (ap->local_value == local_value)
3000e384: e5943004 ldr r3, [r4, #4] 3000e388: e1530005 cmp r3, r5
3000e38c: 1afffff9 bne 3000e378 <rtems_assoc_ptr_by_local+0x54>
return ap;
return default_ap;
}
3000e390: e1a00004 mov r0, r4
3000e394: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
3000e398: e1a04002 mov r4, r2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
3000e39c: e1a00004 mov r0, r4
3000e3a0: e8bd8030 pop {r4, r5, pc}
3000db8c <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
3000db8c: e92d4030 push {r4, r5, lr}
3000db90: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
3000db94: e5900000 ldr r0, [r0]
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
3000db98: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
3000db9c: e3500000 cmp r0, #0 3000dba0: 01a04000 moveq r4, r0
3000dba4: 0a000013 beq 3000dbf8 <rtems_assoc_ptr_by_remote+0x6c>
3000dba8: e59f105c ldr r1, [pc, #92] ; 3000dc0c <rtems_assoc_ptr_by_remote+0x80> 3000dbac: eb00052b bl 3000f060 <strcmp> 3000dbb0: e3500000 cmp r0, #0 3000dbb4: 13a02000 movne r2, #0
3000dbb8: 1a00000b bne 3000dbec <rtems_assoc_ptr_by_remote+0x60>
default_ap = ap++;
for ( ; ap->name; ap++)
3000dbbc: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
3000dbc0: e284300c add r3, r4, #12 <== NOT EXECUTED
for ( ; ap->name; ap++)
3000dbc4: e3520000 cmp r2, #0 <== NOT EXECUTED 3000dbc8: 0a00000a beq 3000dbf8 <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED 3000dbcc: e1a02004 mov r2, r4 <== NOT EXECUTED 3000dbd0: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->remote_value == remote_value)
3000dbd4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3000dbd8: e1530005 cmp r3, r5 <== NOT EXECUTED 3000dbdc: 0a000005 beq 3000dbf8 <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
3000dbe0: e5b4300c ldr r3, [r4, #12]! 3000dbe4: e3530000 cmp r3, #0
3000dbe8: 0a000004 beq 3000dc00 <rtems_assoc_ptr_by_remote+0x74>
if (ap->remote_value == remote_value)
3000dbec: e5943008 ldr r3, [r4, #8] 3000dbf0: e1530005 cmp r3, r5
3000dbf4: 1afffff9 bne 3000dbe0 <rtems_assoc_ptr_by_remote+0x54>
return ap;
return default_ap;
}
3000dbf8: e1a00004 mov r0, r4
3000dbfc: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
3000dc00: e1a04002 mov r4, r2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
3000dc04: e1a00004 mov r0, r4
3000dc08: e8bd8030 pop {r4, r5, pc}
3000e310 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
3000e310: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
3000e314: eb000002 bl 3000e324 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
3000e318: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
3000e31c: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0;
}
3000e320: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30001d18 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
30001d18: e92d4070 push {r4, r5, r6, lr}
30001d1c: e1a05000 mov r5, r0
30001d20: e1a04001 mov r4, r1
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
30001d24: ebffffc2 bl 30001c34 <rtems_bsp_cmdline_get_param>
if ( !p )
30001d28: e2506000 subs r6, r0, #0
30001d2c: 1a000002 bne 30001d3c <rtems_bsp_cmdline_get_param_rhs+0x24>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
30001d30: e3a04000 mov r4, #0 <== NOT EXECUTED
}
30001d34: e1a00004 mov r0, r4 <== NOT EXECUTED
30001d38: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
30001d3c: e1a00005 mov r0, r5 30001d40: eb003704 bl 3000f958 <strlen>
if ( *rhs != '=' )
30001d44: e7d63000 ldrb r3, [r6, r0]
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
30001d48: e0866000 add r6, r6, r0
if ( *rhs != '=' )
30001d4c: e353003d cmp r3, #61 ; 0x3d
30001d50: 1afffff6 bne 30001d30 <rtems_bsp_cmdline_get_param_rhs+0x18>
return NULL;
rhs++;
if ( *rhs == '\"' )
30001d54: e5d63001 ldrb r3, [r6, #1]
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
rhs++;
30001d58: e2866001 add r6, r6, #1
if ( *rhs == '\"' )
30001d5c: e3530022 cmp r3, #34 ; 0x22
rhs++;
30001d60: 05f63001 ldrbeq r3, [r6, #1]!
for ( d=value ; *rhs ; )
30001d64: e3530000 cmp r3, #0 30001d68: 01a02004 moveq r2, r4
30001d6c: 0a000004 beq 30001d84 <rtems_bsp_cmdline_get_param_rhs+0x6c>
30001d70: e1a02004 mov r2, r4 <== NOT EXECUTED
*d++ = *rhs++;
30001d74: e4c23001 strb r3, [r2], #1 <== NOT EXECUTED
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
30001d78: e5f63001 ldrb r3, [r6, #1]! <== NOT EXECUTED 30001d7c: e3530000 cmp r3, #0 <== NOT EXECUTED 30001d80: 1afffffb bne 30001d74 <rtems_bsp_cmdline_get_param_rhs+0x5c><== NOT EXECUTED
*d++ = *rhs++;
if ( *(d-1) == '\"' )
30001d84: e5523001 ldrb r3, [r2, #-1]
d--;
*d = '\0';
return value;
}
30001d88: e1a00004 mov r0, r4
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
30001d8c: e3530022 cmp r3, #34 ; 0x22 30001d90: 02422001 subeq r2, r2, #1
d--;
*d = '\0';
30001d94: e3a03000 mov r3, #0 30001d98: e5c23000 strb r3, [r2]
return value;
}
30001d9c: e8bd8070 pop {r4, r5, r6, pc}
3000e2e4 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
3000e2e4: e92d4010 push {r4, lr} <== NOT EXECUTED
3000e2e8: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
3000e2ec: e59f0018 ldr r0, [pc, #24] ; 3000e30c <rtems_deviceio_errno+0x28><== NOT EXECUTED 3000e2f0: eb000006 bl 3000e310 <rtems_assoc_remote_by_local> <== NOT EXECUTED 3000e2f4: e2504000 subs r4, r0, #0 <== NOT EXECUTED 3000e2f8: 0a000001 beq 3000e304 <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{
errno = rc;
3000e2fc: eb00002e bl 3000e3bc <__errno> <== NOT EXECUTED 3000e300: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
}
return -1;
}
3000e304: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000e308: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30006d4c <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
30006d4c: e92d000e push {r1, r2, r3} <== NOT EXECUTED
30006d50: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
30006d54: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
30006d58: e28d300c add r3, sp, #12 <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
30006d5c: e1a02003 mov r2, r3 <== NOT EXECUTED 30006d60: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
30006d64: e58d3000 str r3, [sp] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
30006d68: ebffff81 bl 30006b74 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
30006d6c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
30006d70: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
30006d74: e28dd00c add sp, sp, #12 <== NOT EXECUTED
30006d78: e12fff1e bx lr <== NOT EXECUTED
30002058 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30002058: e92d40f0 push {r4, r5, r6, r7, lr}
int i = 0;
3000205c: e3a0c000 mov ip, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30002060: e24dd008 sub sp, sp, #8
/*
* Verify Input parameters.
*/
if ( !pathname )
30002064: e2504000 subs r4, r0, #0
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
int i = 0;
30002068: e58dc004 str ip, [sp, #4]
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
3000206c: e1a05001 mov r5, r1 30002070: e1a06002 mov r6, r2 30002074: e1a07003 mov r7, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
30002078: 0a000013 beq 300020cc <rtems_filesystem_evaluate_path+0x74>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
3000207c: e3530000 cmp r3, #0
30002080: 0a00000c beq 300020b8 <rtems_filesystem_evaluate_path+0x60>
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
30002084: e1a02003 mov r2, r3 30002088: e28d1004 add r1, sp, #4 3000208c: eb0003c9 bl 30002fb8 <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
30002090: e59d0004 ldr r0, [sp, #4] 30002094: e59dc01c ldr ip, [sp, #28] 30002098: e0601005 rsb r1, r0, r5 3000209c: e1a02006 mov r2, r6 300020a0: e0840000 add r0, r4, r0 300020a4: e1a03007 mov r3, r7 300020a8: e58dc000 str ip, [sp] 300020ac: ebffffad bl 30001f68 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
300020b0: e28dd008 add sp, sp, #8
300020b4: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
300020b8: eb0030bf bl 3000e3bc <__errno> <== NOT EXECUTED 300020bc: e3a03005 mov r3, #5 <== NOT EXECUTED 300020c0: e5803000 str r3, [r0] <== NOT EXECUTED 300020c4: e3e00000 mvn r0, #0 <== NOT EXECUTED 300020c8: eafffff8 b 300020b0 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
300020cc: eb0030ba bl 3000e3bc <__errno> <== NOT EXECUTED 300020d0: e3a0300e mov r3, #14 <== NOT EXECUTED 300020d4: e5803000 str r3, [r0] <== NOT EXECUTED 300020d8: e3e00000 mvn r0, #0 <== NOT EXECUTED 300020dc: eafffff3 b 300020b0 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
30001f68 <rtems_filesystem_evaluate_relative_path>:
/*
* Verify Input parameters.
*/
if ( !pathname )
30001f68: e3500000 cmp r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001f6c: e92d4030 push {r4, r5, lr}
30001f70: e1a05002 mov r5, r2
30001f74: e1a04003 mov r4, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
30001f78: 0a00002c beq 30002030 <rtems_filesystem_evaluate_relative_path+0xc8>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
30001f7c: e3530000 cmp r3, #0
30001f80: 0a00002f beq 30002044 <rtems_filesystem_evaluate_relative_path+0xdc>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
30001f84: e593c00c ldr ip, [r3, #12] 30001f88: e59cc000 ldr ip, [ip] 30001f8c: e35c0000 cmp ip, #0
30001f90: 0a000021 beq 3000201c <rtems_filesystem_evaluate_relative_path+0xb4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
30001f94: e1a0e00f mov lr, pc 30001f98: e12fff1c bx ip
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
30001f9c: e59d200c ldr r2, [sp, #12]
30001fa0: e2703001 rsbs r3, r0, #1
30001fa4: 33a03000 movcc r3, #0
30001fa8: e3520000 cmp r2, #0
30001fac: 03a03000 moveq r3, #0
30001fb0: e3530000 cmp r3, #0
30001fb4: 08bd8030 popeq {r4, r5, pc}
if ( !pathloc->ops->node_type_h ){
30001fb8: e594200c ldr r2, [r4, #12] 30001fbc: e5923010 ldr r3, [r2, #16] 30001fc0: e3530000 cmp r3, #0
30001fc4: 0a00000f beq 30002008 <rtems_filesystem_evaluate_relative_path+0xa0>
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
30001fc8: e1a00004 mov r0, r4 30001fcc: e1a0e00f mov lr, pc 30001fd0: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
30001fd4: e2400003 sub r0, r0, #3
30001fd8: e3500001 cmp r0, #1
30001fdc: 83a00000 movhi r0, #0
30001fe0: 88bd8030 pophi {r4, r5, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
30001fe4: e594200c ldr r2, [r4, #12] 30001fe8: e5923034 ldr r3, [r2, #52] ; 0x34 30001fec: e3530000 cmp r3, #0
30001ff0: 0a000004 beq 30002008 <rtems_filesystem_evaluate_relative_path+0xa0>
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
30001ff4: e1a00004 mov r0, r4 30001ff8: e1a01005 mov r1, r5 30001ffc: e1a0e00f mov lr, pc 30002000: e12fff13 bx r3
}
}
return result;
}
30002004: e8bd8030 pop {r4, r5, pc}
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
30002008: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3000200c: e3530000 cmp r3, #0 <== NOT EXECUTED 30002010: 11a00004 movne r0, r4 <== NOT EXECUTED 30002014: 11a0e00f movne lr, pc <== NOT EXECUTED 30002018: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000201c: eb0030e6 bl 3000e3bc <__errno> <== NOT EXECUTED
30002020: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
30002024: e5803000 str r3, [r0] <== NOT EXECUTED
30002028: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000202c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
30002030: eb0030e1 bl 3000e3bc <__errno> <== NOT EXECUTED
30002034: e3a0300e mov r3, #14 <== NOT EXECUTED
30002038: e5803000 str r3, [r0] <== NOT EXECUTED
3000203c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002040: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
30002044: eb0030dc bl 3000e3bc <__errno> <== NOT EXECUTED
30002048: e3a03005 mov r3, #5 <== NOT EXECUTED
3000204c: e5803000 str r3, [r0] <== NOT EXECUTED
30002050: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002054: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
30001d6c <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 )
{
30001d6c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d70: e59f20ec ldr r2, [pc, #236] ; 30001e64 <rtems_filesystem_initialize+0xf8>
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d74: e59f60ec ldr r6, [pc, #236] ; 30001e68 <rtems_filesystem_initialize+0xfc>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d78: e5922000 ldr r2, [r2]
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d7c: e5963000 ldr r3, [r6]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d80: e3520000 cmp r2, #0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d84: e3a02012 mov r2, #18
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
30001d88: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d8c: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d90: 0a00002d beq 30001e4c <rtems_filesystem_initialize+0xe0>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001d94: e59f30d0 ldr r3, [pc, #208] ; 30001e6c <rtems_filesystem_initialize+0x100>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001d98: e3a05000 mov r5, #0
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001d9c: e5932000 ldr r2, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001da0: e5923004 ldr r3, [r2, #4] 30001da4: e5920008 ldr r0, [r2, #8] 30001da8: e592100c ldr r1, [r2, #12] 30001dac: e5922000 ldr r2, [r2] 30001db0: e58d5000 str r5, [sp] 30001db4: eb000245 bl 300026d0 <mount>
if ( status == -1 )
30001db8: e3700001 cmn r0, #1
30001dbc: 0a000026 beq 30001e5c <rtems_filesystem_initialize+0xf0>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
30001dc0: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001dc4: 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;
30001dc8: 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);
30001dcc: e3a01001 mov r1, #1 30001dd0: e1a03004 mov r3, r4 30001dd4: e1a02005 mov r2, r5 30001dd8: e59f0090 ldr r0, [pc, #144] ; 30001e70 <rtems_filesystem_initialize+0x104> 30001ddc: e58d5000 str r5, [sp] 30001de0: eb00009c bl 30002058 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30001de4: e596c000 ldr ip, [r6]
30001de8: e1a07004 mov r7, r4
30001dec: e28cc018 add ip, ip, #24
30001df0: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001df4: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001df8: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001dfc: e1a02005 mov r2, r5
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
30001e00: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001e04: e3a01001 mov r1, #1 30001e08: e1a03004 mov r3, r4 30001e0c: e59f005c ldr r0, [pc, #92] ; 30001e70 <rtems_filesystem_initialize+0x104> 30001e10: e58d5000 str r5, [sp] 30001e14: eb00008f bl 30002058 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30001e18: e8b4000f ldm r4!, {r0, r1, r2, r3}
30001e1c: e596c000 ldr ip, [r6]
30001e20: e28cc004 add ip, ip, #4
30001e24: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001e28: 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);
30001e2c: e59f0040 ldr r0, [pc, #64] ; 30001e74 <rtems_filesystem_initialize+0x108>
/* 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;
30001e30: 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);
30001e34: e59f103c ldr r1, [pc, #60] ; 30001e78 <rtems_filesystem_initialize+0x10c> 30001e38: eb0001bf bl 3000253c <mkdir>
if ( status != 0 )
30001e3c: e3500000 cmp r0, #0
30001e40: 1a000003 bne 30001e54 <rtems_filesystem_initialize+0xe8> * 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. */ }
30001e44: e28dd018 add sp, sp, #24
30001e48: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
30001e4c: e59f0028 ldr r0, [pc, #40] ; 30001e7c <rtems_filesystem_initialize+0x110><== NOT EXECUTED 30001e50: eb000fe9 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
30001e54: e59f0024 ldr r0, [pc, #36] ; 30001e80 <rtems_filesystem_initialize+0x114><== NOT EXECUTED 30001e58: eb000fe7 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
30001e5c: e59f0020 ldr r0, [pc, #32] ; 30001e84 <rtems_filesystem_initialize+0x118><== NOT EXECUTED 30001e60: eb000fe5 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
3000afd0 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000afd0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000afd4: e59f60ac ldr r6, [pc, #172] ; 3000b088 <rtems_filesystem_iterate+0xb8>
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000afd8: e1a04000 mov r4, r0
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000afdc: e5963000 ldr r3, [r6]
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000afe0: e1a05001 mov r5, r1
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000afe4: e3530000 cmp r3, #0
3000afe8: 1a000002 bne 3000aff8 <rtems_filesystem_iterate+0x28>
3000afec: ea00000c b 3000b024 <rtems_filesystem_iterate+0x54> <== NOT EXECUTED 3000aff0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000aff4: 1a000021 bne 3000b080 <rtems_filesystem_iterate+0xb0> <== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
3000aff8: e1a00006 mov r0, r6 3000affc: e1a01005 mov r1, r5 3000b000: e1a0e00f mov lr, pc 3000b004: e12fff14 bx r4
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000b008: e5963008 ldr r3, [r6, #8]
stop = (*routine)( table_entry, routine_arg );
3000b00c: e1a0a000 mov sl, r0
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000b010: e3530000 cmp r3, #0 3000b014: e2866008 add r6, r6, #8
3000b018: 1afffff4 bne 3000aff0 <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
3000b01c: e3500000 cmp r0, #0
3000b020: 1a000016 bne 3000b080 <rtems_filesystem_iterate+0xb0>
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 );
3000b024: e59f7060 ldr r7, [pc, #96] ; 3000b08c <rtems_filesystem_iterate+0xbc> 3000b028: e3a01000 mov r1, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
3000b02c: e59f605c ldr r6, [pc, #92] ; 3000b090 <rtems_filesystem_iterate+0xc0> 3000b030: e5970000 ldr r0, [r7] 3000b034: e1a02001 mov r2, r1 3000b038: ebffe9d0 bl 30005780 <rtems_semaphore_obtain> 3000b03c: e4968004 ldr r8, [r6], #4
rtems_libio_lock();
for (
3000b040: e1580006 cmp r8, r6 3000b044: 03a0a000 moveq sl, #0
3000b048: 1a000002 bne 3000b058 <rtems_filesystem_iterate+0x88>
3000b04c: ea000009 b 3000b078 <rtems_filesystem_iterate+0xa8> 3000b050: e3500000 cmp r0, #0
3000b054: 1a000007 bne 3000b078 <rtems_filesystem_iterate+0xa8>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
3000b058: e2880008 add r0, r8, #8 3000b05c: e1a01005 mov r1, r5 3000b060: e1a0e00f mov lr, pc 3000b064: e12fff14 bx r4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
3000b068: e5988000 ldr r8, [r8] 3000b06c: e1a0a000 mov sl, r0
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
3000b070: e1580006 cmp r8, r6
3000b074: 1afffff5 bne 3000b050 <rtems_filesystem_iterate+0x80>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000b078: e5970000 ldr r0, [r7] 3000b07c: ebffea07 bl 300058a0 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
return stop;
}
3000b080: e1a0000a mov r0, sl
3000b084: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
30002658 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
30002658: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
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 );
3000265c: e59f7064 ldr r7, [pc, #100] ; 300026c8 <rtems_filesystem_mount_iterate+0x70>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
30002660: e59f4064 ldr r4, [pc, #100] ; 300026cc <rtems_filesystem_mount_iterate+0x74> 30002664: e1a06001 mov r6, r1 30002668: e3a01000 mov r1, #0 3000266c: e1a05000 mov r5, r0 30002670: e1a02001 mov r2, r1 30002674: e5970000 ldr r0, [r7] 30002678: eb000c40 bl 30005780 <rtems_semaphore_obtain> 3000267c: e4948004 ldr r8, [r4], #4
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
30002680: e1580004 cmp r8, r4 30002684: 03a0a000 moveq sl, #0
30002688: 1a000002 bne 30002698 <rtems_filesystem_mount_iterate+0x40>
3000268c: ea000009 b 300026b8 <rtems_filesystem_mount_iterate+0x60> <== NOT EXECUTED
30002690: e3500000 cmp r0, #0
30002694: 1a000007 bne 300026b8 <rtems_filesystem_mount_iterate+0x60>
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
30002698: e1a00008 mov r0, r8 3000269c: e1a01006 mov r1, r6 300026a0: e1a0e00f mov lr, pc 300026a4: e12fff15 bx r5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
300026a8: e5988000 ldr r8, [r8] 300026ac: e1a0a000 mov sl, r0
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
300026b0: e1580004 cmp r8, r4
300026b4: 1afffff5 bne 30002690 <rtems_filesystem_mount_iterate+0x38>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
300026b8: e5970000 ldr r0, [r7] 300026bc: eb000c77 bl 300058a0 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
300026c0: e1a0000a mov r0, sl
300026c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
30001ed0 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
30001ed0: e92d4070 push {r4, r5, r6, lr}
30001ed4: e1a04000 mov r4, r0
/* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
30001ed8: e5d00000 ldrb r0, [r0] 30001edc: e1a06001 mov r6, r1 30001ee0: e3510000 cmp r1, #0 30001ee4: 13500000 cmpne r0, #0 30001ee8: 03a05000 moveq r5, #0 30001eec: 13a05001 movne r5, #1 30001ef0: 13a05000 movne r5, #0
30001ef4: 1a000005 bne 30001f10 <rtems_filesystem_prefix_separators+0x40>
30001ef8: ea000007 b 30001f1c <rtems_filesystem_prefix_separators+0x4c><== NOT EXECUTED
{
pathname++;
pathnamelen--;
stripped++;
30001efc: e2855001 add r5, r5, #1
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
30001f00: e7d40005 ldrb r0, [r4, r5] 30001f04: e1560005 cmp r6, r5 30001f08: 13500000 cmpne r0, #0
30001f0c: 0a000002 beq 30001f1c <rtems_filesystem_prefix_separators+0x4c>
30001f10: eb00043d bl 3000300c <rtems_filesystem_is_separator> 30001f14: e3500000 cmp r0, #0
30001f18: 1afffff7 bne 30001efc <rtems_filesystem_prefix_separators+0x2c>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
30001f1c: e1a00005 mov r0, r5
30001f20: e8bd8070 pop {r4, r5, r6, pc}
3000b0c8 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
3000b0c8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
3000b0cc: e1a08001 mov r8, r1
3000b0d0: e1a05000 mov r5, r0
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
3000b0d4: eb0010bd bl 3000f3d0 <strlen>
filesystem_node *fsn = malloc( fsn_size );
3000b0d8: e2800011 add r0, r0, #17 3000b0dc: ebffdcd7 bl 30002440 <malloc>
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
3000b0e0: e2504000 subs r4, r0, #0
3000b0e4: 0a00001e beq 3000b164 <rtems_filesystem_register+0x9c>
rtems_filesystem_fsmount_me_t mount_h
)
{
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
3000b0e8: e2847010 add r7, r4, #16
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
3000b0ec: e1a01005 mov r1, r5 3000b0f0: e1a00007 mov r0, r7
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 );
3000b0f4: e59f607c ldr r6, [pc, #124] ; 3000b178 <rtems_filesystem_register+0xb0> 3000b0f8: eb001064 bl 3000f290 <strcpy> 3000b0fc: e3a01000 mov r1, #0 3000b100: e1a02001 mov r2, r1
fsn->entry.type = type_storage;
3000b104: e5847008 str r7, [r4, #8]
fsn->entry.mount_h = mount_h;
3000b108: e584800c str r8, [r4, #12] 3000b10c: e5960000 ldr r0, [r6] 3000b110: ebffe99a bl 30005780 <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
3000b114: e1a00005 mov r0, r5 3000b118: ebffffdd bl 3000b094 <rtems_filesystem_get_mount_handler> 3000b11c: e2505000 subs r5, r0, #0
3000b120: 1a000006 bne 3000b140 <rtems_filesystem_register+0x78>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
3000b124: e1a01004 mov r1, r4 3000b128: e59f004c ldr r0, [pc, #76] ; 3000b17c <rtems_filesystem_register+0xb4> 3000b12c: ebffebe8 bl 300060d4 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000b130: e5960000 ldr r0, [r6] 3000b134: ebffe9d9 bl 300058a0 <rtems_semaphore_release> 3000b138: e1a00005 mov r0, r5
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
3000b13c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
3000b140: e5960000 ldr r0, [r6] <== NOT EXECUTED 3000b144: ebffe9d5 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
3000b148: e1a00004 mov r0, r4 <== NOT EXECUTED 3000b14c: ebffdbe3 bl 300020e0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
3000b150: eb000c99 bl 3000e3bc <__errno> <== NOT EXECUTED 3000b154: e3a03016 mov r3, #22 <== NOT EXECUTED 3000b158: e5803000 str r3, [r0] <== NOT EXECUTED 3000b15c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_libio_unlock();
return 0;
}
3000b160: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
3000b164: eb000c94 bl 3000e3bc <__errno> <== NOT EXECUTED
3000b168: e3a0300c mov r3, #12 <== NOT EXECUTED
3000b16c: e5803000 str r3, [r0] <== NOT EXECUTED
3000b170: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000b174: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
3000af24 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
3000af24: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_chain_node *node = NULL;
if ( type == NULL ) {
3000af28: e2505000 subs r5, r0, #0 <== NOT EXECUTED 3000af2c: 0a000020 beq 3000afb4 <rtems_filesystem_unregister+0x90> <== 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 );
3000af30: e59f6090 ldr r6, [pc, #144] ; 3000afc8 <rtems_filesystem_unregister+0xa4><== NOT EXECUTED 3000af34: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
3000af38: e59f408c ldr r4, [pc, #140] ; 3000afcc <rtems_filesystem_unregister+0xa8><== NOT EXECUTED 3000af3c: e5960000 ldr r0, [r6] <== NOT EXECUTED 3000af40: e1a02001 mov r2, r1 <== NOT EXECUTED 3000af44: ebffea0d bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED 3000af48: e4947004 ldr r7, [r4], #4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
3000af4c: e1570004 cmp r7, r4 <== NOT EXECUTED 3000af50: 1a000003 bne 3000af64 <rtems_filesystem_unregister+0x40> <== NOT EXECUTED 3000af54: ea00000f b 3000af98 <rtems_filesystem_unregister+0x74> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
3000af58: e5977000 ldr r7, [r7] <== NOT EXECUTED 3000af5c: e1570004 cmp r7, r4 <== NOT EXECUTED 3000af60: 0a00000c beq 3000af98 <rtems_filesystem_unregister+0x74> <== NOT EXECUTED
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
3000af64: e5970008 ldr r0, [r7, #8] <== NOT EXECUTED 3000af68: e1a01005 mov r1, r5 <== NOT EXECUTED 3000af6c: eb00103b bl 3000f060 <strcmp> <== NOT EXECUTED 3000af70: e2508000 subs r8, r0, #0 <== NOT EXECUTED 3000af74: 1afffff7 bne 3000af58 <rtems_filesystem_unregister+0x34> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
3000af78: e1a00007 mov r0, r7 <== NOT EXECUTED 3000af7c: ebffec5f bl 30006100 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( node );
free( fsn );
3000af80: e1a00007 mov r0, r7 <== NOT EXECUTED 3000af84: ebffdc55 bl 300020e0 <free> <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000af88: e5960000 ldr r0, [r6] <== NOT EXECUTED 3000af8c: ebffea43 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 3000af90: e1a00008 mov r0, r8 <== NOT EXECUTED
rtems_libio_unlock();
return 0;
3000af94: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
3000af98: e5960000 ldr r0, [r6] <== NOT EXECUTED
3000af9c: ebffea3f bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
3000afa0: eb000d05 bl 3000e3bc <__errno> <== NOT EXECUTED 3000afa4: e3a03002 mov r3, #2 <== NOT EXECUTED 3000afa8: e5803000 str r3, [r0] <== NOT EXECUTED 3000afac: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
3000afb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
3000afb4: eb000d00 bl 3000e3bc <__errno> <== NOT EXECUTED
3000afb8: e3a03016 mov r3, #22 <== NOT EXECUTED
3000afbc: e5803000 str r3, [r0] <== NOT EXECUTED
3000afc0: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000afc4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
30001c24 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
30001c24: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
30001c28: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
30001c2c: e1a06001 mov r6, r1 <== NOT EXECUTED
30001c30: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
30001c34: eb0035e5 bl 3000f3d0 <strlen> <== NOT EXECUTED 30001c38: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30001c3c: e1a01000 mov r1, r0 <== NOT EXECUTED 30001c40: e3a02000 mov r2, #0 <== NOT EXECUTED 30001c44: e1a03004 mov r3, r4 <== NOT EXECUTED 30001c48: e3a0c001 mov ip, #1 <== NOT EXECUTED 30001c4c: e1a00005 mov r0, r5 <== NOT EXECUTED 30001c50: e58dc000 str ip, [sp] <== NOT EXECUTED 30001c54: eb0000ff bl 30002058 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
30001c58: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
30001c5c: e1a07000 mov r7, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
30001c60: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
30001c64: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
30001c68: e3530000 cmp r3, #0 <== NOT EXECUTED 30001c6c: 0a000013 beq 30001cc0 <rtems_io_lookup_name+0x9c> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
30001c70: e1a00004 mov r0, r4 <== NOT EXECUTED 30001c74: e1a0e00f mov lr, pc <== NOT EXECUTED 30001c78: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
30001c7c: e3570000 cmp r7, #0 <== NOT EXECUTED 30001c80: 03500002 cmpeq r0, #2 <== NOT EXECUTED 30001c84: 03a07000 moveq r7, #0 <== NOT EXECUTED 30001c88: 13a07001 movne r7, #1 <== NOT EXECUTED 30001c8c: 0a000015 beq 30001ce8 <rtems_io_lookup_name+0xc4> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
30001c90: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30001c94: e3530000 cmp r3, #0 <== NOT EXECUTED 30001c98: 0a000025 beq 30001d34 <rtems_io_lookup_name+0x110> <== NOT EXECUTED 30001c9c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30001ca0: e3530000 cmp r3, #0 <== NOT EXECUTED 30001ca4: 0a000022 beq 30001d34 <rtems_io_lookup_name+0x110> <== NOT EXECUTED 30001ca8: e1a00004 mov r0, r4 <== NOT EXECUTED 30001cac: e1a0e00f mov lr, pc <== NOT EXECUTED 30001cb0: e12fff13 bx r3 <== NOT EXECUTED 30001cb4: e3a0000d mov r0, #13 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
30001cb8: e28dd018 add sp, sp, #24 <== NOT EXECUTED
30001cbc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
30001cc0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30001cc4: e3530000 cmp r3, #0 <== NOT EXECUTED 30001cc8: 11a00004 movne r0, r4 <== NOT EXECUTED 30001ccc: 11a0e00f movne lr, pc <== NOT EXECUTED 30001cd0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
30001cd4: eb0031b8 bl 3000e3bc <__errno> <== NOT EXECUTED 30001cd8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001cdc: e5803000 str r3, [r0] <== NOT EXECUTED 30001ce0: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001ce4: eafffff3 b 30001cb8 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
30001ce8: e5865000 str r5, [r6] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
30001cec: e1a00005 mov r0, r5 <== NOT EXECUTED 30001cf0: eb0035b6 bl 3000f3d0 <strlen> <== NOT EXECUTED 30001cf4: e5860004 str r0, [r6, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
30001cf8: e5982050 ldr r2, [r8, #80] ; 0x50 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
30001cfc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
30001d00: e5862008 str r2, [r6, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
30001d04: e5982054 ldr r2, [r8, #84] ; 0x54 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
30001d08: e3530000 cmp r3, #0 <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
30001d0c: e586200c str r2, [r6, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
30001d10: 0a000009 beq 30001d3c <rtems_io_lookup_name+0x118> <== NOT EXECUTED 30001d14: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30001d18: e3530000 cmp r3, #0 <== NOT EXECUTED 30001d1c: 0a000006 beq 30001d3c <rtems_io_lookup_name+0x118> <== NOT EXECUTED 30001d20: e1a00004 mov r0, r4 <== NOT EXECUTED 30001d24: e1a0e00f mov lr, pc <== NOT EXECUTED 30001d28: e12fff13 bx r3 <== NOT EXECUTED 30001d2c: e1a00007 mov r0, r7 <== NOT EXECUTED 30001d30: eaffffe0 b 30001cb8 <rtems_io_lookup_name+0x94> <== NOT EXECUTED 30001d34: e3a0000d mov r0, #13 <== NOT EXECUTED 30001d38: eaffffde b 30001cb8 <rtems_io_lookup_name+0x94> <== NOT EXECUTED 30001d3c: e3a00000 mov r0, #0 <== NOT EXECUTED 30001d40: eaffffdc b 30001cb8 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
300074a0 <rtems_io_register_driver>:
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
300074a0: e59fc148 ldr ip, [pc, #328] ; 300075f0 <rtems_io_register_driver+0x150>
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
300074a4: e59f3148 ldr r3, [pc, #328] ; 300075f4 <rtems_io_register_driver+0x154>
if ( rtems_interrupt_is_in_progress() )
300074a8: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
300074ac: e92d4010 push {r4, lr}
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
300074b0: e35c0000 cmp ip, #0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
300074b4: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
300074b8: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
300074bc: 13a00012 movne r0, #18
300074c0: 18bd8010 popne {r4, pc}
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
300074c4: e3520000 cmp r2, #0
300074c8: 0a00003d beq 300075c4 <rtems_io_register_driver+0x124>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
300074cc: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
300074d0: e5820000 str r0, [r2]
if ( driver_table == NULL )
300074d4: 0a00003a beq 300075c4 <rtems_io_register_driver+0x124>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
300074d8: e591c000 ldr ip, [r1] 300074dc: e35c0000 cmp ip, #0
300074e0: 0a000034 beq 300075b8 <rtems_io_register_driver+0x118>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
300074e4: e1500004 cmp r0, r4
300074e8: 93a0000a movls r0, #10
300074ec: 98bd8010 popls {r4, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
300074f0: e59f0100 ldr r0, [pc, #256] ; 300075f8 <rtems_io_register_driver+0x158> 300074f4: e590c000 ldr ip, [r0] 300074f8: e28cc001 add ip, ip, #1 300074fc: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
30007500: e3540000 cmp r4, #0
30007504: 1a000020 bne 3000758c <rtems_io_register_driver+0xec>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
30007508: e593e000 ldr lr, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
3000750c: e35e0000 cmp lr, #0
30007510: 0a00002d beq 300075cc <rtems_io_register_driver+0x12c>
30007514: e59f30e0 ldr r3, [pc, #224] ; 300075fc <rtems_io_register_driver+0x15c> 30007518: e593c000 ldr ip, [r3] 3000751c: e1a0300c mov r3, ip 30007520: ea000003 b 30007534 <rtems_io_register_driver+0x94> 30007524: e2844001 add r4, r4, #1 30007528: e15e0004 cmp lr, r4 3000752c: e2833018 add r3, r3, #24
30007530: 9a000005 bls 3000754c <rtems_io_register_driver+0xac>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007534: e5930000 ldr r0, [r3] 30007538: e3500000 cmp r0, #0
3000753c: 1afffff8 bne 30007524 <rtems_io_register_driver+0x84>
30007540: e5930004 ldr r0, [r3, #4] 30007544: e3500000 cmp r0, #0
30007548: 1afffff5 bne 30007524 <rtems_io_register_driver+0x84>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
3000754c: e15e0004 cmp lr, r4 30007550: 10843084 addne r3, r4, r4, lsl #1
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
30007554: e5824000 str r4, [r2]
if ( m != n )
30007558: 108cc183 addne ip, ip, r3, lsl #3
3000755c: 0a00001b beq 300075d0 <rtems_io_register_driver+0x130>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
30007560: e1a0e001 mov lr, r1
30007564: e8be000f ldm lr!, {r0, r1, r2, r3}
30007568: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000756c: e89e0003 ldm lr, {r0, r1}
30007570: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
30007574: eb0006a2 bl 30009004 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
30007578: e3a01000 mov r1, #0 3000757c: e1a00004 mov r0, r4 30007580: e1a02001 mov r2, r1
}
30007584: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
30007588: ea002245 b 3000fea4 <rtems_io_initialize>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
3000758c: e59f3068 ldr r3, [pc, #104] ; 300075fc <rtems_io_register_driver+0x15c> 30007590: e084c084 add ip, r4, r4, lsl #1 30007594: e5933000 ldr r3, [r3] 30007598: e1a0c18c lsl ip, ip, #3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
3000759c: e793000c ldr r0, [r3, ip]
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
300075a0: e083c00c add ip, r3, ip
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
300075a4: e3500000 cmp r0, #0
300075a8: 0a00000b beq 300075dc <rtems_io_register_driver+0x13c>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
300075ac: eb000694 bl 30009004 <_Thread_Enable_dispatch> 300075b0: e3a0000c mov r0, #12
return RTEMS_RESOURCE_IN_USE;
300075b4: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
300075b8: e591c004 ldr ip, [r1, #4] 300075bc: e35c0000 cmp ip, #0
300075c0: 1affffc7 bne 300074e4 <rtems_io_register_driver+0x44>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
300075c4: e3a00009 mov r0, #9
}
300075c8: e8bd8010 pop {r4, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
300075cc: e5824000 str r4, [r2] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
300075d0: eb00068b bl 30009004 <_Thread_Enable_dispatch> 300075d4: e3a00005 mov r0, #5
return sc;
300075d8: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
300075dc: e59c3004 ldr r3, [ip, #4] 300075e0: e3530000 cmp r3, #0
300075e4: 1afffff0 bne 300075ac <rtems_io_register_driver+0x10c>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
300075e8: e5824000 str r4, [r2] 300075ec: eaffffdb b 30007560 <rtems_io_register_driver+0xc0>
300021f8 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
300021f8: e92d4010 push {r4, lr}
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
300021fc: e59f40b4 ldr r4, [pc, #180] ; 300022b8 <rtems_libio_init+0xc0>
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
30002200: e24dd004 sub sp, sp, #4
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
30002204: e5940000 ldr r0, [r4] 30002208: e3500000 cmp r0, #0
3000220c: 0a000016 beq 3000226c <rtems_libio_init+0x74>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
30002210: e3a01040 mov r1, #64 ; 0x40 30002214: ebffff1b bl 30001e88 <calloc> 30002218: e59f309c ldr r3, [pc, #156] ; 300022bc <rtems_libio_init+0xc4>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
3000221c: e3500000 cmp r0, #0
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
30002220: e5830000 str r0, [r3] 30002224: e1a02000 mov r2, r0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
30002228: 0a000020 beq 300022b0 <rtems_libio_init+0xb8>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
3000222c: e5941000 ldr r1, [r4]
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
30002230: e59f3088 ldr r3, [pc, #136] ; 300022c0 <rtems_libio_init+0xc8>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002234: e3510001 cmp r1, #1
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
30002238: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
3000223c: 9a000008 bls 30002264 <rtems_libio_init+0x6c>
30002240: e2803040 add r3, r0, #64 ; 0x40 30002244: e3a02001 mov r2, #1
iop->data1 = iop + 1;
30002248: e2822001 add r2, r2, #1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
3000224c: e1520001 cmp r2, r1
iop->data1 = iop + 1;
30002250: e503300c str r3, [r3, #-12] 30002254: e2833040 add r3, r3, #64 ; 0x40
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002258: 1afffffa bne 30002248 <rtems_libio_init+0x50>
3000225c: e2422001 sub r2, r2, #1 30002260: e0802302 add r2, r0, r2, lsl #6
iop->data1 = iop + 1;
iop->data1 = NULL;
30002264: e3a03000 mov r3, #0 30002268: e5823034 str r3, [r2, #52] ; 0x34
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
3000226c: e59fc050 ldr ip, [pc, #80] ; 300022c4 <rtems_libio_init+0xcc> 30002270: e59f0050 ldr r0, [pc, #80] ; 300022c8 <rtems_libio_init+0xd0> 30002274: e3a01001 mov r1, #1 30002278: e3a02054 mov r2, #84 ; 0x54 3000227c: e3a03000 mov r3, #0 30002280: e58dc000 str ip, [sp] 30002284: eb000ca2 bl 30005514 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
30002288: e3500000 cmp r0, #0
3000228c: 1a000006 bne 300022ac <rtems_libio_init+0xb4>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
30002290: e59f3034 ldr r3, [pc, #52] ; 300022cc <rtems_libio_init+0xd4> 30002294: e5933000 ldr r3, [r3] 30002298: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
3000229c: 11a0e00f movne lr, pc 300022a0: 112fff13 bxne r3
}
300022a4: e28dd004 add sp, sp, #4
300022a8: e8bd8010 pop {r4, pc}
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
300022ac: eb000ed2 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
300022b0: e280001a add r0, r0, #26 <== NOT EXECUTED 300022b4: eb000ed0 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
30003784 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
30003784: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
30003788: e3a00000 mov r0, #0
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
3000378c: e24dd01c sub sp, sp, #28
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
30003790: e1a01000 mov r1, r0 30003794: e28d2018 add r2, sp, #24 30003798: eb000b4d bl 300064d4 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
3000379c: e2508000 subs r8, r0, #0
300037a0: 1a000026 bne 30003840 <rtems_libio_set_private_env+0xbc>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
300037a4: e59f60dc ldr r6, [pc, #220] ; 30003888 <rtems_libio_set_private_env+0x104> 300037a8: e59f30dc ldr r3, [pc, #220] ; 3000388c <rtems_libio_set_private_env+0x108> 300037ac: e5967000 ldr r7, [r6] 300037b0: e1570003 cmp r7, r3
300037b4: 0a000024 beq 3000384c <rtems_libio_set_private_env+0xc8>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
300037b8: e59f10cc ldr r1, [pc, #204] ; 3000388c <rtems_libio_set_private_env+0x108> 300037bc: e3a02048 mov r2, #72 ; 0x48 300037c0: e1a00007 mov r0, r7 300037c4: eb002f67 bl 3000f568 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
300037c8: e59d3018 ldr r3, [sp, #24]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
300037cc: e3a05000 mov r5, #0 300037d0: e28d4004 add r4, sp, #4
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
300037d4: e5873000 str r3, [r7]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
300037d8: e3a01001 mov r1, #1 300037dc: e1a03004 mov r3, r4 300037e0: e1a02005 mov r2, r5 300037e4: e59f00a4 ldr r0, [pc, #164] ; 30003890 <rtems_libio_set_private_env+0x10c> 300037e8: e58d5000 str r5, [sp] 300037ec: ebfffb1a bl 3000245c <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
300037f0: e596c000 ldr ip, [r6]
300037f4: e1a07004 mov r7, r4
300037f8: e28cc018 add ip, ip, #24
300037fc: e8b7000f ldm r7!, {r0, r1, r2, r3}
30003800: e8ac000f stmia ip!, {r0, r1, r2, r3}
30003804: e5973000 ldr r3, [r7]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003808: e3a01001 mov r1, #1
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
3000380c: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003810: e1a02005 mov r2, r5 30003814: e1a03004 mov r3, r4 30003818: e59f0070 ldr r0, [pc, #112] ; 30003890 <rtems_libio_set_private_env+0x10c> 3000381c: e58d5000 str r5, [sp] 30003820: ebfffb0d bl 3000245c <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30003824: e8b4000f ldm r4!, {r0, r1, r2, r3}
30003828: e596c000 ldr ip, [r6]
3000382c: e1a08005 mov r8, r5
30003830: e28cc004 add ip, ip, #4
30003834: e8ac000f stmia ip!, {r0, r1, r2, r3}
30003838: e5973000 ldr r3, [r7]
3000383c: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL;
}
30003840: e1a00008 mov r0, r8
30003844: e28dd01c add sp, sp, #28
30003848: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
3000384c: e3a00048 mov r0, #72 ; 0x48 30003850: ebfffca8 bl 30002af8 <malloc>
if (!tmp)
30003854: e2507000 subs r7, r0, #0 30003858: 03a0801a moveq r8, #26
3000385c: 0afffff7 beq 30003840 <rtems_libio_set_private_env+0xbc>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
30003860: e1a00008 mov r0, r8 30003864: e1a01006 mov r1, r6 30003868: e59f2024 ldr r2, [pc, #36] ; 30003894 <rtems_libio_set_private_env+0x110> 3000386c: eb000b6b bl 30006620 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
30003870: e2508000 subs r8, r0, #0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
30003874: 05867000 streq r7, [r6]
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
30003878: 0affffce beq 300037b8 <rtems_libio_set_private_env+0x34>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
3000387c: e1a00007 mov r0, r7 <== NOT EXECUTED 30003880: ebfffb17 bl 300024e4 <free> <== NOT EXECUTED
return sc;
30003884: eaffffed b 30003840 <rtems_libio_set_private_env+0xbc> <== NOT EXECUTED
300036d4 <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) {
300036d4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
300036d8: e1a05000 mov r5, r0 <== NOT EXECUTED
300036dc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
300036e0: e3a00000 mov r0, #0 <== NOT EXECUTED 300036e4: e1a01000 mov r1, r0 <== NOT EXECUTED 300036e8: e1a0200d mov r2, sp <== NOT EXECUTED 300036ec: eb000b78 bl 300064d4 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
300036f0: e2503000 subs r3, r0, #0 <== NOT EXECUTED 300036f4: 1a00000d bne 30003730 <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
300036f8: e59f4078 ldr r4, [pc, #120] ; 30003778 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED 300036fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30003700: e5946000 ldr r6, [r4] <== NOT EXECUTED 30003704: e5962000 ldr r2, [r6] <== NOT EXECUTED 30003708: e1520003 cmp r2, r3 <== NOT EXECUTED 3000370c: 0a00000a beq 3000373c <rtems_libio_share_private_env+0x68> <== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
30003710: e1a00005 mov r0, r5 <== NOT EXECUTED 30003714: e59f105c ldr r1, [pc, #92] ; 30003778 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED 30003718: e28d2004 add r2, sp, #4 <== NOT EXECUTED 3000371c: eb000c12 bl 3000676c <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
30003720: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30003724: 0a00000b beq 30003758 <rtems_libio_share_private_env+0x84> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
30003728: e59f204c ldr r2, [pc, #76] ; 3000377c <rtems_libio_share_private_env+0xa8><== NOT EXECUTED 3000372c: e5842000 str r2, [r4] <== NOT EXECUTED
return sc; }
30003730: e1a00003 mov r0, r3 <== NOT EXECUTED
30003734: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30003738: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
3000373c: e1a01004 mov r1, r4 <== NOT EXECUTED 30003740: eb000be3 bl 300066d4 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
30003744: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30003748: 1afffff8 bne 30003730 <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
free_user_env(tmp);
3000374c: e1a00006 mov r0, r6 <== NOT EXECUTED 30003750: ebffffc6 bl 30003670 <free_user_env> <== NOT EXECUTED 30003754: eaffffed b 30003710 <rtems_libio_share_private_env+0x3c> <== NOT EXECUTED
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
30003758: e59f1018 ldr r1, [pc, #24] ; 30003778 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED 3000375c: e59f201c ldr r2, [pc, #28] ; 30003780 <rtems_libio_share_private_env+0xac><== NOT EXECUTED 30003760: eb000bae bl 30006620 <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
30003764: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30003768: 1affffee bne 30003728 <rtems_libio_share_private_env+0x54> <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
3000376c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 30003770: e5842000 str r2, [r4] <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
30003774: eaffffed b 30003730 <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
30006d18 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
30006d18: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED
30006d1c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
30006d20: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
30006d24: e28d300c add r3, sp, #12 <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
30006d28: e1a02003 mov r2, r3 <== NOT EXECUTED 30006d2c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 30006d30: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
...
)
{
va_list arglist;
va_start(arglist, printf_format);
30006d34: e58d3000 str r3, [sp] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
30006d38: ebffff8d bl 30006b74 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
30006d3c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
30006d40: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
30006d44: e28dd010 add sp, sp, #16 <== NOT EXECUTED
30006d48: e12fff1e bx lr <== NOT EXECUTED
300090b0 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
300090b0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if (!rtems_pipe_configured)
300090b4: e59f3054 ldr r3, [pc, #84] ; 30009110 <rtems_pipe_initialize+0x60>
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
300090b8: e24dd004 sub sp, sp, #4
if (!rtems_pipe_configured)
300090bc: e5d33000 ldrb r3, [r3] 300090c0: e3530000 cmp r3, #0
300090c4: 0a000003 beq 300090d8 <rtems_pipe_initialize+0x28>
return;
if (rtems_pipe_semaphore)
300090c8: e59fc044 ldr ip, [pc, #68] ; 30009114 <rtems_pipe_initialize+0x64><== NOT EXECUTED 300090cc: e59c3000 ldr r3, [ip] <== NOT EXECUTED 300090d0: e3530000 cmp r3, #0 <== NOT EXECUTED 300090d4: 0a000001 beq 300090e0 <rtems_pipe_initialize+0x30> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
}
300090d8: e28dd004 add sp, sp, #4
300090dc: e8bd8000 pop {pc}
if (rtems_pipe_semaphore)
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
300090e0: e59f0030 ldr r0, [pc, #48] ; 30009118 <rtems_pipe_initialize+0x68><== NOT EXECUTED 300090e4: e3a01001 mov r1, #1 <== NOT EXECUTED 300090e8: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED 300090ec: e58dc000 str ip, [sp] <== NOT EXECUTED 300090f0: ebfff107 bl 30005514 <rtems_semaphore_create> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
300090f4: e3500000 cmp r0, #0 <== NOT EXECUTED 300090f8: 1a000003 bne 3000910c <rtems_pipe_initialize+0x5c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
300090fc: ebffeffb bl 300050f0 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
rtems_pipe_no = now;
30009100: e59f3014 ldr r3, [pc, #20] ; 3000911c <rtems_pipe_initialize+0x6c><== NOT EXECUTED 30009104: e1c300b0 strh r0, [r3] <== NOT EXECUTED 30009108: eafffff2 b 300090d8 <rtems_pipe_initialize+0x28> <== NOT EXECUTED
sc = rtems_semaphore_create(
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
3000910c: ebfff33a bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
30001998 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
30001998: e92d4830 push {r4, r5, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
3000199c: e59f4078 ldr r4, [pc, #120] ; 30001a1c <rtems_stack_checker_is_blown+0x84>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
300019a0: e28db00c add fp, sp, #12
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
300019a4: e5943000 ldr r3, [r4]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
300019a8: e59300c4 ldr r0, [r3, #196] ; 0xc4 300019ac: e15b0000 cmp fp, r0 300019b0: 33a05000 movcc r5, #0
300019b4: 3a000004 bcc 300019cc <rtems_stack_checker_is_blown+0x34>
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
300019b8: e59350c0 ldr r5, [r3, #192] ; 0xc0 300019bc: e0805005 add r5, r0, r5 300019c0: e15b0005 cmp fp, r5 300019c4: 83a05000 movhi r5, #0 300019c8: 93a05001 movls r5, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
300019cc: e59f304c ldr r3, [pc, #76] ; 30001a20 <rtems_stack_checker_is_blown+0x88> 300019d0: e5933000 ldr r3, [r3] 300019d4: e3530000 cmp r3, #0 300019d8: 03a01001 moveq r1, #1
300019dc: 0a000005 beq 300019f8 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
300019e0: e59f103c ldr r1, [pc, #60] ; 30001a24 <rtems_stack_checker_is_blown+0x8c> 300019e4: e2800008 add r0, r0, #8 300019e8: e3a02010 mov r2, #16 300019ec: eb0035c0 bl 3000f0f4 <memcmp> 300019f0: e2701001 rsbs r1, r0, #1 300019f4: 33a01000 movcc r1, #0
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
300019f8: e3550000 cmp r5, #0
300019fc: 0a000002 beq 30001a0c <rtems_stack_checker_is_blown+0x74>
30001a00: e3510000 cmp r1, #0
30001a04: 13a00000 movne r0, #0
30001a08: 18bd8830 popne {r4, r5, fp, pc}
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
30001a0c: e5940000 ldr r0, [r4] <== NOT EXECUTED 30001a10: ebffffb3 bl 300018e4 <Stack_check_report_blown_task> <== NOT EXECUTED 30001a14: e3a00001 mov r0, #1 <== NOT EXECUTED
return true; }
30001a18: e8bd8830 pop {r4, r5, fp, pc} <== NOT EXECUTED
300018d4 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
300018d4: e59f1004 ldr r1, [pc, #4] ; 300018e0 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED 300018d8: e3a00000 mov r0, #0 <== NOT EXECUTED 300018dc: eaffffe3 b 30001870 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
30001870 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30001870: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
print_context = context;
30001874: e59f4048 ldr r4, [pc, #72] ; 300018c4 <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30001878: e1a05001 mov r5, r1 <== NOT EXECUTED 3000187c: e1a06000 mov r6, r0 <== NOT EXECUTED
print_context = context; print_handler = print;
30001880: e5841004 str r1, [r4, #4] <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
30001884: e5840008 str r0, [r4, #8] <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
30001888: e59f1038 ldr r1, [pc, #56] ; 300018c8 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED 3000188c: e1a0e00f mov lr, pc <== NOT EXECUTED 30001890: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
30001894: e59f1030 ldr r1, [pc, #48] ; 300018cc <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED 30001898: e1a00006 mov r0, r6 <== NOT EXECUTED 3000189c: e1a0e00f mov lr, pc <== NOT EXECUTED 300018a0: 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 );
300018a4: e59f0024 ldr r0, [pc, #36] ; 300018d0 <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED 300018a8: eb001573 bl 30006e7c <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
300018ac: e3e00000 mvn r0, #0 <== NOT EXECUTED 300018b0: ebffff9d bl 3000172c <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
300018b4: e3a03000 mov r3, #0 <== NOT EXECUTED
print_handler = NULL;
300018b8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
print_context = NULL;
300018bc: e5843008 str r3, [r4, #8] <== NOT EXECUTED
print_handler = NULL;
}
300018c0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
30001a28 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001a28: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
30001a2c: e59030c4 ldr r3, [r0, #196] ; 0xc4
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001a30: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001a34: e15b0003 cmp fp, r3
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001a38: e1a04000 mov r4, r0
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
30001a3c: e2830008 add r0, r3, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001a40: 3a000003 bcc 30001a54 <rtems_stack_checker_switch_extension+0x2c>
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
Stack_Control *the_stack = &running->Start.Initial_stack;
30001a44: e59420c0 ldr r2, [r4, #192] ; 0xc0 30001a48: e0833002 add r3, r3, r2 30001a4c: e15b0003 cmp fp, r3
30001a50: 9a000007 bls 30001a74 <rtems_stack_checker_switch_extension+0x4c>
/*
* 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,
30001a54: e59f1034 ldr r1, [pc, #52] ; 30001a90 <rtems_stack_checker_switch_extension+0x68><== NOT EXECUTED 30001a58: e3a02010 mov r2, #16 <== NOT EXECUTED 30001a5c: eb0035a4 bl 3000f0f4 <memcmp> <== NOT EXECUTED 30001a60: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED 30001a64: 33a01000 movcc r1, #0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
30001a68: e1a00004 mov r0, r4 <== NOT EXECUTED
} }
30001a6c: e8bd4810 pop {r4, fp, lr} <== NOT EXECUTED
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
30001a70: eaffff9b b 300018e4 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
30001a74: e59f1014 ldr r1, [pc, #20] ; 30001a90 <rtems_stack_checker_switch_extension+0x68> 30001a78: e3a02010 mov r2, #16 30001a7c: eb00359c bl 3000f0f4 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
30001a80: e3500000 cmp r0, #0 30001a84: 13a01000 movne r1, #0
30001a88: 1afffff6 bne 30001a68 <rtems_stack_checker_switch_extension+0x40>
30001a8c: e8bd8810 pop {r4, fp, pc}
3000bce0 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
3000bce0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
double result;
char *end;
if ( !n )
3000bce4: e2514000 subs r4, r1, #0
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
3000bce8: e1a07000 mov r7, r0 3000bcec: e24dd004 sub sp, sp, #4 3000bcf0: e1a08002 mov r8, r2
double result;
char *end;
if ( !n )
3000bcf4: 03a00009 moveq r0, #9
3000bcf8: 0a000017 beq 3000bd5c <rtems_string_to_double+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000bcfc: eb000904 bl 3000e114 <__errno> 3000bd00: e3a03000 mov r3, #0 3000bd04: e5803000 str r3, [r0]
*n = 0;
3000bd08: e3a02000 mov r2, #0
3000bd0c: e3a03000 mov r3, #0
3000bd10: e884000c stm r4, {r2, r3}
result = strtod( s, &end );
3000bd14: e1a00007 mov r0, r7 3000bd18: e1a0100d mov r1, sp 3000bd1c: eb001473 bl 30010ef0 <strtod>
if ( endptr )
3000bd20: e3580000 cmp r8, #0
*endptr = end;
3000bd24: 159d3000 ldrne r3, [sp] 3000bd28: 059d3000 ldreq r3, [sp] 3000bd2c: 15883000 strne r3, [r8]
if ( end == s )
3000bd30: e1530007 cmp r3, r7
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
3000bd34: e1a05000 mov r5, r0 3000bd38: e1a06001 mov r6, r1
if ( endptr )
*endptr = end;
if ( end == s )
3000bd3c: 03a0000b moveq r0, #11
3000bd40: 0a000005 beq 3000bd5c <rtems_string_to_double+0x7c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000bd44: eb0008f2 bl 3000e114 <__errno> 3000bd48: e5903000 ldr r3, [r0] 3000bd4c: e3530022 cmp r3, #34 ; 0x22
3000bd50: 0a000003 beq 3000bd64 <rtems_string_to_double+0x84>
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
3000bd54: e8840060 stm r4, {r5, r6}
3000bd58: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
3000bd5c: e28dd004 add sp, sp, #4
3000bd60: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000bd64: e1a00005 mov r0, r5 3000bd68: e1a01006 mov r1, r6 3000bd6c: e3a02000 mov r2, #0 3000bd70: e3a03000 mov r3, #0 3000bd74: ebffdc51 bl 30002ec0 <__cmpdf2> 3000bd78: e3500000 cmp r0, #0
3000bd7c: 0a00000d beq 3000bdb8 <rtems_string_to_double+0xd8>
3000bd80: e1a00005 mov r0, r5 3000bd84: e1a01006 mov r1, r6 3000bd88: e3e02000 mvn r2, #0 3000bd8c: e59f302c ldr r3, [pc, #44] ; 3000bdc0 <rtems_string_to_double+0xe0> 3000bd90: ebffdc46 bl 30002eb0 <__gedf2> 3000bd94: e3500000 cmp r0, #0
3000bd98: ca000006 bgt 3000bdb8 <rtems_string_to_double+0xd8>
3000bd9c: e1a00005 mov r0, r5 <== NOT EXECUTED 3000bda0: e1a01006 mov r1, r6 <== NOT EXECUTED 3000bda4: e3e02000 mvn r2, #0 <== NOT EXECUTED 3000bda8: e3e03601 mvn r3, #1048576 ; 0x100000 <== NOT EXECUTED 3000bdac: ebffdc41 bl 30002eb8 <__ledf2> <== NOT EXECUTED 3000bdb0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000bdb4: aaffffe6 bge 3000bd54 <rtems_string_to_double+0x74> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
3000bdb8: e3a0000a mov r0, #10 3000bdbc: eaffffe6 b 3000bd5c <rtems_string_to_double+0x7c>
3000bdc4 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
3000bdc4: e92d40f0 push {r4, r5, r6, r7, lr}
float result;
char *end;
if ( !n )
3000bdc8: e2515000 subs r5, r1, #0
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
3000bdcc: e1a04000 mov r4, r0 3000bdd0: e24dd004 sub sp, sp, #4 3000bdd4: e1a06002 mov r6, r2
float result;
char *end;
if ( !n )
3000bdd8: 03a00009 moveq r0, #9
3000bddc: 0a000015 beq 3000be38 <rtems_string_to_float+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000bde0: eb0008cb bl 3000e114 <__errno> 3000bde4: e3a03000 mov r3, #0 3000bde8: e5803000 str r3, [r0]
*n = 0;
3000bdec: e3a03000 mov r3, #0 3000bdf0: e5853000 str r3, [r5]
result = strtof( s, &end );
3000bdf4: e1a00004 mov r0, r4 3000bdf8: e1a0100d mov r1, sp 3000bdfc: eb001428 bl 30010ea4 <strtof>
if ( endptr )
3000be00: e3560000 cmp r6, #0
*endptr = end;
3000be04: 159d3000 ldrne r3, [sp] 3000be08: 059d3000 ldreq r3, [sp] 3000be0c: 15863000 strne r3, [r6]
if ( end == s )
3000be10: e1530004 cmp r3, r4
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
3000be14: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
3000be18: 03a0000b moveq r0, #11
3000be1c: 0a000005 beq 3000be38 <rtems_string_to_float+0x74>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000be20: eb0008bb bl 3000e114 <__errno> 3000be24: e5903000 ldr r3, [r0] 3000be28: e3530022 cmp r3, #34 ; 0x22
3000be2c: 0a000003 beq 3000be40 <rtems_string_to_float+0x7c>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
3000be30: e5857000 str r7, [r5] 3000be34: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
3000be38: e28dd004 add sp, sp, #4
3000be3c: e8bd80f0 pop {r4, r5, r6, r7, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000be40: e1a00007 mov r0, r7 3000be44: e3a01000 mov r1, #0 3000be48: ebffdc67 bl 30002fec <__cmpsf2> 3000be4c: e3500000 cmp r0, #0
3000be50: 0a000009 beq 3000be7c <rtems_string_to_float+0xb8>
3000be54: e1a00007 mov r0, r7 3000be58: e59f1024 ldr r1, [pc, #36] ; 3000be84 <rtems_string_to_float+0xc0> 3000be5c: ebffdc5e bl 30002fdc <__gesf2> 3000be60: e3500000 cmp r0, #0
3000be64: ca000004 bgt 3000be7c <rtems_string_to_float+0xb8>
3000be68: e1a00007 mov r0, r7 <== NOT EXECUTED 3000be6c: e3e01502 mvn r1, #8388608 ; 0x800000 <== NOT EXECUTED 3000be70: ebffdc5b bl 30002fe4 <__lesf2> <== NOT EXECUTED 3000be74: e3500000 cmp r0, #0 <== NOT EXECUTED 3000be78: aaffffec bge 3000be30 <rtems_string_to_float+0x6c> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
3000be7c: e3a0000a mov r0, #10 3000be80: eaffffec b 3000be38 <rtems_string_to_float+0x74>
3000be88 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
3000be88: e92d40f0 push {r4, r5, r6, r7, lr}
long result;
char *end;
if ( !n )
3000be8c: e2516000 subs r6, r1, #0
const char *s,
int *n,
char **endptr,
int base
)
{
3000be90: e1a04000 mov r4, r0 3000be94: e24dd004 sub sp, sp, #4 3000be98: e1a05002 mov r5, r2 3000be9c: e1a07003 mov r7, r3
long result;
char *end;
if ( !n )
3000bea0: 03a00009 moveq r0, #9
3000bea4: 0a000015 beq 3000bf00 <rtems_string_to_int+0x78>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000bea8: eb000899 bl 3000e114 <__errno> 3000beac: e3a03000 mov r3, #0 3000beb0: e5803000 str r3, [r0]
*n = 0;
result = strtol( s, &end, base );
3000beb4: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
3000beb8: e5863000 str r3, [r6]
result = strtol( s, &end, base );
3000bebc: e1a00004 mov r0, r4 3000bec0: e1a0100d mov r1, sp 3000bec4: eb001479 bl 300110b0 <strtol>
if ( endptr )
3000bec8: e3550000 cmp r5, #0
*endptr = end;
3000becc: 159d3000 ldrne r3, [sp] 3000bed0: 059d3000 ldreq r3, [sp] 3000bed4: 15853000 strne r3, [r5]
if ( end == s )
3000bed8: e1530004 cmp r3, r4
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
3000bedc: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
3000bee0: 03a0000b moveq r0, #11
3000bee4: 0a000005 beq 3000bf00 <rtems_string_to_int+0x78>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000bee8: eb000889 bl 3000e114 <__errno> 3000beec: e5903000 ldr r3, [r0] 3000bef0: e3530022 cmp r3, #34 ; 0x22
3000bef4: 0a000003 beq 3000bf08 <rtems_string_to_int+0x80>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
3000bef8: e5867000 str r7, [r6] 3000befc: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
3000bf00: e28dd004 add sp, sp, #4
3000bf04: e8bd80f0 pop {r4, r5, r6, r7, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000bf08: e3770106 cmn r7, #-2147483647 ; 0x80000001 3000bf0c: 13570000 cmpne r7, #0
3000bf10: 0a000001 beq 3000bf1c <rtems_string_to_int+0x94>
3000bf14: e3570102 cmp r7, #-2147483648 ; 0x80000000 <== NOT EXECUTED 3000bf18: 1afffff6 bne 3000bef8 <rtems_string_to_int+0x70> <== NOT EXECUTED
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
3000bf1c: e3a0000a mov r0, #10 3000bf20: eafffff6 b 3000bf00 <rtems_string_to_int+0x78>
3000c09c <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
3000c09c: e92d40f0 push {r4, r5, r6, r7, lr}
unsigned long result;
char *end;
if ( !n )
3000c0a0: e2516000 subs r6, r1, #0
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
3000c0a4: e1a04000 mov r4, r0 3000c0a8: e24dd004 sub sp, sp, #4 3000c0ac: e1a05002 mov r5, r2 3000c0b0: e1a07003 mov r7, r3
unsigned long result;
char *end;
if ( !n )
3000c0b4: 03a00009 moveq r0, #9
3000c0b8: 0a000017 beq 3000c11c <rtems_string_to_unsigned_char+0x80>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000c0bc: eb000814 bl 3000e114 <__errno> 3000c0c0: e3a03000 mov r3, #0 3000c0c4: e5803000 str r3, [r0]
*n = 0;
result = strtoul( s, &end, base );
3000c0c8: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
3000c0cc: e5c63000 strb r3, [r6]
result = strtoul( s, &end, base );
3000c0d0: e1a00004 mov r0, r4 3000c0d4: e1a0100d mov r1, sp 3000c0d8: eb001511 bl 30011524 <strtoul>
if ( endptr )
3000c0dc: e3550000 cmp r5, #0
*endptr = end;
3000c0e0: 159d3000 ldrne r3, [sp] 3000c0e4: 059d3000 ldreq r3, [sp] 3000c0e8: 15853000 strne r3, [r5]
if ( end == s )
3000c0ec: e1530004 cmp r3, r4
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
3000c0f0: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
3000c0f4: 03a0000b moveq r0, #11
3000c0f8: 0a000007 beq 3000c11c <rtems_string_to_unsigned_char+0x80>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000c0fc: eb000804 bl 3000e114 <__errno> 3000c100: e5903000 ldr r3, [r0] 3000c104: e3530022 cmp r3, #34 ; 0x22
3000c108: 0a000005 beq 3000c124 <rtems_string_to_unsigned_char+0x88>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
3000c10c: e35700ff cmp r7, #255 ; 0xff
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
3000c110: 95c67000 strbls r7, [r6] 3000c114: 93a00000 movls r0, #0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
3000c118: 8a000006 bhi 3000c138 <rtems_string_to_unsigned_char+0x9c>
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
3000c11c: e28dd004 add sp, sp, #4
3000c120: e8bd80f0 pop {r4, r5, r6, r7, pc}
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
3000c124: e2473001 sub r3, r7, #1 <== NOT EXECUTED 3000c128: e3730003 cmn r3, #3 <== NOT EXECUTED 3000c12c: 9afffff6 bls 3000c10c <rtems_string_to_unsigned_char+0x70> <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
3000c130: e3a0000a mov r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
3000c134: eafffff8 b 3000c11c <rtems_string_to_unsigned_char+0x80> <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
3000c138: eb0007f5 bl 3000e114 <__errno> <== NOT EXECUTED 3000c13c: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED 3000c140: e5803000 str r3, [r0] <== NOT EXECUTED 3000c144: e3a0000a mov r0, #10 <== NOT EXECUTED 3000c148: eafffff3 b 3000c11c <rtems_string_to_unsigned_char+0x80> <== NOT EXECUTED
3000465c <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
3000465c: e3500009 cmp r0, #9 30004660: 012fff1e bxeq lr
30004664: da000010 ble 300046ac <rtems_termios_baud_to_index+0x50>
30004668: e350000e cmp r0, #14 <== NOT EXECUTED 3000466c: 012fff1e bxeq lr <== NOT EXECUTED 30004670: da000018 ble 300046d8 <rtems_termios_baud_to_index+0x7c> <== NOT EXECUTED 30004674: e59f30d0 ldr r3, [pc, #208] ; 3000474c <rtems_termios_baud_to_index+0xf0><== NOT EXECUTED 30004678: e1500003 cmp r0, r3 <== NOT EXECUTED
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
3000467c: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
30004680: 012fff1e bxeq lr <== NOT EXECUTED 30004684: da000026 ble 30004724 <rtems_termios_baud_to_index+0xc8> <== NOT EXECUTED 30004688: e59f30c0 ldr r3, [pc, #192] ; 30004750 <rtems_termios_baud_to_index+0xf4><== NOT EXECUTED 3000468c: e1500003 cmp r0, r3 <== NOT EXECUTED
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
30004690: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
30004694: 012fff1e bxeq lr <== NOT EXECUTED 30004698: e2833001 add r3, r3, #1 <== NOT EXECUTED 3000469c: e1500003 cmp r0, r3 <== NOT EXECUTED 300046a0: 1a00001d bne 3000471c <rtems_termios_baud_to_index+0xc0> <== NOT EXECUTED
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
300046a4: e3a00013 mov r0, #19 <== NOT EXECUTED
case B460800: baud_index = 19; break;
300046a8: e12fff1e bx lr <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
300046ac: e3500004 cmp r0, #4 300046b0: 012fff1e bxeq lr
300046b4: ca000010 bgt 300046fc <rtems_termios_baud_to_index+0xa0>
300046b8: e3500001 cmp r0, #1 300046bc: 012fff1e bxeq lr
300046c0: da00001e ble 30004740 <rtems_termios_baud_to_index+0xe4>
300046c4: e3500002 cmp r0, #2 <== NOT EXECUTED 300046c8: 012fff1e bxeq lr <== NOT EXECUTED 300046cc: e3500003 cmp r0, #3 <== NOT EXECUTED 300046d0: 1a000011 bne 3000471c <rtems_termios_baud_to_index+0xc0> <== NOT EXECUTED 300046d4: e12fff1e bx lr <== NOT EXECUTED 300046d8: e350000b cmp r0, #11 <== NOT EXECUTED 300046dc: 012fff1e bxeq lr <== NOT EXECUTED
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
300046e0: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
300046e4: b12fff1e bxlt lr <== NOT EXECUTED 300046e8: e350000c cmp r0, #12 <== NOT EXECUTED 300046ec: 012fff1e bxeq lr <== NOT EXECUTED 300046f0: e350000d cmp r0, #13 <== NOT EXECUTED 300046f4: 1a000008 bne 3000471c <rtems_termios_baud_to_index+0xc0> <== NOT EXECUTED 300046f8: e12fff1e bx lr <== NOT EXECUTED 300046fc: e3500006 cmp r0, #6 <== NOT EXECUTED 30004700: 012fff1e bxeq lr <== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
30004704: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
30004708: b12fff1e bxlt lr <== NOT EXECUTED 3000470c: e3500007 cmp r0, #7 <== NOT EXECUTED 30004710: 012fff1e bxeq lr <== NOT EXECUTED 30004714: e3500008 cmp r0, #8 <== NOT EXECUTED 30004718: 012fff1e bxeq lr <== NOT EXECUTED
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
3000471c: e3e00000 mvn r0, #0
default: baud_index = -1; break;
}
return baud_index;
}
30004720: e12fff1e bx lr
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
30004724: e350000f cmp r0, #15
30004728: 012fff1e bxeq lr <== NOT EXECUTED 3000472c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30004730: e1500003 cmp r0, r3 <== NOT EXECUTED 30004734: 1afffff8 bne 3000471c <rtems_termios_baud_to_index+0xc0> <== NOT EXECUTED
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
30004738: e3a00010 mov r0, #16 <== NOT EXECUTED
case B57600: baud_index = 16; break;
3000473c: e12fff1e bx lr <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
30004740: e3500000 cmp r0, #0 30004744: 012fff1e bxeq lr 30004748: eafffff3 b 3000471c <rtems_termios_baud_to_index+0xc0>
30003074 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
30003074: e59f3008 ldr r3, [pc, #8] ; 30003084 <rtems_termios_bufsize+0x10><== NOT EXECUTED
30003078: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; }
3000307c: e3a00000 mov r0, #0 <== NOT EXECUTED 30003080: e12fff1e bx lr <== NOT EXECUTED
3000461c <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000461c: e92d4070 push {r4, r5, r6, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30004620: e59f51b0 ldr r5, [pc, #432] ; 300047d8 <rtems_termios_close+0x1bc>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30004624: e5903000 ldr r3, [r0]
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30004628: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000462c: e1a06000 mov r6, 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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30004630: e1a02001 mov r2, r1 30004634: e5950000 ldr r0, [r5]
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30004638: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3000463c: eb00044f bl 30005780 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
30004640: e3500000 cmp r0, #0
30004644: 1a00005f bne 300047c8 <rtems_termios_close+0x1ac>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
30004648: e5943008 ldr r3, [r4, #8] 3000464c: e2433001 sub r3, r3, #1 30004650: e3530000 cmp r3, #0 30004654: e5843008 str r3, [r4, #8]
30004658: 1a00002f bne 3000471c <rtems_termios_close+0x100>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3000465c: e59420cc ldr r2, [r4, #204] ; 0xcc 30004660: e59f3174 ldr r3, [pc, #372] ; 300047dc <rtems_termios_close+0x1c0> 30004664: e0833282 add r3, r3, r2, lsl #5 30004668: e5931004 ldr r1, [r3, #4] 3000466c: e3510000 cmp r1, #0
30004670: 0a000040 beq 30004778 <rtems_termios_close+0x15c> /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30004674: e1a00004 mov r0, r4 <== NOT EXECUTED 30004678: e1a0e00f mov lr, pc <== NOT EXECUTED 3000467c: e12fff11 bx r1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
30004680: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 30004684: e3530002 cmp r3, #2 <== NOT EXECUTED 30004688: 0a000044 beq 300047a0 <rtems_termios_close+0x184> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
3000468c: e594309c ldr r3, [r4, #156] ; 0x9c 30004690: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
30004694: 11a02006 movne r2, r6 30004698: 1594000c ldrne r0, [r4, #12] 3000469c: 15941010 ldrne r1, [r4, #16] 300046a0: 11a0e00f movne lr, pc 300046a4: 112fff13 bxne r3
if (tty->forw == NULL) {
300046a8: e5943000 ldr r3, [r4] 300046ac: e3530000 cmp r3, #0
300046b0: 0a000020 beq 30004738 <rtems_termios_close+0x11c>
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
300046b4: e5942004 ldr r2, [r4, #4] 300046b8: e5832004 str r2, [r3, #4]
}
if (tty->back == NULL) {
300046bc: e5942004 ldr r2, [r4, #4] 300046c0: e3520000 cmp r2, #0
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
300046c4: 15823000 strne r3, [r2]
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
300046c8: 0a000025 beq 30004764 <rtems_termios_close+0x148>
}
}
else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
300046cc: e5940014 ldr r0, [r4, #20] 300046d0: eb000401 bl 300056dc <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
300046d4: e5940018 ldr r0, [r4, #24] 300046d8: eb0003ff bl 300056dc <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
300046dc: e594008c ldr r0, [r4, #140] ; 0x8c 300046e0: eb0003fd bl 300056dc <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
300046e4: e59430a0 ldr r3, [r4, #160] ; 0xa0 300046e8: e3530000 cmp r3, #0
300046ec: 0a00000e beq 3000472c <rtems_termios_close+0x110> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
300046f0: e59430b4 ldr r3, [r4, #180] ; 0xb4 300046f4: e3530002 cmp r3, #2
300046f8: 0a00000b beq 3000472c <rtems_termios_close+0x110> rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf);
300046fc: e5940058 ldr r0, [r4, #88] ; 0x58 30004700: ebfff676 bl 300020e0 <free>
free (tty->rawOutBuf.theBuf);
30004704: e594007c ldr r0, [r4, #124] ; 0x7c 30004708: ebfff674 bl 300020e0 <free>
free (tty->cbuf);
3000470c: e594001c ldr r0, [r4, #28] 30004710: ebfff672 bl 300020e0 <free>
free (tty);
30004714: e1a00004 mov r0, r4 30004718: ebfff670 bl 300020e0 <free>
} rtems_semaphore_release (rtems_termios_ttyMutex);
3000471c: e5950000 ldr r0, [r5] 30004720: eb00045e bl 300058a0 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
30004724: e3a00000 mov r0, #0
30004728: e8bd8070 pop {r4, r5, r6, pc}
rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3000472c: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 30004730: eb0003e9 bl 300056dc <rtems_semaphore_delete> <== NOT EXECUTED 30004734: eafffff0 b 300046fc <rtems_termios_close+0xe0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
30004738: e5942004 ldr r2, [r4, #4] 3000473c: e59f109c ldr r1, [pc, #156] ; 300047e0 <rtems_termios_close+0x1c4>
if ( rtems_termios_ttyTail != NULL ) {
30004740: e3520000 cmp r2, #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;
30004744: e5812000 str r2, [r1]
if ( rtems_termios_ttyTail != NULL ) {
30004748: 0a00001f beq 300047cc <rtems_termios_close+0x1b0>
rtems_termios_ttyTail->forw = NULL;
3000474c: e5823000 str r3, [r2] <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
30004750: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 30004754: e5943000 ldr r3, [r4] <== NOT EXECUTED 30004758: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
3000475c: 15823000 strne r3, [r2] <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
30004760: 1affffd9 bne 300046cc <rtems_termios_close+0xb0> <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
30004764: e59f1078 ldr r1, [pc, #120] ; 300047e4 <rtems_termios_close+0x1c8>
if ( rtems_termios_ttyHead != NULL ) {
30004768: e3530000 cmp r3, #0
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
3000476c: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
30004770: 15832004 strne r2, [r3, #4] 30004774: eaffffd4 b 300046cc <rtems_termios_close+0xb0>
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30004778: e5940018 ldr r0, [r4, #24] 3000477c: e1a02001 mov r2, r1 30004780: eb0003fe bl 30005780 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
30004784: e3500000 cmp r0, #0
30004788: 1a00000e bne 300047c8 <rtems_termios_close+0x1ac> rtems_fatal_error_occurred (sc); } drainOutput (tty);
3000478c: e1a00004 mov r0, r4 30004790: ebfffda4 bl 30003e28 <drainOutput>
}
if (tty->device.outputUsesInterrupts
30004794: e59430b4 ldr r3, [r4, #180] ; 0xb4 30004798: e3530002 cmp r3, #2
3000479c: 1affffba bne 3000468c <rtems_termios_close+0x70>
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
300047a0: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 300047a4: e3a01001 mov r1, #1 <== NOT EXECUTED 300047a8: eb0002ce bl 300052e8 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
300047ac: e3500000 cmp r0, #0 <== NOT EXECUTED 300047b0: 1a000004 bne 300047c8 <rtems_termios_close+0x1ac> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
300047b4: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 300047b8: e3a01001 mov r1, #1 <== NOT EXECUTED 300047bc: eb0002c9 bl 300052e8 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
300047c0: e3500000 cmp r0, #0 <== NOT EXECUTED 300047c4: 0affffb0 beq 3000468c <rtems_termios_close+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
300047c8: eb00058b bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
300047cc: e59f3010 ldr r3, [pc, #16] ; 300047e4 <rtems_termios_close+0x1c8> 300047d0: e5832000 str r2, [r3] 300047d4: eaffffbc b 300046cc <rtems_termios_close+0xb0>
300032a4 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
300032a4: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300032a8: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
300032ac: e08c1001 add r1, ip, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300032b0: e3520002 cmp r2, #2 <== NOT EXECUTED
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
300032b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
300032b8: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300032bc: 0a00000b beq 300032f0 <rtems_termios_dequeue_characters+0x4c><== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
300032c0: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 300032c4: e3530005 cmp r3, #5 <== NOT EXECUTED 300032c8: 0a000001 beq 300032d4 <rtems_termios_dequeue_characters+0x30><== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
300032cc: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
300032d0: eaffff6f b 30003094 <rtems_termios_refill_transmitter> <== NOT EXECUTED
}
else if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
300032d4: e59f302c ldr r3, [pc, #44] ; 30003308 <rtems_termios_dequeue_characters+0x64><== NOT EXECUTED 300032d8: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 300032dc: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
300032e0: 11a0e00f movne lr, pc <== NOT EXECUTED 300032e4: 112fff13 bxne r3 <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
300032e8: e3a00000 mov r0, #0 <== NOT EXECUTED
300032ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
300032f0: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 300032f4: e1a01002 mov r1, r2 <== NOT EXECUTED 300032f8: eb0007fa bl 300052e8 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
300032fc: e3500000 cmp r0, #0 <== NOT EXECUTED 30003300: 0afffff8 beq 300032e8 <rtems_termios_dequeue_characters+0x44><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
30003304: eb000abc bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
3000330c <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)
{
3000330c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
30003310: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 30003314: e59f82e8 ldr r8, [pc, #744] ; 30003604 <rtems_termios_enqueue_raw_characters+0x2f8><== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30003318: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
3000331c: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 30003320: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30003324: e1a04000 mov r4, r0 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
30003328: e3560000 cmp r6, #0 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
3000332c: e1a05001 mov r5, r1 <== NOT EXECUTED 30003330: e1a07002 mov r7, r2 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
30003334: 0a00001e beq 300033b4 <rtems_termios_enqueue_raw_characters+0xa8><== NOT EXECUTED
while (len--) {
30003338: e3520000 cmp r2, #0 <== NOT EXECUTED 3000333c: 0a00000b beq 30003370 <rtems_termios_enqueue_raw_characters+0x64><== NOT EXECUTED 30003340: e3a0a000 mov sl, #0 <== NOT EXECUTED 30003344: ea000002 b 30003354 <rtems_termios_enqueue_raw_characters+0x48><== NOT EXECUTED 30003348: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 3000334c: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 30003350: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
30003354: e7d5000a ldrb r0, [r5, sl] <== NOT EXECUTED 30003358: e1a01004 mov r1, r4 <== NOT EXECUTED 3000335c: e28aa001 add sl, sl, #1 <== NOT EXECUTED 30003360: e1a0e00f mov lr, pc <== NOT EXECUTED 30003364: e12fff16 bx r6 <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
30003368: e157000a cmp r7, sl <== NOT EXECUTED 3000336c: 1afffff5 bne 30003348 <rtems_termios_enqueue_raw_characters+0x3c><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30003370: e59490e4 ldr r9, [r4, #228] ; 0xe4 <== NOT EXECUTED 30003374: e3590000 cmp r9, #0 <== NOT EXECUTED 30003378: 1a00000b bne 300033ac <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED 3000337c: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 30003380: e3530000 cmp r3, #0 <== NOT EXECUTED 30003384: 0a000008 beq 300033ac <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
30003388: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 3000338c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 30003390: e1a0e00f mov lr, pc <== NOT EXECUTED 30003394: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
30003398: e3a03001 mov r3, #1 <== NOT EXECUTED 3000339c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
} } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; }
300033a0: e1a00009 mov r0, r9 <== NOT EXECUTED
300033a4: e28dd00c add sp, sp, #12 <== NOT EXECUTED
300033a8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
300033ac: e3a09000 mov r9, #0 <== NOT EXECUTED 300033b0: eafffffa b 300033a0 <rtems_termios_enqueue_raw_characters+0x94><== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
300033b4: e280304a add r3, r0, #74 ; 0x4a <== NOT EXECUTED 300033b8: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
300033bc: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED 300033c0: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 300033c4: e1a0b006 mov fp, r6 <== NOT EXECUTED 300033c8: e58d6000 str r6, [sp] <== NOT EXECUTED 300033cc: ea000034 b 300034a4 <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
300033d0: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 300033d4: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 300033d8: e2800001 add r0, r0, #1 <== NOT EXECUTED 300033dc: eb0051c4 bl 30017af4 <__umodsi3> <== NOT EXECUTED 300033e0: e1a08000 mov r8, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300033e4: e10f9000 mrs r9, CPSR <== NOT EXECUTED 300033e8: e3893080 orr r3, r9, #128 ; 0x80 <== NOT EXECUTED 300033ec: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
300033f0: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 300033f4: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 300033f8: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 300033fc: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 30003400: e0800008 add r0, r0, r8 <== NOT EXECUTED 30003404: eb0051ba bl 30017af4 <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
30003408: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 3000340c: e1500003 cmp r0, r3 <== NOT EXECUTED 30003410: 9a00000e bls 30003450 <rtems_termios_enqueue_raw_characters+0x144><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
30003414: 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)
30003418: e3130001 tst r3, #1 <== NOT EXECUTED 3000341c: 1a00000b bne 30003450 <rtems_termios_enqueue_raw_characters+0x144><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
30003420: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
30003424: e59f31dc ldr r3, [pc, #476] ; 30003608 <rtems_termios_enqueue_raw_characters+0x2fc><== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
30003428: e3822001 orr r2, r2, #1 <== NOT EXECUTED 3000342c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
30003430: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003434: e0023003 and r3, r2, r3 <== NOT EXECUTED 30003438: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 3000343c: 0a000057 beq 300035a0 <rtems_termios_enqueue_raw_characters+0x294><== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
30003440: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003444: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 30003448: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 3000344c: 0a000062 beq 300035dc <rtems_termios_enqueue_raw_characters+0x2d0><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003450: e129f009 msr CPSR_fc, r9 <== NOT EXECUTED
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
30003454: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 30003458: e1530008 cmp r3, r8 <== NOT EXECUTED 3000345c: 0a00002d beq 30003518 <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
30003460: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 30003464: e7c3a008 strb sl, [r3, r8] <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30003468: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
3000346c: e5848060 str r8, [r4, #96] ; 0x60 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30003470: e3530000 cmp r3, #0 <== NOT EXECUTED 30003474: 1a000008 bne 3000349c <rtems_termios_enqueue_raw_characters+0x190><== NOT EXECUTED 30003478: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 3000347c: e3530000 cmp r3, #0 <== NOT EXECUTED 30003480: 0a000005 beq 3000349c <rtems_termios_enqueue_raw_characters+0x190><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
30003484: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 30003488: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 3000348c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003490: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
30003494: e3a03001 mov r3, #1 <== NOT EXECUTED 30003498: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 3000349c: e2866001 add r6, r6, #1 <== NOT EXECUTED 300034a0: e2477001 sub r7, r7, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
300034a4: e3570000 cmp r7, #0 <== NOT EXECUTED 300034a8: 0a00002d beq 30003564 <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
300034ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
300034b0: e7d5a006 ldrb sl, [r5, r6] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
300034b4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 300034b8: 0a000005 beq 300034d4 <rtems_termios_enqueue_raw_characters+0x1c8><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
300034bc: e5d4304a ldrb r3, [r4, #74] ; 0x4a <== NOT EXECUTED 300034c0: e153000a cmp r3, sl <== NOT EXECUTED 300034c4: 0a000017 beq 30003528 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
300034c8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 300034cc: e153000a cmp r3, sl <== NOT EXECUTED 300034d0: 0a00001e beq 30003550 <rtems_termios_enqueue_raw_characters+0x244><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
300034d4: e35b0000 cmp fp, #0 <== NOT EXECUTED 300034d8: 0affffbc beq 300033d0 <rtems_termios_enqueue_raw_characters+0xc4><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
300034dc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300034e0: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 300034e4: e3530020 cmp r3, #32 <== NOT EXECUTED 300034e8: 1affffeb bne 3000349c <rtems_termios_enqueue_raw_characters+0x190><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300034ec: e10f8000 mrs r8, CPSR <== NOT EXECUTED 300034f0: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 300034f4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
300034f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
300034fc: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30003500: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003504: e3520000 cmp r2, #0 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30003508: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3000350c: 1a00001b bne 30003580 <rtems_termios_enqueue_raw_characters+0x274><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003510: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 30003514: eaffffe0 b 3000349c <rtems_termios_enqueue_raw_characters+0x190><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
30003518: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000351c: e2833001 add r3, r3, #1 <== NOT EXECUTED 30003520: e58d3000 str r3, [sp] <== NOT EXECUTED 30003524: eaffffdc b 3000349c <rtems_termios_enqueue_raw_characters+0x190><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
30003528: e5d42049 ldrb r2, [r4, #73] ; 0x49 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
3000352c: e3a0b001 mov fp, #1 <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
30003530: e1520003 cmp r2, r3 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
30003534: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
30003538: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
3000353c: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
30003540: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
30003544: 058430b8 streq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
30003548: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000354c: eaffffe2 b 300034dc <rtems_termios_enqueue_raw_characters+0x1d0><== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
30003550: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
30003554: e3a0b001 mov fp, #1 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
30003558: e3c33010 bic r3, r3, #16 <== NOT EXECUTED 3000355c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003560: eaffffdd b 300034dc <rtems_termios_enqueue_raw_characters+0x1d0><== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
30003564: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 30003568: e59d9000 ldr r9, [sp] <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
3000356c: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
30003570: e0833009 add r3, r3, r9 <== NOT EXECUTED 30003574: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30003578: eb0008c8 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
3000357c: eaffff87 b 300033a0 <rtems_termios_enqueue_raw_characters+0x94><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
30003580: 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)(tty->minor,
30003584: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 30003588: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000358c: e0811003 add r1, r1, r3 <== NOT EXECUTED 30003590: e3a02001 mov r2, #1 <== NOT EXECUTED 30003594: e1a0e00f mov lr, pc <== NOT EXECUTED 30003598: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3000359c: eaffffdb b 30003510 <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
300035a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300035a4: e3130020 tst r3, #32 <== NOT EXECUTED 300035a8: 1a000002 bne 300035b8 <rtems_termios_enqueue_raw_characters+0x2ac><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
300035ac: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 300035b0: e3530000 cmp r3, #0 <== NOT EXECUTED 300035b4: 1affffa5 bne 30003450 <rtems_termios_enqueue_raw_characters+0x144><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF;
300035b8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
300035bc: 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;
300035c0: e3833002 orr r3, r3, #2 <== NOT EXECUTED 300035c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
300035c8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 300035cc: e3a02001 mov r2, #1 <== NOT EXECUTED 300035d0: e1a0e00f mov lr, pc <== NOT EXECUTED 300035d4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 300035d8: eaffff9c b 30003450 <rtems_termios_enqueue_raw_characters+0x144><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
300035dc: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
300035e0: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
300035e4: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
300035e8: e3530000 cmp r3, #0 <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
300035ec: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
300035f0: 0affff96 beq 30003450 <rtems_termios_enqueue_raw_characters+0x144><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
300035f4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300035f8: e1a0e00f mov lr, pc <== NOT EXECUTED 300035fc: e12fff13 bx r3 <== NOT EXECUTED 30003600: eaffff92 b 30003450 <rtems_termios_enqueue_raw_characters+0x144><== NOT EXECUTED
3000302c <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
3000302c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
30003030: e59fc034 ldr ip, [pc, #52] ; 3000306c <rtems_termios_initialize+0x40>
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
30003034: e24dd004 sub sp, sp, #4
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
30003038: e59c3000 ldr r3, [ip] 3000303c: e3530000 cmp r3, #0
30003040: 0a000001 beq 3000304c <rtems_termios_initialize+0x20>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
30003044: e28dd004 add sp, sp, #4
30003048: e8bd8000 pop {pc}
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
3000304c: e59f001c ldr r0, [pc, #28] ; 30003070 <rtems_termios_initialize+0x44> 30003050: e3a01001 mov r1, #1 30003054: e3a02054 mov r2, #84 ; 0x54 30003058: e58dc000 str ip, [sp] 3000305c: eb00092c bl 30005514 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'm', 'i'),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
30003060: e3500000 cmp r0, #0
30003064: 0afffff6 beq 30003044 <rtems_termios_initialize+0x18>
rtems_fatal_error_occurred (sc);
30003068: eb000b63 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
3000424c <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;
3000424c: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
30004250: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
30004254: 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;
30004258: e5935034 ldr r5, [r3, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
3000425c: e580100c str r1, [r0, #12]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
30004260: e1a04000 mov r4, 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);
30004264: e1a02001 mov r2, r1 30004268: e5950018 ldr r0, [r5, #24]
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;
3000426c: e5947008 ldr r7, [r4, #8]
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30004270: eb000542 bl 30005780 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
30004274: e2506000 subs r6, r0, #0
30004278: 1a00000e bne 300042b8 <rtems_termios_ioctl+0x6c>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
3000427c: e5943004 ldr r3, [r4, #4] 30004280: e3530004 cmp r3, #4
30004284: 0a000006 beq 300042a4 <rtems_termios_ioctl+0x58> 30004288: 8a00000d bhi 300042c4 <rtems_termios_ioctl+0x78>
3000428c: e3530002 cmp r3, #2
30004290: 0a00001e beq 30004310 <rtems_termios_ioctl+0xc4>
30004294: 9a000085 bls 300044b0 <rtems_termios_ioctl+0x264>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
30004298: e1a00005 mov r0, r5 3000429c: ebfffee1 bl 30003e28 <drainOutput>
break;
300042a0: ea000002 b 300042b0 <rtems_termios_ioctl+0x64>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
300042a4: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
300042a8: e58520dc str r2, [r5, #220] ; 0xdc <== NOT EXECUTED
300042ac: e58530e0 str r3, [r5, #224] ; 0xe0 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
300042b0: e5950018 ldr r0, [r5, #24] 300042b4: eb000579 bl 300058a0 <rtems_semaphore_release>
args->ioctl_return = sc;
300042b8: e584600c str r6, [r4, #12]
return sc; }
300042bc: e1a00006 mov r0, r6
300042c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
300042c4: e59f2340 ldr r2, [pc, #832] ; 3000460c <rtems_termios_ioctl+0x3c0><== NOT EXECUTED 300042c8: e1530002 cmp r3, r2 <== NOT EXECUTED 300042cc: 0a00006b beq 30004480 <rtems_termios_ioctl+0x234> <== NOT EXECUTED 300042d0: 8a000082 bhi 300044e0 <rtems_termios_ioctl+0x294> <== NOT EXECUTED 300042d4: e3530005 cmp r3, #5 <== NOT EXECUTED 300042d8: 0a0000a1 beq 30004564 <rtems_termios_ioctl+0x318> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
300042dc: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 300042e0: e59f3328 ldr r3, [pc, #808] ; 30004610 <rtems_termios_ioctl+0x3c4><== NOT EXECUTED 300042e4: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 300042e8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 300042ec: e3530000 cmp r3, #0 <== NOT EXECUTED 300042f0: 03a0600a moveq r6, #10 <== NOT EXECUTED 300042f4: 0affffed beq 300042b0 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
300042f8: e1a00005 mov r0, r5 <== NOT EXECUTED 300042fc: e1a01004 mov r1, r4 <== NOT EXECUTED 30004300: e1a0e00f mov lr, pc <== NOT EXECUTED 30004304: e12fff13 bx r3 <== NOT EXECUTED 30004308: e1a06000 mov r6, r0 <== NOT EXECUTED 3000430c: eaffffe7 b 300042b0 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
30004310: e594e008 ldr lr, [r4, #8]
30004314: e2857030 add r7, r5, #48 ; 0x30
30004318: e1a0c007 mov ip, r7
3000431c: e8be000f ldm lr!, {r0, r1, r2, r3}
30004320: e8ac000f stmia ip!, {r0, r1, r2, r3}
30004324: e8be000f ldm lr!, {r0, r1, r2, r3}
30004328: e8ac000f stmia ip!, {r0, r1, r2, r3}
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
3000432c: e59520b8 ldr r2, [r5, #184] ; 0xb8
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
30004330: e59e3000 ldr r3, [lr]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
30004334: e3120c02 tst r2, #512 ; 0x200
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
30004338: 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) &&
3000433c: 0a000012 beq 3000438c <rtems_termios_ioctl+0x140>
30004340: e5953030 ldr r3, [r5, #48] ; 0x30 30004344: e3130b01 tst r3, #1024 ; 0x400
30004348: 1a00000f bne 3000438c <rtems_termios_ioctl+0x140>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
3000434c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 30004350: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 30004354: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
30004358: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3000435c: e3130020 tst r3, #32 <== NOT EXECUTED 30004360: 0a000009 beq 3000438c <rtems_termios_ioctl+0x140> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004364: e10f8000 mrs r8, CPSR <== NOT EXECUTED 30004368: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 3000436c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30004370: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30004374: e5952094 ldr r2, [r5, #148] ; 0x94 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30004378: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3000437c: e3520000 cmp r2, #0 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30004380: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30004384: 1a000098 bne 300045ec <rtems_termios_ioctl+0x3a0> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004388: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
3000438c: e59530b8 ldr r3, [r5, #184] ; 0xb8 30004390: e3130b01 tst r3, #1024 ; 0x400
30004394: 0a000008 beq 300043bc <rtems_termios_ioctl+0x170>
30004398: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED 3000439c: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 300043a0: 1a000005 bne 300043bc <rtems_termios_ioctl+0x170> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
300043a4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 300043a8: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 300043ac: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
300043b0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 300043b4: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 300043b8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
300043bc: e59530b8 ldr r3, [r5, #184] ; 0xb8 300043c0: e3130c01 tst r3, #256 ; 0x100 300043c4: 05952038 ldreq r2, [r5, #56] ; 0x38
300043c8: 0a000012 beq 30004418 <rtems_termios_ioctl+0x1cc>
300043cc: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED 300043d0: e3520000 cmp r2, #0 <== NOT EXECUTED 300043d4: ba000078 blt 300045bc <rtems_termios_ioctl+0x370> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
300043d8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 300043dc: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 300043e0: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
300043e4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 300043e8: e3130004 tst r3, #4 <== NOT EXECUTED 300043ec: 0a000006 beq 3000440c <rtems_termios_ioctl+0x1c0> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
300043f0: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
300043f4: e3530000 cmp r3, #0 <== NOT EXECUTED 300043f8: 0a000003 beq 3000440c <rtems_termios_ioctl+0x1c0> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
300043fc: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 30004400: e1a0e00f mov lr, pc <== NOT EXECUTED 30004404: e12fff13 bx r3 <== NOT EXECUTED 30004408: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
3000440c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 30004410: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 30004414: e58530b8 str r3, [r5, #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) {
30004418: e3520000 cmp r2, #0
3000441c: ba000066 blt 300045bc <rtems_termios_ioctl+0x370>
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
30004420: e5953030 ldr r3, [r5, #48] ; 0x30
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) {
30004424: e595803c ldr r8, [r5, #60] ; 0x3c
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
30004428: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
3000442c: 159520b8 ldrne r2, [r5, #184] ; 0xb8 30004430: 13822b01 orrne r2, r2, #1024 ; 0x400 30004434: 158520b8 strne r2, [r5, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
30004438: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
3000443c: 159530b8 ldrne r3, [r5, #184] ; 0xb8 30004440: 13833c02 orrne r3, r3, #512 ; 0x200 30004444: 158530b8 strne r3, [r5, #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) {
30004448: e2188002 ands r8, r8, #2
3000444c: 0a000048 beq 30004574 <rtems_termios_ioctl+0x328> tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30004450: e3a03000 mov r3, #0
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30004454: e5853074 str r3, [r5, #116] ; 0x74
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30004458: e585306c str r3, [r5, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
3000445c: e5853070 str r3, [r5, #112] ; 0x70
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
30004460: e59530a8 ldr r3, [r5, #168] ; 0xa8 30004464: e3530000 cmp r3, #0
30004468: 0affff90 beq 300042b0 <rtems_termios_ioctl+0x64> (*tty->device.setAttributes)(tty->minor, &tty->termios);
3000446c: e1a01007 mov r1, r7 30004470: e5950010 ldr r0, [r5, #16] 30004474: e1a0e00f mov lr, pc 30004478: e12fff13 bx r3 3000447c: eaffff8b b 300042b0 <rtems_termios_ioctl+0x64>
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
30004480: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED 30004484: e595305c ldr r3, [r5, #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;
30004488: e5950020 ldr r0, [r5, #32] <== NOT EXECUTED
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
3000448c: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
30004490: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30004494: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
30004498: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3000449c: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED 300044a0: e0622000 rsb r2, r2, r0 <== NOT EXECUTED 300044a4: e0823003 add r3, r2, r3 <== NOT EXECUTED 300044a8: e5813000 str r3, [r1] <== NOT EXECUTED 300044ac: eaffff7f b 300042b0 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
300044b0: e3530001 cmp r3, #1
300044b4: 1affff88 bne 300042dc <rtems_termios_ioctl+0x90>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
300044b8: e5947008 ldr r7, [r4, #8]
300044bc: e285c030 add ip, r5, #48 ; 0x30
300044c0: e1a0e007 mov lr, r7
300044c4: e8bc000f ldm ip!, {r0, r1, r2, r3}
300044c8: e8ae000f stmia lr!, {r0, r1, r2, r3}
300044cc: e8bc000f ldm ip!, {r0, r1, r2, r3}
300044d0: e8ae000f stmia lr!, {r0, r1, r2, r3}
300044d4: e59c3000 ldr r3, [ip]
300044d8: e58e3000 str r3, [lr]
break;
300044dc: eaffff73 b 300042b0 <rtems_termios_ioctl+0x64>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
300044e0: e59f212c ldr r2, [pc, #300] ; 30004614 <rtems_termios_ioctl+0x3c8><== NOT EXECUTED 300044e4: e1530002 cmp r3, r2 <== NOT EXECUTED 300044e8: 0a000019 beq 30004554 <rtems_termios_ioctl+0x308> <== NOT EXECUTED 300044ec: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 300044f0: e1530002 cmp r3, r2 <== NOT EXECUTED 300044f4: 1affff78 bne 300042dc <rtems_termios_ioctl+0x90> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
300044f8: e59f7110 ldr r7, [pc, #272] ; 30004610 <rtems_termios_ioctl+0x3c4><== NOT EXECUTED 300044fc: e59530cc ldr r3, [r5, #204] ; 0xcc <== NOT EXECUTED 30004500: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 30004504: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 30004508: e3530000 cmp r3, #0 <== NOT EXECUTED 3000450c: 0a000003 beq 30004520 <rtems_termios_ioctl+0x2d4> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30004510: e1a00005 mov r0, r5 <== NOT EXECUTED 30004514: e1a0e00f mov lr, pc <== NOT EXECUTED 30004518: e12fff13 bx r3 <== NOT EXECUTED 3000451c: e1a06000 mov r6, r0 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
30004520: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30004524: e5932000 ldr r2, [r3] <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
30004528: e3a03000 mov r3, #0 <== NOT EXECUTED 3000452c: e58530d0 str r3, [r5, #208] ; 0xd0 <== NOT EXECUTED
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
30004530: e7973282 ldr r3, [r7, r2, lsl #5] <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
30004534: e58520cc str r2, [r5, #204] ; 0xcc <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
30004538: e3530000 cmp r3, #0 <== NOT EXECUTED 3000453c: 0affff5b beq 300042b0 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
30004540: e1a00005 mov r0, r5 <== NOT EXECUTED 30004544: e1a0e00f mov lr, pc <== NOT EXECUTED 30004548: e12fff13 bx r3 <== NOT EXECUTED 3000454c: e1a06000 mov r6, r0 <== NOT EXECUTED 30004550: eaffff56 b 300042b0 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
} break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line;
30004554: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30004558: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 3000455c: e5832000 str r2, [r3] <== NOT EXECUTED
break;
30004560: eaffff52 b 300042b0 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
30004564: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
30004568: e58520d4 str r2, [r5, #212] ; 0xd4 <== NOT EXECUTED
3000456c: e58530d8 str r3, [r5, #216] ; 0xd8 <== NOT EXECUTED
break;
30004570: eaffff4e b 300042b0 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
30004574: e5d5a046 ldrb sl, [r5, #70] ; 0x46 <== NOT EXECUTED 30004578: eb0002d4 bl 300050d0 <rtems_clock_get_ticks_per_second> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
3000457c: e000009a mul r0, sl, r0 <== NOT EXECUTED 30004580: e59f1090 ldr r1, [pc, #144] ; 30004618 <rtems_termios_ioctl+0x3cc><== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
30004584: e5d52046 ldrb r2, [r5, #70] ; 0x46 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
30004588: e083c091 umull ip, r3, r1, r0 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
3000458c: e3520000 cmp r2, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
30004590: e1a031a3 lsr r3, r3, #3 <== NOT EXECUTED 30004594: e5853054 str r3, [r5, #84] ; 0x54 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
30004598: 0a00000b beq 300045cc <rtems_termios_ioctl+0x380> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN])
3000459c: e5d52047 ldrb r2, [r5, #71] ; 0x47 <== NOT EXECUTED
}
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;
300045a0: e585806c str r8, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300045a4: e3520000 cmp r2, #0 <== NOT EXECUTED 300045a8: 01a02003 moveq r2, r3 <== NOT EXECUTED 300045ac: 13a02000 movne r2, #0 <== NOT EXECUTED 300045b0: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED
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;
300045b4: e5853070 str r3, [r5, #112] ; 0x70 <== NOT EXECUTED 300045b8: eaffffa8 b 30004460 <rtems_termios_ioctl+0x214> <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
300045bc: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 300045c0: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 300045c4: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 300045c8: eaffff94 b 30004420 <rtems_termios_ioctl+0x1d4> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
300045cc: e5d53047 ldrb r3, [r5, #71] ; 0x47 <== NOT EXECUTED 300045d0: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
300045d4: 03a03001 moveq r3, #1 <== NOT EXECUTED
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300045d8: 15852074 strne r2, [r5, #116] ; 0x74 <== NOT EXECUTED
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
300045dc: 1585206c strne r2, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
300045e0: 15852070 strne r2, [r5, #112] ; 0x70 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
300045e4: 0585306c streq r3, [r5, #108] ; 0x6c <== NOT EXECUTED 300045e8: eaffff9c b 30004460 <rtems_termios_ioctl+0x214> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
300045ec: e5953084 ldr r3, [r5, #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)(tty->minor,
300045f0: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED 300045f4: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 300045f8: e0811003 add r1, r1, r3 <== NOT EXECUTED 300045fc: e3a02001 mov r2, #1 <== NOT EXECUTED 30004600: e1a0e00f mov lr, pc <== NOT EXECUTED 30004604: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED 30004608: eaffff5e b 30004388 <rtems_termios_ioctl+0x13c> <== NOT EXECUTED
300047e8 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
300047e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
300047ec: e59f7460 ldr r7, [pc, #1120] ; 30004c54 <rtems_termios_open+0x46c>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
300047f0: e1a06001 mov r6, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
300047f4: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
300047f8: e24dd010 sub sp, sp, #16 300047fc: e1a05000 mov r5, r0 30004800: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
30004804: e5970000 ldr r0, [r7] 30004808: e1a02001 mov r2, r1
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
3000480c: e1a09003 mov r9, r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
30004810: eb0003da bl 30005780 <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
30004814: e250a000 subs sl, r0, #0
30004818: 1a000020 bne 300048a0 <rtems_termios_open+0xb8>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
3000481c: e59fb434 ldr fp, [pc, #1076] ; 30004c58 <rtems_termios_open+0x470> 30004820: e59b4000 ldr r4, [fp] 30004824: e3540000 cmp r4, #0
30004828: 1a000003 bne 3000483c <rtems_termios_open+0x54>
3000482c: ea00002b b 300048e0 <rtems_termios_open+0xf8> 30004830: e5944000 ldr r4, [r4] 30004834: e3540000 cmp r4, #0
30004838: 0a000028 beq 300048e0 <rtems_termios_open+0xf8> if ((tty->major == major) && (tty->minor == minor))
3000483c: e594300c ldr r3, [r4, #12] 30004840: e1530005 cmp r3, r5
30004844: 1afffff9 bne 30004830 <rtems_termios_open+0x48>
30004848: e5943010 ldr r3, [r4, #16] 3000484c: e1530006 cmp r3, r6
30004850: 1afffff6 bne 30004830 <rtems_termios_open+0x48>
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
30004854: e5943008 ldr r3, [r4, #8]
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
30004858: e5982000 ldr r2, [r8]
if (!tty->refcount++) {
3000485c: e3530000 cmp r3, #0 30004860: e2833001 add r3, r3, #1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
30004864: e5824034 str r4, [r2, #52] ; 0x34
if (!tty->refcount++) {
30004868: e5843008 str r3, [r4, #8]
3000486c: 1a000009 bne 30004898 <rtems_termios_open+0xb0> if (tty->device.firstOpen)
30004870: e5943098 ldr r3, [r4, #152] ; 0x98 30004874: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
30004878: 11a00005 movne r0, r5 3000487c: 11a01006 movne r1, r6 30004880: 11a02008 movne r2, r8 30004884: 11a0e00f movne lr, pc 30004888: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3000488c: e59430b4 ldr r3, [r4, #180] ; 0xb4 30004890: e3530002 cmp r3, #2
30004894: 0a000004 beq 300048ac <rtems_termios_open+0xc4> (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex);
30004898: e5970000 ldr r0, [r7] 3000489c: eb0003ff bl 300058a0 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
300048a0: e1a0000a mov r0, sl
300048a4: e28dd010 add sp, sp, #16
300048a8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
300048ac: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 300048b0: e59f13a4 ldr r1, [pc, #932] ; 30004c5c <rtems_termios_open+0x474><== NOT EXECUTED 300048b4: e1a02004 mov r2, r4 <== NOT EXECUTED 300048b8: eb0004c9 bl 30005be4 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
300048bc: e3500000 cmp r0, #0 <== NOT EXECUTED 300048c0: 1a0000c7 bne 30004be4 <rtems_termios_open+0x3fc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
300048c4: e1a02004 mov r2, r4 <== NOT EXECUTED 300048c8: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 300048cc: e59f138c ldr r1, [pc, #908] ; 30004c60 <rtems_termios_open+0x478><== NOT EXECUTED 300048d0: eb0004c3 bl 30005be4 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
300048d4: e3500000 cmp r0, #0 <== NOT EXECUTED 300048d8: 0affffee beq 30004898 <rtems_termios_open+0xb0> <== NOT EXECUTED 300048dc: ea0000c0 b 30004be4 <rtems_termios_open+0x3fc> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
300048e0: e3a00001 mov r0, #1 300048e4: e3a010e8 mov r1, #232 ; 0xe8 300048e8: ebfff566 bl 30001e88 <calloc>
if (tty == NULL) {
300048ec: e3500000 cmp r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
300048f0: e58d0008 str r0, [sp, #8] 300048f4: e1a04000 mov r4, r0
if (tty == NULL) {
300048f8: 0a0000a5 beq 30004b94 <rtems_termios_open+0x3ac>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
300048fc: e59f1360 ldr r1, [pc, #864] ; 30004c64 <rtems_termios_open+0x47c> 30004900: e59d2008 ldr r2, [sp, #8] 30004904: e5913004 ldr r3, [r1, #4] 30004908: e5823064 str r3, [r2, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3000490c: e5920064 ldr r0, [r2, #100] ; 0x64 30004910: ebfff6ca bl 30002440 <malloc> 30004914: e59d3008 ldr r3, [sp, #8]
if (tty->rawInBuf.theBuf == NULL) {
30004918: e3500000 cmp r0, #0
} /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3000491c: e5830058 str r0, [r3, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
30004920: 0a00009f beq 30004ba4 <rtems_termios_open+0x3bc>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
30004924: e59fc338 ldr ip, [pc, #824] ; 30004c64 <rtems_termios_open+0x47c> 30004928: e59de008 ldr lr, [sp, #8] 3000492c: e59c3008 ldr r3, [ip, #8] 30004930: e58e3088 str r3, [lr, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
30004934: e59e0088 ldr r0, [lr, #136] ; 0x88 30004938: ebfff6c0 bl 30002440 <malloc> 3000493c: e59d1008 ldr r1, [sp, #8]
if (tty->rawOutBuf.theBuf == NULL) {
30004940: e3500000 cmp r0, #0
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
30004944: e581007c str r0, [r1, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
30004948: 05910058 ldreq r0, [r1, #88] ; 0x58
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
3000494c: 0a00008d beq 30004b88 <rtems_termios_open+0x3a0>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
30004950: e59f230c ldr r2, [pc, #780] ; 30004c64 <rtems_termios_open+0x47c> 30004954: e5920000 ldr r0, [r2] 30004958: ebfff6b8 bl 30002440 <malloc> 3000495c: e59d3008 ldr r3, [sp, #8]
if (tty->cbuf == NULL) {
30004960: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
30004964: e583001c str r0, [r3, #28]
if (tty->cbuf == NULL) {
30004968: 0a000082 beq 30004b78 <rtems_termios_open+0x390>
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
3000496c: e59de008 ldr lr, [sp, #8]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
30004970: e59b2000 ldr r2, [fp]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
30004974: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
30004978: e58e3004 str r3, [lr, #4]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
3000497c: e58e30d4 str r3, [lr, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
30004980: e58e30d8 str r3, [lr, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
30004984: e58e30dc str r3, [lr, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
30004988: e58e30e0 str r3, [lr, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
3000498c: e58e30e4 str r3, [lr, #228] ; 0xe4
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL)
30004990: e1520003 cmp r2, r3
rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL)
30004994: e59f32cc ldr r3, [pc, #716] ; 30004c68 <rtems_termios_open+0x480>
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
30004998: e58e2000 str r2, [lr]
tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty;
3000499c: 1582e004 strne lr, [r2, #4]
rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL)
300049a0: e5932000 ldr r2, [r3]
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
300049a4: e59d1008 ldr r1, [sp, #8]
if (rtems_termios_ttyTail == NULL)
300049a8: e3520000 cmp r2, #0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
300049ac: e59f22b0 ldr r2, [pc, #688] ; 30004c64 <rtems_termios_open+0x47c> 300049b0: e59de008 ldr lr, [sp, #8]
tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty;
300049b4: 05831000 streq r1, [r3]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
300049b8: e59f02ac ldr r0, [pc, #684] ; 30004c6c <rtems_termios_open+0x484> 300049bc: e5d2300c ldrb r3, [r2, #12] 300049c0: e28ec014 add ip, lr, #20
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
300049c4: e58b1000 str r1, [fp]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
300049c8: e1830000 orr r0, r3, r0 300049cc: e58dc000 str ip, [sp] 300049d0: e3a03000 mov r3, #0 300049d4: e3a01001 mov r1, #1 300049d8: e3a02054 mov r2, #84 ; 0x54
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
300049dc: e58e6010 str r6, [lr, #16]
tty->major = major;
300049e0: e58e500c str r5, [lr, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
300049e4: eb0002ca bl 30005514 <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)
300049e8: e2503000 subs r3, r0, #0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
300049ec: e59fb270 ldr fp, [pc, #624] ; 30004c64 <rtems_termios_open+0x47c>
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)
300049f0: 1a00007b bne 30004be4 <rtems_termios_open+0x3fc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
300049f4: e5db200c ldrb r2, [fp, #12] 300049f8: e59d1008 ldr r1, [sp, #8] 300049fc: e59f026c ldr r0, [pc, #620] ; 30004c70 <rtems_termios_open+0x488> 30004a00: e281c018 add ip, r1, #24 30004a04: e1820000 orr r0, r2, r0 30004a08: e3a01001 mov r1, #1 30004a0c: e3a02054 mov r2, #84 ; 0x54 30004a10: e58dc000 str ip, [sp] 30004a14: eb0002be bl 30005514 <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)
30004a18: e2501000 subs r1, r0, #0
30004a1c: 1a000070 bne 30004be4 <rtems_termios_open+0x3fc> rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
30004a20: e5db300c ldrb r3, [fp, #12] 30004a24: e59d2008 ldr r2, [sp, #8] 30004a28: e59f0244 ldr r0, [pc, #580] ; 30004c74 <rtems_termios_open+0x48c> 30004a2c: e282c08c add ip, r2, #140 ; 0x8c 30004a30: e1830000 orr r0, r3, r0 30004a34: e3a02020 mov r2, #32 30004a38: e1a03001 mov r3, r1 30004a3c: e58dc000 str ip, [sp] 30004a40: eb0002b3 bl 30005514 <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)
30004a44: e2503000 subs r3, r0, #0 30004a48: e58d300c str r3, [sp, #12]
30004a4c: 1a000064 bne 30004be4 <rtems_termios_open+0x3fc>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
30004a50: e59dc008 ldr ip, [sp, #8]
30004a54: e28ce098 add lr, ip, #152 ; 0x98
30004a58: e1a0c009 mov ip, r9
30004a5c: e8bc000f ldm ip!, {r0, r1, r2, r3}
30004a60: e8ae000f stmia lr!, {r0, r1, r2, r3}
30004a64: e89c000f ldm ip, {r0, r1, r2, r3}
30004a68: e88e000f stm lr, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004a6c: e59de008 ldr lr, [sp, #8]
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;
30004a70: e59d100c ldr r1, [sp, #12]
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004a74: e59e30b4 ldr r3, [lr, #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;
30004a78: e58e1094 str r1, [lr, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004a7c: e3530002 cmp r3, #2
30004a80: 0a000058 beq 30004be8 <rtems_termios_open+0x400>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
30004a84: e59d2008 ldr r2, [sp, #8] 30004a88: e59230a0 ldr r3, [r2, #160] ; 0xa0 30004a8c: e3530000 cmp r3, #0
30004a90: 0a000046 beq 30004bb0 <rtems_termios_open+0x3c8>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
30004a94: e59230b4 ldr r3, [r2, #180] ; 0xb4 30004a98: e3530002 cmp r3, #2
30004a9c: 0a000043 beq 30004bb0 <rtems_termios_open+0x3c8>
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;
30004aa0: e59d1008 ldr r1, [sp, #8]
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';
30004aa4: 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;
30004aa8: e58130b8 str r3, [r1, #184] ; 0xb8
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
30004aac: e59fc1b0 ldr ip, [pc, #432] ; 30004c64 <rtems_termios_open+0x47c>
/* 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;
30004ab0: e5910064 ldr r0, [r1, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
30004ab4: e5911064 ldr r1, [r1, #100] ; 0x64
/* * Bump name characer */ if (c++ == 'z')
30004ab8: e5dc200c ldrb r2, [ip, #12]
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;
30004abc: e59de008 ldr lr, [sp, #8] 30004ac0: e0811081 add r1, r1, r1, lsl #1
/* * Bump name characer */ if (c++ == 'z')
30004ac4: e352007a cmp r2, #122 ; 0x7a
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;
30004ac8: e1a01121 lsr r1, r1, #2
/* * Bump name characer */ if (c++ == 'z')
30004acc: e2822001 add r2, r2, #1
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;
30004ad0: e58e10c0 str r1, [lr, #192] ; 0xc0
/* * Bump name characer */ if (c++ == 'z')
30004ad4: e5cc200c strb r2, [ip, #12]
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30004ad8: e59f2198 ldr r2, [pc, #408] ; 30004c78 <rtems_termios_open+0x490>
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';
30004adc: e5ce304c strb r3, [lr, #76] ; 0x4c
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30004ae0: e58e2030 str r2, [lr, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30004ae4: e59f2190 ldr r2, [pc, #400] ; 30004c7c <rtems_termios_open+0x494>
tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000';
30004ae8: e5ce3051 strb r3, [lr, #81] ; 0x51
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30004aec: e58e2034 str r2, [lr, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
30004af0: e59f2188 ldr r2, [pc, #392] ; 30004c80 <rtems_termios_open+0x498>
/* 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;
30004af4: e1a000a0 lsr r0, r0, #1
/* * 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;
30004af8: e58e2038 str r2, [lr, #56] ; 0x38
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
30004afc: e59f2180 ldr r2, [pc, #384] ; 30004c84 <rtems_termios_open+0x49c>
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a';
30004b00: 01a0300c moveq r3, ip
* Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
30004b04: e58e203c str r2, [lr, #60] ; 0x3c
tty->termios.c_cc[VINTR] = '\003';
30004b08: e3a02003 mov r2, #3 30004b0c: e5ce2041 strb r2, [lr, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
30004b10: e3a0201c mov r2, #28 30004b14: e5ce2042 strb r2, [lr, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
30004b18: e3a0207f mov r2, #127 ; 0x7f 30004b1c: e5ce2043 strb r2, [lr, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
30004b20: e3a02015 mov r2, #21 30004b24: e5ce2044 strb r2, [lr, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
30004b28: e3a02004 mov r2, #4 30004b2c: e5ce2045 strb r2, [lr, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
30004b30: e3a02011 mov r2, #17 30004b34: e5ce2049 strb r2, [lr, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
30004b38: e3a02013 mov r2, #19 30004b3c: e5ce204a strb r2, [lr, #74] ; 0x4a
tty->termios.c_cc[VSUSP] = '\032';
30004b40: e3a0201a mov r2, #26 30004b44: e5ce204b strb r2, [lr, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
30004b48: e3a02012 mov r2, #18 30004b4c: e5ce204d strb r2, [lr, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
30004b50: e3a0200f mov r2, #15 30004b54: e5ce204e strb r2, [lr, #78] ; 0x4e
tty->termios.c_cc[VWERASE] = '\027';
30004b58: e3a02017 mov r2, #23 30004b5c: e5ce204f strb r2, [lr, #79] ; 0x4f
tty->termios.c_cc[VLNEXT] = '\026';
30004b60: e3a02016 mov r2, #22 30004b64: e5ce2050 strb r2, [lr, #80] ; 0x50
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a';
30004b68: 0282204b addeq r2, r2, #75 ; 0x4b
/* 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;
30004b6c: e58e00bc str r0, [lr, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a';
30004b70: 05c3200c strbeq r2, [r3, #12] 30004b74: eaffff36 b 30004854 <rtems_termios_open+0x6c>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
30004b78: e593007c ldr r0, [r3, #124] ; 0x7c <== NOT EXECUTED 30004b7c: ebfff557 bl 300020e0 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
30004b80: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED 30004b84: e59c0058 ldr r0, [ip, #88] ; 0x58 <== NOT EXECUTED 30004b88: ebfff554 bl 300020e0 <free> <== NOT EXECUTED
free(tty);
30004b8c: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 30004b90: ebfff552 bl 300020e0 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
30004b94: e5970000 ldr r0, [r7] <== NOT EXECUTED 30004b98: eb000340 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 30004b9c: e3a0a01a mov sl, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
30004ba0: eaffff3e b 300048a0 <rtems_termios_open+0xb8> <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
30004ba4: e1a00003 mov r0, r3 <== NOT EXECUTED 30004ba8: ebfff54c bl 300020e0 <free> <== NOT EXECUTED 30004bac: eafffff8 b 30004b94 <rtems_termios_open+0x3ac> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
30004bb0: e59fc0ac ldr ip, [pc, #172] ; 30004c64 <rtems_termios_open+0x47c><== NOT EXECUTED 30004bb4: e59de008 ldr lr, [sp, #8] <== NOT EXECUTED 30004bb8: e5dc300c ldrb r3, [ip, #12] <== NOT EXECUTED 30004bbc: e59f00c4 ldr r0, [pc, #196] ; 30004c88 <rtems_termios_open+0x4a0><== NOT EXECUTED 30004bc0: e3a01000 mov r1, #0 <== NOT EXECUTED 30004bc4: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30004bc8: e28ec068 add ip, lr, #104 ; 0x68 <== NOT EXECUTED 30004bcc: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 30004bd0: e1a03001 mov r3, r1 <== NOT EXECUTED 30004bd4: e58dc000 str ip, [sp] <== NOT EXECUTED 30004bd8: eb00024d bl 30005514 <rtems_semaphore_create> <== NOT EXECUTED
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
30004bdc: e3500000 cmp r0, #0 <== NOT EXECUTED 30004be0: 0affffae beq 30004aa0 <rtems_termios_open+0x2b8> <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
30004be4: eb000484 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
30004be8: e5db300c ldrb r3, [fp, #12] <== NOT EXECUTED 30004bec: e59f0098 ldr r0, [pc, #152] ; 30004c8c <rtems_termios_open+0x4a4><== NOT EXECUTED 30004bf0: e28ec0c8 add ip, lr, #200 ; 0xc8 <== NOT EXECUTED 30004bf4: e59de00c ldr lr, [sp, #12] <== NOT EXECUTED 30004bf8: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30004bfc: e3a0100a mov r1, #10 <== NOT EXECUTED 30004c00: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 30004c04: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 30004c08: e58de000 str lr, [sp] <== NOT EXECUTED 30004c0c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30004c10: eb00034c bl 30005948 <rtems_task_create> <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL)
30004c14: e250e000 subs lr, r0, #0 <== NOT EXECUTED 30004c18: 1afffff1 bne 30004be4 <rtems_termios_open+0x3fc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
30004c1c: e5db300c ldrb r3, [fp, #12] <== NOT EXECUTED 30004c20: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 30004c24: e59f0064 ldr r0, [pc, #100] ; 30004c90 <rtems_termios_open+0x4a8><== NOT EXECUTED 30004c28: e281c0c4 add ip, r1, #196 ; 0xc4 <== NOT EXECUTED 30004c2c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30004c30: e3a01009 mov r1, #9 <== NOT EXECUTED 30004c34: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 30004c38: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 30004c3c: e58de000 str lr, [sp] <== NOT EXECUTED 30004c40: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30004c44: eb00033f bl 30005948 <rtems_task_create> <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL)
30004c48: e3500000 cmp r0, #0 <== NOT EXECUTED 30004c4c: 0affff8c beq 30004a84 <rtems_termios_open+0x29c> <== NOT EXECUTED 30004c50: eaffffe3 b 30004be4 <rtems_termios_open+0x3fc> <== NOT EXECUTED
3000360c <rtems_termios_puts>:
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
3000360c: e59230b4 ldr r3, [r2, #180] ; 0xb4
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
30003610: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
30003614: e3530000 cmp r3, #0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
30003618: e1a04002 mov r4, r2 3000361c: e1a0b000 mov fp, r0 30003620: e1a09001 mov r9, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
30003624: 0a000039 beq 30003710 <rtems_termios_puts+0x104>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
30003628: e3510000 cmp r1, #0 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
3000362c: e5928080 ldr r8, [r2, #128] ; 0x80 <== NOT EXECUTED
while (len) {
30003630: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30003634: e3a0a000 mov sl, #0 <== NOT EXECUTED
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
30003638: e3a07002 mov r7, #2 <== NOT EXECUTED
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
3000363c: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 30003640: e2880001 add r0, r8, #1 <== NOT EXECUTED 30003644: eb00512a bl 30017af4 <__umodsi3> <== NOT EXECUTED 30003648: e1a08000 mov r8, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000364c: e10f5000 mrs r5, CPSR <== NOT EXECUTED 30003650: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 30003654: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
30003658: e5946084 ldr r6, [r4, #132] ; 0x84 <== NOT EXECUTED 3000365c: e1560000 cmp r6, r0 <== NOT EXECUTED 30003660: 1a00000d bne 3000369c <rtems_termios_puts+0x90> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
30003664: e5847094 str r7, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003668: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
3000366c: e3a01000 mov r1, #0 <== NOT EXECUTED 30003670: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 30003674: e1a02001 mov r2, r1 <== NOT EXECUTED 30003678: eb000840 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
3000367c: e3500000 cmp r0, #0 <== NOT EXECUTED 30003680: 1a000028 bne 30003728 <rtems_termios_puts+0x11c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003684: e10f5000 mrs r5, CPSR <== NOT EXECUTED 30003688: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 3000368c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
30003690: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 30003694: e1530006 cmp r3, r6 <== NOT EXECUTED 30003698: 0afffff1 beq 30003664 <rtems_termios_puts+0x58> <== NOT EXECUTED
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
3000369c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 300036a0: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED 300036a4: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 300036a8: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
300036ac: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead;
300036b0: e5848080 str r8, [r4, #128] ; 0x80 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
300036b4: e3530000 cmp r3, #0 <== NOT EXECUTED 300036b8: 1a000007 bne 300036dc <rtems_termios_puts+0xd0> <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
300036bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300036c0: e3130010 tst r3, #16 <== NOT EXECUTED 300036c4: 0a000009 beq 300036f0 <rtems_termios_puts+0xe4> <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
300036c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300036cc: e3833020 orr r3, r3, #32 <== NOT EXECUTED 300036d0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} tty->rawOutBufState = rob_busy;
300036d4: e3a03001 mov r3, #1 <== NOT EXECUTED 300036d8: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300036dc: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
300036e0: e2599001 subs r9, r9, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--;
300036e4: e28aa001 add sl, sl, #1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
300036e8: 1affffd3 bne 3000363c <rtems_termios_puts+0x30> <== NOT EXECUTED
300036ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
300036f0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
300036f4: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 300036f8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300036fc: e0811003 add r1, r1, r3 <== NOT EXECUTED 30003700: e3a02001 mov r2, #1 <== NOT EXECUTED 30003704: e1a0e00f mov lr, pc <== NOT EXECUTED 30003708: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3000370c: eafffff0 b 300036d4 <rtems_termios_puts+0xc8> <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
30003710: e1a01000 mov r1, r0 30003714: e1a02009 mov r2, r9 30003718: e5940010 ldr r0, [r4, #16] 3000371c: e1a0e00f mov lr, pc 30003720: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
30003724: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
30003728: eb0009b3 bl 30005dfc <rtems_fatal_error_occurred> <== NOT EXECUTED
30003ea4 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003ea4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
30003ea8: e5903000 ldr r3, [r0] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003eac: e1a0a000 mov sl, r0 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
30003eb0: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003eb4: e3a01000 mov r1, #0 <== NOT EXECUTED
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
30003eb8: e59a300c ldr r3, [sl, #12] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003ebc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003ec0: e1a02001 mov r2, r1 <== NOT EXECUTED 30003ec4: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
30003ec8: e59a7010 ldr r7, [sl, #16] <== NOT EXECUTED
char *buffer = args->buffer;
30003ecc: e58d3000 str r3, [sp] <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003ed0: eb00062a bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
30003ed4: e250b000 subs fp, r0, #0 <== NOT EXECUTED 30003ed8: 1a00000e bne 30003f18 <rtems_termios_read+0x74> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
30003edc: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 30003ee0: e59f3358 ldr r3, [pc, #856] ; 30004240 <rtems_termios_read+0x39c><== NOT EXECUTED 30003ee4: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 30003ee8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 30003eec: e3530000 cmp r3, #0 <== NOT EXECUTED 30003ef0: 0a00000b beq 30003f24 <rtems_termios_read+0x80> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
30003ef4: e1a0100a mov r1, sl <== NOT EXECUTED 30003ef8: e1a00004 mov r0, r4 <== NOT EXECUTED 30003efc: e1a0e00f mov lr, pc <== NOT EXECUTED 30003f00: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
30003f04: e3a03000 mov r3, #0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
30003f08: e1a0b000 mov fp, r0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
30003f0c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
30003f10: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 30003f14: eb000661 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
} args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; }
30003f18: e1a0000b mov r0, fp <== NOT EXECUTED
30003f1c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30003f20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
30003f24: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 30003f28: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003f2c: e1520003 cmp r2, r3 <== NOT EXECUTED 30003f30: 0a00001a beq 30003fa0 <rtems_termios_read+0xfc> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30003f34: e3570000 cmp r7, #0 <== NOT EXECUTED 30003f38: 0a000010 beq 30003f80 <rtems_termios_read+0xdc> <== NOT EXECUTED 30003f3c: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 30003f40: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30003f44: e1530002 cmp r3, r2 <== NOT EXECUTED 30003f48: aa00000c bge 30003f80 <rtems_termios_read+0xdc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
30003f4c: e59d2000 ldr r2, [sp] <== NOT EXECUTED 30003f50: e0631002 rsb r1, r3, r2 <== NOT EXECUTED 30003f54: ea000002 b 30003f64 <rtems_termios_read+0xc0> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30003f58: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30003f5c: e1520003 cmp r2, r3 <== NOT EXECUTED 30003f60: da000006 ble 30003f80 <rtems_termios_read+0xdc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
30003f64: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30003f68: e2577001 subs r7, r7, #1 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
30003f6c: e7d22003 ldrb r2, [r2, r3] <== NOT EXECUTED 30003f70: e7c12003 strb r2, [r1, r3] <== NOT EXECUTED 30003f74: e2833001 add r3, r3, #1 <== NOT EXECUTED 30003f78: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30003f7c: 1afffff5 bne 30003f58 <rtems_termios_read+0xb4> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
30003f80: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED 30003f84: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 30003f88: e58a7018 str r7, [sl, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
30003f8c: e3a03000 mov r3, #0 <== NOT EXECUTED 30003f90: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
30003f94: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 30003f98: eb000640 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
30003f9c: eaffffdd b 30003f18 <rtems_termios_read+0x74> <== NOT EXECUTED
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
30003fa0: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
30003fa4: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
if (tty->device.pollRead != NULL
30003fa8: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
30003fac: e584202c str r2, [r4, #44] ; 0x2c <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
30003fb0: e584b020 str fp, [r4, #32] <== NOT EXECUTED 30003fb4: e584b024 str fp, [r4, #36] ; 0x24 <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
30003fb8: 0a000002 beq 30003fc8 <rtems_termios_read+0x124> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
30003fbc: e59420b4 ldr r2, [r4, #180] ; 0xb4 <== NOT EXECUTED 30003fc0: e3520000 cmp r2, #0 <== NOT EXECUTED 30003fc4: 0a000061 beq 30004150 <rtems_termios_read+0x2ac> <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
30003fc8: e2842049 add r2, r4, #73 ; 0x49 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
30003fcc: e5945074 ldr r5, [r4, #116] ; 0x74 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30003fd0: e59f626c ldr r6, [pc, #620] ; 30004244 <rtems_termios_read+0x3a0><== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30003fd4: e59f926c ldr r9, [pc, #620] ; 30004248 <rtems_termios_read+0x3a4><== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
30003fd8: e58d2004 str r2, [sp, #4] <== NOT EXECUTED 30003fdc: e3a08001 mov r8, #1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30003fe0: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 30003fe4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 30003fe8: e1520003 cmp r2, r3 <== NOT EXECUTED 30003fec: 0a000039 beq 300040d8 <rtems_termios_read+0x234> <== NOT EXECUTED 30003ff0: e5962000 ldr r2, [r6] <== NOT EXECUTED 30003ff4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003ff8: e2422001 sub r2, r2, #1 <== NOT EXECUTED 30003ffc: e1520003 cmp r2, r3 <== NOT EXECUTED 30004000: da000034 ble 300040d8 <rtems_termios_read+0x234> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
30004004: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 30004008: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3000400c: e2800001 add r0, r0, #1 <== NOT EXECUTED 30004010: eb004eb7 bl 30017af4 <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
30004014: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 30004018: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
3000401c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
30004020: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 30004024: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 30004028: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3000402c: e0823003 add r3, r2, r3 <== NOT EXECUTED 30004030: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 30004034: eb004eae bl 30017af4 <__umodsi3> <== NOT EXECUTED 30004038: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 3000403c: e1500003 cmp r0, r3 <== NOT EXECUTED 30004040: 2a000012 bcs 30004090 <rtems_termios_read+0x1ec> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30004044: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30004048: e59f31f8 ldr r3, [pc, #504] ; 30004248 <rtems_termios_read+0x3a4><== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
3000404c: e3c22001 bic r2, r2, #1 <== NOT EXECUTED 30004050: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30004054: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004058: e0023003 and r3, r2, r3 <== NOT EXECUTED 3000405c: e1530009 cmp r3, r9 <== NOT EXECUTED 30004060: 0a00002e beq 30004120 <rtems_termios_read+0x27c> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
30004064: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004068: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3000406c: 0a000007 beq 30004090 <rtems_termios_read+0x1ec> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
30004070: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
30004074: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
30004078: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
3000407c: e3530000 cmp r3, #0 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
30004080: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
tty->device.startRemoteTx(tty->minor);
30004084: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30004088: 11a0e00f movne lr, pc <== NOT EXECUTED 3000408c: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
30004090: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30004094: e3130002 tst r3, #2 <== NOT EXECUTED 30004098: 0a000017 beq 300040fc <rtems_termios_read+0x258> <== NOT EXECUTED
if (siproc (c, tty))
3000409c: e1a00005 mov r0, r5 <== NOT EXECUTED 300040a0: e1a01004 mov r1, r4 <== NOT EXECUTED 300040a4: ebffff13 bl 30003cf8 <siproc> <== NOT EXECUTED 300040a8: e3500000 cmp r0, #0 <== NOT EXECUTED 300040ac: 1a000019 bne 30004118 <rtems_termios_read+0x274> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
300040b0: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 300040b4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
300040b8: e5945070 ldr r5, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
300040bc: e1520003 cmp r2, r3 <== NOT EXECUTED 300040c0: 0a000004 beq 300040d8 <rtems_termios_read+0x234> <== NOT EXECUTED 300040c4: e5963000 ldr r3, [r6] <== NOT EXECUTED 300040c8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 300040cc: e2433001 sub r3, r3, #1 <== NOT EXECUTED 300040d0: e1520003 cmp r2, r3 <== NOT EXECUTED 300040d4: baffffca blt 30004004 <rtems_termios_read+0x160> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
300040d8: e3580000 cmp r8, #0 <== NOT EXECUTED 300040dc: 0affff94 beq 30003f34 <rtems_termios_read+0x90> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
300040e0: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 300040e4: e594106c ldr r1, [r4, #108] ; 0x6c <== NOT EXECUTED 300040e8: e1a02005 mov r2, r5 <== NOT EXECUTED 300040ec: eb0005a3 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
300040f0: e3500000 cmp r0, #0 <== NOT EXECUTED 300040f4: 0affffb9 beq 30003fe0 <rtems_termios_read+0x13c> <== NOT EXECUTED 300040f8: eaffff8d b 30003f34 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
300040fc: e1a00005 mov r0, r5 <== NOT EXECUTED 30004100: e1a01004 mov r1, r4 <== NOT EXECUTED 30004104: ebfffefb bl 30003cf8 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
30004108: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3000410c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30004110: e1520003 cmp r2, r3 <== NOT EXECUTED 30004114: baffffe5 blt 300040b0 <rtems_termios_read+0x20c> <== NOT EXECUTED 30004118: e3a08000 mov r8, #0 <== NOT EXECUTED 3000411c: eaffffe3 b 300040b0 <rtems_termios_read+0x20c> <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30004120: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30004124: e3530000 cmp r3, #0 <== NOT EXECUTED 30004128: 0a000002 beq 30004138 <rtems_termios_read+0x294> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
3000412c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30004130: e3130020 tst r3, #32 <== NOT EXECUTED 30004134: 0affffca beq 30004064 <rtems_termios_read+0x1c0> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
30004138: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000413c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 30004140: e3a02001 mov r2, #1 <== NOT EXECUTED 30004144: e1a0e00f mov lr, pc <== NOT EXECUTED 30004148: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3000414c: eaffffcf b 30004090 <rtems_termios_read+0x1ec> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30004150: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 30004154: e3120002 tst r2, #2 <== NOT EXECUTED 30004158: 0a00000b beq 3000418c <rtems_termios_read+0x2e8> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
3000415c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30004160: e1a0e00f mov lr, pc <== NOT EXECUTED 30004164: e12fff13 bx r3 <== NOT EXECUTED
if (n < 0) {
30004168: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
3000416c: e1a01004 mov r1, r4 <== NOT EXECUTED 30004170: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
30004174: ba00002d blt 30004230 <rtems_termios_read+0x38c> <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
30004178: ebfffede bl 30003cf8 <siproc> <== NOT EXECUTED 3000417c: e3500000 cmp r0, #0 <== NOT EXECUTED 30004180: 1affff6b bne 30003f34 <rtems_termios_read+0x90> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30004184: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 30004188: eafffff3 b 3000415c <rtems_termios_read+0x2b8> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
3000418c: eb0003d7 bl 300050f0 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED 30004190: e1a05000 mov r5, r0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30004194: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30004198: e1a0e00f mov lr, pc <== NOT EXECUTED 3000419c: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
300041a0: e3500000 cmp r0, #0 <== NOT EXECUTED 300041a4: ba00000c blt 300041dc <rtems_termios_read+0x338> <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
300041a8: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 300041ac: e1a01004 mov r1, r4 <== NOT EXECUTED 300041b0: ebfffed0 bl 30003cf8 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
300041b4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 300041b8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 300041bc: e1520003 cmp r2, r3 <== NOT EXECUTED 300041c0: aaffff5b bge 30003f34 <rtems_termios_read+0x90> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
300041c4: e3530000 cmp r3, #0 <== NOT EXECUTED 300041c8: 0afffff1 beq 30004194 <rtems_termios_read+0x2f0> <== NOT EXECUTED 300041cc: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 300041d0: e3530000 cmp r3, #0 <== NOT EXECUTED 300041d4: 0affffee beq 30004194 <rtems_termios_read+0x2f0> <== NOT EXECUTED 300041d8: eaffffeb b 3000418c <rtems_termios_read+0x2e8> <== NOT EXECUTED
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
300041dc: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 300041e0: e3530000 cmp r3, #0 <== NOT EXECUTED 300041e4: 0a000008 beq 3000420c <rtems_termios_read+0x368> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
300041e8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 300041ec: e3530000 cmp r3, #0 <== NOT EXECUTED 300041f0: 0a000002 beq 30004200 <rtems_termios_read+0x35c> <== NOT EXECUTED 300041f4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 300041f8: e3530000 cmp r3, #0 <== NOT EXECUTED 300041fc: 1a000005 bne 30004218 <rtems_termios_read+0x374> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
30004200: e3a00001 mov r0, #1 <== NOT EXECUTED 30004204: eb000690 bl 30005c4c <rtems_task_wake_after> <== NOT EXECUTED 30004208: eaffffe1 b 30004194 <rtems_termios_read+0x2f0> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
3000420c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 30004210: e3530000 cmp r3, #0 <== NOT EXECUTED 30004214: 0affff46 beq 30003f34 <rtems_termios_read+0x90> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
30004218: eb0003b4 bl 300050f0 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
3000421c: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 30004220: e0650000 rsb r0, r5, r0 <== NOT EXECUTED 30004224: e1500003 cmp r0, r3 <== NOT EXECUTED 30004228: 9afffff4 bls 30004200 <rtems_termios_read+0x35c> <== NOT EXECUTED 3000422c: eaffff40 b 30003f34 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
30004230: e3a00001 mov r0, #1 <== NOT EXECUTED 30004234: eb000684 bl 30005c4c <rtems_task_wake_after> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30004238: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 3000423c: eaffffc6 b 3000415c <rtems_termios_read+0x2b8> <== NOT EXECUTED
30003094 <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))
30003094: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 30003098: e59f31fc ldr r3, [pc, #508] ; 3000329c <rtems_termios_refill_transmitter+0x208><== NOT EXECUTED
* 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)
{
3000309c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
300030a0: e0023003 and r3, r2, r3 <== NOT EXECUTED 300030a4: e59f21f4 ldr r2, [pc, #500] ; 300032a0 <rtems_termios_refill_transmitter+0x20c><== NOT EXECUTED
* 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)
{
300030a8: e1a04000 mov r4, r0 <== NOT EXECUTED
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
300030ac: e1530002 cmp r3, r2 <== NOT EXECUTED 300030b0: 0a000046 beq 300031d0 <rtems_termios_refill_transmitter+0x13c><== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
300030b4: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 300030b8: e2033003 and r3, r3, #3 <== NOT EXECUTED 300030bc: e3530002 cmp r3, #2 <== NOT EXECUTED 300030c0: 0a000054 beq 30003218 <rtems_termios_refill_transmitter+0x184><== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
300030c4: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 300030c8: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 300030cc: e1520003 cmp r2, r3 <== NOT EXECUTED 300030d0: 0a00002a beq 30003180 <rtems_termios_refill_transmitter+0xec><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300030d4: e10f3000 mrs r3, CPSR <== NOT EXECUTED 300030d8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 300030dc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
300030e0: e3a02000 mov r2, #0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
300030e4: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
300030e8: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300030ec: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
300030f0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 300030f4: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 300030f8: e0800003 add r0, r0, r3 <== NOT EXECUTED 300030fc: eb00527c bl 30017af4 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
30003100: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
30003104: e1a05000 mov r5, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
30003108: e3530002 cmp r3, #2 <== NOT EXECUTED
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
3000310c: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
30003110: 0a00002b beq 300031c4 <rtems_termios_refill_transmitter+0x130><== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
30003114: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 30003118: e1530005 cmp r3, r5 <== NOT EXECUTED 3000311c: 0a00001d beq 30003198 <rtems_termios_refill_transmitter+0x104><== NOT EXECUTED
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
30003120: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003124: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 30003128: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 3000312c: 0a00004b beq 30003260 <rtems_termios_refill_transmitter+0x1cc><== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30003130: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
30003134: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30003138: e1550003 cmp r5, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
3000313c: 85946088 ldrhi r6, [r4, #136] ; 0x88 <== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
30003140: 95946080 ldrls r6, [r4, #128] ; 0x80 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
30003144: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
30003148: 80656006 rsbhi r6, r5, r6 <== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
3000314c: 90656006 rsbls r6, r5, r6 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
30003150: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 30003154: 13a06001 movne r6, #1 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
30003158: e3a03001 mov r3, #1 <== NOT EXECUTED 3000315c: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
30003160: e0811005 add r1, r1, r5 <== NOT EXECUTED 30003164: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30003168: e1a02006 mov r2, r6 <== NOT EXECUTED 3000316c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003170: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
30003174: e5845084 str r5, [r4, #132] ; 0x84 <== NOT EXECUTED
} return nToSend; }
30003178: e1a00006 mov r0, r6 <== NOT EXECUTED
3000317c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
30003180: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 30003184: e3530002 cmp r3, #2 <== NOT EXECUTED 30003188: 0a00003f beq 3000328c <rtems_termios_refill_transmitter+0x1f8><== NOT EXECUTED
/* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
3000318c: e3a06000 mov r6, #0 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
30003190: e1a00006 mov r0, r6 <== NOT EXECUTED
30003194: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30003198: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
3000319c: e3a06000 mov r6, #0 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
300031a0: e1530006 cmp r3, r6 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
300031a4: e5846094 str r6, [r4, #148] ; 0x94 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
300031a8: 01a06003 moveq r6, r3 <== NOT EXECUTED 300031ac: 0afffff0 beq 30003174 <rtems_termios_refill_transmitter+0xe0><== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
300031b0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 300031b4: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 300031b8: e1a0e00f mov lr, pc <== NOT EXECUTED 300031bc: e12fff13 bx r3 <== NOT EXECUTED 300031c0: eaffffeb b 30003174 <rtems_termios_refill_transmitter+0xe0><== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
300031c4: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 300031c8: eb0009b4 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 300031cc: eaffffd0 b 30003114 <rtems_termios_refill_transmitter+0x80><== NOT EXECUTED
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
300031d0: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 300031d4: e3a02001 mov r2, #1 <== NOT EXECUTED 300031d8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 300031dc: e1a0e00f mov lr, pc <== NOT EXECUTED 300031e0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300031e4: e10f3000 mrs r3, CPSR <== NOT EXECUTED 300031e8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 300031ec: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
300031f0: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
300031f4: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
300031f8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
300031fc: e3811002 orr r1, r1, #2 <== NOT EXECUTED 30003200: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30003204: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003208: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 3000320c: e3a06001 mov r6, #1 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
30003210: e1a00006 mov r0, r6 <== NOT EXECUTED
30003214: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor,
30003218: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 3000321c: e3a02001 mov r2, #1 <== NOT EXECUTED 30003220: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30003224: e1a0e00f mov lr, pc <== NOT EXECUTED 30003228: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000322c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30003230: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30003234: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30003238: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
3000323c: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30003240: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30003244: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 30003248: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
3000324c: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003250: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30003254: e3a06001 mov r6, #1 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
30003258: e1a00006 mov r0, r6 <== NOT EXECUTED
3000325c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003260: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30003264: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30003268: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
3000326c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003270: e3822020 orr r2, r2, #32 <== NOT EXECUTED 30003274: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
30003278: e3a02001 mov r2, #1 <== NOT EXECUTED 3000327c: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003280: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30003284: e3a06000 mov r6, #0 <== NOT EXECUTED 30003288: eaffffb9 b 30003174 <rtems_termios_refill_transmitter+0xe0><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
3000328c: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 30003290: eb000982 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED 30003294: e3a06000 mov r6, #0 <== NOT EXECUTED 30003298: eaffffbc b 30003190 <rtems_termios_refill_transmitter+0xfc><== NOT EXECUTED
30004d04 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
30004d04: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
30004d08: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
30004d0c: e1a04000 mov r4, r0 <== NOT EXECUTED
30004d10: e28d7007 add r7, sp, #7 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
30004d14: e3a06000 mov r6, #0 <== NOT EXECUTED 30004d18: e1a0300d mov r3, sp <== NOT EXECUTED 30004d1c: e3a01002 mov r1, #2 <== NOT EXECUTED 30004d20: e3a02000 mov r2, #0 <== NOT EXECUTED 30004d24: e3a00003 mov r0, #3 <== NOT EXECUTED 30004d28: eb000110 bl 30005170 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
30004d2c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30004d30: e3130001 tst r3, #1 <== NOT EXECUTED 30004d34: 1a000012 bne 30004d84 <rtems_termios_rxdaemon+0x80> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
30004d38: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30004d3c: e1a0e00f mov lr, pc <== NOT EXECUTED 30004d40: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
30004d44: e3700001 cmn r0, #1 <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
30004d48: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
30004d4c: 0afffff1 beq 30004d18 <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
30004d50: e1a01007 mov r1, r7 <== NOT EXECUTED 30004d54: e3a02001 mov r2, #1 <== NOT EXECUTED 30004d58: e1a00004 mov r0, r4 <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
30004d5c: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
30004d60: ebfff969 bl 3000330c <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
30004d64: e1a0300d mov r3, sp <== NOT EXECUTED 30004d68: e3a01002 mov r1, #2 <== NOT EXECUTED 30004d6c: e3a02000 mov r2, #0 <== NOT EXECUTED 30004d70: e3a00003 mov r0, #3 <== NOT EXECUTED 30004d74: eb0000fd bl 30005170 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
30004d78: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30004d7c: e3130001 tst r3, #1 <== NOT EXECUTED 30004d80: 0affffec beq 30004d38 <rtems_termios_rxdaemon+0x34> <== NOT EXECUTED
tty->rxTaskId = 0;
30004d84: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
30004d88: e1a00006 mov r0, r6 <== NOT EXECUTED 30004d8c: eb00033b bl 30005a80 <rtems_task_delete> <== NOT EXECUTED 30004d90: eaffffe0 b 30004d18 <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
30003088 <rtems_termios_rxirq_occured>:
void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty)
{
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
30003088: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 3000308c: e3a01002 mov r1, #2 <== NOT EXECUTED 30003090: ea000894 b 300052e8 <rtems_event_send> <== NOT EXECUTED
30004c94 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
30004c94: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
30004c98: e59f6060 ldr r6, [pc, #96] ; 30004d00 <rtems_termios_txdaemon+0x6c><== NOT EXECUTED
30004c9c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
30004ca0: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
30004ca4: e3a07000 mov r7, #0 <== NOT EXECUTED 30004ca8: e1a0300d mov r3, sp <== NOT EXECUTED 30004cac: e3a01002 mov r1, #2 <== NOT EXECUTED 30004cb0: e3a02000 mov r2, #0 <== NOT EXECUTED 30004cb4: e3a00003 mov r0, #3 <== NOT EXECUTED 30004cb8: eb00012c bl 30005170 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
30004cbc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
rtems_termios_linesw[tty->t_line].l_start(tty);
30004cc0: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_event_receive((TERMIOS_TX_START_EVENT |
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
30004cc4: e3130001 tst r3, #1 <== NOT EXECUTED 30004cc8: 1a000008 bne 30004cf0 <rtems_termios_txdaemon+0x5c> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004ccc: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 30004cd0: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED 30004cd4: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 30004cd8: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
30004cdc: 11a0e00f movne lr, pc <== NOT EXECUTED 30004ce0: 112fff13 bxne r3 <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
30004ce4: e1a00004 mov r0, r4 <== NOT EXECUTED 30004ce8: ebfff8e9 bl 30003094 <rtems_termios_refill_transmitter> <== NOT EXECUTED 30004cec: eaffffed b 30004ca8 <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
30004cf0: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
30004cf4: e1a00007 mov r0, r7 <== NOT EXECUTED 30004cf8: eb000360 bl 30005a80 <rtems_task_delete> <== NOT EXECUTED 30004cfc: eaffffe9 b 30004ca8 <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
30003d58 <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;
30003d58: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
30003d5c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
30003d60: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003d64: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
30003d68: e1a05000 mov r5, 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);
30003d6c: e1a02001 mov r2, r1 30003d70: e5940018 ldr r0, [r4, #24] 30003d74: eb000681 bl 30005780 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
30003d78: e2506000 subs r6, r0, #0
30003d7c: 1a00000c bne 30003db4 <rtems_termios_write+0x5c>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
30003d80: e59420cc ldr r2, [r4, #204] ; 0xcc 30003d84: e59f3098 ldr r3, [pc, #152] ; 30003e24 <rtems_termios_write+0xcc> 30003d88: e0833282 add r3, r3, r2, lsl #5 30003d8c: e593300c ldr r3, [r3, #12] 30003d90: e3530000 cmp r3, #0
30003d94: 0a000008 beq 30003dbc <rtems_termios_write+0x64> sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
30003d98: e1a01005 mov r1, r5 <== NOT EXECUTED 30003d9c: e1a00004 mov r0, r4 <== NOT EXECUTED 30003da0: e1a0e00f mov lr, pc <== NOT EXECUTED 30003da4: e12fff13 bx r3 <== NOT EXECUTED 30003da8: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
30003dac: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 30003db0: eb0006ba bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; }
30003db4: e1a00006 mov r0, r6 <== NOT EXECUTED
30003db8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
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) {
30003dbc: e5943034 ldr r3, [r4, #52] ; 0x34 30003dc0: e3130001 tst r3, #1
30003dc4: 0a000011 beq 30003e10 <rtems_termios_write+0xb8> uint32_t count = args->count;
30003dc8: e5958010 ldr r8, [r5, #16]
char *buffer = args->buffer;
30003dcc: e595a00c ldr sl, [r5, #12]
while (count--)
30003dd0: e3580000 cmp r8, #0 30003dd4: 01a03006 moveq r3, r6
30003dd8: 0a000007 beq 30003dfc <rtems_termios_write+0xa4>
30003ddc: e1a07006 mov r7, r6
oproc (*buffer++, tty);
30003de0: e7da0007 ldrb r0, [sl, r7] 30003de4: e1a01004 mov r1, r4 30003de8: e2877001 add r7, r7, #1 30003dec: ebfffe4e bl 3000372c <oproc>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
30003df0: e1580007 cmp r8, r7
30003df4: 1afffff9 bne 30003de0 <rtems_termios_write+0x88>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
30003df8: e5953010 ldr r3, [r5, #16] 30003dfc: e5853018 str r3, [r5, #24]
} rtems_semaphore_release (tty->osem);
30003e00: e5940018 ldr r0, [r4, #24] 30003e04: eb0006a5 bl 300058a0 <rtems_semaphore_release>
return sc; }
30003e08: e1a00006 mov r0, r6
30003e0c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
30003e10: e595000c ldr r0, [r5, #12] <== NOT EXECUTED 30003e14: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED 30003e18: e1a02004 mov r2, r4 <== NOT EXECUTED 30003e1c: ebfffdfa bl 3000360c <rtems_termios_puts> <== NOT EXECUTED 30003e20: eafffff4 b 30003df8 <rtems_termios_write+0xa0> <== NOT EXECUTED
30006b74 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
30006b74: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
30006b78: e2108202 ands r8, r0, #536870912 ; 0x20000000 <== NOT EXECUTED
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
30006b7c: e1a04000 mov r4, r0 <== NOT EXECUTED 30006b80: e1a09001 mov r9, r1 <== NOT EXECUTED 30006b84: e1a07002 mov r7, r2 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
30006b88: 0a00000c beq 30006bc0 <rtems_verror+0x4c> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
30006b8c: e59f2160 ldr r2, [pc, #352] ; 30006cf4 <rtems_verror+0x180><== NOT EXECUTED 30006b90: e5923000 ldr r3, [r2] <== NOT EXECUTED 30006b94: e3530000 cmp r3, #0 <== NOT EXECUTED 30006b98: e2833001 add r3, r3, #1 <== NOT EXECUTED 30006b9c: e5823000 str r3, [r2] <== NOT EXECUTED 30006ba0: 0a000004 beq 30006bb8 <rtems_verror+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
30006ba4: e59f314c ldr r3, [pc, #332] ; 30006cf8 <rtems_verror+0x184><== NOT EXECUTED 30006ba8: e5931000 ldr r1, [r3] <== NOT EXECUTED 30006bac: e2811001 add r1, r1, #1 <== NOT EXECUTED 30006bb0: e5831000 str r1, [r3] <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
30006bb4: e5923000 ldr r3, [r2] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
30006bb8: e3530002 cmp r3, #2 <== NOT EXECUTED 30006bbc: ca00002e bgt 30006c7c <rtems_verror+0x108> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006bc0: e59f5134 ldr r5, [pc, #308] ; 30006cfc <rtems_verror+0x188><== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
30006bc4: e3c4a207 bic sl, r4, #1879048192 ; 0x70000000 <== NOT EXECUTED
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006bc8: e5953000 ldr r3, [r5] <== NOT EXECUTED 30006bcc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30006bd0: eb003451 bl 30013d1c <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
30006bd4: e2146101 ands r6, r4, #1073741824 ; 0x40000000 <== NOT EXECUTED 30006bd8: 1a000038 bne 30006cc0 <rtems_verror+0x14c> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
30006bdc: e5953000 ldr r3, [r5] <== NOT EXECUTED 30006be0: e1a02007 mov r2, r7 <== NOT EXECUTED 30006be4: e1a01009 mov r1, r9 <== NOT EXECUTED 30006be8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30006bec: eb004c71 bl 30019db8 <vfprintf> <== NOT EXECUTED
if (status)
30006bf0: e35a0000 cmp sl, #0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
30006bf4: e1a07000 mov r7, r0 <== NOT EXECUTED
if (status)
30006bf8: 1a000025 bne 30006c94 <rtems_verror+0x120> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
30006bfc: e3560000 cmp r6, #0 <== NOT EXECUTED 30006c00: 0a00000b beq 30006c34 <rtems_verror+0xc0> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
30006c04: da000004 ble 30006c1c <rtems_verror+0xa8> <== NOT EXECUTED 30006c08: e1a00006 mov r0, r6 <== NOT EXECUTED 30006c0c: eb003813 bl 30014c60 <strerror> <== NOT EXECUTED 30006c10: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 30006c14: e3530000 cmp r3, #0 <== NOT EXECUTED 30006c18: 1a00002b bne 30006ccc <rtems_verror+0x158> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
30006c1c: e5953000 ldr r3, [r5] <== NOT EXECUTED 30006c20: e59f10d8 ldr r1, [pc, #216] ; 30006d00 <rtems_verror+0x18c><== NOT EXECUTED 30006c24: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30006c28: e1a02006 mov r2, r6 <== NOT EXECUTED 30006c2c: eb0034f8 bl 30014014 <fprintf> <== NOT EXECUTED 30006c30: e0877000 add r7, r7, r0 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
30006c34: e5953000 ldr r3, [r5] <== NOT EXECUTED 30006c38: e59f10c4 ldr r1, [pc, #196] ; 30006d04 <rtems_verror+0x190><== NOT EXECUTED 30006c3c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30006c40: eb0034f3 bl 30014014 <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
30006c44: e5953000 ldr r3, [r5] <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
30006c48: e1a0a000 mov sl, r0 <== NOT EXECUTED
(void) fflush(stderr);
30006c4c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30006c50: eb003431 bl 30013d1c <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
30006c54: e3140203 tst r4, #805306368 ; 0x30000000 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
30006c58: 008a0007 addeq r0, sl, r7 <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
30006c5c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
30006c60: e3580000 cmp r8, #0 <== NOT EXECUTED 30006c64: 0a000006 beq 30006c84 <rtems_verror+0x110> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
30006c68: e3a00000 mov r0, #0 <== NOT EXECUTED 30006c6c: e59f1094 ldr r1, [pc, #148] ; 30006d08 <rtems_verror+0x194><== NOT EXECUTED 30006c70: eb000035 bl 30006d4c <rtems_error> <== NOT EXECUTED
_exit(local_errno);
30006c74: e1a00006 mov r0, r6 <== NOT EXECUTED 30006c78: eb00032a bl 30007928 <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
30006c7c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return chars_written;
}
30006c80: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
30006c84: e59f1080 ldr r1, [pc, #128] ; 30006d0c <rtems_verror+0x198><== NOT EXECUTED 30006c88: e1a00008 mov r0, r8 <== NOT EXECUTED 30006c8c: eb00002e bl 30006d4c <rtems_error> <== NOT EXECUTED
abort();
30006c90: eb003325 bl 3001392c <abort> <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
30006c94: e59f3060 ldr r3, [pc, #96] ; 30006cfc <rtems_verror+0x188> <== NOT EXECUTED 30006c98: e1a0000a mov r0, sl <== NOT EXECUTED 30006c9c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30006ca0: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 30006ca4: ebffffae bl 30006b64 <rtems_status_text> <== NOT EXECUTED 30006ca8: e59f1060 ldr r1, [pc, #96] ; 30006d10 <rtems_verror+0x19c> <== NOT EXECUTED 30006cac: e1a02000 mov r2, r0 <== NOT EXECUTED 30006cb0: e1a0000a mov r0, sl <== NOT EXECUTED 30006cb4: eb0034d6 bl 30014014 <fprintf> <== NOT EXECUTED 30006cb8: e0877000 add r7, r7, r0 <== NOT EXECUTED 30006cbc: eaffffce b 30006bfc <rtems_verror+0x88> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
30006cc0: eb003322 bl 30013950 <__errno> <== NOT EXECUTED 30006cc4: e5906000 ldr r6, [r0] <== NOT EXECUTED 30006cc8: eaffffc3 b 30006bdc <rtems_verror+0x68> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
30006ccc: e5953000 ldr r3, [r5] <== NOT EXECUTED 30006cd0: e1a00006 mov r0, r6 <== NOT EXECUTED 30006cd4: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 30006cd8: eb0037e0 bl 30014c60 <strerror> <== NOT EXECUTED 30006cdc: e59f1030 ldr r1, [pc, #48] ; 30006d14 <rtems_verror+0x1a0> <== NOT EXECUTED 30006ce0: e1a02000 mov r2, r0 <== NOT EXECUTED 30006ce4: e1a0000a mov r0, sl <== NOT EXECUTED 30006ce8: eb0034c9 bl 30014014 <fprintf> <== NOT EXECUTED 30006cec: e0877000 add r7, r7, r0 <== NOT EXECUTED
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
30006cf0: eaffffcf b 30006c34 <rtems_verror+0xc0> <== NOT EXECUTED
30002324 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002324: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30002328: e3a06000 mov r6, #0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
3000232c: e59f90e8 ldr r9, [pc, #232] ; 3000241c <scanInt+0xf8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
30002330: e59f80e8 ldr r8, [pc, #232] ; 30002420 <scanInt+0xfc>
return 0;
d = c - '0';
if ((i > (limit / 10))
30002334: e59fa0e8 ldr sl, [pc, #232] ; 30002424 <scanInt+0x100>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002338: e1a04000 mov r4, r0 3000233c: e1a0b001 mov fp, r1 30002340: e3e07102 mvn r7, #-2147483648 ; 0x80000000 30002344: e1a05006 mov r5, r6
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002348: e5943004 ldr r3, [r4, #4] 3000234c: e2433001 sub r3, r3, #1 30002350: e3530000 cmp r3, #0 30002354: e5843004 str r3, [r4, #4]
30002358: ba00001d blt 300023d4 <scanInt+0xb0>
3000235c: e5943000 ldr r3, [r4] 30002360: e4d30001 ldrb r0, [r3], #1
if (c == ':')
30002364: e350003a cmp r0, #58 ; 0x3a
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002368: e5843000 str r3, [r4]
if (c == ':')
3000236c: 0a00001d beq 300023e8 <scanInt+0xc4>
break;
if (sign == 0) {
30002370: e3560000 cmp r6, #0
30002374: 1a000004 bne 3000238c <scanInt+0x68>
if (c == '-') {
30002378: e350002d cmp r0, #45 ; 0x2d
sign = -1;
limit++;
3000237c: 02877001 addeq r7, r7, #1 30002380: 03e06000 mvneq r6, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
30002384: 0affffef beq 30002348 <scanInt+0x24>
sign = -1;
limit++;
continue;
30002388: e3a06001 mov r6, #1
}
sign = 1;
}
if (!isdigit(c))
3000238c: e5983000 ldr r3, [r8] 30002390: e0833000 add r3, r3, r0 30002394: e5d33001 ldrb r3, [r3, #1] 30002398: e3130004 tst r3, #4
3000239c: 0a00001c beq 30002414 <scanInt+0xf0>
return 0;
d = c - '0';
if ((i > (limit / 10))
300023a0: e083279a umull r2, r3, sl, r7 300023a4: e15501a3 cmp r5, r3, lsr #3
300023a8: 8a000019 bhi 30002414 <scanInt+0xf0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
300023ac: e2400030 sub r0, r0, #48 ; 0x30 300023b0: 11a03105 lslne r3, r5, #2
if ((i > (limit / 10))
300023b4: 0a000011 beq 30002400 <scanInt+0xdc>
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
300023b8: e0835005 add r5, r3, r5
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
300023bc: e5943004 ldr r3, [r4, #4]
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
300023c0: e0805085 add r5, r0, r5, lsl #1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
300023c4: e2433001 sub r3, r3, #1 300023c8: e3530000 cmp r3, #0 300023cc: e5843004 str r3, [r4, #4]
300023d0: aaffffe1 bge 3000235c <scanInt+0x38>
300023d4: e5990000 ldr r0, [r9] <== NOT EXECUTED 300023d8: e1a01004 mov r1, r4 <== NOT EXECUTED 300023dc: eb0037e0 bl 30010364 <__srget_r> <== NOT EXECUTED
if (c == ':')
300023e0: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 300023e4: 1affffe1 bne 30002370 <scanInt+0x4c> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
300023e8: e3560000 cmp r6, #0
300023ec: 0a000008 beq 30002414 <scanInt+0xf0>
return 0;
*val = i * sign;
300023f0: e0030695 mul r3, r5, r6 300023f4: e3a00001 mov r0, #1 300023f8: e58b3000 str r3, [fp]
return 1;
300023fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
30002400: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED 30002404: e0832005 add r2, r3, r5 <== NOT EXECUTED 30002408: e0472082 sub r2, r7, r2, lsl #1 <== NOT EXECUTED 3000240c: e1500002 cmp r0, r2 <== NOT EXECUTED 30002410: 9affffe8 bls 300023b8 <scanInt+0x94> <== NOT EXECUTED
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
30002414: e3a00000 mov r0, #0 <== NOT EXECUTED
}
30002418: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30002428 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002428: e92d41f0 push {r4, r5, r6, r7, r8, lr}
3000242c: e1a05002 mov r5, r2
int c;
*name = *bufp;
30002430: e5922000 ldr r2, [r2]
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002434: e59d7018 ldr r7, [sp, #24]
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002438: e59f60c8 ldr r6, [pc, #200] ; 30002508 <scanString+0xe0>
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
int c;
*name = *bufp;
3000243c: e5812000 str r2, [r1]
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002440: e1a04000 mov r4, r0 30002444: e1a08003 mov r8, r3 30002448: ea000013 b 3000249c <scanString+0x74>
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
3000244c: e5943000 ldr r3, [r4] 30002450: e4d30001 ldrb r0, [r3], #1
if (c == ':') {
30002454: e350003a cmp r0, #58 ; 0x3a
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002458: e5843000 str r3, [r4]
if (c == ':') {
3000245c: 0a000018 beq 300024c4 <scanString+0x9c>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
30002460: e350000a cmp r0, #10
30002464: 0a000023 beq 300024f8 <scanString+0xd0>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
30002468: e3700001 cmn r0, #1
3000246c: 0a000023 beq 30002500 <scanString+0xd8>
return 0;
if (*nleft < 2)
30002470: e5983000 ldr r3, [r8] 30002474: e3530001 cmp r3, #1
30002478: 9a000020 bls 30002500 <scanString+0xd8>
return 0;
**bufp = c;
3000247c: e5953000 ldr r3, [r5] 30002480: e5c30000 strb r0, [r3]
++(*bufp);
30002484: e5952000 ldr r2, [r5]
--(*nleft);
30002488: e5983000 ldr r3, [r8]
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
3000248c: e2822001 add r2, r2, #1
--(*nleft);
30002490: e2433001 sub r3, r3, #1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
30002494: e5852000 str r2, [r5]
--(*nleft);
30002498: e5883000 str r3, [r8]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
3000249c: e5943004 ldr r3, [r4, #4] 300024a0: e2433001 sub r3, r3, #1 300024a4: e3530000 cmp r3, #0 300024a8: e5843004 str r3, [r4, #4]
300024ac: aaffffe6 bge 3000244c <scanString+0x24>
300024b0: e5960000 ldr r0, [r6] 300024b4: e1a01004 mov r1, r4 300024b8: eb0037a9 bl 30010364 <__srget_r>
if (c == ':') {
300024bc: e350003a cmp r0, #58 ; 0x3a
300024c0: 1affffe6 bne 30002460 <scanString+0x38>
if (nlFlag)
300024c4: e3570000 cmp r7, #0
300024c8: 1a00000c bne 30002500 <scanString+0xd8>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
300024cc: e5953000 ldr r3, [r5] 300024d0: e3a02000 mov r2, #0 300024d4: e5c32000 strb r2, [r3]
++(*bufp);
300024d8: e5952000 ldr r2, [r5]
--(*nleft);
300024dc: e5983000 ldr r3, [r8]
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
300024e0: e2822001 add r2, r2, #1
--(*nleft);
300024e4: e2433001 sub r3, r3, #1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
300024e8: e5852000 str r2, [r5]
--(*nleft);
300024ec: e5883000 str r3, [r8] 300024f0: e3a00001 mov r0, #1
return 1;
300024f4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
300024f8: e3570000 cmp r7, #0
300024fc: 1afffff2 bne 300024cc <scanString+0xa4>
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
30002500: e3a00000 mov r0, #0 <== NOT EXECUTED
}
30002504: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
3000250c <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
3000250c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30002510: e24dd014 sub sp, sp, #20
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002514: e28d5008 add r5, sp, #8 30002518: e28d4004 add r4, sp, #4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
3000251c: e58d2008 str r2, [sp, #8] 30002520: e58d3004 str r3, [sp, #4]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002524: e3a06000 mov r6, #0 30002528: e1a02005 mov r2, r5 3000252c: e1a03004 mov r3, r4 30002530: e58d6000 str r6, [sp]
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
30002534: e1a07000 mov r7, r0 30002538: e1a08001 mov r8, r1
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
3000253c: ebffffb9 bl 30002428 <scanString> 30002540: e1500006 cmp r0, r6
30002544: 1a000002 bne 30002554 <scangr+0x48>
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
30002548: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000254c: e28dd014 add sp, sp, #20
30002550: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
30002554: e1a00007 mov r0, r7 30002558: e2881004 add r1, r8, #4 3000255c: e1a02005 mov r2, r5 30002560: e1a03004 mov r3, r4 30002564: e58d6000 str r6, [sp] 30002568: ebffffae bl 30002428 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
3000256c: e1500006 cmp r0, r6
30002570: 0afffff4 beq 30002548 <scangr+0x3c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
30002574: e1a00007 mov r0, r7 30002578: e28d1010 add r1, sp, #16 3000257c: ebffff68 bl 30002324 <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002580: e1500006 cmp r0, r6
30002584: 0affffef beq 30002548 <scangr+0x3c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
30002588: e1a03004 mov r3, r4 3000258c: e1a00007 mov r0, r7 30002590: e1a02005 mov r2, r5 30002594: e3a04001 mov r4, #1 30002598: e28d100c add r1, sp, #12 3000259c: e58d4000 str r4, [sp] 300025a0: ebffffa0 bl 30002428 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
300025a4: e1500006 cmp r0, r6
300025a8: 0affffe6 beq 30002548 <scangr+0x3c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
300025ac: e1dd31b0 ldrh r3, [sp, #16]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
300025b0: e59d100c ldr r1, [sp, #12]
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
300025b4: e1c830b8 strh r3, [r8, #8]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
300025b8: e5d13000 ldrb r3, [r1] 300025bc: e1530006 cmp r3, r6 300025c0: 03a04017 moveq r4, #23
300025c4: 0a000007 beq 300025e8 <scangr+0xdc>
300025c8: e1a02001 mov r2, r1
if(*cp == ',')
300025cc: e353002c cmp r3, #44 ; 0x2c
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
300025d0: e5f23001 ldrb r3, [r2, #1]!
if(*cp == ',')
memcount++;
300025d4: 02844001 addeq r4, r4, #1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
300025d8: e3530000 cmp r3, #0
300025dc: 1afffffa bne 300025cc <scangr+0xc0>
300025e0: e1a04104 lsl r4, r4, #2 300025e4: e2844013 add r4, r4, #19
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
300025e8: e59d3004 ldr r3, [sp, #4] 300025ec: e1530004 cmp r3, r4
300025f0: 3affffd4 bcc 30002548 <scangr+0x3c>
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
300025f4: e59d3008 ldr r3, [sp, #8] 300025f8: e283300f add r3, r3, #15 300025fc: e3c3300f bic r3, r3, #15
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
30002600: e5831000 str r1, [r3]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002604: e59d200c ldr r2, [sp, #12]
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
30002608: e588300c str r3, [r8, #12]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
3000260c: e5d23000 ldrb r3, [r2] 30002610: e3530000 cmp r3, #0 30002614: 03a01004 moveq r1, #4
30002618: 0a00000b beq 3000264c <scangr+0x140>
3000261c: e2822001 add r2, r2, #1 30002620: e3a01001 mov r1, #1
if(*cp == ',') {
*cp = '\0';
30002624: e3a00000 mov r0, #0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
30002628: e353002c cmp r3, #44 ; 0x2c
*cp = '\0';
3000262c: 05420001 strbeq r0, [r2, #-1]
grp->gr_mem[memcount++] = cp + 1;
30002630: 0598300c ldreq r3, [r8, #12] 30002634: 07832101 streq r2, [r3, r1, lsl #2]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002638: e4d23001 ldrb r3, [r2], #1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
3000263c: 02811001 addeq r1, r1, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002640: e3530000 cmp r3, #0
30002644: 1afffff7 bne 30002628 <scangr+0x11c>
30002648: e1a01101 lsl r1, r1, #2
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
3000264c: e598300c ldr r3, [r8, #12] 30002650: e3a02000 mov r2, #0 30002654: e7832001 str r2, [r3, r1] 30002658: e3a00001 mov r0, #1
return 1;
3000265c: eaffffba b 3000254c <scangr+0x40>
300026a0 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
300026a0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
300026a4: e24dd014 sub sp, sp, #20
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
300026a8: e28d5008 add r5, sp, #8 300026ac: e28d4004 add r4, sp, #4
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
300026b0: e58d2008 str r2, [sp, #8] 300026b4: e58d3004 str r3, [sp, #4]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
300026b8: e3a06000 mov r6, #0 300026bc: e1a02005 mov r2, r5 300026c0: e1a03004 mov r3, r4 300026c4: e58d6000 str r6, [sp]
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
300026c8: e1a07000 mov r7, r0 300026cc: e1a08001 mov r8, r1
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
300026d0: ebffff54 bl 30002428 <scanString> 300026d4: e1500006 cmp r0, r6
300026d8: 1a000002 bne 300026e8 <scanpw+0x48>
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
300026dc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
300026e0: e28dd014 add sp, sp, #20
300026e4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
300026e8: e1a00007 mov r0, r7 300026ec: e2881004 add r1, r8, #4 300026f0: e1a02005 mov r2, r5 300026f4: e1a03004 mov r3, r4 300026f8: e58d6000 str r6, [sp] 300026fc: ebffff49 bl 30002428 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
30002700: e1500006 cmp r0, r6
30002704: 0afffff4 beq 300026dc <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
30002708: e1a00007 mov r0, r7 3000270c: e28d1010 add r1, sp, #16 30002710: ebffff03 bl 30002324 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
30002714: e1500006 cmp r0, r6
30002718: 0affffef beq 300026dc <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
3000271c: e1a00007 mov r0, r7 30002720: e28d100c add r1, sp, #12 30002724: ebfffefe bl 30002324 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
30002728: e1500006 cmp r0, r6
3000272c: 0affffea beq 300026dc <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
30002730: e1a00007 mov r0, r7 30002734: e288100c add r1, r8, #12 30002738: e1a02005 mov r2, r5 3000273c: e1a03004 mov r3, r4 30002740: e58d6000 str r6, [sp] 30002744: ebffff37 bl 30002428 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
30002748: e1500006 cmp r0, r6
3000274c: 0affffe2 beq 300026dc <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
30002750: e1a00007 mov r0, r7 30002754: e2881010 add r1, r8, #16 30002758: e1a02005 mov r2, r5 3000275c: e1a03004 mov r3, r4 30002760: e58d6000 str r6, [sp] 30002764: ebffff2f bl 30002428 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
30002768: e1500006 cmp r0, r6
3000276c: 0affffda beq 300026dc <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
30002770: e1a00007 mov r0, r7 30002774: e2881014 add r1, r8, #20 30002778: e1a02005 mov r2, r5 3000277c: e1a03004 mov r3, r4 30002780: e58d6000 str r6, [sp] 30002784: ebffff27 bl 30002428 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
30002788: e1500006 cmp r0, r6
3000278c: 0affffd2 beq 300026dc <scanpw+0x3c> || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
30002790: e1a03004 mov r3, r4 30002794: e1a00007 mov r0, r7 30002798: e1a02005 mov r2, r5 3000279c: e3a04001 mov r4, #1 300027a0: e2881018 add r1, r8, #24 300027a4: e58d4000 str r4, [sp] 300027a8: ebffff1e bl 30002428 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
300027ac: e1500006 cmp r0, r6
300027b0: 0affffc9 beq 300026dc <scanpw+0x3c>
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
300027b4: e1dd30bc ldrh r3, [sp, #12] 300027b8: e1a00004 mov r0, r4 300027bc: e1c830ba strh r3, [r8, #10]
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
300027c0: e1dd31b0 ldrh r3, [sp, #16] 300027c4: e1c830b8 strh r3, [r8, #8]
pwd->pw_gid = pwgid; return 1;
300027c8: eaffffc4 b 300026e0 <scanpw+0x40>
300028ec <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
300028ec: e92d4010 push {r4, lr} <== NOT EXECUTED
init_etc_passwd_group();
if (group_fp != NULL)
300028f0: e59f4020 ldr r4, [pc, #32] ; 30002918 <setgrent+0x2c> <== NOT EXECUTED
return &grent;
}
void setgrent(void)
{
init_etc_passwd_group();
300028f4: ebffffc4 bl 3000280c <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
300028f8: e5940000 ldr r0, [r4] <== NOT EXECUTED 300028fc: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(group_fp);
30002900: 1b003199 blne 3000ef6c <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
30002904: e59f0010 ldr r0, [pc, #16] ; 3000291c <setgrent+0x30> <== NOT EXECUTED 30002908: e59f1010 ldr r1, [pc, #16] ; 30002920 <setgrent+0x34> <== NOT EXECUTED 3000290c: eb00334e bl 3000f64c <fopen> <== NOT EXECUTED 30002910: e5840000 str r0, [r4] <== NOT EXECUTED
}
30002914: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30002ae4 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
30002ae4: e92d4010 push {r4, lr} <== NOT EXECUTED
init_etc_passwd_group();
if (passwd_fp != NULL)
30002ae8: e59f4020 ldr r4, [pc, #32] ; 30002b10 <setpwent+0x2c> <== NOT EXECUTED
return &pwent;
}
void setpwent(void)
{
init_etc_passwd_group();
30002aec: ebffff46 bl 3000280c <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
30002af0: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 30002af4: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(passwd_fp);
30002af8: 1b00311b blne 3000ef6c <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
30002afc: e59f0010 ldr r0, [pc, #16] ; 30002b14 <setpwent+0x30> <== NOT EXECUTED 30002b00: e59f1010 ldr r1, [pc, #16] ; 30002b18 <setpwent+0x34> <== NOT EXECUTED 30002b04: eb0032d0 bl 3000f64c <fopen> <== NOT EXECUTED 30002b08: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
30002b0c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30003cf8 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003cf8: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 30003cfc: e59f3050 ldr r3, [pc, #80] ; 30003d54 <siproc+0x5c> <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003d00: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003d04: e0023003 and r3, r2, r3 <== NOT EXECUTED 30003d08: e3530000 cmp r3, #0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003d0c: e1a04001 mov r4, r1 <== NOT EXECUTED 30003d10: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003d14: 1a000002 bne 30003d24 <siproc+0x2c> <== 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);
30003d18: e1a00005 mov r0, r5 <== NOT EXECUTED
} return i; }
30003d1c: 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);
30003d20: eaffff82 b 30003b30 <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003d24: e3a01000 mov r1, #0 <== NOT EXECUTED 30003d28: e1a02001 mov r2, r1 <== NOT EXECUTED 30003d2c: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 30003d30: eb000692 bl 30005780 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
30003d34: e1a01004 mov r1, r4 <== NOT EXECUTED 30003d38: e1a00005 mov r0, r5 <== NOT EXECUTED 30003d3c: ebffff7b bl 30003b30 <iproc> <== NOT EXECUTED 30003d40: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
30003d44: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 30003d48: eb0006d4 bl 300058a0 <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
30003d4c: e1a00005 mov r0, r5 <== NOT EXECUTED
30003d50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
300042b8 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
300042b8: e92d4070 push {r4, r5, r6, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
300042bc: e2515000 subs r5, r1, #0
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
300042c0: e24dd018 sub sp, sp, #24 300042c4: e1a06000 mov r6, r0
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
300042c8: 0a00002f beq 3000438c <stat+0xd4>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
300042cc: eb0033b5 bl 300111a8 <strlen> 300042d0: e28d4004 add r4, sp, #4 300042d4: e1a01000 mov r1, r0 300042d8: e3a0c001 mov ip, #1 300042dc: e1a00006 mov r0, r6 300042e0: e3a02000 mov r2, #0 300042e4: e1a03004 mov r3, r4 300042e8: e58dc000 str ip, [sp] 300042ec: ebfff9bd bl 300029e8 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
300042f0: e2501000 subs r1, r0, #0
300042f4: 1a000022 bne 30004384 <stat+0xcc>
return -1;
if ( !loc.handlers->fstat_h ){
300042f8: e59d300c ldr r3, [sp, #12] 300042fc: e5933018 ldr r3, [r3, #24] 30004300: e3530000 cmp r3, #0
30004304: 0a000013 beq 30004358 <stat+0xa0>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
30004308: e3a02048 mov r2, #72 ; 0x48 3000430c: e1a00005 mov r0, r5 30004310: eb00314b bl 30010844 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
30004314: e1a01005 mov r1, r5 30004318: e59d300c ldr r3, [sp, #12] 3000431c: e1a00004 mov r0, r4 30004320: e1a0e00f mov lr, pc 30004324: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
30004328: e59d3010 ldr r3, [sp, #16]
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat_h)( &loc, buf );
3000432c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
30004330: e3530000 cmp r3, #0
30004334: 0a000004 beq 3000434c <stat+0x94>
30004338: e593301c ldr r3, [r3, #28] 3000433c: e3530000 cmp r3, #0 30004340: 11a00004 movne r0, r4 30004344: 11a0e00f movne lr, pc 30004348: 112fff13 bxne r3
return status;
}
3000434c: e1a00005 mov r0, r5
30004350: e28dd018 add sp, sp, #24
30004354: e8bd8070 pop {r4, r5, r6, pc}
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
30004358: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3000435c: e3530000 cmp r3, #0 <== NOT EXECUTED 30004360: 0a000004 beq 30004378 <stat+0xc0> <== NOT EXECUTED 30004364: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30004368: e3530000 cmp r3, #0 <== NOT EXECUTED 3000436c: 11a00004 movne r0, r4 <== NOT EXECUTED 30004370: 11a0e00f movne lr, pc <== NOT EXECUTED 30004374: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
30004378: eb002c73 bl 3000f54c <__errno> <== NOT EXECUTED 3000437c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30004380: e5803000 str r3, [r0] <== NOT EXECUTED
30004384: e3e05000 mvn r5, #0 30004388: eaffffef b 3000434c <stat+0x94>
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
3000438c: eb002c6e bl 3000f54c <__errno> 30004390: e3a0300e mov r3, #14 30004394: e5803000 str r3, [r0] 30004398: e3e05000 mvn r5, #0 3000439c: eaffffea b 3000434c <stat+0x94>
30004810 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
30004810: e92d4070 push {r4, r5, r6, lr}
30004814: e1a05001 mov r5, r1
30004818: e24dd01c sub sp, sp, #28
3000481c: e1a06000 mov r6, r0
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
30004820: e28d1018 add r1, sp, #24 30004824: e1a00005 mov r0, r5 30004828: e1a0200d mov r2, sp 3000482c: ebffffda bl 3000479c <rtems_filesystem_get_start_loc>
if ( !loc.ops->evalformake_h ) {
30004830: e59d300c ldr r3, [sp, #12]
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
30004834: e1a0400d mov r4, sp
if ( !loc.ops->evalformake_h ) {
30004838: e5933004 ldr r3, [r3, #4] 3000483c: e3530000 cmp r3, #0
30004840: 0a000021 beq 300048cc <symlink+0xbc>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
30004844: e59d0018 ldr r0, [sp, #24] 30004848: e1a0100d mov r1, sp 3000484c: e0850000 add r0, r5, r0 30004850: e28d2014 add r2, sp, #20 30004854: e1a0e00f mov lr, pc 30004858: e12fff13 bx r3
if ( result != 0 )
3000485c: e3500000 cmp r0, #0
30004860: 1a00001c bne 300048d8 <symlink+0xc8>
return -1;
if ( !loc.ops->symlink_h ) {
30004864: e59d200c ldr r2, [sp, #12] 30004868: e5923038 ldr r3, [r2, #56] ; 0x38 3000486c: e3530000 cmp r3, #0
30004870: 0a000010 beq 300048b8 <symlink+0xa8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
30004874: e1a01006 mov r1, r6 30004878: e1a0000d mov r0, sp 3000487c: e59d2014 ldr r2, [sp, #20] 30004880: e1a0e00f mov lr, pc 30004884: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
30004888: e59d300c ldr r3, [sp, #12]
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
3000488c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
30004890: e3530000 cmp r3, #0
30004894: 0a000004 beq 300048ac <symlink+0x9c>
30004898: e593301c ldr r3, [r3, #28] 3000489c: e3530000 cmp r3, #0 300048a0: 11a0000d movne r0, sp 300048a4: 11a0e00f movne lr, pc 300048a8: 112fff13 bxne r3
return result;
}
300048ac: e1a00005 mov r0, r5
300048b0: e28dd01c add sp, sp, #28
300048b4: e8bd8070 pop {r4, r5, r6, pc}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
300048b8: e592301c ldr r3, [r2, #28]
300048bc: e3530000 cmp r3, #0 <== NOT EXECUTED 300048c0: 11a0000d movne r0, sp <== NOT EXECUTED 300048c4: 11a0e00f movne lr, pc <== NOT EXECUTED 300048c8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
300048cc: eb002c6a bl 3000fa7c <__errno> <== NOT EXECUTED 300048d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300048d4: e5803000 str r3, [r0] <== NOT EXECUTED
300048d8: e3e05000 mvn r5, #0 300048dc: eafffff2 b 300048ac <symlink+0x9c>
30004604 <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
30004604: e3510000 cmp r1, #0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
30004608: e92d4030 push {r4, r5, lr}
3000460c: e1a04002 mov r4, r2
30004610: e1a05000 mov r5, r0
switch (opt) {
30004614: 0a00000b beq 30004648 <tcsetattr+0x44>
30004618: e3510001 cmp r1, #1
3000461c: 0a000004 beq 30004634 <tcsetattr+0x30> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
30004620: eb002d72 bl 3000fbf0 <__errno> <== NOT EXECUTED 30004624: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30004628: e5803000 str r3, [r0] <== NOT EXECUTED
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
3000462c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30004630: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
30004634: e3a01003 mov r1, #3 <== NOT EXECUTED 30004638: e3a02000 mov r2, #0 <== NOT EXECUTED 3000463c: eb002066 bl 3000c7dc <ioctl> <== NOT EXECUTED 30004640: e3500000 cmp r0, #0 <== NOT EXECUTED 30004644: bafffff8 blt 3000462c <tcsetattr+0x28> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
30004648: e1a00005 mov r0, r5 3000464c: e1a02004 mov r2, r4 30004650: e3a01002 mov r1, #2
} }
30004654: e8bd4030 pop {r4, r5, lr}
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
30004658: ea00205f b 3000c7dc <ioctl>
3000dc20 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
3000dc20: e92d40f0 push {r4, r5, r6, r7, lr}
3000dc24: e24dd030 sub sp, sp, #48 ; 0x30
3000dc28: e1a07000 mov r7, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
3000dc2c: ebffd0bc bl 30001f24 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
3000dc30: e2505000 subs r5, r0, #0
3000dc34: 1a000045 bne 3000dd50 <unlink+0x130>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
3000dc38: e28d4018 add r4, sp, #24 3000dc3c: e1a00007 mov r0, r7 3000dc40: e28d102c add r1, sp, #44 ; 0x2c 3000dc44: e1a02004 mov r2, r4 3000dc48: ebffd4da bl 30002fb8 <rtems_filesystem_get_start_loc> 3000dc4c: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
3000dc50: e28dc004 add ip, sp, #4
3000dc54: e1a0e004 mov lr, r4
3000dc58: e8be000f ldm lr!, {r0, r1, r2, r3}
3000dc5c: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000dc60: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
3000dc64: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
3000dc68: e58c3000 str r3, [ip]
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
3000dc6c: e1a00005 mov r0, r5 3000dc70: eb0005d6 bl 3000f3d0 <strlen> 3000dc74: e1a01000 mov r1, r0 3000dc78: e1a00005 mov r0, r5 3000dc7c: ebffd093 bl 30001ed0 <rtems_filesystem_prefix_separators> 3000dc80: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
3000dc84: e1a00007 mov r0, r7 3000dc88: eb0005d0 bl 3000f3d0 <strlen> 3000dc8c: e28d5004 add r5, sp, #4 3000dc90: e3a0c000 mov ip, #0 3000dc94: e1a01000 mov r1, r0 3000dc98: e1a0200c mov r2, ip 3000dc9c: e1a00007 mov r0, r7 3000dca0: e1a03005 mov r3, r5 3000dca4: e58dc000 str ip, [sp] 3000dca8: ebffd0ae bl 30001f68 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
3000dcac: e3500000 cmp r0, #0
3000dcb0: 1a000033 bne 3000dd84 <unlink+0x164>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
3000dcb4: e59d2010 ldr r2, [sp, #16] 3000dcb8: e5923010 ldr r3, [r2, #16] 3000dcbc: e3530000 cmp r3, #0
3000dcc0: 0a00003c beq 3000ddb8 <unlink+0x198>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
3000dcc4: e1a00005 mov r0, r5 3000dcc8: e1a0e00f mov lr, pc 3000dccc: e12fff13 bx r3 3000dcd0: e3500001 cmp r0, #1
3000dcd4: 0a00004b beq 3000de08 <unlink+0x1e8>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
3000dcd8: e59d2010 ldr r2, [sp, #16] 3000dcdc: e592300c ldr r3, [r2, #12] 3000dce0: e3530000 cmp r3, #0
3000dce4: 0a000033 beq 3000ddb8 <unlink+0x198>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
3000dce8: e1a00004 mov r0, r4 3000dcec: e1a01005 mov r1, r5 3000dcf0: e1a0e00f mov lr, pc 3000dcf4: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
3000dcf8: e59d3010 ldr r3, [sp, #16]
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
3000dcfc: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
3000dd00: e3530000 cmp r3, #0
3000dd04: 0a000004 beq 3000dd1c <unlink+0xfc>
3000dd08: e593301c ldr r3, [r3, #28] 3000dd0c: e3530000 cmp r3, #0 3000dd10: 11a00005 movne r0, r5 3000dd14: 11a0e00f movne lr, pc 3000dd18: 112fff13 bxne r3
if ( free_parentloc )
3000dd1c: e3560000 cmp r6, #0
3000dd20: 0a000007 beq 3000dd44 <unlink+0x124>
rtems_filesystem_freenode( &parentloc );
3000dd24: e59d3024 ldr r3, [sp, #36] ; 0x24 3000dd28: e3530000 cmp r3, #0
3000dd2c: 0a000004 beq 3000dd44 <unlink+0x124>
3000dd30: e593301c ldr r3, [r3, #28] 3000dd34: e3530000 cmp r3, #0 3000dd38: 11a00004 movne r0, r4 3000dd3c: 11a0e00f movne lr, pc 3000dd40: 112fff13 bxne r3
return result;
}
3000dd44: e1a00007 mov r0, r7
3000dd48: e28dd030 add sp, sp, #48 ; 0x30
3000dd4c: e8bd80f0 pop {r4, r5, r6, r7, pc}
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
3000dd50: e28d4018 add r4, sp, #24 3000dd54: e3a0c000 mov ip, #0 3000dd58: e1a00007 mov r0, r7 3000dd5c: e1a01005 mov r1, r5 3000dd60: e3a02002 mov r2, #2 3000dd64: e1a03004 mov r3, r4 3000dd68: e58dc000 str ip, [sp] 3000dd6c: ebffd0b9 bl 30002058 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
3000dd70: e3500000 cmp r0, #0 3000dd74: 03a06001 moveq r6, #1
3000dd78: 0affffb4 beq 3000dc50 <unlink+0x30>
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
3000dd7c: e3e07000 mvn r7, #0 <== NOT EXECUTED 3000dd80: eaffffef b 3000dd44 <unlink+0x124> <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
3000dd84: e3560000 cmp r6, #0
3000dd88: 0afffffb beq 3000dd7c <unlink+0x15c>
rtems_filesystem_freenode( &parentloc );
3000dd8c: e59d3024 ldr r3, [sp, #36] ; 0x24 3000dd90: e3530000 cmp r3, #0
3000dd94: 0afffff8 beq 3000dd7c <unlink+0x15c>
3000dd98: e593301c ldr r3, [r3, #28] 3000dd9c: e3530000 cmp r3, #0
3000dda0: 0afffff5 beq 3000dd7c <unlink+0x15c>
3000dda4: e1a00004 mov r0, r4 3000dda8: e1a0e00f mov lr, pc 3000ddac: e12fff13 bx r3 3000ddb0: e3e07000 mvn r7, #0 3000ddb4: eaffffe2 b 3000dd44 <unlink+0x124>
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
3000ddb8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3000ddbc: e3530000 cmp r3, #0 <== NOT EXECUTED 3000ddc0: 11a00005 movne r0, r5 <== NOT EXECUTED 3000ddc4: 11a0e00f movne lr, pc <== NOT EXECUTED 3000ddc8: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
3000ddcc: e3560000 cmp r6, #0 <== NOT EXECUTED 3000ddd0: 0a000007 beq 3000ddf4 <unlink+0x1d4> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
3000ddd4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 3000ddd8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000dddc: 0a000004 beq 3000ddf4 <unlink+0x1d4> <== NOT EXECUTED 3000dde0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000dde4: e3530000 cmp r3, #0 <== NOT EXECUTED 3000dde8: 11a00004 movne r0, r4 <== NOT EXECUTED 3000ddec: 11a0e00f movne lr, pc <== NOT EXECUTED 3000ddf0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000ddf4: eb000170 bl 3000e3bc <__errno> <== NOT EXECUTED 3000ddf8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000ddfc: e5803000 str r3, [r0] <== NOT EXECUTED 3000de00: e3e07000 mvn r7, #0 <== NOT EXECUTED 3000de04: eaffffce b 3000dd44 <unlink+0x124> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
3000de08: e59d3010 ldr r3, [sp, #16] 3000de0c: e3530000 cmp r3, #0
3000de10: 0a000004 beq 3000de28 <unlink+0x208>
3000de14: e593301c ldr r3, [r3, #28] 3000de18: e3530000 cmp r3, #0 3000de1c: 11a00005 movne r0, r5 3000de20: 11a0e00f movne lr, pc 3000de24: 112fff13 bxne r3
if ( free_parentloc )
3000de28: e3560000 cmp r6, #0
3000de2c: 0a000007 beq 3000de50 <unlink+0x230>
rtems_filesystem_freenode( &parentloc );
3000de30: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 3000de34: e3530000 cmp r3, #0 <== NOT EXECUTED 3000de38: 0a000004 beq 3000de50 <unlink+0x230> <== NOT EXECUTED 3000de3c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000de40: e3530000 cmp r3, #0 <== NOT EXECUTED 3000de44: 11a00004 movne r0, r4 <== NOT EXECUTED 3000de48: 11a0e00f movne lr, pc <== NOT EXECUTED 3000de4c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
3000de50: eb000159 bl 3000e3bc <__errno> 3000de54: e3a03015 mov r3, #21 3000de58: e5803000 str r3, [r0] 3000de5c: e3e07000 mvn r7, #0 3000de60: eaffffb7 b 3000dd44 <unlink+0x124>
30008f20 <unmount>:
*/
int unmount(
const char *path
)
{
30008f20: e92d4030 push {r4, r5, lr}
30008f24: e24dd018 sub sp, sp, #24
30008f28: 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 ) )
30008f2c: eb0031a8 bl 300155d4 <strlen> 30008f30: e28d4004 add r4, sp, #4 30008f34: e1a01000 mov r1, r0 30008f38: e3a0c001 mov ip, #1 30008f3c: e1a00005 mov r0, r5 30008f40: e3a02000 mov r2, #0 30008f44: e1a03004 mov r3, r4 30008f48: e58dc000 str ip, [sp] 30008f4c: ebfff068 bl 300050f4 <rtems_filesystem_evaluate_path> 30008f50: e3500000 cmp r0, #0
30008f54: 1a000028 bne 30008ffc <unmount+0xdc>
return -1;
mt_entry = loc.mt_entry;
30008f58: e59d5014 ldr r5, [sp, #20]
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
30008f5c: e59d3004 ldr r3, [sp, #4] 30008f60: e595201c ldr r2, [r5, #28] 30008f64: e1520003 cmp r2, r3
30008f68: 1a000040 bne 30009070 <unmount+0x150>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
30008f6c: e59d3010 ldr r3, [sp, #16] 30008f70: e3530000 cmp r3, #0
30008f74: 0a000004 beq 30008f8c <unmount+0x6c>
30008f78: e593301c ldr r3, [r3, #28] 30008f7c: e3530000 cmp r3, #0 30008f80: 11a00004 movne r0, r4 30008f84: 11a0e00f movne lr, pc 30008f88: 112fff13 bxne r3
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_loc = &mt_entry->mt_point_node;
30008f8c: e5953014 ldr r3, [r5, #20] 30008f90: e5933028 ldr r3, [r3, #40] ; 0x28 30008f94: e3530000 cmp r3, #0
30008f98: 0a00004e beq 300090d8 <unmount+0x1b8> fs_root_loc = &mt_entry->mt_fs_root;
30008f9c: e5953028 ldr r3, [r5, #40] ; 0x28 30008fa0: e593302c ldr r3, [r3, #44] ; 0x2c 30008fa4: e3530000 cmp r3, #0
30008fa8: 0a00004a beq 300090d8 <unmount+0x1b8>
* 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 )
30008fac: e59f3138 ldr r3, [pc, #312] ; 300090ec <unmount+0x1cc> 30008fb0: e5933000 ldr r3, [r3] 30008fb4: e5933014 ldr r3, [r3, #20] 30008fb8: e1530005 cmp r3, r5
30008fbc: 0a000038 beq 300090a4 <unmount+0x184>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
30008fc0: e59f0128 ldr r0, [pc, #296] ; 300090f0 <unmount+0x1d0> 30008fc4: e595102c ldr r1, [r5, #44] ; 0x2c 30008fc8: ebfff373 bl 30005d9c <rtems_filesystem_mount_iterate> 30008fcc: e3500000 cmp r0, #0
30008fd0: 1a000033 bne 300090a4 <unmount+0x184>
* 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 )
30008fd4: e1a00005 mov r0, r5 30008fd8: ebfff119 bl 30005444 <rtems_libio_is_open_files_in_fs> 30008fdc: e3500001 cmp r0, #1
30008fe0: 0a00002f beq 300090a4 <unmount+0x184>
* 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 )
30008fe4: e5953014 ldr r3, [r5, #20] 30008fe8: e1a00005 mov r0, r5 30008fec: e1a0e00f mov lr, pc 30008ff0: e593f028 ldr pc, [r3, #40] ; 0x28 30008ff4: e2504000 subs r4, r0, #0
30008ff8: 0a000002 beq 30009008 <unmount+0xe8>
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
30008ffc: e3e00000 mvn r0, #0
}
30009000: e28dd018 add sp, sp, #24
30009004: e8bd8030 pop {r4, r5, pc}
* 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){
30009008: e5953028 ldr r3, [r5, #40] ; 0x28 3000900c: e1a00005 mov r0, r5 30009010: e1a0e00f mov lr, pc 30009014: e593f02c ldr pc, [r3, #44] ; 0x2c 30009018: e2501000 subs r1, r0, #0
3000901c: 1a000025 bne 300090b8 <unmount+0x198>
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 );
30009020: e59f40cc ldr r4, [pc, #204] ; 300090f4 <unmount+0x1d4> 30009024: e1a02001 mov r2, r1 30009028: e5940000 ldr r0, [r4] 3000902c: eb00035d bl 30009da8 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30009030: e1a00005 mov r0, r5 30009034: eb0005a6 bl 3000a6d4 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
30009038: e5940000 ldr r0, [r4] 3000903c: eb0003a1 bl 30009ec8 <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 );
30009040: e5953014 ldr r3, [r5, #20] 30009044: e3530000 cmp r3, #0
30009048: 0a000004 beq 30009060 <unmount+0x140>
3000904c: e593301c ldr r3, [r3, #28] 30009050: e3530000 cmp r3, #0 30009054: 12850008 addne r0, r5, #8 30009058: 11a0e00f movne lr, pc 3000905c: 112fff13 bxne r3
free( mt_entry );
30009060: e1a00005 mov r0, r5 30009064: ebfff044 bl 3000517c <free> 30009068: e3a00000 mov r0, #0
return 0;
3000906c: eaffffe3 b 30009000 <unmount+0xe0>
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
30009070: e59d3010 ldr r3, [sp, #16] 30009074: e3530000 cmp r3, #0
30009078: 0a000004 beq 30009090 <unmount+0x170>
3000907c: e593301c ldr r3, [r3, #28] 30009080: e3530000 cmp r3, #0 30009084: 11a00004 movne r0, r4 30009088: 11a0e00f movne lr, pc 3000908c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
30009090: eb00243e bl 30012190 <__errno> 30009094: e3a0300d mov r3, #13 30009098: e5803000 str r3, [r0] 3000909c: e3e00000 mvn r0, #0 300090a0: eaffffd6 b 30009000 <unmount+0xe0>
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
300090a4: eb002439 bl 30012190 <__errno> 300090a8: e3a03010 mov r3, #16 300090ac: e5803000 str r3, [r0] 300090b0: e3e00000 mvn r0, #0 300090b4: eaffffd1 b 30009000 <unmount+0xe0>
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
300090b8: e1a00005 mov r0, r5 300090bc: e5953014 ldr r3, [r5, #20] 300090c0: e1a0e00f mov lr, pc 300090c4: e593f020 ldr pc, [r3, #32] 300090c8: e3500000 cmp r0, #0
300090cc: 0affffca beq 30008ffc <unmount+0xdc>
rtems_fatal_error_occurred( 0 );
300090d0: e1a00004 mov r0, r4 300090d4: eb0004bd bl 3000a3d0 <rtems_fatal_error_occurred>
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
300090d8: eb00242c bl 30012190 <__errno>
300090dc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300090e0: e5803000 str r3, [r0] <== NOT EXECUTED 300090e4: e3e00000 mvn r0, #0 <== NOT EXECUTED 300090e8: eaffffc4 b 30009000 <unmount+0xe0> <== NOT EXECUTED
3000622c <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
3000622c: e92d4070 push {r4, r5, r6, lr}
30006230: e24dd018 sub sp, sp, #24
30006234: e1a05001 mov r5, r1
30006238: e1a06000 mov r6, r0
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
3000623c: eb002bd9 bl 300111a8 <strlen> 30006240: e28d4004 add r4, sp, #4 30006244: e1a01000 mov r1, r0 30006248: e3a0c001 mov ip, #1 3000624c: e1a00006 mov r0, r6 30006250: e3a02000 mov r2, #0 30006254: e1a03004 mov r3, r4 30006258: e58dc000 str ip, [sp] 3000625c: ebfff1e1 bl 300029e8 <rtems_filesystem_evaluate_path> 30006260: e3500000 cmp r0, #0
30006264: 1a00001b bne 300062d8 <utime+0xac>
return -1;
if ( !temp_loc.ops->utime_h ){
30006268: e59d2010 ldr r2, [sp, #16] 3000626c: e5923030 ldr r3, [r2, #48] ; 0x30 30006270: e3530000 cmp r3, #0
30006274: 0a00000f beq 300062b8 <utime+0x8c>
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
30006278: e8950006 ldm r5, {r1, r2}
3000627c: e1a00004 mov r0, r4
30006280: e1a0e00f mov lr, pc
30006284: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
30006288: e59d3010 ldr r3, [sp, #16]
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
3000628c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
30006290: e3530000 cmp r3, #0
30006294: 0a000004 beq 300062ac <utime+0x80>
30006298: e593301c ldr r3, [r3, #28] 3000629c: e3530000 cmp r3, #0 300062a0: 11a00004 movne r0, r4 300062a4: 11a0e00f movne lr, pc 300062a8: 112fff13 bxne r3
return result;
}
300062ac: e1a00005 mov r0, r5
300062b0: e28dd018 add sp, sp, #24
300062b4: e8bd8070 pop {r4, r5, r6, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
300062b8: e592301c ldr r3, [r2, #28] 300062bc: e3530000 cmp r3, #0 300062c0: 11a00004 movne r0, r4 300062c4: 11a0e00f movne lr, pc 300062c8: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTSUP );
300062cc: eb00249e bl 3000f54c <__errno> <== NOT EXECUTED 300062d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300062d4: e5803000 str r3, [r0] <== NOT EXECUTED
300062d8: e3e05000 mvn r5, #0 300062dc: eafffff2 b 300062ac <utime+0x80>
30019f90 <write>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30019f90: e59f30bc ldr r3, [pc, #188] ; 3001a054 <write+0xc4>
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
30019f94: e92d4810 push {r4, fp, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30019f98: e5933000 ldr r3, [r3] 30019f9c: e1500003 cmp r0, r3
30019fa0: 2a00001c bcs 3001a018 <write+0x88> iop = rtems_libio_iop( fd );
30019fa4: e59f40ac ldr r4, [pc, #172] ; 3001a058 <write+0xc8> 30019fa8: e5944000 ldr r4, [r4] 30019fac: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
30019fb0: e5940014 ldr r0, [r4, #20] 30019fb4: e3100c01 tst r0, #256 ; 0x100
30019fb8: 0a000016 beq 3001a018 <write+0x88> rtems_libio_check_buffer( buffer );
30019fbc: e3510000 cmp r1, #0
30019fc0: 0a000019 beq 3001a02c <write+0x9c> rtems_libio_check_count( count );
30019fc4: e3520000 cmp r2, #0
30019fc8: 01a00002 moveq r0, r2
30019fcc: 08bd8810 popeq {r4, fp, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30019fd0: e3100004 tst r0, #4
30019fd4: 0a000014 beq 3001a02c <write+0x9c>
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
30019fd8: e594303c ldr r3, [r4, #60] ; 0x3c 30019fdc: e593300c ldr r3, [r3, #12] 30019fe0: e3530000 cmp r3, #0
30019fe4: 0a000015 beq 3001a040 <write+0xb0>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
30019fe8: e1a00004 mov r0, r4 30019fec: e1a0e00f mov lr, pc 30019ff0: e12fff13 bx r3
if ( rc > 0 )
30019ff4: e3500000 cmp r0, #0
30019ff8: d8bd8810 pople {r4, fp, pc}
iop->offset += rc;
30019ffc: e284c00c add ip, r4, #12
3001a000: e89c1800 ldm ip, {fp, ip}
3001a004: e09b2000 adds r2, fp, r0
3001a008: e0ac3fc0 adc r3, ip, r0, asr #31
3001a00c: e584200c str r2, [r4, #12]
3001a010: e5843010 str r3, [r4, #16]
return rc;
}
3001a014: e8bd8810 pop {r4, fp, pc}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
3001a018: ebffd0e7 bl 3000e3bc <__errno> <== NOT EXECUTED
3001a01c: e3a03009 mov r3, #9 <== NOT EXECUTED
3001a020: e5803000 str r3, [r0] <== NOT EXECUTED
3001a024: e3e00000 mvn r0, #0 <== NOT EXECUTED
3001a028: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
3001a02c: ebffd0e2 bl 3000e3bc <__errno> <== NOT EXECUTED
3001a030: e3a03016 mov r3, #22 <== NOT EXECUTED
3001a034: e5803000 str r3, [r0] <== NOT EXECUTED
3001a038: e3e00000 mvn r0, #0 <== NOT EXECUTED
3001a03c: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
3001a040: ebffd0dd bl 3000e3bc <__errno> <== NOT EXECUTED
3001a044: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3001a048: e5803000 str r3, [r0] <== NOT EXECUTED
3001a04c: e3e00000 mvn r0, #0 <== NOT EXECUTED
3001a050: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
30006200 <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
30006200: e59f3178 ldr r3, [pc, #376] ; 30006380 <writev+0x180>
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
30006204: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
30006208: e5933000 ldr r3, [r3]
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
3000620c: e1a05002 mov r5, r2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
30006210: e1500003 cmp r0, r3
30006214: 2a00004d bcs 30006350 <writev+0x150> iop = rtems_libio_iop( fd );
30006218: e59f3164 ldr r3, [pc, #356] ; 30006384 <writev+0x184> 3000621c: e5937000 ldr r7, [r3] 30006220: e0877300 add r7, r7, r0, lsl #6
rtems_libio_check_is_open( iop );
30006224: e5973014 ldr r3, [r7, #20] 30006228: e3130c01 tst r3, #256 ; 0x100
3000622c: 0a000047 beq 30006350 <writev+0x150> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30006230: e3130004 tst r3, #4
30006234: 0a00003f beq 30006338 <writev+0x138>
/*
* Argument validation on IO vector
*/
if ( !iov )
30006238: e3510000 cmp r1, #0
3000623c: 0a00003d beq 30006338 <writev+0x138>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
30006240: e3520000 cmp r2, #0
30006244: da00003b ble 30006338 <writev+0x138>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
30006248: e3520b01 cmp r2, #1024 ; 0x400
3000624c: ca000039 bgt 30006338 <writev+0x138>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
30006250: e597303c ldr r3, [r7, #60] ; 0x3c 30006254: e593300c ldr r3, [r3, #12] 30006258: e3530000 cmp r3, #0
3000625c: 0a000042 beq 3000636c <writev+0x16c>
rtems_set_errno_and_return_minus_one( ENOTSUP );
30006260: e1a04001 mov r4, r1 30006264: e3a01000 mov r1, #0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
30006268: e59fc118 ldr ip, [pc, #280] ; 30006388 <writev+0x188>
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000626c: e1a02004 mov r2, r4 30006270: e3a06001 mov r6, #1 30006274: e1a08001 mov r8, r1 30006278: ea000000 b 30006280 <writev+0x80>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
3000627c: e1a08003 mov r8, r3
if ( !iov[v].iov_base )
30006280: e5923000 ldr r3, [r2]
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
30006284: e2811001 add r1, r1, #1
if ( !iov[v].iov_base )
30006288: e3530000 cmp r3, #0
3000628c: 0a000029 beq 30006338 <writev+0x138>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
30006290: e5920004 ldr r0, [r2, #4]
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
30006294: e2822008 add r2, r2, #8
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
30006298: e0883000 add r3, r8, r0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
3000629c: e3500000 cmp r0, #0 300062a0: 13a06000 movne r6, #0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
300062a4: e1580003 cmp r8, r3 300062a8: d153000c cmple r3, ip 300062ac: d3a08000 movle r8, #0 300062b0: c3a08001 movgt r8, #1
300062b4: ca00001f bgt 30006338 <writev+0x138>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
300062b8: e1550001 cmp r5, r1
300062bc: caffffee bgt 3000627c <writev+0x7c>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
300062c0: e3560000 cmp r6, #0
300062c4: 1a00001f bne 30006348 <writev+0x148>
300062c8: e1a08006 mov r8, r6 300062cc: ea000002 b 300062dc <writev+0xdc>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
300062d0: e1550006 cmp r5, r6 300062d4: e2844008 add r4, r4, #8
300062d8: da00001a ble 30006348 <writev+0x148>
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
300062dc: e5942004 ldr r2, [r4, #4]
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
300062e0: e2866001 add r6, r6, #1
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
300062e4: e3520000 cmp r2, #0
300062e8: 0afffff8 beq 300062d0 <writev+0xd0>
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
300062ec: e5941000 ldr r1, [r4] 300062f0: e597303c ldr r3, [r7, #60] ; 0x3c 300062f4: e1a00007 mov r0, r7 300062f8: e1a0e00f mov lr, pc 300062fc: e593f00c ldr pc, [r3, #12]
if ( bytes < 0 )
30006300: e3500000 cmp r0, #0
30006304: ba000016 blt 30006364 <writev+0x164>
return -1;
if ( bytes > 0 ) {
30006308: 0a000006 beq 30006328 <writev+0x128>
iop->offset += bytes;
3000630c: e287c00c add ip, r7, #12
30006310: e89c1800 ldm ip, {fp, ip}
30006314: e09b2000 adds r2, fp, r0
30006318: e0ac3fc0 adc r3, ip, r0, asr #31
3000631c: e587200c str r2, [r7, #12]
30006320: e5873010 str r3, [r7, #16]
total += bytes;
30006324: e0888000 add r8, r8, r0
}
if (bytes != iov[ v ].iov_len)
30006328: e5943004 ldr r3, [r4, #4] 3000632c: e1500003 cmp r0, r3
30006330: 0affffe6 beq 300062d0 <writev+0xd0>
30006334: ea000003 b 30006348 <writev+0x148>
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
30006338: eb002404 bl 3000f350 <__errno> 3000633c: e3a03016 mov r3, #22 30006340: e5803000 str r3, [r0] 30006344: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
30006348: e1a00008 mov r0, r8
3000634c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
30006350: eb0023fe bl 3000f350 <__errno> 30006354: e3a03009 mov r3, #9 30006358: e5803000 str r3, [r0] 3000635c: e3e08000 mvn r8, #0 30006360: eafffff8 b 30006348 <writev+0x148>
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
30006364: e3e08000 mvn r8, #0 30006368: eafffff6 b 30006348 <writev+0x148>
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
3000636c: eb0023f7 bl 3000f350 <__errno> <== NOT EXECUTED 30006370: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30006374: e5803000 str r3, [r0] <== NOT EXECUTED 30006378: e3e08000 mvn r8, #0 <== NOT EXECUTED 3000637c: eafffff1 b 30006348 <writev+0x148> <== NOT EXECUTED