0000934c <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 ) {
934c: e5903000 ldr r3, [r0]
9350: e593204c ldr r2, [r3, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
9354: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
9358: e2422001 sub r2, r2, #1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
935c: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
9360: e3520006 cmp r2, #6
9364: 979ff102 ldrls pc, [pc, r2, lsl #2]
9368: ea000010 b 93b0 <IMFS_Set_handlers+0x64> <== NOT EXECUTED
936c: 00009388 .word 0x00009388 <== NOT EXECUTED
9370: 00009390 .word 0x00009390 <== NOT EXECUTED
9374: 00009398 .word 0x00009398 <== NOT EXECUTED
9378: 00009398 .word 0x00009398 <== NOT EXECUTED
937c: 000093a0 .word 0x000093a0 <== NOT EXECUTED
9380: 000093a0 .word 0x000093a0 <== NOT EXECUTED
9384: 000093a8 .word 0x000093a8 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
9388: e593300c ldr r3, [r3, #12]
938c: ea000006 b 93ac <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
9390: e59f3020 ldr r3, [pc, #32] ; 93b8 <IMFS_Set_handlers+0x6c>
9394: ea000004 b 93ac <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
9398: e59f301c ldr r3, [pc, #28] ; 93bc <IMFS_Set_handlers+0x70>
939c: ea000002 b 93ac <IMFS_Set_handlers+0x60>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
93a0: e5933008 ldr r3, [r3, #8]
93a4: ea000000 b 93ac <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
93a8: e59f3010 ldr r3, [pc, #16] ; 93c0 <IMFS_Set_handlers+0x74>
93ac: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
93b0: e3a00000 mov r0, #0
93b4: e12fff1e bx lr
000090ec <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
90ec: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr}
90f0: e1a02802 lsl r2, r2, #16
90f4: e1a01801 lsl r1, r1, #16
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
90f8: e5904000 ldr r4, [r0]
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
90fc: e1a07821 lsr r7, r1, #16
9100: e1a06822 lsr r6, r2, #16
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
9104: eb00044f bl a248 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
9108: e1d453bc ldrh r5, [r4, #60] ; 0x3c
910c: e3500000 cmp r0, #0
9110: 11550000 cmpne r5, r0
9114: 03a05000 moveq r5, #0
9118: 13a05001 movne r5, #1
911c: 0a000004 beq 9134 <IMFS_chown+0x48>
rtems_set_errno_and_return_minus_one( EPERM );
9120: eb001566 bl e6c0 <__errno> <== NOT EXECUTED
9124: e3a03001 mov r3, #1 <== NOT EXECUTED
9128: e5803000 str r3, [r0] <== NOT EXECUTED
912c: e3e00000 mvn r0, #0 <== NOT EXECUTED
9130: ea000007 b 9154 <IMFS_chown+0x68> <== NOT EXECUTED
#endif
jnode->st_uid = owner;
9134: e1c473bc strh r7, [r4, #60] ; 0x3c
jnode->st_gid = group;
9138: e1c463be strh r6, [r4, #62] ; 0x3e
IMFS_update_ctime( jnode );
913c: e1a0000d mov r0, sp
9140: e1a01005 mov r1, r5
9144: ebffe36e bl 1f04 <gettimeofday>
9148: e59d3000 ldr r3, [sp]
914c: e5843048 str r3, [r4, #72] ; 0x48
9150: e1a00005 mov r0, r5
return 0;
}
9154: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc}
00009210 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
9210: 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 )
9214: e2504000 subs r4, r0, #0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
9218: e1a05001 mov r5, r1
921c: e59d6014 ldr r6, [sp, #20]
9220: e1a01002 mov r1, r2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
9224: 01a07004 moveq r7, r4
9228: 0a000041 beq 9334 <IMFS_create_node+0x124>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
922c: e59f2108 ldr r2, [pc, #264] ; 933c <IMFS_create_node+0x12c>
9230: e5922000 ldr r2, [r2]
9234: e592202c ldr r2, [r2, #44] ; 0x2c
9238: e1a00005 mov r0, r5
923c: e1c32002 bic r2, r3, r2
9240: ebffffc4 bl 9158 <IMFS_allocate_node>
if ( !node )
9244: e2507000 subs r7, r0, #0
9248: 0a000039 beq 9334 <IMFS_create_node+0x124>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
924c: e2455001 sub r5, r5, #1
9250: e3550006 cmp r5, #6
9254: 979ff105 ldrls pc, [pc, r5, lsl #2]
9258: ea000025 b 92f4 <IMFS_create_node+0xe4> <== NOT EXECUTED
925c: 00009278 .word 0x00009278 <== NOT EXECUTED
9260: 0000929c .word 0x0000929c <== NOT EXECUTED
9264: 00009294 .word 0x00009294 <== NOT EXECUTED
9268: 00009294 .word 0x00009294 <== NOT EXECUTED
926c: 000092c4 .word 0x000092c4 <== NOT EXECUTED
9270: 000092ac .word 0x000092ac <== NOT EXECUTED
9274: 000092e8 .word 0x000092e8 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9278: e2872054 add r2, r7, #84 ; 0x54
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
927c: e2873050 add r3, r7, #80 ; 0x50
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9280: e5872050 str r2, [r7, #80] ; 0x50
the_chain->permanent_null = NULL;
9284: e3a02000 mov r2, #0
9288: e5872054 str r2, [r7, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
928c: e5873058 str r3, [r7, #88] ; 0x58
9290: ea00001c b 9308 <IMFS_create_node+0xf8>
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;
9294: e5963000 ldr r3, [r6]
9298: ea000013 b 92ec <IMFS_create_node+0xdc>
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
929c: 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;
92a0: e5963000 ldr r3, [r6]
node->info.device.minor = info->device.minor;
92a4: e5872054 str r2, [r7, #84] ; 0x54
92a8: ea00000f b 92ec <IMFS_create_node+0xdc>
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
92ac: e3a03000 mov r3, #0 <== NOT EXECUTED
92b0: e3a02000 mov r2, #0 <== NOT EXECUTED
92b4: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED
92b8: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED
node->info.linearfile.direct = 0;
92bc: e3a03000 mov r3, #0 <== NOT EXECUTED
92c0: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
92c4: 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;
92c8: e3a01000 mov r1, #0
92cc: e3a02000 mov r2, #0
92d0: e5871050 str r1, [r7, #80] ; 0x50
92d4: e5872054 str r2, [r7, #84] ; 0x54
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
92d8: 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;
92dc: e5873058 str r3, [r7, #88] ; 0x58
node->info.file.doubly_indirect = 0;
92e0: e587305c str r3, [r7, #92] ; 0x5c
node->info.file.triply_indirect = 0;
break;
92e4: ea000007 b 9308 <IMFS_create_node+0xf8>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
92e8: e3a03000 mov r3, #0
92ec: e5873050 str r3, [r7, #80] ; 0x50
break;
92f0: ea000004 b 9308 <IMFS_create_node+0xf8>
default:
assert(0);
92f4: e59f0044 ldr r0, [pc, #68] ; 9340 <IMFS_create_node+0x130> <== NOT EXECUTED
92f8: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED
92fc: e59f2040 ldr r2, [pc, #64] ; 9344 <IMFS_create_node+0x134> <== NOT EXECUTED
9300: e59f3040 ldr r3, [pc, #64] ; 9348 <IMFS_create_node+0x138> <== NOT EXECUTED
9304: eb000356 bl a064 <__assert_func> <== NOT EXECUTED
/*
* 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;
9308: e5943010 ldr r3, [r4, #16]
930c: e5932034 ldr r2, [r3, #52] ; 0x34
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
9310: e5923004 ldr r3, [r2, #4]
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
9314: e5940000 ldr r0, [r4]
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
9318: e2833001 add r3, r3, #1
931c: e5823004 str r3, [r2, #4]
* 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;
node->Parent = parent;
9320: e5870008 str r0, [r7, #8]
node->st_ino = ++fs_info->ino_count;
9324: e5873038 str r3, [r7, #56] ; 0x38
9328: e2800050 add r0, r0, #80 ; 0x50
932c: e1a01007 mov r1, r7
9330: ebfff1c6 bl 5a50 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
9334: e1a00007 mov r0, r7
9338: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003de8 <IMFS_dump_directory>:
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
3de8: e3500000 cmp r0, #0
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
3dec: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
3df0: e1a05001 mov r5, r1
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
3df4: 059f00a4 ldreq r0, [pc, #164] ; 3ea0 <IMFS_dump_directory+0xb8>
3df8: 03a01084 moveq r1, #132 ; 0x84
3dfc: 059f20a0 ldreq r2, [pc, #160] ; 3ea4 <IMFS_dump_directory+0xbc>
3e00: 059f30a0 ldreq r3, [pc, #160] ; 3ea8 <IMFS_dump_directory+0xc0>
3e04: 0a000005 beq 3e20 <IMFS_dump_directory+0x38>
assert( level >= 0 );
3e08: e3510000 cmp r1, #0
3e0c: aa000004 bge 3e24 <IMFS_dump_directory+0x3c>
3e10: e59f0088 ldr r0, [pc, #136] ; 3ea0 <IMFS_dump_directory+0xb8><== NOT EXECUTED
3e14: e59f2088 ldr r2, [pc, #136] ; 3ea4 <IMFS_dump_directory+0xbc><== NOT EXECUTED
3e18: e59f308c ldr r3, [pc, #140] ; 3eac <IMFS_dump_directory+0xc4><== NOT EXECUTED
3e1c: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED
3e20: eb000212 bl 4670 <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
3e24: e590304c ldr r3, [r0, #76] ; 0x4c
3e28: e3530001 cmp r3, #1
3e2c: 159f006c ldrne r0, [pc, #108] ; 3ea0 <IMFS_dump_directory+0xb8>
3e30: 13a01088 movne r1, #136 ; 0x88
3e34: 159f2068 ldrne r2, [pc, #104] ; 3ea4 <IMFS_dump_directory+0xbc>
3e38: 159f3070 ldrne r3, [pc, #112] ; 3eb0 <IMFS_dump_directory+0xc8>
3e3c: 1afffff7 bne 3e20 <IMFS_dump_directory+0x38>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3e40: e280a054 add sl, r0, #84 ; 0x54
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3e44: e5904050 ldr r4, [r0, #80] ; 0x50
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
3e48: e59f8064 ldr r8, [pc, #100] ; 3eb4 <IMFS_dump_directory+0xcc>
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
3e4c: e2817001 add r7, r1, #1
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3e50: ea00000f b 3e94 <IMFS_dump_directory+0xac>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
3e54: e3a06000 mov r6, #0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
3e58: e5983000 ldr r3, [r8]
!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++ )
3e5c: e2866001 add r6, r6, #1
fprintf(stdout, "...." );
3e60: e5931008 ldr r1, [r3, #8]
3e64: e59f004c ldr r0, [pc, #76] ; 3eb8 <IMFS_dump_directory+0xd0>
3e68: eb003b27 bl 12b0c <fputs>
!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++ )
3e6c: e1560005 cmp r6, r5
3e70: dafffff8 ble 3e58 <IMFS_dump_directory+0x70>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
3e74: e1a00004 mov r0, r4
3e78: ebffff7e bl 3c78 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
3e7c: e594304c ldr r3, [r4, #76] ; 0x4c
3e80: e3530001 cmp r3, #1
IMFS_dump_directory( the_jnode, level + 1 );
3e84: 01a00004 moveq r0, r4
3e88: 01a01007 moveq r1, r7
3e8c: 0bffffd5 bleq 3de8 <IMFS_dump_directory>
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 ) {
3e90: e5944000 ldr r4, [r4]
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3e94: e154000a cmp r4, sl
3e98: 1affffed bne 3e54 <IMFS_dump_directory+0x6c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
3e9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00009538 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
9538: 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 ) ) {
953c: e3d27007 bics r7, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
9540: e24dd040 sub sp, sp, #64 ; 0x40
9544: e1a08002 mov r8, r2
9548: e58d0000 str r0, [sp]
954c: e1a06001 mov r6, r1
9550: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
9554: 05935000 ldreq r5, [r3]
9558: 03a09001 moveq r9, #1
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
955c: 028da004 addeq sl, sp, #4
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
9560: 0a00005a beq 96d0 <IMFS_eval_path+0x198>
assert( 0 );
9564: e59f0220 ldr r0, [pc, #544] ; 978c <IMFS_eval_path+0x254> <== NOT EXECUTED
9568: e59f1220 ldr r1, [pc, #544] ; 9790 <IMFS_eval_path+0x258> <== NOT EXECUTED
956c: e59f2220 ldr r2, [pc, #544] ; 9794 <IMFS_eval_path+0x25c> <== NOT EXECUTED
9570: e59f3220 ldr r3, [pc, #544] ; 9798 <IMFS_eval_path+0x260> <== NOT EXECUTED
9574: eb0002ba bl a064 <__assert_func> <== NOT EXECUTED
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
9578: e59d2000 ldr r2, [sp]
957c: e28d303c add r3, sp, #60 ; 0x3c
9580: e0820007 add r0, r2, r7
9584: e1a01006 mov r1, r6
9588: e1a0200a mov r2, sl
958c: eb00021d bl 9e08 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
9590: e5943000 ldr r3, [r4]
9594: e3530000 cmp r3, #0
* 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 );
9598: e1a09000 mov r9, r0
pathnamelen -= len;
959c: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
95a0: 0a000042 beq 96b0 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
95a4: e3500000 cmp r0, #0
95a8: 0a000006 beq 95c8 <IMFS_eval_path+0x90>
if ( node->type == IMFS_DIRECTORY )
95ac: e595104c ldr r1, [r5, #76] ; 0x4c
95b0: e3510001 cmp r1, #1
95b4: 1a000003 bne 95c8 <IMFS_eval_path+0x90>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
95b8: e1a00004 mov r0, r4
95bc: ebffff80 bl 93c4 <IMFS_evaluate_permission>
95c0: e3500000 cmp r0, #0
95c4: 0a000069 beq 9770 <IMFS_eval_path+0x238>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
95c8: e3590003 cmp r9, #3
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
i += len;
95cc: e087700b add r7, r7, fp
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
95d0: e06b6006 rsb r6, fp, r6
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;
95d4: e5945000 ldr r5, [r4]
switch( type ) {
95d8: 0a000013 beq 962c <IMFS_eval_path+0xf4>
95dc: e3590004 cmp r9, #4
95e0: 0a000037 beq 96c4 <IMFS_eval_path+0x18c>
95e4: e3590002 cmp r9, #2
95e8: 1a000038 bne 96d0 <IMFS_eval_path+0x198>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
95ec: e59f21a8 ldr r2, [pc, #424] ; 979c <IMFS_eval_path+0x264>
95f0: e5923000 ldr r3, [r2]
95f4: e5933018 ldr r3, [r3, #24]
95f8: e1550003 cmp r5, r3
95fc: 0a000033 beq 96d0 <IMFS_eval_path+0x198>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
9600: e594e010 ldr lr, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
9604: e59e301c ldr r3, [lr, #28]
9608: e1550003 cmp r5, r3
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
960c: 028ee008 addeq lr, lr, #8
9610: 0a000038 beq 96f8 <IMFS_eval_path+0x1c0>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
9614: e5955008 ldr r5, [r5, #8]
9618: e3550000 cmp r5, #0
961c: 1a000026 bne 96bc <IMFS_eval_path+0x184>
rtems_set_errno_and_return_minus_one( ENOENT );
9620: eb001426 bl e6c0 <__errno>
9624: e5809000 str r9, [r0]
9628: ea000053 b 977c <IMFS_eval_path+0x244>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
962c: e595304c ldr r3, [r5, #76] ; 0x4c
9630: e3530003 cmp r3, #3
9634: 1a000006 bne 9654 <IMFS_eval_path+0x11c>
IMFS_evaluate_hard_link( pathloc, 0 );
9638: e1a00004 mov r0, r4
963c: e3a01000 mov r1, #0
9640: ebffff79 bl 942c <IMFS_evaluate_hard_link>
node = pathloc->node_access;
9644: e5945000 ldr r5, [r4]
if ( !node )
9648: e3550000 cmp r5, #0
964c: 1a000009 bne 9678 <IMFS_eval_path+0x140>
9650: ea00000b b 9684 <IMFS_eval_path+0x14c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
9654: e3530004 cmp r3, #4
9658: 1a000006 bne 9678 <IMFS_eval_path+0x140>
result = IMFS_evaluate_sym_link( pathloc, 0 );
965c: e1a00004 mov r0, r4
9660: e3a01000 mov r1, #0
9664: ebffff87 bl 9488 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
9668: 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 );
966c: e1a0b000 mov fp, r0
node = pathloc->node_access;
9670: e5945000 ldr r5, [r4]
if ( result == -1 )
9674: 0a000041 beq 9780 <IMFS_eval_path+0x248>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
9678: e595304c ldr r3, [r5, #76] ; 0x4c
967c: e3530001 cmp r3, #1
9680: 0a000002 beq 9690 <IMFS_eval_path+0x158>
rtems_set_errno_and_return_minus_one( ENOTDIR );
9684: eb00140d bl e6c0 <__errno>
9688: e3a03014 mov r3, #20
968c: ea000039 b 9778 <IMFS_eval_path+0x240>
/*
* 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 ) {
9690: e595e05c ldr lr, [r5, #92] ; 0x5c
9694: e35e0000 cmp lr, #0
9698: 1a000015 bne 96f4 <IMFS_eval_path+0x1bc>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
969c: e1a00005 mov r0, r5
96a0: e1a0100a mov r1, sl
96a4: eb0001af bl 9d68 <IMFS_find_match_in_dir>
if ( !node )
96a8: e2505000 subs r5, r0, #0
96ac: 1a000002 bne 96bc <IMFS_eval_path+0x184>
rtems_set_errno_and_return_minus_one( ENOENT );
96b0: eb001402 bl e6c0 <__errno>
96b4: e3a03002 mov r3, #2
96b8: ea00002e b 9778 <IMFS_eval_path+0x240>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
96bc: e5845000 str r5, [r4]
96c0: ea000002 b 96d0 <IMFS_eval_path+0x198>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
96c4: eb0013fd bl e6c0 <__errno>
96c8: e3a0305b mov r3, #91 ; 0x5b
96cc: ea000029 b 9778 <IMFS_eval_path+0x240>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
96d0: e3590004 cmp r9, #4
96d4: 13590000 cmpne r9, #0
96d8: 1affffa6 bne 9578 <IMFS_eval_path+0x40>
* 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 ) {
96dc: e595304c ldr r3, [r5, #76] ; 0x4c
96e0: e3530001 cmp r3, #1
96e4: 1a000019 bne 9750 <IMFS_eval_path+0x218>
if ( node->info.directory.mt_fs != NULL ) {
96e8: e595e05c ldr lr, [r5, #92] ; 0x5c
96ec: e35e0000 cmp lr, #0
96f0: 0a000016 beq 9750 <IMFS_eval_path+0x218>
newloc = node->info.directory.mt_fs->mt_fs_root;
96f4: e28ee01c add lr, lr, #28
96f8: e8be000f ldm lr!, {r0, r1, r2, r3}
96fc: e28dc028 add ip, sp, #40 ; 0x28
9700: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
9704: e28d5028 add r5, sp, #40 ; 0x28
9708: e8b5000f ldm r5!, {r0, r1, r2, r3}
970c: e1a05004 mov r5, r4
* 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;
9710: e59ee000 ldr lr, [lr]
*pathloc = newloc;
9714: e8a5000f stmia r5!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
9718: 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;
971c: e585e000 str lr, [r5]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
9720: e59d2000 ldr r2, [sp]
* 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;
9724: e58ce000 str lr, [ip]
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
9728: e0610007 rsb r0, r1, r7
972c: e0820000 add r0, r2, r0
9730: e0861001 add r1, r6, r1
9734: e1a02008 mov r2, r8
9738: e1a03004 mov r3, r4
973c: e594c00c ldr ip, [r4, #12]
9740: e1a0e00f mov lr, pc
9744: e59cf000 ldr pc, [ip]
9748: e1a0b000 mov fp, r0
974c: ea00000b b 9780 <IMFS_eval_path+0x248>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
9750: e1a00004 mov r0, r4
9754: ebfffefc bl 934c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
9758: e1a01008 mov r1, r8
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
975c: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
9760: e1a00004 mov r0, r4
9764: ebffff16 bl 93c4 <IMFS_evaluate_permission>
9768: e3500000 cmp r0, #0
976c: 1a000003 bne 9780 <IMFS_eval_path+0x248>
rtems_set_errno_and_return_minus_one( EACCES );
9770: eb0013d2 bl e6c0 <__errno>
9774: e3a0300d mov r3, #13
9778: e5803000 str r3, [r0]
977c: e3e0b000 mvn fp, #0
return result;
}
9780: e1a0000b mov r0, fp
9784: e28dd040 add sp, sp, #64 ; 0x40
9788: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00009854 <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 */
)
{
9854: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
9858: e24dd040 sub sp, sp, #64 ; 0x40
985c: e1a04001 mov r4, r1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
9860: e5916000 ldr r6, [r1]
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
9864: e58d2000 str r2, [sp]
9868: e1a07000 mov r7, r0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
986c: eb001798 bl f6d4 <strlen>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
9870: e59fa224 ldr sl, [pc, #548] ; 9a9c <IMFS_evaluate_for_make+0x248>
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
9874: e3a05000 mov r5, #0
9878: e1a08000 mov r8, r0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
987c: e1a01008 mov r1, r8
9880: e28d303c add r3, sp, #60 ; 0x3c
9884: e0870005 add r0, r7, r5
9888: e28d2004 add r2, sp, #4
988c: eb00015d bl 9e08 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
9890: e5943000 ldr r3, [r4]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
9894: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
9898: 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 );
989c: e1a09000 mov r9, r0
pathlen -= len;
98a0: e06b8008 rsb r8, fp, r8
i += len;
if ( !pathloc->node_access )
98a4: 0a000060 beq 9a2c <IMFS_evaluate_for_make+0x1d8>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
98a8: e3500000 cmp r0, #0
98ac: 0a000006 beq 98cc <IMFS_evaluate_for_make+0x78>
if ( node->type == IMFS_DIRECTORY )
98b0: e596104c ldr r1, [r6, #76] ; 0x4c
98b4: e3510001 cmp r1, #1
98b8: 1a000003 bne 98cc <IMFS_evaluate_for_make+0x78>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
98bc: e1a00004 mov r0, r4
98c0: ebfffebf bl 93c4 <IMFS_evaluate_permission>
98c4: e3500000 cmp r0, #0
98c8: 0a00006c beq 9a80 <IMFS_evaluate_for_make+0x22c>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
98cc: e5943000 ldr r3, [r4]
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
98d0: e085500b add r5, r5, fp
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
98d4: e1a06003 mov r6, r3
switch( type ) {
98d8: e3590004 cmp r9, #4
98dc: 979ff109 ldrls pc, [pc, r9, lsl #2]
98e0: eaffffe5 b 987c <IMFS_evaluate_for_make+0x28> <== NOT EXECUTED
98e4: 000099e8 .word 0x000099e8 <== NOT EXECUTED
98e8: 0000987c .word 0x0000987c <== NOT EXECUTED
98ec: 000098f8 .word 0x000098f8 <== NOT EXECUTED
98f0: 0000992c .word 0x0000992c <== NOT EXECUTED
98f4: 000099f4 .word 0x000099f4 <== NOT EXECUTED
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
98f8: e59a2000 ldr r2, [sl]
98fc: e5922018 ldr r2, [r2, #24]
9900: e1530002 cmp r3, r2
9904: 0affffdc beq 987c <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){
9908: e594e010 ldr lr, [r4, #16]
990c: e59e201c ldr r2, [lr, #28]
9910: e1530002 cmp r3, r2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
9914: 028ee008 addeq lr, lr, #8
9918: 0a000018 beq 9980 <IMFS_evaluate_for_make+0x12c>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
991c: e5936008 ldr r6, [r3, #8]
9920: e3560000 cmp r6, #0
9924: 1a00002d bne 99e0 <IMFS_evaluate_for_make+0x18c>
9928: ea00003f b 9a2c <IMFS_evaluate_for_make+0x1d8>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
992c: e593304c ldr r3, [r3, #76] ; 0x4c
9930: e3530003 cmp r3, #3
9934: 0a000001 beq 9940 <IMFS_evaluate_for_make+0xec>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
9938: e3530004 cmp r3, #4
993c: 1a000005 bne 9958 <IMFS_evaluate_for_make+0x104>
result = IMFS_evaluate_link( pathloc, 0 );
9940: e1a00004 mov r0, r4
9944: e3a01000 mov r1, #0
9948: ebffff94 bl 97a0 <IMFS_evaluate_link>
if ( result == -1 )
994c: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
9950: e1a06000 mov r6, r0
if ( result == -1 )
9954: 0a00004d beq 9a90 <IMFS_evaluate_for_make+0x23c>
return -1;
}
node = pathloc->node_access;
9958: e5940000 ldr r0, [r4]
if ( !node )
995c: e3500000 cmp r0, #0
9960: 0a00003e beq 9a60 <IMFS_evaluate_for_make+0x20c>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
9964: e590304c ldr r3, [r0, #76] ; 0x4c
9968: e3530001 cmp r3, #1
996c: 1a00003b bne 9a60 <IMFS_evaluate_for_make+0x20c>
/*
* 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 ) {
9970: e590e05c ldr lr, [r0, #92] ; 0x5c
9974: e35e0000 cmp lr, #0
9978: 0a000014 beq 99d0 <IMFS_evaluate_for_make+0x17c>
newloc = node->info.directory.mt_fs->mt_fs_root;
997c: e28ee01c add lr, lr, #28
9980: e8be000f ldm lr!, {r0, r1, r2, r3}
9984: e28dc028 add ip, sp, #40 ; 0x28
9988: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
998c: e28d6028 add r6, sp, #40 ; 0x28
9990: e8b6000f ldm r6!, {r0, r1, r2, r3}
9994: e1a06004 mov r6, r4
* 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;
9998: e59ee000 ldr lr, [lr]
*pathloc = newloc;
999c: e8a6000f stmia r6!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
99a0: e59d303c ldr r3, [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;
99a4: e586e000 str lr, [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;
99a8: e58ce000 str lr, [ip]
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
99ac: e0635005 rsb r5, r3, r5
99b0: e0870005 add r0, r7, r5
99b4: e1a01004 mov r1, r4
99b8: e59d2000 ldr r2, [sp]
99bc: e594300c ldr r3, [r4, #12]
99c0: e1a0e00f mov lr, pc
99c4: e593f004 ldr pc, [r3, #4]
99c8: e1a06000 mov r6, r0
99cc: ea00002f b 9a90 <IMFS_evaluate_for_make+0x23c>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
99d0: e28d1004 add r1, sp, #4
99d4: eb0000e3 bl 9d68 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
99d8: e2506000 subs r6, r0, #0
99dc: 0a000007 beq 9a00 <IMFS_evaluate_for_make+0x1ac>
done = true;
else
pathloc->node_access = node;
99e0: e5846000 str r6, [r4]
99e4: eaffffa4 b 987c <IMFS_evaluate_for_make+0x28>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
99e8: eb001334 bl e6c0 <__errno>
99ec: e3a03011 mov r3, #17
99f0: ea000024 b 9a88 <IMFS_evaluate_for_make+0x234>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
99f4: eb001331 bl e6c0 <__errno>
99f8: e3a0305b mov r3, #91 ; 0x5b
99fc: ea000021 b 9a88 <IMFS_evaluate_for_make+0x234>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
9a00: e59d303c ldr r3, [sp, #60] ; 0x3c
9a04: e59d2000 ldr r2, [sp]
9a08: e0633005 rsb r3, r3, r5
9a0c: e0873003 add r3, r7, r3
9a10: e5823000 str r3, [r2]
9a14: e0875005 add r5, r7, r5
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
9a18: ea000006 b 9a38 <IMFS_evaluate_for_make+0x1e4>
if ( !IMFS_is_separator( path[ i ] ) )
9a1c: ebffe4bc bl 2d14 <rtems_filesystem_is_separator>
9a20: e3500000 cmp r0, #0
9a24: e2855001 add r5, r5, #1
9a28: 1a000002 bne 9a38 <IMFS_evaluate_for_make+0x1e4>
rtems_set_errno_and_return_minus_one( ENOENT );
9a2c: eb001323 bl e6c0 <__errno>
9a30: e3a03002 mov r3, #2
9a34: ea000013 b 9a88 <IMFS_evaluate_for_make+0x234>
/*
* 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++) {
9a38: e5d53000 ldrb r3, [r5]
9a3c: e2530000 subs r0, r3, #0
9a40: 1afffff5 bne 9a1c <IMFS_evaluate_for_make+0x1c8>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
9a44: e1a00004 mov r0, r4
9a48: ebfffe3f bl 934c <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
9a4c: e5943000 ldr r3, [r4]
9a50: e593304c ldr r3, [r3, #76] ; 0x4c
9a54: e3530001 cmp r3, #1
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
9a58: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
9a5c: 0a000002 beq 9a6c <IMFS_evaluate_for_make+0x218>
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
9a60: eb001316 bl e6c0 <__errno>
9a64: e3a03014 mov r3, #20
9a68: ea000006 b 9a88 <IMFS_evaluate_for_make+0x234>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
9a6c: e1a00004 mov r0, r4
9a70: e3a01003 mov r1, #3
9a74: ebfffe52 bl 93c4 <IMFS_evaluate_permission>
9a78: e3500000 cmp r0, #0
9a7c: 1a000003 bne 9a90 <IMFS_evaluate_for_make+0x23c>
rtems_set_errno_and_return_minus_one( EACCES );
9a80: eb00130e bl e6c0 <__errno>
9a84: e3a0300d mov r3, #13
9a88: e5803000 str r3, [r0]
9a8c: e3e06000 mvn r6, #0
return result;
}
9a90: e1a00006 mov r0, r6
9a94: e28dd040 add sp, sp, #64 ; 0x40
9a98: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000942c <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;
942c: e5903000 ldr r3, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
9430: e593204c ldr r2, [r3, #76] ; 0x4c
9434: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
9438: e92d4030 push {r4, r5, lr}
943c: e1a04000 mov r4, r0
9440: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
9444: 159f0038 ldrne r0, [pc, #56] ; 9484 <IMFS_evaluate_hard_link+0x58>
9448: 1bfff0c6 blne 5768 <rtems_fatal_error_occurred>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
944c: e5933050 ldr r3, [r3, #80] ; 0x50
9450: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
9454: ebffffbc bl 934c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
9458: e1a00004 mov r0, r4
945c: e1a01005 mov r1, r5
9460: ebffffd7 bl 93c4 <IMFS_evaluate_permission>
9464: e3500000 cmp r0, #0
9468: 13a00000 movne r0, #0
946c: 18bd8030 popne {r4, r5, pc}
rtems_set_errno_and_return_minus_one( EACCES );
9470: eb001492 bl e6c0 <__errno> <== NOT EXECUTED
9474: e3a0300d mov r3, #13 <== NOT EXECUTED
9478: e5803000 str r3, [r0] <== NOT EXECUTED
947c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return result;
}
9480: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
000093c4 <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 ) )
93c4: e3d13007 bics r3, r1, #7
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
93c8: e92d4070 push {r4, r5, r6, lr}
93cc: e1a04001 mov r4, r1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
93d0: 0a000004 beq 93e8 <IMFS_evaluate_permission+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
93d4: eb0014b9 bl e6c0 <__errno> <== NOT EXECUTED
93d8: e3a03001 mov r3, #1 <== NOT EXECUTED
93dc: e5803000 str r3, [r0] <== NOT EXECUTED
93e0: e3e00000 mvn r0, #0 <== NOT EXECUTED
93e4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
jnode = node->node_access;
93e8: e5905000 ldr r5, [r0]
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
93ec: eb000395 bl a248 <geteuid>
93f0: e1a06000 mov r6, r0
st_gid = getegid();
93f4: eb00038e bl a234 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
93f8: e1d533bc ldrh r3, [r5, #60] ; 0x3c
93fc: e1530006 cmp r3, r6
flags_to_test <<= 6;
9400: 01a04304 lsleq r4, r4, #6
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
9404: 0a000002 beq 9414 <IMFS_evaluate_permission+0x50>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
9408: e1d533be ldrh r3, [r5, #62] ; 0x3e
940c: e1530000 cmp r3, r0
flags_to_test <<= 3;
9410: 01a04184 lsleq r4, r4, #3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
9414: e5950030 ldr r0, [r5, #48] ; 0x30
9418: e0040000 and r0, r4, r0
941c: e1500004 cmp r0, r4
9420: 13a00000 movne r0, #0
9424: 03a00001 moveq r0, #1
return 1;
return 0;
}
9428: e8bd8070 pop {r4, r5, r6, pc}
00009488 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
9488: e92d4071 push {r0, r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
948c: e5906000 ldr r6, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
9490: e596304c ldr r3, [r6, #76] ; 0x4c
9494: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
9498: e1a04000 mov r4, r0
949c: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
94a0: 159f0088 ldrne r0, [pc, #136] ; 9530 <IMFS_evaluate_sym_link+0xa8>
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
94a4: 1a000003 bne 94b8 <IMFS_evaluate_sym_link+0x30>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
94a8: e5963008 ldr r3, [r6, #8]
94ac: e3530000 cmp r3, #0
94b0: 1a000001 bne 94bc <IMFS_evaluate_sym_link+0x34>
rtems_fatal_error_occurred( 0xBAD00000 );
94b4: e59f0078 ldr r0, [pc, #120] ; 9534 <IMFS_evaluate_sym_link+0xac><== NOT EXECUTED
94b8: ebfff0aa bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
94bc: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
94c0: e1a0100d mov r1, sp
94c4: e5960050 ldr r0, [r6, #80] ; 0x50
94c8: e1a02004 mov r2, r4
94cc: eb0004a5 bl a768 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
94d0: e59d3000 ldr r3, [sp]
94d4: e5966050 ldr r6, [r6, #80] ; 0x50
94d8: e0866003 add r6, r6, r3
94dc: e1a00006 mov r0, r6
94e0: eb00187b bl f6d4 <strlen>
94e4: e1a02005 mov r2, r5
94e8: e1a01000 mov r1, r0
94ec: e1a03004 mov r3, r4
94f0: e1a00006 mov r0, r6
94f4: eb00000f bl 9538 <IMFS_eval_path>
94f8: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
94fc: e1a00004 mov r0, r4
9500: ebffff91 bl 934c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
9504: e1a00004 mov r0, r4
9508: e1a01005 mov r1, r5
950c: ebffffac bl 93c4 <IMFS_evaluate_permission>
9510: e3500000 cmp r0, #0
9514: 1a000003 bne 9528 <IMFS_evaluate_sym_link+0xa0>
rtems_set_errno_and_return_minus_one( EACCES );
9518: eb001468 bl e6c0 <__errno> <== NOT EXECUTED
951c: e3a0300d mov r3, #13 <== NOT EXECUTED
9520: e5803000 str r3, [r0] <== NOT EXECUTED
9524: e3e06000 mvn r6, #0 <== NOT EXECUTED
return result;
}
9528: e1a00006 mov r0, r6
952c: e8bd8078 pop {r3, r4, r5, r6, pc}
0000d5a0 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
d5a0: e92d4073 push {r0, r1, r4, r5, r6, lr}
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
d5a4: e5904000 ldr r4, [r0]
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
d5a8: e1a06001 mov r6, r1
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
d5ac: ebfff325 bl a248 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
d5b0: e1d453bc ldrh r5, [r4, #60] ; 0x3c
d5b4: e3500000 cmp r0, #0
d5b8: 11550000 cmpne r5, r0
d5bc: 03a05000 moveq r5, #0
d5c0: 13a05001 movne r5, #1
d5c4: 0a000004 beq d5dc <IMFS_fchmod+0x3c>
rtems_set_errno_and_return_minus_one( EPERM );
d5c8: eb00043c bl e6c0 <__errno> <== NOT EXECUTED
d5cc: e3a03001 mov r3, #1 <== NOT EXECUTED
d5d0: e5803000 str r3, [r0] <== NOT EXECUTED
d5d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
d5d8: ea00000c b d610 <IMFS_fchmod+0x70> <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
d5dc: e5943030 ldr r3, [r4, #48] ; 0x30
d5e0: e1a06a06 lsl r6, r6, #20
d5e4: e3c33eff bic r3, r3, #4080 ; 0xff0
d5e8: e3c3300f bic r3, r3, #15
d5ec: e1a06a26 lsr r6, r6, #20
d5f0: e1866003 orr r6, r6, r3
d5f4: e5846030 str r6, [r4, #48] ; 0x30
IMFS_update_ctime( jnode );
d5f8: e1a0000d mov r0, sp
d5fc: e1a01005 mov r1, r5
d600: ebffd23f bl 1f04 <gettimeofday>
d604: e59d3000 ldr r3, [sp]
d608: e5843048 str r3, [r4, #72] ; 0x48
d60c: e1a00005 mov r0, r5
return 0;
}
d610: e8bd807c pop {r2, r3, r4, r5, r6, pc}
00009c00 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
9c00: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
9c04: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
9c08: e1a01000 mov r1, r0 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
9c0c: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
9c10: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED
9c14: ebfffc15 bl 8c70 <pipe_release> <== NOT EXECUTED
if (! err) {
9c18: e2506000 subs r6, r0, #0 <== NOT EXECUTED
9c1c: 1a00000c bne 9c54 <IMFS_fifo_close+0x54> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
9c20: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
9c24: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
9c28: e5853014 str r3, [r5, #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)
9c2c: e1a00004 mov r0, r4 <== NOT EXECUTED
9c30: eb00019d bl a2ac <rtems_libio_is_file_open> <== NOT EXECUTED
9c34: e3500000 cmp r0, #0 <== NOT EXECUTED
9c38: 1a00000a bne 9c68 <IMFS_fifo_close+0x68> <== NOT EXECUTED
9c3c: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED
9c40: e3530000 cmp r3, #0 <== NOT EXECUTED
9c44: 1a000007 bne 9c68 <IMFS_fifo_close+0x68> <== NOT EXECUTED
free(jnode);
9c48: e1a00004 mov r0, r4 <== NOT EXECUTED
9c4c: ebffe083 bl 1e60 <free> <== NOT EXECUTED
9c50: ea000004 b 9c68 <IMFS_fifo_close+0x68> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
9c54: aa000003 bge 9c68 <IMFS_fifo_close+0x68> <== NOT EXECUTED
9c58: eb001298 bl e6c0 <__errno> <== NOT EXECUTED
9c5c: e2666000 rsb r6, r6, #0 <== NOT EXECUTED
9c60: e5806000 str r6, [r0] <== NOT EXECUTED
9c64: e3e06000 mvn r6, #0 <== NOT EXECUTED
}
9c68: e1a00006 mov r0, r6 <== NOT EXECUTED
9c6c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00009ae8 <IMFS_fifo_ioctl>:
void *buffer
)
{
int err;
if (command == FIONBIO) {
9ae8: e59f3068 ldr r3, [pc, #104] ; 9b58 <IMFS_fifo_ioctl+0x70> <== NOT EXECUTED
9aec: e1510003 cmp r1, r3 <== NOT EXECUTED
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
9af0: e92d4010 push {r4, lr} <== NOT EXECUTED
9af4: e1a03000 mov r3, r0 <== NOT EXECUTED
int err;
if (command == FIONBIO) {
9af8: 1a00000b bne 9b2c <IMFS_fifo_ioctl+0x44> <== NOT EXECUTED
if (buffer == NULL)
9afc: e3520000 cmp r2, #0 <== NOT EXECUTED
9b00: 03e0400d mvneq r4, #13 <== NOT EXECUTED
9b04: 0a00000d beq 9b40 <IMFS_fifo_ioctl+0x58> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
9b08: e5924000 ldr r4, [r2] <== NOT EXECUTED
9b0c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
9b10: e3540000 cmp r4, #0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
9b14: 13822001 orrne r2, r2, #1 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
9b18: 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;
9b1c: 15832014 strne r2, [r3, #20] <== NOT EXECUTED
9b20: 13a04000 movne r4, #0 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
9b24: 05832014 streq r2, [r3, #20] <== NOT EXECUTED
9b28: ea000008 b 9b50 <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
9b2c: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED
9b30: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED
9b34: ebfffb63 bl 88c8 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9b38: e2504000 subs r4, r0, #0 <== NOT EXECUTED
9b3c: aa000003 bge 9b50 <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED
9b40: eb0012de bl e6c0 <__errno> <== NOT EXECUTED
9b44: e2644000 rsb r4, r4, #0 <== NOT EXECUTED
9b48: e5804000 str r4, [r0] <== NOT EXECUTED
9b4c: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
9b50: e1a00004 mov r0, r4 <== NOT EXECUTED
9b54: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00009aa0 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
9aa0: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
9aa4: e58d0000 str r0, [sp] <== NOT EXECUTED
9aa8: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED
9aac: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED
9ab0: ebfffb6a bl 8860 <pipe_lseek> <== NOT EXECUTED
9ab4: e1a03000 mov r3, r0 <== NOT EXECUTED
9ab8: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9abc: 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);
9ac0: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9ac4: aa000004 bge 9adc <IMFS_fifo_lseek+0x3c> <== NOT EXECUTED
9ac8: eb0012fc bl e6c0 <__errno> <== NOT EXECUTED
9acc: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
9ad0: e5805000 str r5, [r0] <== NOT EXECUTED
9ad4: e3e03000 mvn r3, #0 <== NOT EXECUTED
9ad8: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
9adc: e1a01004 mov r1, r4 <== NOT EXECUTED
9ae0: e1a00003 mov r0, r3 <== NOT EXECUTED
9ae4: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
00009bb0 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
9bb0: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
9bb4: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
9bb8: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
9bbc: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED
9bc0: ebfffb58 bl 8928 <pipe_read> <== NOT EXECUTED
if (err > 0)
9bc4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
9bc8: da000005 ble 9be4 <IMFS_fifo_read+0x34> <== NOT EXECUTED
IMFS_update_atime(jnode);
9bcc: e1a0000d mov r0, sp <== NOT EXECUTED
9bd0: e3a01000 mov r1, #0 <== NOT EXECUTED
9bd4: ebffe0ca bl 1f04 <gettimeofday> <== NOT EXECUTED
9bd8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
9bdc: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
9be0: ea000004 b 9bf8 <IMFS_fifo_read+0x48> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9be4: 0a000003 beq 9bf8 <IMFS_fifo_read+0x48> <== NOT EXECUTED
9be8: eb0012b4 bl e6c0 <__errno> <== NOT EXECUTED
9bec: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
9bf0: e5805000 str r5, [r0] <== NOT EXECUTED
9bf4: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
9bf8: e1a00005 mov r0, r5 <== NOT EXECUTED
9bfc: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00009b5c <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
9b5c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
9b60: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
9b64: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
9b68: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED
9b6c: ebfffbc9 bl 8a98 <pipe_write> <== NOT EXECUTED
if (err > 0) {
9b70: e2505000 subs r5, r0, #0 <== NOT EXECUTED
9b74: da000006 ble 9b94 <IMFS_fifo_write+0x38> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
9b78: e1a0000d mov r0, sp <== NOT EXECUTED
9b7c: e3a01000 mov r1, #0 <== NOT EXECUTED
9b80: ebffe0df bl 1f04 <gettimeofday> <== NOT EXECUTED
9b84: e59d3000 ldr r3, [sp] <== NOT EXECUTED
9b88: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
9b8c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
9b90: ea000004 b 9ba8 <IMFS_fifo_write+0x4c> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
9b94: 0a000003 beq 9ba8 <IMFS_fifo_write+0x4c> <== NOT EXECUTED
9b98: eb0012c8 bl e6c0 <__errno> <== NOT EXECUTED
9b9c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
9ba0: e5805000 str r5, [r0] <== NOT EXECUTED
9ba4: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
9ba8: e1a00005 mov r0, r5 <== NOT EXECUTED
9bac: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00009cac <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
)
{
9cac: 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;
9cb0: e1a0c000 mov ip, r0
9cb4: 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
)
{
9cb8: e1a05000 mov r5, r0
9cbc: 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;
9cc0: e8bc000f ldm ip!, {r0, r1, r2, r3}
9cc4: e1a0e00d mov lr, sp
9cc8: e8ae000f stmia lr!, {r0, r1, r2, r3}
9ccc: e59c3000 ldr r3, [ip]
9cd0: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
9cd4: e3a03000 mov r3, #0
9cd8: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
9cdc: e1a0500d mov r5, sp
9ce0: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
9ce4: e58d4000 str r4, [sp]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
9ce8: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
9cec: ebfffd96 bl 934c <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
9cf0: e594204c ldr r2, [r4, #76] ; 0x4c
9cf4: e3520001 cmp r2, #1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
9cf8: e2843054 add r3, r4, #84 ; 0x54
9cfc: 1a000002 bne 9d0c <IMFS_fsunmount+0x60>
9d00: e5942050 ldr r2, [r4, #80] ; 0x50
9d04: e1520003 cmp r2, r3
9d08: 1a000005 bne 9d24 <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
9d0c: e3a00000 mov r0, #0
9d10: e1a0100d mov r1, sp
9d14: ebffdee7 bl 18b8 <IMFS_unlink>
if (result != 0)
9d18: e3500000 cmp r0, #0
9d1c: 1a00000c bne 9d54 <IMFS_fsunmount+0xa8>
9d20: e1a04006 mov r4, r6
return -1;
jnode = next;
}
if ( jnode != NULL ) {
9d24: e3540000 cmp r4, #0
9d28: 0a00000b beq 9d5c <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
9d2c: e594304c ldr r3, [r4, #76] ; 0x4c
9d30: e3530001 cmp r3, #1
9d34: 1affffe9 bne 9ce0 <IMFS_fsunmount+0x34>
9d38: e5943050 ldr r3, [r4, #80] ; 0x50
9d3c: e2842054 add r2, r4, #84 ; 0x54
9d40: e1530002 cmp r3, r2
9d44: 0affffe5 beq 9ce0 <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
9d48: e2534000 subs r4, r3, #0
9d4c: 1affffe3 bne 9ce0 <IMFS_fsunmount+0x34>
9d50: ea000001 b 9d5c <IMFS_fsunmount+0xb0> <== NOT EXECUTED
9d54: e3e00000 mvn r0, #0 <== NOT EXECUTED
9d58: ea000000 b 9d60 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
9d5c: e3a00000 mov r0, #0
return 0;
}
9d60: e28dd014 add sp, sp, #20
9d64: e8bd8070 pop {r4, r5, r6, pc}
000014d8 <IMFS_initialize_support>:
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
14d8: e59fc0d4 ldr ip, [pc, #212] ; 15b4 <IMFS_initialize_support+0xdc>
14dc: e59cc000 ldr ip, [ip]
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
)
{
14e0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
14e4: e1a08002 mov r8, r2
14e8: e1a06003 mov r6, r3
14ec: e1a04000 mov r4, r0
14f0: 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,
14f4: e3a02000 mov r2, #0
14f8: e3a03010 mov r3, #16
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
14fc: e153000c cmp r3, ip
1500: e2822001 add r2, r2, #1
1504: 0a000003 beq 1518 <IMFS_initialize_support+0x40>
1508: e3520006 cmp r2, #6
150c: e1a03083 lsl r3, r3, #1
1510: 1afffff9 bne 14fc <IMFS_initialize_support+0x24>
1514: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
1518: e59f5098 ldr r5, [pc, #152] ; 15b8 <IMFS_initialize_support+0xe0>
151c: e5853000 str r3, [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();
1520: eb001f2a bl 91d0 <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;
1524: e59fe090 ldr lr, [pc, #144] ; 15bc <IMFS_initialize_support+0xe4>
/* * 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();
1528: 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;
152c: e8be000f ldm lr!, {r0, r1, r2, r3}
1530: e284c038 add ip, r4, #56 ; 0x38
1534: e8ac000f stmia ip!, {r0, r1, r2, r3}
1538: e8be000f ldm lr!, {r0, r1, r2, r3}
153c: e8ac000f stmia ip!, {r0, r1, r2, r3}
1540: 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;
1544: e5847028 str r7, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
1548: 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;
154c: 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 ) );
1550: e3a00001 mov r0, #1
1554: e3a01010 mov r1, #16
1558: eb0001b8 bl 1c40 <calloc>
if ( !fs_info ) {
155c: e3500000 cmp r0, #0
1560: 1a000006 bne 1580 <IMFS_initialize_support+0xa8>
free(temp_mt_entry->mt_fs_root.node_access);
1564: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
1568: eb00023c bl 1e60 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
156c: eb003453 bl e6c0 <__errno> <== NOT EXECUTED
1570: e3a0300c mov r3, #12 <== NOT EXECUTED
1574: e5803000 str r3, [r0] <== NOT EXECUTED
1578: e3e00000 mvn r0, #0 <== NOT EXECUTED
157c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1580: 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;
1584: e594101c ldr r1, [r4, #28]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
1588: e3a03001 mov r3, #1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
158c: e880000c stm r0, {r2, r3}
fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers;
1590: 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;
1594: e5808008 str r8, [r0, #8]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1598: 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;
159c: 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;
15a0: e5813038 str r3, [r1, #56] ; 0x38
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
15a4: 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();
15a8: eb001cae bl 8868 <rtems_pipe_initialize>
15ac: e3a00000 mov r0, #0
return 0;
}
15b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000015c0 <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 */
)
{
15c0: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
15c4: 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 */
)
{
15c8: e24dd048 sub sp, sp, #72 ; 0x48
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
15cc: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
15d0: e1d333b4 ldrh r3, [r3, #52] ; 0x34
15d4: 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 */
)
{
15d8: e1a05001 mov r5, r1
15dc: 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 )
15e0: 9a000002 bls 15f0 <IMFS_link+0x30>
rtems_set_errno_and_return_minus_one( EMLINK );
15e4: eb003435 bl e6c0 <__errno>
15e8: e3a0301f mov r3, #31
15ec: ea000012 b 163c <IMFS_link+0x7c>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
15f0: e1a00002 mov r0, r2
15f4: eb003836 bl f6d4 <strlen>
15f8: e28d4004 add r4, sp, #4
15fc: e1a01000 mov r1, r0
1600: e1a02004 mov r2, r4
1604: e28d3044 add r3, sp, #68 ; 0x44
1608: e1a00006 mov r0, r6
160c: eb0021fd bl 9e08 <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(
1610: e28dc028 add ip, sp, #40 ; 0x28
1614: e1a00005 mov r0, r5
1618: e1a02004 mov r2, r4
161c: e3a01003 mov r1, #3
1620: e59f3054 ldr r3, [pc, #84] ; 167c <IMFS_link+0xbc>
1624: e58dc000 str ip, [sp]
1628: eb001ef8 bl 9210 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
162c: e3500000 cmp r0, #0
1630: 1a000004 bne 1648 <IMFS_link+0x88>
rtems_set_errno_and_return_minus_one( ENOMEM );
1634: eb003421 bl e6c0 <__errno> <== NOT EXECUTED
1638: e3a0300c mov r3, #12 <== NOT EXECUTED
163c: e5803000 str r3, [r0]
1640: e3e00000 mvn r0, #0
1644: ea00000a b 1674 <IMFS_link+0xb4>
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
1648: e59d3028 ldr r3, [sp, #40] ; 0x28
164c: e1d323b4 ldrh r2, [r3, #52] ; 0x34
1650: e2822001 add r2, r2, #1
1654: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
1658: e28d003c add r0, sp, #60 ; 0x3c
165c: e3a01000 mov r1, #0
1660: eb000227 bl 1f04 <gettimeofday>
1664: e59d203c ldr r2, [sp, #60] ; 0x3c
1668: e59d3028 ldr r3, [sp, #40] ; 0x28
166c: e5832048 str r2, [r3, #72] ; 0x48
1670: e3a00000 mov r0, #0
return 0;
}
1674: e28dd048 add sp, sp, #72 ; 0x48
1678: e8bd8070 pop {r4, r5, r6, pc}
0000c6b8 <IMFS_memfile_addblock>:
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
c6b8: e2503000 subs r3, r0, #0
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
c6bc: e92d4030 push {r4, r5, lr}
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
c6c0: 059f0060 ldreq r0, [pc, #96] ; c728 <IMFS_memfile_addblock+0x70>
c6c4: 059f1060 ldreq r1, [pc, #96] ; c72c <IMFS_memfile_addblock+0x74>
c6c8: 059f2060 ldreq r2, [pc, #96] ; c730 <IMFS_memfile_addblock+0x78>
c6cc: 059f3060 ldreq r3, [pc, #96] ; c734 <IMFS_memfile_addblock+0x7c>
c6d0: 0a000006 beq c6f0 <IMFS_memfile_addblock+0x38>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c6d4: e593304c ldr r3, [r3, #76] ; 0x4c
c6d8: e3530005 cmp r3, #5
c6dc: 0a000004 beq c6f4 <IMFS_memfile_addblock+0x3c>
c6e0: e59f0040 ldr r0, [pc, #64] ; c728 <IMFS_memfile_addblock+0x70><== NOT EXECUTED
c6e4: e59f104c ldr r1, [pc, #76] ; c738 <IMFS_memfile_addblock+0x80><== NOT EXECUTED
c6e8: e59f2040 ldr r2, [pc, #64] ; c730 <IMFS_memfile_addblock+0x78><== NOT EXECUTED
c6ec: e59f3048 ldr r3, [pc, #72] ; c73c <IMFS_memfile_addblock+0x84><== NOT EXECUTED
c6f0: ebfff65b bl a064 <__assert_func> <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
c6f4: e3a02001 mov r2, #1
c6f8: ebfffeaf bl c1bc <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
c6fc: e5904000 ldr r4, [r0]
c700: e3540000 cmp r4, #0
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 );
c704: e1a05000 mov r5, r0
if ( *block_entry_ptr )
c708: 13a00000 movne r0, #0
c70c: 18bd8030 popne {r4, r5, pc}
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
c710: ebfffe9c bl c188 <memfile_alloc_block>
if ( !memory )
c714: e3500000 cmp r0, #0
return 1;
*block_entry_ptr = memory;
c718: 15850000 strne r0, [r5]
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
c71c: 03a00001 moveq r0, #1
return 1;
*block_entry_ptr = memory;
c720: 11a00004 movne r0, r4
return 0;
}
c724: e8bd8030 pop {r4, r5, pc}
0000c740 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
c740: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c744: e2504000 subs r4, r0, #0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
c748: e1a05001 mov r5, r1
c74c: e1a06002 mov r6, r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c750: 059f0134 ldreq r0, [pc, #308] ; c88c <IMFS_memfile_extend+0x14c>
c754: 059f1134 ldreq r1, [pc, #308] ; c890 <IMFS_memfile_extend+0x150>
c758: 059f2134 ldreq r2, [pc, #308] ; c894 <IMFS_memfile_extend+0x154>
c75c: 059f3134 ldreq r3, [pc, #308] ; c898 <IMFS_memfile_extend+0x158>
c760: 0a000006 beq c780 <IMFS_memfile_extend+0x40>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c764: e594304c ldr r3, [r4, #76] ; 0x4c
c768: e3530005 cmp r3, #5
c76c: 0a000004 beq c784 <IMFS_memfile_extend+0x44>
c770: e59f0114 ldr r0, [pc, #276] ; c88c <IMFS_memfile_extend+0x14c><== NOT EXECUTED
c774: e59f1120 ldr r1, [pc, #288] ; c89c <IMFS_memfile_extend+0x15c><== NOT EXECUTED
c778: e59f2114 ldr r2, [pc, #276] ; c894 <IMFS_memfile_extend+0x154><== NOT EXECUTED
c77c: e59f311c ldr r3, [pc, #284] ; c8a0 <IMFS_memfile_extend+0x160><== NOT EXECUTED
c780: ebfff637 bl a064 <__assert_func> <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
c784: e59f3118 ldr r3, [pc, #280] ; c8a4 <IMFS_memfile_extend+0x164>
c788: e593b000 ldr fp, [r3]
c78c: e1a0312b lsr r3, fp, #2
c790: e2832001 add r2, r3, #1
c794: e0010293 mul r1, r3, r2
c798: e2811001 add r1, r1, #1
c79c: e0020193 mul r2, r3, r1
c7a0: e3a03000 mov r3, #0
c7a4: e1530006 cmp r3, r6
c7a8: e2422001 sub r2, r2, #1
c7ac: e003029b mul r3, fp, r2
c7b0: ca000005 bgt c7cc <IMFS_memfile_extend+0x8c>
c7b4: 1a000001 bne c7c0 <IMFS_memfile_extend+0x80>
c7b8: e1530005 cmp r3, r5
c7bc: 8a000002 bhi c7cc <IMFS_memfile_extend+0x8c>
rtems_set_errno_and_return_minus_one( EINVAL );
c7c0: eb0007be bl e6c0 <__errno> <== NOT EXECUTED
c7c4: e3a03016 mov r3, #22 <== NOT EXECUTED
c7c8: ea000025 b c864 <IMFS_memfile_extend+0x124> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
c7cc: e5948054 ldr r8, [r4, #84] ; 0x54
c7d0: e1560008 cmp r6, r8
c7d4: e5947050 ldr r7, [r4, #80] ; 0x50
c7d8: ca000002 bgt c7e8 <IMFS_memfile_extend+0xa8>
c7dc: 1a000028 bne c884 <IMFS_memfile_extend+0x144>
c7e0: e1550007 cmp r5, r7
c7e4: 9a000026 bls c884 <IMFS_memfile_extend+0x144>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
c7e8: e1a0cfcb asr ip, fp, #31
c7ec: e1a0300c mov r3, ip
c7f0: e1a0200b mov r2, fp
c7f4: e1a00005 mov r0, r5
c7f8: e1a01006 mov r1, r6
c7fc: e58dc000 str ip, [sp]
c800: eb003079 bl 189ec <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
c804: e59dc000 ldr ip, [sp]
c808: e1a01008 mov r1, r8
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
c80c: e1a0a000 mov sl, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
c810: e1a0200b mov r2, fp
c814: e1a00007 mov r0, r7
c818: e1a0300c mov r3, ip
c81c: eb003072 bl 189ec <__divdi3>
c820: e1a08000 mov r8, r0
c824: e1a07000 mov r7, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
c828: ea000011 b c874 <IMFS_memfile_extend+0x134>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
c82c: e1a00004 mov r0, r4
c830: e1a01007 mov r1, r7
c834: ebffff9f bl c6b8 <IMFS_memfile_addblock>
c838: e3500000 cmp r0, #0
c83c: 0a00000b beq c870 <IMFS_memfile_extend+0x130>
c840: ea000003 b c854 <IMFS_memfile_extend+0x114> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
c844: e1a01007 mov r1, r7 <== NOT EXECUTED
c848: e1a00004 mov r0, r4 <== NOT EXECUTED
c84c: ebfffefa bl c43c <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-- ) {
c850: e2477001 sub r7, r7, #1 <== NOT EXECUTED
c854: e1570008 cmp r7, r8 <== NOT EXECUTED
c858: 2afffff9 bcs c844 <IMFS_memfile_extend+0x104> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
c85c: eb000797 bl e6c0 <__errno> <== NOT EXECUTED
c860: e3a0301c mov r3, #28 <== NOT EXECUTED
c864: e5803000 str r3, [r0] <== NOT EXECUTED
c868: e3e00000 mvn r0, #0 <== NOT EXECUTED
c86c: ea000005 b c888 <IMFS_memfile_extend+0x148> <== NOT EXECUTED
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
c870: e2877001 add r7, r7, #1
c874: e157000a cmp r7, sl
c878: 9affffeb bls c82c <IMFS_memfile_extend+0xec>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
c87c: e5846054 str r6, [r4, #84] ; 0x54
c880: e5845050 str r5, [r4, #80] ; 0x50
c884: e3a00000 mov r0, #0
return 0; }
c888: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc}
0000c1bc <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
c1bc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c1c0: e2504000 subs r4, r0, #0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
c1c4: e1a06001 mov r6, r1
c1c8: e1a08002 mov r8, r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c1cc: 059f01d8 ldreq r0, [pc, #472] ; c3ac <IMFS_memfile_get_block_pointer+0x1f0>
c1d0: 03a01fe2 moveq r1, #904 ; 0x388
c1d4: 059f21d4 ldreq r2, [pc, #468] ; c3b0 <IMFS_memfile_get_block_pointer+0x1f4>
c1d8: 059f31d4 ldreq r3, [pc, #468] ; c3b4 <IMFS_memfile_get_block_pointer+0x1f8>
c1dc: 0a000006 beq c1fc <IMFS_memfile_get_block_pointer+0x40>
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
c1e0: e594304c ldr r3, [r4, #76] ; 0x4c
c1e4: e3530005 cmp r3, #5
c1e8: 0a000004 beq c200 <IMFS_memfile_get_block_pointer+0x44>
c1ec: e59f01b8 ldr r0, [pc, #440] ; c3ac <IMFS_memfile_get_block_pointer+0x1f0><== NOT EXECUTED
c1f0: e59f21b8 ldr r2, [pc, #440] ; c3b0 <IMFS_memfile_get_block_pointer+0x1f4><== NOT EXECUTED
c1f4: e59f31bc ldr r3, [pc, #444] ; c3b8 <IMFS_memfile_get_block_pointer+0x1fc><== NOT EXECUTED
c1f8: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED
c1fc: ebfff798 bl a064 <__assert_func> <== NOT EXECUTED
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
c200: e59f31b4 ldr r3, [pc, #436] ; c3bc <IMFS_memfile_get_block_pointer+0x200>
c204: e5935000 ldr r5, [r3]
c208: e1a05125 lsr r5, r5, #2
c20c: e2453001 sub r3, r5, #1
c210: e1510003 cmp r1, r3
c214: 8a00000e bhi c254 <IMFS_memfile_get_block_pointer+0x98>
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
c218: e3520000 cmp r2, #0
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
c21c: e5940058 ldr r0, [r4, #88] ; 0x58
if ( malloc_it ) {
c220: 0a000007 beq c244 <IMFS_memfile_get_block_pointer+0x88>
if ( !p ) {
c224: e3500000 cmp r0, #0
c228: 1a000003 bne c23c <IMFS_memfile_get_block_pointer+0x80>
p = memfile_alloc_block();
c22c: ebffffd5 bl c188 <memfile_alloc_block>
if ( !p )
c230: e3500000 cmp r0, #0
c234: 0a00005a beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->indirect = p;
c238: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
c23c: e5940058 ldr r0, [r4, #88] ; 0x58
c240: ea000001 b c24c <IMFS_memfile_get_block_pointer+0x90>
}
if ( !p )
c244: e3500000 cmp r0, #0
c248: 0a000055 beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return &info->indirect[ my_block ];
c24c: e0800106 add r0, r0, r6, lsl #2
c250: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
c254: e2852001 add r2, r5, #1 <== NOT EXECUTED
c258: e0030295 mul r3, r5, r2 <== NOT EXECUTED
c25c: e2432001 sub r2, r3, #1 <== NOT EXECUTED
c260: e1510002 cmp r1, r2 <== NOT EXECUTED
c264: 8a000015 bhi c2c0 <IMFS_memfile_get_block_pointer+0x104> <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
c268: e0656001 rsb r6, r5, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c26c: e1a00006 mov r0, r6 <== NOT EXECUTED
c270: e1a01005 mov r1, r5 <== NOT EXECUTED
c274: eb002f2f bl 17f38 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c278: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c27c: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c280: e1a00006 mov r0, r6 <== NOT EXECUTED
c284: eb002e97 bl 17ce8 <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
c288: e3580000 cmp r8, #0 <== NOT EXECUTED
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c28c: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->doubly_indirect;
c290: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( malloc_it ) {
c294: 0a00003b beq c388 <IMFS_memfile_get_block_pointer+0x1cc> <== NOT EXECUTED
if ( !p ) {
c298: e3530000 cmp r3, #0 <== NOT EXECUTED
c29c: 1a000003 bne c2b0 <IMFS_memfile_get_block_pointer+0xf4> <== NOT EXECUTED
p = memfile_alloc_block();
c2a0: ebffffb8 bl c188 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
c2a4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
c2a8: 0a00003d beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
info->doubly_indirect = p;
c2ac: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
c2b0: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
c2b4: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
c2b8: e3500000 cmp r0, #0 <== NOT EXECUTED
c2bc: ea000028 b c364 <IMFS_memfile_get_block_pointer+0x1a8> <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
c2c0: e2831001 add r1, r3, #1 <== NOT EXECUTED
c2c4: e0020195 mul r2, r5, r1 <== NOT EXECUTED
c2c8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
c2cc: e1560002 cmp r6, r2 <== NOT EXECUTED
c2d0: 8a000033 bhi c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
c2d4: e0636006 rsb r6, r3, r6 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c2d8: e1a01005 mov r1, r5 <== NOT EXECUTED
c2dc: e1a00006 mov r0, r6 <== NOT EXECUTED
c2e0: eb002f14 bl 17f38 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c2e4: e1a01005 mov r1, r5 <== NOT EXECUTED
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c2e8: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c2ec: e1a00006 mov r0, r6 <== NOT EXECUTED
c2f0: eb002e7c bl 17ce8 <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
c2f4: 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;
c2f8: e1a06000 mov r6, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
c2fc: eb002e79 bl 17ce8 <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
c300: 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;
c304: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
c308: e1a00006 mov r0, r6 <== NOT EXECUTED
c30c: eb002f09 bl 17f38 <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
c310: e3580000 cmp r8, #0 <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
c314: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->triply_indirect;
c318: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if ( malloc_it ) {
c31c: 0a000016 beq c37c <IMFS_memfile_get_block_pointer+0x1c0> <== NOT EXECUTED
if ( !p ) {
c320: e3530000 cmp r3, #0 <== NOT EXECUTED
c324: 1a000003 bne c338 <IMFS_memfile_get_block_pointer+0x17c> <== NOT EXECUTED
p = memfile_alloc_block();
c328: ebffff96 bl c188 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
c32c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
c330: 0a00001b beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
info->triply_indirect = p;
c334: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
c338: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
c33c: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
c340: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
c344: 1a000003 bne c358 <IMFS_memfile_get_block_pointer+0x19c> <== NOT EXECUTED
p1 = memfile_alloc_block();
c348: ebffff8e bl c188 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
c34c: e2502000 subs r2, r0, #0 <== NOT EXECUTED
c350: 0a000013 beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
c354: e5872000 str r2, [r7] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
c358: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED
c35c: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED
if ( !p2 ) {
c360: e3500000 cmp r0, #0 <== NOT EXECUTED
c364: 1a00000c bne c39c <IMFS_memfile_get_block_pointer+0x1e0> <== NOT EXECUTED
p2 = memfile_alloc_block();
c368: ebffff86 bl c188 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
c36c: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
c370: 15850000 strne r0, [r5] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
c374: 1a000008 bne c39c <IMFS_memfile_get_block_pointer+0x1e0> <== NOT EXECUTED
c378: ea000009 b c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
c37c: e3530000 cmp r3, #0 <== NOT EXECUTED
c380: 0a000007 beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== 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 ];
c384: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 )
c388: e3530000 cmp r3, #0 <== NOT EXECUTED
c38c: 0a000004 beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
c390: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
if ( !p2 )
c394: e3500000 cmp r0, #0 <== NOT EXECUTED
c398: 0a000001 beq c3a4 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
return (block_p *)&p2[ singly ];
c39c: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED
c3a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
c3a4: e3a00000 mov r0, #0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
c3a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0000ccc8 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ccc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
cccc: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ccd0: e24dd014 sub sp, sp, #20
ccd4: e1a06003 mov r6, r3
ccd8: e1a08001 mov r8, r1
ccdc: e1a09002 mov r9, r2
cce0: e59d7038 ldr r7, [sp, #56] ; 0x38
/*
* Perform internal consistency checks
*/
assert( the_jnode );
cce4: 059f0268 ldreq r0, [pc, #616] ; cf54 <IMFS_memfile_read+0x28c>
cce8: 03a01f93 moveq r1, #588 ; 0x24c
ccec: 059f2264 ldreq r2, [pc, #612] ; cf58 <IMFS_memfile_read+0x290>
ccf0: 059f3264 ldreq r3, [pc, #612] ; cf5c <IMFS_memfile_read+0x294>
ccf4: 0a000007 beq cd18 <IMFS_memfile_read+0x50>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
ccf8: e594304c ldr r3, [r4, #76] ; 0x4c
ccfc: e2432005 sub r2, r3, #5
cd00: e3520001 cmp r2, #1
cd04: 9a000004 bls cd1c <IMFS_memfile_read+0x54>
cd08: e59f0244 ldr r0, [pc, #580] ; cf54 <IMFS_memfile_read+0x28c><== NOT EXECUTED
cd0c: e59f124c ldr r1, [pc, #588] ; cf60 <IMFS_memfile_read+0x298><== NOT EXECUTED
cd10: e59f2240 ldr r2, [pc, #576] ; cf58 <IMFS_memfile_read+0x290><== NOT EXECUTED
cd14: e59f3248 ldr r3, [pc, #584] ; cf64 <IMFS_memfile_read+0x29c><== NOT EXECUTED
cd18: ebfff4d1 bl a064 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
cd1c: e3560000 cmp r6, #0
cd20: 059f022c ldreq r0, [pc, #556] ; cf54 <IMFS_memfile_read+0x28c>
cd24: 059f123c ldreq r1, [pc, #572] ; cf68 <IMFS_memfile_read+0x2a0>
cd28: 059f2228 ldreq r2, [pc, #552] ; cf58 <IMFS_memfile_read+0x290>
cd2c: 059f3238 ldreq r3, [pc, #568] ; cf6c <IMFS_memfile_read+0x2a4>
cd30: 0afffff8 beq cd18 <IMFS_memfile_read+0x50>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
cd34: e3570000 cmp r7, #0
cd38: 1a000004 bne cd50 <IMFS_memfile_read+0x88>
rtems_set_errno_and_return_minus_one( EINVAL );
cd3c: eb00065f bl e6c0 <__errno> <== NOT EXECUTED
cd40: e3a03016 mov r3, #22 <== NOT EXECUTED
cd44: e5803000 str r3, [r0] <== NOT EXECUTED
cd48: e3e07000 mvn r7, #0 <== NOT EXECUTED
cd4c: ea00007d b cf48 <IMFS_memfile_read+0x280> <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
cd50: e3530006 cmp r3, #6
cd54: 1a000012 bne cda4 <IMFS_memfile_read+0xdc>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
cd58: e2843050 add r3, r4, #80 ; 0x50 <== NOT EXECUTED
cd5c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
cd60: e1a00002 mov r0, r2 <== NOT EXECUTED
cd64: e1a01003 mov r1, r3 <== NOT EXECUTED
cd68: e3a0c000 mov ip, #0 <== NOT EXECUTED
cd6c: e0500008 subs r0, r0, r8 <== NOT EXECUTED
cd70: e0c11009 sbc r1, r1, r9 <== NOT EXECUTED
cd74: e15c0001 cmp ip, 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;
cd78: e594c058 ldr ip, [r4, #88] ; 0x58 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
cd7c: ca000002 bgt cd8c <IMFS_memfile_read+0xc4> <== NOT EXECUTED
cd80: 1a000002 bne cd90 <IMFS_memfile_read+0xc8> <== NOT EXECUTED
cd84: e1570000 cmp r7, r0 <== NOT EXECUTED
cd88: 9a000000 bls cd90 <IMFS_memfile_read+0xc8> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
cd8c: e0687002 rsb r7, r8, r2 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
cd90: e08c1008 add r1, ip, r8 <== NOT EXECUTED
cd94: e1a00006 mov r0, r6 <== NOT EXECUTED
cd98: e1a02007 mov r2, r7 <== NOT EXECUTED
cd9c: eb000855 bl eef8 <memcpy> <== NOT EXECUTED
cda0: ea000063 b cf34 <IMFS_memfile_read+0x26c> <== NOT EXECUTED
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
cda4: e5943054 ldr r3, [r4, #84] ; 0x54
cda8: e3a02000 mov r2, #0
cdac: e1520003 cmp r2, r3
cdb0: e5945050 ldr r5, [r4, #80] ; 0x50
/*
* 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;
cdb4: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
cdb8: e0872001 add r2, r7, r1
cdbc: ca000004 bgt cdd4 <IMFS_memfile_read+0x10c>
cdc0: 1a000001 bne cdcc <IMFS_memfile_read+0x104>
cdc4: e1520005 cmp r2, r5
cdc8: 8a000001 bhi cdd4 <IMFS_memfile_read+0x10c>
cdcc: e1a05007 mov r5, r7 <== NOT EXECUTED
cdd0: ea000000 b cdd8 <IMFS_memfile_read+0x110> <== NOT EXECUTED
my_length = the_jnode->info.file.size - start;
cdd4: e0635005 rsb r5, r3, r5
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
cdd8: e59f3190 ldr r3, [pc, #400] ; cf70 <IMFS_memfile_read+0x2a8>
cddc: e593a000 ldr sl, [r3]
cde0: e1a0b00a mov fp, sl
cde4: e1a0cfcb asr ip, fp, #31
cde8: e1a0300c mov r3, ip
cdec: e1a00008 mov r0, r8
cdf0: e1a01009 mov r1, r9
cdf4: e1a0200b mov r2, fp
cdf8: e58dc000 str ip, [sp]
cdfc: eb003024 bl 18e94 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ce00: e59dc000 ldr ip, [sp]
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ce04: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ce08: e1a01009 mov r1, r9
ce0c: e1a00008 mov r0, r8
ce10: e1a0200b mov r2, fp
ce14: e1a0300c mov r3, ip
ce18: eb002ef3 bl 189ec <__divdi3>
if ( start_offset ) {
ce1c: e3570000 cmp r7, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ce20: e1a08000 mov r8, r0
if ( start_offset ) {
ce24: 058d6008 streq r6, [sp, #8]
ce28: 01a09007 moveq r9, r7
ce2c: 0a000013 beq ce80 <IMFS_memfile_read+0x1b8>
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 );
ce30: e1a00004 mov r0, r4
ce34: e1a01008 mov r1, r8
ce38: e3a02000 mov r2, #0
ce3c: ebfffcde bl c1bc <IMFS_memfile_get_block_pointer>
assert( block_ptr );
ce40: e3500000 cmp r0, #0
ce44: 059f0108 ldreq r0, [pc, #264] ; cf54 <IMFS_memfile_read+0x28c>
ce48: 059f1124 ldreq r1, [pc, #292] ; cf74 <IMFS_memfile_read+0x2ac>
ce4c: 0a000030 beq cf14 <IMFS_memfile_read+0x24c>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
ce50: 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;
ce54: e067900a rsb r9, r7, sl
ce58: e1550009 cmp r5, r9
ce5c: 31a09005 movcc r9, 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 );
ce60: e1a00006 mov r0, r6
ce64: e0811007 add r1, r1, r7
ce68: e1a02009 mov r2, r9
dest += to_copy;
ce6c: e0866009 add r6, r6, r9
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 );
ce70: eb000820 bl eef8 <memcpy>
dest += to_copy;
ce74: e58d6008 str r6, [sp, #8]
block++;
ce78: e2888001 add r8, r8, #1
my_length -= to_copy;
ce7c: e0695005 rsb r5, r9, r5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ce80: e59f30e8 ldr r3, [pc, #232] ; cf70 <IMFS_memfile_read+0x2a8>
ce84: e3a06000 mov r6, #0
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ce88: e1a0b003 mov fp, r3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ce8c: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ce90: ea00000e b ced0 <IMFS_memfile_read+0x208>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ce94: e1a00004 mov r0, r4
ce98: e1a01008 mov r1, r8
ce9c: e3a02000 mov r2, #0
cea0: ebfffcc5 bl c1bc <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cea4: e2503000 subs r3, r0, #0
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
cea8: e086600a add r6, r6, sl
assert( block_ptr );
ceac: 059f00a0 ldreq r0, [pc, #160] ; cf54 <IMFS_memfile_read+0x28c>
ceb0: 059f10c0 ldreq r1, [pc, #192] ; cf78 <IMFS_memfile_read+0x2b0>
ceb4: 0a000016 beq cf14 <IMFS_memfile_read+0x24c>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
ceb8: e59d0004 ldr r0, [sp, #4]
cebc: e5931000 ldr r1, [r3]
cec0: e1a0200a mov r2, sl
cec4: eb00080b bl eef8 <memcpy>
dest += to_copy;
block++;
cec8: e2888001 add r8, r8, #1
my_length -= to_copy;
cecc: 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 ) {
ced0: e59b3000 ldr r3, [fp]
ced4: e1550003 cmp r5, r3
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
ced8: e59d3008 ldr r3, [sp, #8]
cedc: e0833006 add r3, r3, r6
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
cee0: e0867009 add r7, r6, r9
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
cee4: e58d3004 str r3, [sp, #4]
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
cee8: 2affffe9 bcs ce94 <IMFS_memfile_read+0x1cc>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
ceec: e3550000 cmp r5, #0
cef0: 0a00000f beq cf34 <IMFS_memfile_read+0x26c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
cef4: e1a01008 mov r1, r8
cef8: e1a00004 mov r0, r4
cefc: e3a02000 mov r2, #0
cf00: ebfffcad bl c1bc <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cf04: e2503000 subs r3, r0, #0
cf08: 1a000004 bne cf20 <IMFS_memfile_read+0x258>
cf0c: e59f0040 ldr r0, [pc, #64] ; cf54 <IMFS_memfile_read+0x28c><== NOT EXECUTED
cf10: e59f1064 ldr r1, [pc, #100] ; cf7c <IMFS_memfile_read+0x2b4><== NOT EXECUTED
cf14: e59f203c ldr r2, [pc, #60] ; cf58 <IMFS_memfile_read+0x290><== NOT EXECUTED
cf18: e59f3060 ldr r3, [pc, #96] ; cf80 <IMFS_memfile_read+0x2b8><== NOT EXECUTED
cf1c: eaffff7d b cd18 <IMFS_memfile_read+0x50> <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
cf20: e59d0004 ldr r0, [sp, #4]
cf24: e5931000 ldr r1, [r3]
cf28: e1a02005 mov r2, r5
cf2c: eb0007f1 bl eef8 <memcpy>
copied += my_length;
cf30: e0857007 add r7, r5, r7
}
IMFS_update_atime( the_jnode );
cf34: e28d000c add r0, sp, #12
cf38: e3a01000 mov r1, #0
cf3c: ebffd3f0 bl 1f04 <gettimeofday>
cf40: e59d300c ldr r3, [sp, #12]
cf44: e5843040 str r3, [r4, #64] ; 0x40
return copied;
}
cf48: e1a00007 mov r0, r7
cf4c: e28dd014 add sp, sp, #20
cf50: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000c488 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
c488: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c48c: e2504000 subs r4, r0, #0
c490: 059f012c ldreq r0, [pc, #300] ; c5c4 <IMFS_memfile_remove+0x13c>
c494: 059f112c ldreq r1, [pc, #300] ; c5c8 <IMFS_memfile_remove+0x140>
c498: 059f212c ldreq r2, [pc, #300] ; c5cc <IMFS_memfile_remove+0x144>
c49c: 059f312c ldreq r3, [pc, #300] ; c5d0 <IMFS_memfile_remove+0x148>
c4a0: 0a000006 beq c4c0 <IMFS_memfile_remove+0x38>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c4a4: e594304c ldr r3, [r4, #76] ; 0x4c
c4a8: e3530005 cmp r3, #5
c4ac: 0a000004 beq c4c4 <IMFS_memfile_remove+0x3c>
c4b0: e59f010c ldr r0, [pc, #268] ; c5c4 <IMFS_memfile_remove+0x13c><== NOT EXECUTED
c4b4: e59f1118 ldr r1, [pc, #280] ; c5d4 <IMFS_memfile_remove+0x14c><== NOT EXECUTED
c4b8: e59f210c ldr r2, [pc, #268] ; c5cc <IMFS_memfile_remove+0x144><== NOT EXECUTED
c4bc: e59f3114 ldr r3, [pc, #276] ; c5d8 <IMFS_memfile_remove+0x150><== NOT EXECUTED
c4c0: ebfff6e7 bl a064 <__assert_func> <== NOT EXECUTED
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
c4c4: e59f2110 ldr r2, [pc, #272] ; c5dc <IMFS_memfile_remove+0x154>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c4c8: e5943058 ldr r3, [r4, #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;
c4cc: e5925000 ldr r5, [r2]
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c4d0: 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;
c4d4: e1a05125 lsr r5, r5, #2
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
c4d8: 12840058 addne r0, r4, #88 ; 0x58
c4dc: 11a01005 movne r1, r5
c4e0: 1bffffb6 blne c3c0 <memfile_free_blocks_in_table>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c4e4: e594305c ldr r3, [r4, #92] ; 0x5c
c4e8: e3530000 cmp r3, #0
c4ec: 13a06000 movne r6, #0
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
c4f0: 159f70e4 ldrne r7, [pc, #228] ; c5dc <IMFS_memfile_remove+0x154>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c4f4: 1a000008 bne c51c <IMFS_memfile_remove+0x94>
c4f8: ea00000d b c534 <IMFS_memfile_remove+0xac>
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
c4fc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
c500: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED
c504: e3520000 cmp r2, #0 <== NOT EXECUTED
c508: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED
memfile_free_blocks_in_table(
c50c: 10830000 addne r0, r3, r0 <== NOT EXECUTED
c510: 11a01005 movne r1, r5 <== NOT EXECUTED
c514: 1bffffa9 blne c3c0 <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++ ) {
c518: e2866001 add r6, r6, #1 <== NOT EXECUTED
c51c: e5973000 ldr r3, [r7] <== NOT EXECUTED
c520: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
c524: 3afffff4 bcc c4fc <IMFS_memfile_remove+0x74> <== 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 );
c528: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED
c52c: e1a01005 mov r1, r5 <== NOT EXECUTED
c530: ebffffa2 bl c3c0 <memfile_free_blocks_in_table> <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c534: e5943060 ldr r3, [r4, #96] ; 0x60
c538: e3530000 cmp r3, #0
c53c: 13a06000 movne r6, #0
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
c540: 159fa094 ldrne sl, [pc, #148] ; c5dc <IMFS_memfile_remove+0x154>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c544: 1a000016 bne c5a4 <IMFS_memfile_remove+0x11c>
c548: ea00001b b c5bc <IMFS_memfile_remove+0x134>
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
c54c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
c550: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
c554: e3570000 cmp r7, #0 <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c558: e1a09106 lsl r9, r6, #2 <== 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 */
c55c: 0a000013 beq c5b0 <IMFS_memfile_remove+0x128> <== NOT EXECUTED
c560: e3a08000 mov r8, #0 <== NOT EXECUTED
c564: ea000006 b c584 <IMFS_memfile_remove+0xfc> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
c568: e5973000 ldr r3, [r7] <== NOT EXECUTED
c56c: e3530000 cmp r3, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
c570: 11a00007 movne r0, r7 <== NOT EXECUTED
c574: 11a01005 movne r1, r5 <== NOT EXECUTED
c578: 1bffff90 blne c3c0 <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++ ) {
c57c: e2888001 add r8, r8, #1 <== NOT EXECUTED
c580: e2877004 add r7, r7, #4 <== NOT EXECUTED
c584: e59a3000 ldr r3, [sl] <== NOT EXECUTED
c588: e1580123 cmp r8, r3, lsr #2 <== NOT EXECUTED
c58c: 3afffff5 bcc c568 <IMFS_memfile_remove+0xe0> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
c590: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
c594: e1a01005 mov r1, r5 <== NOT EXECUTED
c598: e0800009 add r0, r0, r9 <== NOT EXECUTED
c59c: ebffff87 bl c3c0 <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++ ) {
c5a0: e2866001 add r6, r6, #1 <== NOT EXECUTED
c5a4: e59a3000 ldr r3, [sl] <== NOT EXECUTED
c5a8: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
c5ac: 3affffe6 bcc c54c <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
c5b0: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
c5b4: e1a01005 mov r1, r5 <== NOT EXECUTED
c5b8: ebffff80 bl c3c0 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
c5bc: e3a00000 mov r0, #0
c5c0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0000c43c <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
c43c: 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 );
c440: e3a02000 mov r2, #0 <== NOT EXECUTED
c444: ebffff5c bl c1bc <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
c448: e2503000 subs r3, r0, #0 <== NOT EXECUTED
c44c: 059f0024 ldreq r0, [pc, #36] ; c478 <IMFS_memfile_remove_block+0x3c><== NOT EXECUTED
c450: 059f1024 ldreq r1, [pc, #36] ; c47c <IMFS_memfile_remove_block+0x40><== NOT EXECUTED
c454: 059f2024 ldreq r2, [pc, #36] ; c480 <IMFS_memfile_remove_block+0x44><== NOT EXECUTED
c458: 059f3024 ldreq r3, [pc, #36] ; c484 <IMFS_memfile_remove_block+0x48><== NOT EXECUTED
c45c: 0bfff700 bleq a064 <__assert_func> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
*block_ptr = 0;
c460: 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;
c464: e5930000 ldr r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
c468: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
c46c: ebffff3d bl c168 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
c470: e3a00001 mov r0, #1 <== NOT EXECUTED
c474: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000c998 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
c998: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c99c: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
c9a0: e1a08001 mov r8, r1
c9a4: e1a0a002 mov sl, r2
c9a8: e1a06003 mov r6, r3
c9ac: e59d5030 ldr r5, [sp, #48] ; 0x30
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c9b0: 059f0204 ldreq r0, [pc, #516] ; cbbc <IMFS_memfile_write+0x224>
c9b4: 059f1204 ldreq r1, [pc, #516] ; cbc0 <IMFS_memfile_write+0x228>
c9b8: 059f2204 ldreq r2, [pc, #516] ; cbc4 <IMFS_memfile_write+0x22c>
c9bc: 059f3204 ldreq r3, [pc, #516] ; cbc8 <IMFS_memfile_write+0x230>
c9c0: 0a000006 beq c9e0 <IMFS_memfile_write+0x48>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c9c4: e594304c ldr r3, [r4, #76] ; 0x4c
c9c8: e3530005 cmp r3, #5
c9cc: 0a000004 beq c9e4 <IMFS_memfile_write+0x4c>
c9d0: e59f01e4 ldr r0, [pc, #484] ; cbbc <IMFS_memfile_write+0x224><== NOT EXECUTED
c9d4: e59f11f0 ldr r1, [pc, #496] ; cbcc <IMFS_memfile_write+0x234><== NOT EXECUTED
c9d8: e59f21e4 ldr r2, [pc, #484] ; cbc4 <IMFS_memfile_write+0x22c><== NOT EXECUTED
c9dc: e59f31ec ldr r3, [pc, #492] ; cbd0 <IMFS_memfile_write+0x238><== NOT EXECUTED
c9e0: ebfff59f bl a064 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
c9e4: e3560000 cmp r6, #0
c9e8: 059f01cc ldreq r0, [pc, #460] ; cbbc <IMFS_memfile_write+0x224>
c9ec: 059f11e0 ldreq r1, [pc, #480] ; cbd4 <IMFS_memfile_write+0x23c>
c9f0: 059f21cc ldreq r2, [pc, #460] ; cbc4 <IMFS_memfile_write+0x22c>
c9f4: 059f31dc ldreq r3, [pc, #476] ; cbd8 <IMFS_memfile_write+0x240>
c9f8: 0afffff8 beq c9e0 <IMFS_memfile_write+0x48>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
c9fc: e3550000 cmp r5, #0
ca00: 1a000002 bne ca10 <IMFS_memfile_write+0x78>
rtems_set_errno_and_return_minus_one( EINVAL );
ca04: eb00072d bl e6c0 <__errno> <== NOT EXECUTED
ca08: e3a03016 mov r3, #22 <== NOT EXECUTED
ca0c: ea00000e b ca4c <IMFS_memfile_write+0xb4> <== NOT EXECUTED
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
ca10: e5943054 ldr r3, [r4, #84] ; 0x54
ca14: e3530000 cmp r3, #0
ca18: e0851001 add r1, r5, r1
ca1c: ba000003 blt ca30 <IMFS_memfile_write+0x98>
ca20: 1a00000c bne ca58 <IMFS_memfile_write+0xc0>
ca24: e5943050 ldr r3, [r4, #80] ; 0x50
ca28: e1530001 cmp r3, r1
ca2c: 2a000009 bcs ca58 <IMFS_memfile_write+0xc0>
status = IMFS_memfile_extend( the_jnode, last_byte );
ca30: e1a00004 mov r0, r4
ca34: e3a02000 mov r2, #0
ca38: ebffff40 bl c740 <IMFS_memfile_extend>
if ( status )
ca3c: e3500000 cmp r0, #0
ca40: 0a000004 beq ca58 <IMFS_memfile_write+0xc0>
rtems_set_errno_and_return_minus_one( ENOSPC );
ca44: eb00071d bl e6c0 <__errno> <== NOT EXECUTED
ca48: e3a0301c mov r3, #28 <== NOT EXECUTED
ca4c: e5803000 str r3, [r0] <== NOT EXECUTED
ca50: e3e07000 mvn r7, #0 <== NOT EXECUTED
ca54: ea000056 b cbb4 <IMFS_memfile_write+0x21c> <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ca58: e59f317c ldr r3, [pc, #380] ; cbdc <IMFS_memfile_write+0x244>
ca5c: e5939000 ldr r9, [r3]
ca60: e1a0b009 mov fp, r9
ca64: e1a0cfcb asr ip, fp, #31
ca68: e1a0300c mov r3, ip
ca6c: e1a00008 mov r0, r8
ca70: e1a0200b mov r2, fp
ca74: e1a0100a mov r1, sl
ca78: e58dc000 str ip, [sp]
ca7c: eb003104 bl 18e94 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ca80: e59dc000 ldr ip, [sp]
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ca84: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ca88: e1a0100a mov r1, sl
ca8c: e1a00008 mov r0, r8
ca90: e1a0200b mov r2, fp
ca94: e1a0300c mov r3, ip
ca98: eb002fd3 bl 189ec <__divdi3>
if ( start_offset ) {
ca9c: e3570000 cmp r7, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
caa0: e1a08000 mov r8, r0
if ( start_offset ) {
caa4: 0a000013 beq caf8 <IMFS_memfile_write+0x160>
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 );
caa8: e1a01008 mov r1, r8
caac: e1a00004 mov r0, r4
cab0: e3a02000 mov r2, #0
cab4: ebfffdc0 bl c1bc <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cab8: e3500000 cmp r0, #0
cabc: 059f00f8 ldreq r0, [pc, #248] ; cbbc <IMFS_memfile_write+0x224>
cac0: 03a01fc7 moveq r1, #796 ; 0x31c
cac4: 0a00002c beq cb7c <IMFS_memfile_write+0x1e4>
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 );
cac8: 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;
cacc: e067a009 rsb sl, r7, r9
cad0: e15a0005 cmp sl, r5
cad4: 21a0a005 movcs sl, r5
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 );
cad8: e0800007 add r0, r0, r7
cadc: e1a01006 mov r1, r6
cae0: e1a0200a mov r2, sl
cae4: eb000903 bl eef8 <memcpy>
src += to_copy;
cae8: e086600a add r6, r6, sl
block++;
caec: e2888001 add r8, r8, #1
my_length -= to_copy;
caf0: e06a5005 rsb r5, sl, r5
copied += to_copy;
caf4: e1a0700a mov r7, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
caf8: e59f30dc ldr r3, [pc, #220] ; cbdc <IMFS_memfile_write+0x244>
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
cafc: e1a09003 mov r9, r3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
cb00: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
cb04: ea00000f b cb48 <IMFS_memfile_write+0x1b0>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
cb08: e1a00004 mov r0, r4
cb0c: e1a01008 mov r1, r8
cb10: e3a02000 mov r2, #0
cb14: ebfffda8 bl c1bc <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cb18: e3500000 cmp r0, #0
cb1c: 059f0098 ldreq r0, [pc, #152] ; cbbc <IMFS_memfile_write+0x224>
cb20: 03a01e33 moveq r1, #816 ; 0x330
cb24: 0a000014 beq cb7c <IMFS_memfile_write+0x1e4>
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 );
cb28: e1a01006 mov r1, r6
cb2c: e5900000 ldr r0, [r0]
cb30: e1a0200a mov r2, sl
cb34: eb0008ef bl eef8 <memcpy>
src += to_copy;
cb38: e086600a add r6, r6, sl
block++;
cb3c: e2888001 add r8, r8, #1
my_length -= to_copy;
cb40: e06a5005 rsb r5, sl, r5
*
* 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(
cb44: e087700a add r7, r7, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
cb48: e5993000 ldr r3, [r9]
cb4c: e1550003 cmp r5, r3
cb50: 2affffec bcs cb08 <IMFS_memfile_write+0x170>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
cb54: e3550000 cmp r5, #0
cb58: 0a00000f beq cb9c <IMFS_memfile_write+0x204>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
cb5c: e1a01008 mov r1, r8
cb60: e1a00004 mov r0, r4
cb64: e3a02000 mov r2, #0
cb68: ebfffd93 bl c1bc <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cb6c: e3500000 cmp r0, #0
cb70: 1a000004 bne cb88 <IMFS_memfile_write+0x1f0>
cb74: e59f0040 ldr r0, [pc, #64] ; cbbc <IMFS_memfile_write+0x224><== NOT EXECUTED
cb78: e59f1060 ldr r1, [pc, #96] ; cbe0 <IMFS_memfile_write+0x248><== NOT EXECUTED
cb7c: e59f2040 ldr r2, [pc, #64] ; cbc4 <IMFS_memfile_write+0x22c><== NOT EXECUTED
cb80: e59f305c ldr r3, [pc, #92] ; cbe4 <IMFS_memfile_write+0x24c><== NOT EXECUTED
cb84: eaffff95 b c9e0 <IMFS_memfile_write+0x48> <== NOT EXECUTED
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
cb88: e5900000 ldr r0, [r0]
cb8c: e1a01006 mov r1, r6
cb90: e1a02005 mov r2, r5
cb94: eb0008d7 bl eef8 <memcpy>
my_length = 0;
copied += to_copy;
cb98: e0877005 add r7, r7, r5
}
IMFS_mtime_ctime_update( the_jnode );
cb9c: e28d0004 add r0, sp, #4
cba0: e3a01000 mov r1, #0
cba4: ebffd4d6 bl 1f04 <gettimeofday>
cba8: e59d3004 ldr r3, [sp, #4]
cbac: e5843048 str r3, [r4, #72] ; 0x48
cbb0: e5843044 str r3, [r4, #68] ; 0x44
return copied;
}
cbb4: e1a00007 mov r0, r7
cbb8: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00001680 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
1680: e92d40f0 push {r4, r5, r6, r7, lr}
1684: e24dd040 sub sp, sp, #64 ; 0x40
1688: e1a04001 mov r4, r1
168c: e1a07000 mov r7, r0
1690: e1a06002 mov r6, r2
1694: e1a05003 mov r5, r3
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 );
1698: eb00380d bl f6d4 <strlen>
169c: e28d303c add r3, sp, #60 ; 0x3c
16a0: e1a01000 mov r1, r0
16a4: e28d2004 add r2, sp, #4
16a8: e1a00007 mov r0, r7
16ac: eb0021d5 bl 9e08 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
16b0: e2043a0f and r3, r4, #61440 ; 0xf000
16b4: e3530901 cmp r3, #16384 ; 0x4000
16b8: 0a00000e beq 16f8 <IMFS_mknod+0x78>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
16bc: e3530902 cmp r3, #32768 ; 0x8000
16c0: 03a01005 moveq r1, #5
16c4: 0a00000c beq 16fc <IMFS_mknod+0x7c>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
16c8: e3530a06 cmp r3, #24576 ; 0x6000
16cc: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
16d0: 058d6028 streq r6, [sp, #40] ; 0x28
16d4: 058d502c streq r5, [sp, #44] ; 0x2c
16d8: 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) ) {
16dc: 0a000006 beq 16fc <IMFS_mknod+0x7c>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
16e0: e3530a01 cmp r3, #4096 ; 0x1000
16e4: 03a01007 moveq r1, #7
16e8: 0a000003 beq 16fc <IMFS_mknod+0x7c>
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
16ec: eb0033f3 bl e6c0 <__errno> <== NOT EXECUTED
16f0: e3a03016 mov r3, #22 <== NOT EXECUTED
16f4: ea00000b b 1728 <IMFS_mknod+0xa8> <== NOT EXECUTED
16f8: e3a01001 mov r1, #1
* 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(
16fc: e28dc028 add ip, sp, #40 ; 0x28
1700: e59d0054 ldr r0, [sp, #84] ; 0x54
1704: e1a03004 mov r3, r4
1708: e28d2004 add r2, sp, #4
170c: e58dc000 str ip, [sp]
1710: eb001ebe bl 9210 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
1714: e3500000 cmp r0, #0
1718: 13a00000 movne r0, #0
171c: 1a000003 bne 1730 <IMFS_mknod+0xb0>
rtems_set_errno_and_return_minus_one( ENOMEM );
1720: eb0033e6 bl e6c0 <__errno> <== NOT EXECUTED
1724: e3a0300c mov r3, #12 <== NOT EXECUTED
1728: e5803000 str r3, [r0] <== NOT EXECUTED
172c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return 0;
}
1730: e28dd040 add sp, sp, #64 ; 0x40
1734: e8bd80f0 pop {r4, r5, r6, r7, pc}
00001738 <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1738: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
173c: e593204c ldr r2, [r3, #76] ; 0x4c
1740: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1744: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1748: 0a000004 beq 1760 <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
174c: eb0033db bl e6c0 <__errno> <== NOT EXECUTED
1750: e3a03014 mov r3, #20 <== NOT EXECUTED
1754: e5803000 str r3, [r0] <== NOT EXECUTED
1758: e3e00000 mvn r0, #0 <== NOT EXECUTED
175c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
1760: e583005c str r0, [r3, #92] ; 0x5c
1764: e3a00000 mov r0, #0
return 0; }
1768: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00003c78 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
3c78: e92d4030 push {r4, r5, lr}
assert( the_jnode );
3c7c: e2504000 subs r4, r0, #0
3c80: 059f0130 ldreq r0, [pc, #304] ; 3db8 <IMFS_print_jnode+0x140>
3c84: 03a01038 moveq r1, #56 ; 0x38
3c88: 059f212c ldreq r2, [pc, #300] ; 3dbc <IMFS_print_jnode+0x144>
3c8c: 059f312c ldreq r3, [pc, #300] ; 3dc0 <IMFS_print_jnode+0x148>
3c90: 0a00002f beq 3d54 <IMFS_print_jnode+0xdc>
fprintf(stdout, "%s", the_jnode->name );
3c94: e59f5128 ldr r5, [pc, #296] ; 3dc4 <IMFS_print_jnode+0x14c>
3c98: e5953000 ldr r3, [r5]
3c9c: e284000c add r0, r4, #12
3ca0: e5931008 ldr r1, [r3, #8]
3ca4: eb003b98 bl 12b0c <fputs>
switch( the_jnode->type ) {
3ca8: e594204c ldr r2, [r4, #76] ; 0x4c
3cac: e2423001 sub r3, r2, #1
3cb0: e3530006 cmp r3, #6
3cb4: 979ff103 ldrls pc, [pc, r3, lsl #2]
3cb8: ea000034 b 3d90 <IMFS_print_jnode+0x118> <== NOT EXECUTED
3cbc: 00003cd8 .word 0x00003cd8 <== NOT EXECUTED
3cc0: 00003cec .word 0x00003cec <== NOT EXECUTED
3cc4: 00003d34 .word 0x00003d34 <== NOT EXECUTED
3cc8: 00003d58 .word 0x00003d58 <== NOT EXECUTED
3ccc: 00003d1c .word 0x00003d1c <== NOT EXECUTED
3cd0: 00003d00 .word 0x00003d00 <== NOT EXECUTED
3cd4: 00003d74 .word 0x00003d74 <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
3cd8: e5953000 ldr r3, [r5]
3cdc: e3a0002f mov r0, #47 ; 0x2f
3ce0: e5931008 ldr r1, [r3, #8]
3ce4: eb003b43 bl 129f8 <fputc>
break;
3ce8: ea00002f b 3dac <IMFS_print_jnode+0x134>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
3cec: e5952000 ldr r2, [r5]
3cf0: e5943054 ldr r3, [r4, #84] ; 0x54
3cf4: e5920008 ldr r0, [r2, #8]
3cf8: e59f10c8 ldr r1, [pc, #200] ; 3dc8 <IMFS_print_jnode+0x150>
3cfc: ea000003 b 3d10 <IMFS_print_jnode+0x98>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
3d00: e5952000 ldr r2, [r5] <== NOT EXECUTED
3d04: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
3d08: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
3d0c: e59f10b8 ldr r1, [pc, #184] ; 3dcc <IMFS_print_jnode+0x154><== NOT EXECUTED
3d10: e5942050 ldr r2, [r4, #80] ; 0x50
3d14: eb003b1b bl 12988 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
3d18: ea000023 b 3dac <IMFS_print_jnode+0x134>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
3d1c: e5953000 ldr r3, [r5]
3d20: e5942050 ldr r2, [r4, #80] ; 0x50
3d24: e5930008 ldr r0, [r3, #8]
3d28: e59f10a0 ldr r1, [pc, #160] ; 3dd0 <IMFS_print_jnode+0x158>
3d2c: eb003b15 bl 12988 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
3d30: ea00001d b 3dac <IMFS_print_jnode+0x134>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
3d34: e5953000 ldr r3, [r5] <== NOT EXECUTED
3d38: e59f0094 ldr r0, [pc, #148] ; 3dd4 <IMFS_print_jnode+0x15c><== NOT EXECUTED
3d3c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
3d40: eb003b71 bl 12b0c <fputs> <== NOT EXECUTED
assert(0);
3d44: e59f006c ldr r0, [pc, #108] ; 3db8 <IMFS_print_jnode+0x140><== NOT EXECUTED
3d48: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED
3d4c: e59f2068 ldr r2, [pc, #104] ; 3dbc <IMFS_print_jnode+0x144><== NOT EXECUTED
3d50: e59f3080 ldr r3, [pc, #128] ; 3dd8 <IMFS_print_jnode+0x160><== NOT EXECUTED
3d54: eb000245 bl 4670 <__assert_func> <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
3d58: e5953000 ldr r3, [r5] <== NOT EXECUTED
3d5c: e59f0070 ldr r0, [pc, #112] ; 3dd4 <IMFS_print_jnode+0x15c><== NOT EXECUTED
3d60: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
3d64: eb003b68 bl 12b0c <fputs> <== NOT EXECUTED
assert(0);
3d68: e59f0048 ldr r0, [pc, #72] ; 3db8 <IMFS_print_jnode+0x140> <== NOT EXECUTED
3d6c: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED
3d70: eafffff5 b 3d4c <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
3d74: e5953000 ldr r3, [r5] <== NOT EXECUTED
3d78: e59f005c ldr r0, [pc, #92] ; 3ddc <IMFS_print_jnode+0x164> <== NOT EXECUTED
3d7c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
3d80: eb003b61 bl 12b0c <fputs> <== NOT EXECUTED
assert(0);
3d84: e59f002c ldr r0, [pc, #44] ; 3db8 <IMFS_print_jnode+0x140> <== NOT EXECUTED
3d88: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED
3d8c: eaffffee b 3d4c <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
3d90: e5953000 ldr r3, [r5] <== NOT EXECUTED
3d94: e59f1044 ldr r1, [pc, #68] ; 3de0 <IMFS_print_jnode+0x168> <== NOT EXECUTED
3d98: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
3d9c: eb003af9 bl 12988 <fprintf> <== NOT EXECUTED
assert(0);
3da0: e59f0010 ldr r0, [pc, #16] ; 3db8 <IMFS_print_jnode+0x140> <== NOT EXECUTED
3da4: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED
3da8: eaffffe7 b 3d4c <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break;
}
puts("");
3dac: e59f0030 ldr r0, [pc, #48] ; 3de4 <IMFS_print_jnode+0x16c>
}
3db0: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
3db4: ea004222 b 14644 <puts>
00001778 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
int i;
node = loc->node_access;
1778: e5903000 ldr r3, [r0]
if ( node->type != IMFS_SYM_LINK )
177c: e593004c ldr r0, [r3, #76] ; 0x4c
1780: e3500004 cmp r0, #4
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
1784: e52de004 push {lr} ; (str lr, [sp, #-4]!)
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
1788: 03a00000 moveq r0, #0
178c: 0a000006 beq 17ac <IMFS_readlink+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
1790: eb0033ca bl e6c0 <__errno> <== NOT EXECUTED
1794: e3a03016 mov r3, #22 <== NOT EXECUTED
1798: e5803000 str r3, [r0] <== NOT EXECUTED
179c: e3e00000 mvn r0, #0 <== NOT EXECUTED
17a0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
17a4: e7c1c000 strb ip, [r1, r0]
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++ )
17a8: e2800001 add r0, r0, #1
17ac: e1500002 cmp r0, r2
17b0: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4)
17b4: e593c050 ldr ip, [r3, #80] ; 0x50
17b8: e7dcc000 ldrb ip, [ip, r0]
17bc: e35c0000 cmp ip, #0
17c0: 1afffff7 bne 17a4 <IMFS_readlink+0x2c>
buf[i] = node->info.sym_link.name[i];
return i;
}
17c4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00009f84 <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
9f84: e5903000 ldr r3, [r0]
switch ( the_jnode->type ) {
9f88: e593204c ldr r2, [r3, #76] ; 0x4c
9f8c: e2422002 sub r2, r2, #2
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
9f90: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
9f94: e3520005 cmp r2, #5
9f98: 979ff102 ldrls pc, [pc, r2, lsl #2]
9f9c: ea000012 b 9fec <IMFS_stat+0x68> <== NOT EXECUTED
9fa0: 00009fb8 .word 0x00009fb8 <== NOT EXECUTED
9fa4: 00009fec .word 0x00009fec <== NOT EXECUTED
9fa8: 00009fd8 .word 0x00009fd8 <== NOT EXECUTED
9fac: 00009fcc .word 0x00009fcc <== NOT EXECUTED
9fb0: 00009fcc .word 0x00009fcc <== NOT EXECUTED
9fb4: 00009fd8 .word 0x00009fd8 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
9fb8: e2832050 add r2, r3, #80 ; 0x50
9fbc: e8921004 ldm r2, {r2, ip}
9fc0: e581c01c str ip, [r1, #28]
9fc4: e5812018 str r2, [r1, #24]
break;
9fc8: ea00000c b a000 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
9fcc: e283c050 add ip, r3, #80 ; 0x50
9fd0: e89c1800 ldm ip, {fp, ip}
9fd4: ea000001 b 9fe0 <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
9fd8: e3a0b000 mov fp, #0 <== NOT EXECUTED
9fdc: e3a0c000 mov ip, #0 <== NOT EXECUTED
9fe0: e581b020 str fp, [r1, #32]
9fe4: e581c024 str ip, [r1, #36] ; 0x24
break;
9fe8: ea000004 b a000 <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
9fec: eb0011b3 bl e6c0 <__errno> <== NOT EXECUTED
9ff0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
9ff4: e5803000 str r3, [r0] <== NOT EXECUTED
9ff8: e3e00000 mvn r0, #0 <== NOT EXECUTED
9ffc: e8bd8800 pop {fp, pc} <== 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;
a000: e5932030 ldr r2, [r3, #48] ; 0x30
a004: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
a008: e5932038 ldr r2, [r3, #56] ; 0x38
a00c: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
a010: e5932040 ldr r2, [r3, #64] ; 0x40
a014: e5812028 str r2, [r1, #40] ; 0x28
* 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 );
a018: e5902010 ldr r2, [r0, #16]
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
a01c: e1d3c3b4 ldrh ip, [r3, #52] ; 0x34
* 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 );
a020: e5922034 ldr r2, [r2, #52] ; 0x34
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
a024: e5930044 ldr r0, [r3, #68] ; 0x44
* 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 );
a028: e5922000 ldr r2, [r2]
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
a02c: 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;
buf->st_mtime = the_jnode->stat_mtime;
a030: e5810030 str r0, [r1, #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 =
a034: e5812004 str r2, [r1, #4]
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;
a038: e1d323bc ldrh r2, [r3, #60] ; 0x3c
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;
a03c: e5930048 ldr r0, [r3, #72] ; 0x48
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;
a040: e1c121b2 strh r2, [r1, #18]
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;
a044: 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;
a048: 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 =
a04c: e59f000c ldr r0, [pc, #12] ; a060 <IMFS_stat+0xdc>
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;
a050: e1c131b4 strh r3, [r1, #20]
/* * 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 =
a054: e5810000 str r0, [r1]
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;
a058: e3a00000 mov r0, #0
return 0;
}
a05c: e8bd8800 pop {fp, pc}
00001824 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1824: e92d40f0 push {r4, r5, r6, r7, lr}
1828: e1a05000 mov r5, r0
182c: 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 );
1830: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1834: e1a07002 mov r7, r2
1838: e1a06001 mov r6, r1
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
183c: eb0037a4 bl f6d4 <strlen>
1840: e28d4004 add r4, sp, #4
1844: e1a01000 mov r1, r0
1848: e1a02004 mov r2, r4
184c: e28d303c add r3, sp, #60 ; 0x3c
1850: e1a00007 mov r0, r7
1854: eb00216b bl 9e08 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
1858: e1a00006 mov r0, r6
185c: eb003788 bl f684 <strdup>
if (info.sym_link.name == NULL) {
1860: 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);
1864: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
1868: 0a00000b beq 189c <IMFS_symlink+0x78>
* 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(
186c: e28dc028 add ip, sp, #40 ; 0x28
1870: e1a00005 mov r0, r5
1874: e1a02004 mov r2, r4
1878: e3a01004 mov r1, #4
187c: e59f3030 ldr r3, [pc, #48] ; 18b4 <IMFS_symlink+0x90>
1880: e58dc000 str ip, [sp]
1884: eb001e61 bl 9210 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
1888: e3500000 cmp r0, #0
188c: 13a00000 movne r0, #0
1890: 1a000005 bne 18ac <IMFS_symlink+0x88>
free(info.sym_link.name);
1894: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
1898: eb000170 bl 1e60 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
189c: eb003387 bl e6c0 <__errno> <== NOT EXECUTED
18a0: e3a0300c mov r3, #12 <== NOT EXECUTED
18a4: e5803000 str r3, [r0] <== NOT EXECUTED
18a8: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return 0;
}
18ac: e28dd040 add sp, sp, #64 ; 0x40
18b0: e8bd80f0 pop {r4, r5, r6, r7, pc}
000018b8 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
18b8: 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;
18bc: e5915000 ldr r5, [r1]
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
18c0: e595304c ldr r3, [r5, #76] ; 0x4c
18c4: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
18c8: e24dd01c sub sp, sp, #28
18cc: e1a04001 mov r4, r1
18d0: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
18d4: 1a000025 bne 1970 <IMFS_unlink+0xb8>
if ( !node->info.hard_link.link_node )
18d8: e595e050 ldr lr, [r5, #80] ; 0x50
18dc: e35e0000 cmp lr, #0
18e0: 1a000003 bne 18f4 <IMFS_unlink+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
18e4: eb003375 bl e6c0 <__errno> <== NOT EXECUTED
18e8: e3a03016 mov r3, #22 <== NOT EXECUTED
18ec: e5803000 str r3, [r0] <== NOT EXECUTED
18f0: ea000014 b 1948 <IMFS_unlink+0x90> <== NOT EXECUTED
the_link = *loc;
18f4: e1a07001 mov r7, r1
18f8: e8b7000f ldm r7!, {r0, r1, r2, r3}
18fc: e1a0c00d mov ip, sp
1900: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
1904: e28d801c add r8, sp, #28
1908: 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;
190c: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1910: 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;
1914: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1918: eb001e8b bl 934c <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)
191c: e5953050 ldr r3, [r5, #80] ; 0x50
1920: e1d323b4 ldrh r2, [r3, #52] ; 0x34
1924: e3520001 cmp r2, #1
1928: 1a000008 bne 1950 <IMFS_unlink+0x98>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
192c: e1a0100d mov r1, sp
1930: e1a00006 mov r0, r6
1934: e59d3008 ldr r3, [sp, #8]
1938: e1a0e00f mov lr, pc
193c: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
1940: e3500000 cmp r0, #0
1944: 0a000009 beq 1970 <IMFS_unlink+0xb8>
1948: e3e00000 mvn r0, #0
194c: ea00000c b 1984 <IMFS_unlink+0xcc>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
1950: e2422001 sub r2, r2, #1
1954: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
1958: e28d0014 add r0, sp, #20
195c: e3a01000 mov r1, #0
1960: eb000167 bl 1f04 <gettimeofday>
1964: e5953050 ldr r3, [r5, #80] ; 0x50
1968: e59d2014 ldr r2, [sp, #20]
196c: e5832048 str r2, [r3, #72] ; 0x48
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
1970: e1a00006 mov r0, r6
1974: e1a01004 mov r1, r4
1978: e5943008 ldr r3, [r4, #8]
197c: e1a0e00f mov lr, pc
1980: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
}
1984: e28dd01c add sp, sp, #28
1988: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000198c <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
198c: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1990: e593204c ldr r2, [r3, #76] ; 0x4c
1994: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1998: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
199c: 0a000002 beq 19ac <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
19a0: eb003346 bl e6c0 <__errno> <== NOT EXECUTED
19a4: e3a03014 mov r3, #20 <== NOT EXECUTED
19a8: ea000004 b 19c0 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
19ac: e593205c ldr r2, [r3, #92] ; 0x5c
19b0: e3520000 cmp r2, #0
19b4: 1a000004 bne 19cc <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
19b8: eb003340 bl e6c0 <__errno> <== NOT EXECUTED
19bc: e3a03016 mov r3, #22 <== NOT EXECUTED
19c0: e5803000 str r3, [r0] <== NOT EXECUTED
19c4: e3e00000 mvn r0, #0 <== NOT EXECUTED
19c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
19cc: e3a00000 mov r0, #0
19d0: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
19d4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
000020a8 <RTEMS_Malloc_Initialize>:
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
20a8: e59f30c8 ldr r3, [pc, #200] ; 2178 <RTEMS_Malloc_Initialize+0xd0>
20ac: e5933000 ldr r3, [r3]
20b0: e3530000 cmp r3, #0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
20b4: e92d4070 push {r4, r5, r6, lr}
20b8: e1a04000 mov r4, r0
20bc: e1a05001 mov r5, r1
20c0: e1a06002 mov r6, r2
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
(*rtems_malloc_statistics_helpers->initialize)();
20c4: 11a0e00f movne lr, pc
20c8: 1593f000 ldrne pc, [r3]
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
20cc: ebffffe1 bl 2058 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
20d0: e59f30a4 ldr r3, [pc, #164] ; 217c <RTEMS_Malloc_Initialize+0xd4>
20d4: e5933000 ldr r3, [r3]
20d8: e3530000 cmp r3, #0
20dc: 0a000006 beq 20fc <RTEMS_Malloc_Initialize+0x54>
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
20e0: e1a00004 mov r0, r4 <== NOT EXECUTED
20e4: e1a01006 mov r1, r6 <== NOT EXECUTED
20e8: e1a0e00f mov lr, pc <== NOT EXECUTED
20ec: e593f000 ldr pc, [r3] <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
20f0: e0845005 add r5, r4, r5 <== NOT EXECUTED
20f4: e0605005 rsb r5, r0, r5 <== NOT EXECUTED
20f8: e1a04000 mov r4, 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 (
20fc: e59f307c ldr r3, [pc, #124] ; 2180 <RTEMS_Malloc_Initialize+0xd8>
2100: e5d31000 ldrb r1, [r3]
2104: e3510000 cmp r1, #0
2108: 1a000005 bne 2124 <RTEMS_Malloc_Initialize+0x7c>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
210c: e59f3070 ldr r3, [pc, #112] ; 2184 <RTEMS_Malloc_Initialize+0xdc>
2110: e5d33028 ldrb r3, [r3, #40] ; 0x28
2114: e3530000 cmp r3, #0
) {
memset( heap_begin, 0, heap_size );
2118: 11a00004 movne r0, r4
211c: 11a02005 movne r2, r5
2120: 1b0033b0 blne efe8 <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 ) {
2124: e59f3054 ldr r3, [pc, #84] ; 2180 <RTEMS_Malloc_Initialize+0xd8>
2128: e5d33000 ldrb r3, [r3]
212c: e3530000 cmp r3, #0
2130: 1a000008 bne 2158 <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 );
2134: e59f304c ldr r3, [pc, #76] ; 2188 <RTEMS_Malloc_Initialize+0xe0>
2138: e1a01004 mov r1, r4
213c: e5930000 ldr r0, [r3]
2140: e1a02005 mov r2, r5
2144: e3a03004 mov r3, #4
2148: eb000f8f bl 5f8c <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
214c: e3500000 cmp r0, #0
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
2150: 0280001a addeq r0, r0, #26
2154: 0b000d83 bleq 5768 <rtems_fatal_error_occurred>
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
2158: e59f3028 ldr r3, [pc, #40] ; 2188 <RTEMS_Malloc_Initialize+0xe0>
215c: e59f4028 ldr r4, [pc, #40] ; 218c <RTEMS_Malloc_Initialize+0xe4>
2160: e5930000 ldr r0, [r3]
2164: e5945000 ldr r5, [r4]
2168: eb001268 bl 6b10 <_Protected_heap_Get_size>
216c: e0800005 add r0, r0, r5
2170: e5840000 str r0, [r4]
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
2174: e8bd8070 pop {r4, r5, r6, pc}
0000134c <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
134c: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}<== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
1350: e250a000 subs sl, r0, #0 <== NOT EXECUTED
1354: 0a000043 beq 1468 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
return;
if ( !print_handler )
1358: e59f310c ldr r3, [pc, #268] ; 146c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED
135c: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED
1360: e3570000 cmp r7, #0 <== NOT EXECUTED
1364: 0a00003f beq 1468 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
1368: e37a0001 cmn sl, #1 <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
136c: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
1370: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
1374: 1a000005 bne 1390 <Stack_check_Dump_threads_usage+0x44> <== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
1378: e59f40f0 ldr r4, [pc, #240] ; 1470 <Stack_check_Dump_threads_usage+0x124><== NOT EXECUTED
137c: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
1380: e3530000 cmp r3, #0 <== NOT EXECUTED
1384: 13a06000 movne r6, #0 <== NOT EXECUTED
1388: 11a0a006 movne sl, r6 <== NOT EXECUTED
138c: 0a000035 beq 1468 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
1390: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED
1394: e2899010 add r9, r9, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
1398: e2455010 sub r5, r5, #16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
139c: e1a00009 mov r0, r9 <== NOT EXECUTED
13a0: e1a01005 mov r1, r5 <== NOT EXECUTED
13a4: ebffffda bl 1314 <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
13a8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
13ac: 10899005 addne r9, r9, r5 <== NOT EXECUTED
13b0: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
13b4: e35a0000 cmp sl, #0 <== NOT EXECUTED
13b8: e59f30ac ldr r3, [pc, #172] ; 146c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED
13bc: 0a00000c beq 13f4 <Stack_check_Dump_threads_usage+0xa8> <== NOT EXECUTED
(*print_handler)(
13c0: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED
13c4: e28d2008 add r2, sp, #8 <== NOT EXECUTED
13c8: e1a0000a mov r0, sl <== NOT EXECUTED
13cc: e3a01005 mov r1, #5 <== NOT EXECUTED
13d0: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED
13d4: eb000f33 bl 50a8 <rtems_object_get_name> <== NOT EXECUTED
13d8: e1a0200a mov r2, sl <== NOT EXECUTED
13dc: e1a03000 mov r3, r0 <== NOT EXECUTED
13e0: e59f108c ldr r1, [pc, #140] ; 1474 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
13e4: e1a00009 mov r0, r9 <== NOT EXECUTED
13e8: e1a0e00f mov lr, pc <== NOT EXECUTED
13ec: e12fff17 bx r7 <== NOT EXECUTED
13f0: ea000004 b 1408 <Stack_check_Dump_threads_usage+0xbc> <== 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 );
13f4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
13f8: e59f1078 ldr r1, [pc, #120] ; 1478 <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED
13fc: e3e02000 mvn r2, #0 <== NOT EXECUTED
1400: e1a0e00f mov lr, pc <== NOT EXECUTED
1404: e12fff17 bx r7 <== NOT EXECUTED
}
(*print_handler)(
1408: e5943000 ldr r3, [r4] <== NOT EXECUTED
140c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
1410: e59f4054 ldr r4, [pc, #84] ; 146c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED
1414: e58d6000 str r6, [sp] <== NOT EXECUTED
1418: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
141c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
1420: e0823003 add r3, r2, r3 <== NOT EXECUTED
1424: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
1428: e59f104c ldr r1, [pc, #76] ; 147c <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
142c: e1a0e00f mov lr, pc <== NOT EXECUTED
1430: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
1434: e5943000 ldr r3, [r4] <== NOT EXECUTED
1438: e3530000 cmp r3, #0 <== NOT EXECUTED
143c: 1a000004 bne 1454 <Stack_check_Dump_threads_usage+0x108> <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
1440: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
1444: e59f1034 ldr r1, [pc, #52] ; 1480 <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED
1448: e1a0e00f mov lr, pc <== NOT EXECUTED
144c: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
1450: ea000004 b 1468 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
1454: e1a02008 mov r2, r8 <== NOT EXECUTED
1458: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
145c: e59f1020 ldr r1, [pc, #32] ; 1484 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED
1460: e1a0e00f mov lr, pc <== NOT EXECUTED
1464: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
}
}
1468: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED
00001314 <Stack_check_find_high_water_mark>:
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
1314: e2800010 add r0, r0, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
1318: e3c11003 bic r1, r1, #3 <== NOT EXECUTED
131c: e0801001 add r1, r0, r1 <== NOT EXECUTED
if (*base != U32_PATTERN)
1320: e59f3020 ldr r3, [pc, #32] ; 1348 <Stack_check_find_high_water_mark+0x34><== 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++)
1324: ea000003 b 1338 <Stack_check_find_high_water_mark+0x24> <== NOT EXECUTED
if (*base != U32_PATTERN)
1328: e5902000 ldr r2, [r0] <== NOT EXECUTED
132c: e1520003 cmp r2, r3 <== NOT EXECUTED
1330: 112fff1e bxne lr <== 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++)
1334: e2800004 add r0, r0, #4 <== NOT EXECUTED
1338: e1500001 cmp r0, r1 <== NOT EXECUTED
133c: 3afffff9 bcc 1328 <Stack_check_find_high_water_mark+0x14> <== NOT EXECUTED
1340: e3a00000 mov r0, #0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
1344: e12fff1e bx lr <== NOT EXECUTED
00006154 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
6154: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
6158: e1a04001 mov r4, r1
615c: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
6160: e1a0100d mov r1, sp
6164: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
6168: e1a08002 mov r8, r2
616c: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
6170: eb00006f bl 6334 <_POSIX_Mutex_Get>
6174: e3500000 cmp r0, #0
6178: 0a000032 beq 6248 <_POSIX_Condition_variables_Wait_support+0xf4>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
617c: e59f30d0 ldr r3, [pc, #208] ; 6254 <_POSIX_Condition_variables_Wait_support+0x100>
6180: e5932000 ldr r2, [r3]
6184: e2422001 sub r2, r2, #1
6188: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
618c: e1a0100d mov r1, sp
6190: e1a00006 mov r0, r6
6194: ebffff7c bl 5f8c <_POSIX_Condition_variables_Get>
switch ( location ) {
6198: e59d3000 ldr r3, [sp]
619c: e3530000 cmp r3, #0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
61a0: e1a0a000 mov sl, r0
switch ( location ) {
61a4: 1a000027 bne 6248 <_POSIX_Condition_variables_Wait_support+0xf4>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
61a8: e5903014 ldr r3, [r0, #20]
61ac: e3530000 cmp r3, #0
61b0: 0a000004 beq 61c8 <_POSIX_Condition_variables_Wait_support+0x74>
61b4: e5942000 ldr r2, [r4]
61b8: e1530002 cmp r3, r2
61bc: 0a000001 beq 61c8 <_POSIX_Condition_variables_Wait_support+0x74>
_Thread_Enable_dispatch();
61c0: eb000be2 bl 9150 <_Thread_Enable_dispatch>
61c4: ea00001f b 6248 <_POSIX_Condition_variables_Wait_support+0xf4>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
61c8: e1a00004 mov r0, r4
61cc: eb0000de bl 654c <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
61d0: e3570000 cmp r7, #0
61d4: 1a000015 bne 6230 <_POSIX_Condition_variables_Wait_support+0xdc>
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
61d8: e59f5078 ldr r5, [pc, #120] ; 6258 <_POSIX_Condition_variables_Wait_support+0x104>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
61dc: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
61e0: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
61e4: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
61e8: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
61ec: e5961000 ldr r1, [r6]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
61f0: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
61f4: e5831020 str r1, [r3, #32]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
61f8: e3a01001 mov r1, #1
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
61fc: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
6200: e1a00002 mov r0, r2
6204: e58a1048 str r1, [sl, #72] ; 0x48
6208: e59f204c ldr r2, [pc, #76] ; 625c <_POSIX_Condition_variables_Wait_support+0x108>
620c: e1a01008 mov r1, r8
6210: eb000d07 bl 9634 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
6214: eb000bcd bl 9150 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
6218: e5953000 ldr r3, [r5]
621c: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
6220: e3550074 cmp r5, #116 ; 0x74
6224: 13550000 cmpne r5, #0
6228: 0a000002 beq 6238 <_POSIX_Condition_variables_Wait_support+0xe4>
622c: ea000006 b 624c <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
6230: eb000bc6 bl 9150 <_Thread_Enable_dispatch>
6234: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
6238: e1a00004 mov r0, r4
623c: eb0000a3 bl 64d0 <pthread_mutex_lock>
if ( mutex_status )
6240: e3500000 cmp r0, #0
6244: 0a000000 beq 624c <_POSIX_Condition_variables_Wait_support+0xf8>
6248: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
624c: e1a00005 mov r0, r5
6250: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
0000766c <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
766c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
7670: e5913014 ldr r3, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7674: e281503c add r5, r1, #60 ; 0x3c
7678: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
767c: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
7680: e281c038 add ip, r1, #56 ; 0x38
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
7684: e3130020 tst r3, #32
_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 ];
7688: e1a04323 lsr r4, r3, #6
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
768c: e581503c str r5, [r1, #60] ; 0x3c
7690: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
7694: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
7698: e5907038 ldr r7, [r0, #56] ; 0x38
_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 ];
769c: e02c0495 mla ip, r5, r4, r0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
76a0: 159f8154 ldrne r8, [pc, #340] ; 77fc <_Thread_queue_Enqueue_priority+0x190>
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
76a4: 1a000023 bne 7738 <_Thread_queue_Enqueue_priority+0xcc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
76a8: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
76ac: e10f5000 mrs r5, CPSR
76b0: e3854080 orr r4, r5, #128 ; 0x80
76b4: 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;
76b8: e3e06000 mvn r6, #0
76bc: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
76c0: ea00000b b 76f4 <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
76c4: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
76c8: e1530006 cmp r3, r6
76cc: 9a00000a bls 76fc <_Thread_queue_Enqueue_priority+0x90>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
76d0: e10fa000 mrs sl, CPSR
76d4: e129f005 msr CPSR_fc, r5
76d8: e129f00a msr CPSR_fc, sl
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) ) {
76dc: e594a010 ldr sl, [r4, #16]
76e0: e117000a tst r7, sl
76e4: 1a000001 bne 76f0 <_Thread_queue_Enqueue_priority+0x84>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
76e8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
76ec: eaffffee b 76ac <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
76f0: 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 ) ) {
76f4: e1540008 cmp r4, r8
76f8: 1afffff1 bne 76c4 <_Thread_queue_Enqueue_priority+0x58>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
76fc: e590c030 ldr ip, [r0, #48] ; 0x30
7700: e35c0001 cmp ip, #1
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 ) ) {
7704: e1a0c005 mov ip, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
7708: 1a000038 bne 77f0 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
770c: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7710: e3a03000 mov r3, #0
7714: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7718: 0a00002a beq 77c8 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
771c: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7720: e5814000 str r4, [r1]
the_node->previous = previous_node;
7724: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
7728: 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;
772c: e5831000 str r1, [r3]
search_node->previous = the_node;
7730: e5841004 str r1, [r4, #4]
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
7734: ea000021 b 77c0 <_Thread_queue_Enqueue_priority+0x154>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
7738: e5d86000 ldrb r6, [r8]
773c: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7740: e10f5000 mrs r5, CPSR
7744: e3854080 orr r4, r5, #128 ; 0x80
7748: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
774c: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7750: ea00000b b 7784 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
7754: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
7758: e1530006 cmp r3, r6
775c: 2a00000a bcs 778c <_Thread_queue_Enqueue_priority+0x120>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7760: e10fa000 mrs sl, CPSR
7764: e129f005 msr CPSR_fc, r5
7768: e129f00a msr CPSR_fc, sl
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) ) {
776c: e594a010 ldr sl, [r4, #16]
7770: e117000a tst r7, sl
7774: 1a000001 bne 7780 <_Thread_queue_Enqueue_priority+0x114>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7778: e129f005 msr CPSR_fc, r5
777c: eaffffed b 7738 <_Thread_queue_Enqueue_priority+0xcc>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
7780: 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 ) ) {
7784: e154000c cmp r4, ip
7788: 1afffff1 bne 7754 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
778c: e590c030 ldr ip, [r0, #48] ; 0x30
7790: e35c0001 cmp ip, #1
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 ) ) {
7794: e1a0c005 mov ip, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7798: 1a000014 bne 77f0 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
779c: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
77a0: e3a03000 mov r3, #0
77a4: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
77a8: 0a000006 beq 77c8 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
77ac: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
77b0: e8810018 stm r1, {r3, r4}
search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
77b4: 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;
77b8: e5841000 str r1, [r4]
next_node->previous = the_node;
77bc: e5831004 str r1, [r3, #4]
77c0: e129f005 msr CPSR_fc, r5
77c4: ea000007 b 77e8 <_Thread_queue_Enqueue_priority+0x17c>
77c8: 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;
77cc: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
77d0: e5814000 str r4, [r1]
the_node->previous = previous_node;
77d4: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
77d8: 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;
77dc: e5831000 str r1, [r3]
search_node->previous = the_node;
77e0: e5841004 str r1, [r4, #4]
77e4: e129f00c msr CPSR_fc, ip
77e8: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
77ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* 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;
77f0: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
77f4: e5900030 ldr r0, [r0, #48] ; 0x30
}
77f8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
000150d4 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
150d4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
150d8: e24dd020 sub sp, sp, #32
150dc: e28d3014 add r3, sp, #20
150e0: e28d5008 add r5, sp, #8
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
150e4: e3a09000 mov r9, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
150e8: e283a004 add sl, r3, #4 150ec: e2858004 add r8, r5, #4
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
150f0: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
150f4: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
150f8: e2803040 add r3, r0, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
150fc: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
15100: e58d9018 str r9, [sp, #24]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15104: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
15108: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
1510c: e58d5010 str r5, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15110: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
15114: e58d3000 str r3, [sp]
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
15118: e1a04000 mov r4, r0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1511c: e280b030 add fp, r0, #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 );
15120: e2807068 add r7, r0, #104 ; 0x68
{
/*
* 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;
15124: e28d2014 add r2, sp, #20 15128: 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;
1512c: e59f2168 ldr r2, [pc, #360] ; 1529c <_Timer_server_Body+0x1c8> 15130: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
15134: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15138: e1a02005 mov r2, r5 1513c: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
15140: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15144: e1a0000b mov r0, fp 15148: eb001075 bl 19324 <_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();
1514c: e59f314c ldr r3, [pc, #332] ; 152a0 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
15150: e5942074 ldr r2, [r4, #116] ; 0x74
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
15154: e5936000 ldr r6, [r3]
/*
* 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 ) {
15158: e1560002 cmp r6, r2
1515c: 9a000004 bls 15174 <_Timer_server_Body+0xa0>
/*
* 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 );
15160: e0621006 rsb r1, r2, r6 15164: e1a00007 mov r0, r7 15168: e1a02005 mov r2, r5 1516c: eb00106c bl 19324 <_Watchdog_Adjust_to_chain> 15170: ea000003 b 15184 <_Timer_server_Body+0xb0>
/*
* 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 );
15174: 30662002 rsbcc r2, r6, r2 15178: 31a00007 movcc r0, r7 1517c: 33a01001 movcc r1, #1 15180: 3b00103f blcc 19284 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
15184: e5846074 str r6, [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 );
15188: e5940078 ldr r0, [r4, #120] ; 0x78 1518c: eb000244 bl 15aa4 <_Chain_Get>
if ( timer == NULL ) {
15190: e2501000 subs r1, r0, #0
15194: 0a00000a beq 151c4 <_Timer_server_Body+0xf0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
15198: e5913038 ldr r3, [r1, #56] ; 0x38 1519c: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
151a0: 02811010 addeq r1, r1, #16 151a4: 01a0000b moveq r0, fp
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
151a8: 0a000003 beq 151bc <_Timer_server_Body+0xe8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
151ac: e3530003 cmp r3, #3
151b0: 1afffff4 bne 15188 <_Timer_server_Body+0xb4>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
151b4: e2811010 add r1, r1, #16 151b8: e1a00007 mov r0, r7 151bc: eb001085 bl 193d8 <_Watchdog_Insert> 151c0: eafffff0 b 15188 <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
151c4: e10f3000 mrs r3, CPSR 151c8: e3832080 orr r2, r3, #128 ; 0x80 151cc: e129f002 msr CPSR_fc, r2
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
151d0: e59d2014 ldr r2, [sp, #20] 151d4: e152000a cmp r2, sl
151d8: 1a000005 bne 151f4 <_Timer_server_Body+0x120>
ts->insert_chain = NULL;
151dc: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
151e0: e129f003 msr CPSR_fc, r3
_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 ) ) {
151e4: e59d3008 ldr r3, [sp, #8] 151e8: e1530008 cmp r3, r8
151ec: 1a000002 bne 151fc <_Timer_server_Body+0x128>
151f0: ea000015 b 1524c <_Timer_server_Body+0x178>
151f4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 151f8: eaffffcb b 1512c <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
151fc: e10f2000 mrs r2, CPSR 15200: e3823080 orr r3, r2, #128 ; 0x80 15204: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
15208: e59d3008 ldr r3, [sp, #8]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
1520c: e1530008 cmp r3, r8
15210: 0a00000b beq 15244 <_Timer_server_Body+0x170>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
15214: e5931000 ldr r1, [r3]
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
15218: e3530000 cmp r3, #0
the_chain->first = new_first;
1521c: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
15220: e5815004 str r5, [r1, #4]
15224: 0a000006 beq 15244 <_Timer_server_Body+0x170>
watchdog->state = WATCHDOG_INACTIVE;
15228: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
1522c: e129f002 msr CPSR_fc, r2
/*
* 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 );
15230: e2830020 add r0, r3, #32
15234: e8900003 ldm r0, {r0, r1}
15238: e1a0e00f mov lr, pc
1523c: e593f01c ldr pc, [r3, #28]
}
15240: eaffffed b 151fc <_Timer_server_Body+0x128> 15244: e129f002 msr CPSR_fc, r2 15248: eaffffb5 b 15124 <_Timer_server_Body+0x50>
} else {
ts->active = false;
1524c: e5c4907c strb r9, [r4, #124] ; 0x7c 15250: e59f304c ldr r3, [pc, #76] ; 152a4 <_Timer_server_Body+0x1d0> 15254: e5932000 ldr r2, [r3] 15258: e2822001 add r2, r2, #1 1525c: e5832000 str r2, [r3]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
15260: e3a01008 mov r1, #8 15264: e5940000 ldr r0, [r4] 15268: eb000da8 bl 18910 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
1526c: e1a00004 mov r0, r4 15270: ebffff6b bl 15024 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
15274: e1a00004 mov r0, r4 15278: ebffff7f bl 1507c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
1527c: eb000b0a bl 17eac <_Thread_Enable_dispatch>
ts->active = true;
15280: e3a03001 mov r3, #1 15284: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15288: e59d0004 ldr r0, [sp, #4] 1528c: eb0010aa bl 1953c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
15290: e59d0000 ldr r0, [sp] 15294: eb0010a8 bl 1953c <_Watchdog_Remove> 15298: eaffffa1 b 15124 <_Timer_server_Body+0x50>
0001a21c <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
1a21c: e1a04000 mov r4, r0 1a220: eb000226 bl 1aac0 <___DTOR_END__>
* 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();
1a224: ebffffe0 bl 1a1ac <libc_wrapup>
rtems_shutdown_executive(status);
1a228: e1a00004 mov r0, r4 1a22c: eb00003b bl 1a320 <rtems_shutdown_executive>
1a230: eafffffe b 1a230 <_exit+0x14> <== NOT EXECUTED
00002918 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
2918: e1a00001 mov r0, r1 <== NOT EXECUTED
291c: e1a01002 mov r1, r2 <== NOT EXECUTED
2920: e1a02003 mov r2, r3 <== NOT EXECUTED
2924: eaffff8b b 2758 <fcntl> <== NOT EXECUTED
0000a264 <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
a264: e3a00001 mov r0, #1 <== NOT EXECUTED
a268: e12fff1e bx lr <== NOT EXECUTED
00001f5c <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
1f5c: eaffffe8 b 1f04 <gettimeofday> <== NOT EXECUTED
00003378 <_link_r>:
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
3378: e1a00001 mov r0, r1 <== NOT EXECUTED
337c: e1a01002 mov r1, r2 <== NOT EXECUTED
3380: eaffff7f b 3184 <link> <== NOT EXECUTED
0001a304 <_realloc_r>:
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
1a304: e1a00001 mov r0, r1 <== NOT EXECUTED 1a308: e1a01002 mov r1, r2 <== NOT EXECUTED 1a30c: ea00000e b 1a34c <realloc> <== NOT EXECUTED
00003f28 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
3f28: e1a00001 mov r0, r1 <== NOT EXECUTED
3f2c: e1a01002 mov r1, r2 <== NOT EXECUTED
3f30: eaffffc4 b 3e48 <stat> <== NOT EXECUTED
0000d920 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
d920: e1a00001 mov r0, r1 <== NOT EXECUTED
d924: eaffff71 b d6f0 <unlink> <== NOT EXECUTED
0000a8d4 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
a8d4: e92d4030 push {r4, r5, lr}
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
a8d8: e2505000 subs r5, r0, #0
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
a8dc: e24dd018 sub sp, sp, #24
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
a8e0: 1a000002 bne a8f0 <chdir+0x1c>
rtems_set_errno_and_return_minus_one( EFAULT );
a8e4: eb00108f bl eb28 <__errno>
a8e8: e3a0300e mov r3, #14
a8ec: ea000025 b a988 <chdir+0xb4>
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
a8f0: eb001465 bl fa8c <strlen>
a8f4: e28d4004 add r4, sp, #4
a8f8: e3a0c001 mov ip, #1
a8fc: e1a01000 mov r1, r0
a900: e1a0200c mov r2, ip
a904: e1a00005 mov r0, r5
a908: e1a03004 mov r3, r4
a90c: e58dc000 str ip, [sp]
a910: ebffddb7 bl 1ff4 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
a914: e3500000 cmp r0, #0
a918: 1a00001b bne a98c <chdir+0xb8>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
a91c: e59d2010 ldr r2, [sp, #16]
a920: e5923010 ldr r3, [r2, #16]
a924: e3530000 cmp r3, #0
a928: 1a000007 bne a94c <chdir+0x78>
rtems_filesystem_freenode( &loc );
a92c: e592301c ldr r3, [r2, #28]
a930: e3530000 cmp r3, #0 <== NOT EXECUTED
a934: 11a00004 movne r0, r4 <== NOT EXECUTED
a938: 11a0e00f movne lr, pc <== NOT EXECUTED
a93c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
a940: eb001078 bl eb28 <__errno> <== NOT EXECUTED
a944: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
a948: ea00000e b a988 <chdir+0xb4> <== NOT EXECUTED
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
a94c: e1a00004 mov r0, r4
a950: e1a0e00f mov lr, pc
a954: e12fff13 bx r3
a958: e3500001 cmp r0, #1
a95c: 0a00000c beq a994 <chdir+0xc0>
rtems_filesystem_freenode( &loc );
a960: e59d3010 ldr r3, [sp, #16]
a964: e3530000 cmp r3, #0
a968: 0a000004 beq a980 <chdir+0xac>
a96c: e593301c ldr r3, [r3, #28]
a970: e3530000 cmp r3, #0
a974: 11a00004 movne r0, r4
a978: 11a0e00f movne lr, pc
a97c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
a980: eb001068 bl eb28 <__errno>
a984: e3a03014 mov r3, #20
a988: e5803000 str r3, [r0]
a98c: e3e00000 mvn r0, #0
a990: ea000012 b a9e0 <chdir+0x10c>
}
rtems_filesystem_freenode( &rtems_filesystem_current );
a994: e59f304c ldr r3, [pc, #76] ; a9e8 <chdir+0x114>
a998: e5930000 ldr r0, [r3]
a99c: e5903010 ldr r3, [r0, #16]
a9a0: e3530000 cmp r3, #0
a9a4: 0a000004 beq a9bc <chdir+0xe8>
a9a8: e593301c ldr r3, [r3, #28]
a9ac: e3530000 cmp r3, #0
a9b0: 12800004 addne r0, r0, #4
a9b4: 11a0e00f movne lr, pc
a9b8: 112fff13 bxne r3
rtems_filesystem_current = loc;
a9bc: e59f3024 ldr r3, [pc, #36] ; a9e8 <chdir+0x114>
a9c0: e28d4004 add r4, sp, #4
a9c4: e593c000 ldr ip, [r3]
a9c8: e8b4000f ldm r4!, {r0, r1, r2, r3}
a9cc: e28cc004 add ip, ip, #4
a9d0: e8ac000f stmia ip!, {r0, r1, r2, r3}
a9d4: e5943000 ldr r3, [r4]
a9d8: e58c3000 str r3, [ip]
a9dc: e3a00000 mov r0, #0
return 0;
}
a9e0: e28dd018 add sp, sp, #24
a9e4: e8bd8030 pop {r4, r5, pc}
00003c10 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
3c10: e92d4070 push {r4, r5, r6, lr}
3c14: e24dd018 sub sp, sp, #24
3c18: e1a05001 mov r5, r1
3c1c: 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 );
3c20: eb003d79 bl 1320c <strlen>
3c24: e28d4004 add r4, sp, #4
3c28: e1a01000 mov r1, r0
3c2c: e3a0c001 mov ip, #1
3c30: e1a00006 mov r0, r6
3c34: e3a02000 mov r2, #0
3c38: e1a03004 mov r3, r4
3c3c: e58dc000 str ip, [sp]
3c40: eb0000b7 bl 3f24 <rtems_filesystem_evaluate_path>
if ( status != 0 )
3c44: e3500000 cmp r0, #0
3c48: 1a00000d bne 3c84 <chmod+0x74>
return -1;
if ( !loc.handlers ){
3c4c: e59d300c ldr r3, [sp, #12]
3c50: e3530000 cmp r3, #0
3c54: 1a00000c bne 3c8c <chmod+0x7c>
rtems_filesystem_freenode( &loc );
3c58: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
3c5c: e3530000 cmp r3, #0 <== NOT EXECUTED
3c60: 0a000004 beq 3c78 <chmod+0x68> <== NOT EXECUTED
3c64: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3c68: e3530000 cmp r3, #0 <== NOT EXECUTED
3c6c: 11a00004 movne r0, r4 <== NOT EXECUTED
3c70: 11a0e00f movne lr, pc <== NOT EXECUTED
3c74: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
3c78: eb0035fb bl 1146c <__errno> <== NOT EXECUTED
3c7c: e3a03009 mov r3, #9 <== NOT EXECUTED
3c80: e5803000 str r3, [r0] <== NOT EXECUTED
3c84: e3e05000 mvn r5, #0
3c88: ea00001a b 3cf8 <chmod+0xe8>
}
if ( !loc.handlers->fchmod_h ){
3c8c: e593301c ldr r3, [r3, #28]
3c90: e3530000 cmp r3, #0
3c94: 1a00000a bne 3cc4 <chmod+0xb4>
rtems_filesystem_freenode( &loc );
3c98: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
3c9c: e3530000 cmp r3, #0 <== NOT EXECUTED
3ca0: 0a000004 beq 3cb8 <chmod+0xa8> <== NOT EXECUTED
3ca4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3ca8: e3530000 cmp r3, #0 <== NOT EXECUTED
3cac: 11a00004 movne r0, r4 <== NOT EXECUTED
3cb0: 11a0e00f movne lr, pc <== NOT EXECUTED
3cb4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3cb8: eb0035eb bl 1146c <__errno> <== NOT EXECUTED
3cbc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3cc0: eaffffee b 3c80 <chmod+0x70> <== NOT EXECUTED
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
3cc4: e1a01005 mov r1, r5
3cc8: e1a00004 mov r0, r4
3ccc: e1a0e00f mov lr, pc
3cd0: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
3cd4: e59d3010 ldr r3, [sp, #16]
3cd8: e3530000 cmp r3, #0
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
3cdc: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
3ce0: 0a000004 beq 3cf8 <chmod+0xe8>
3ce4: e593301c ldr r3, [r3, #28]
3ce8: e3530000 cmp r3, #0
3cec: 11a00004 movne r0, r4
3cf0: 11a0e00f movne lr, pc
3cf4: 112fff13 bxne r3
return result;
}
3cf8: e1a00005 mov r0, r5
3cfc: e28dd018 add sp, sp, #24
3d00: e8bd8070 pop {r4, r5, r6, pc}
00003d04 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
3d04: e92d40f0 push {r4, r5, r6, r7, lr}
3d08: e1a01801 lsl r1, r1, #16
3d0c: e24dd018 sub sp, sp, #24
3d10: e1a02802 lsl r2, r2, #16
3d14: e1a06821 lsr r6, r1, #16
3d18: e1a05822 lsr r5, r2, #16
3d1c: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
3d20: eb003d39 bl 1320c <strlen>
3d24: e28d4004 add r4, sp, #4
3d28: e1a01000 mov r1, r0
3d2c: e3a0c001 mov ip, #1
3d30: e1a00007 mov r0, r7
3d34: e3a02000 mov r2, #0
3d38: e1a03004 mov r3, r4
3d3c: e58dc000 str ip, [sp]
3d40: eb000077 bl 3f24 <rtems_filesystem_evaluate_path>
3d44: e3500000 cmp r0, #0
3d48: 1a00000b bne 3d7c <chown+0x78>
return -1;
if ( !loc.ops->chown_h ) {
3d4c: e59d2010 ldr r2, [sp, #16]
3d50: e5923018 ldr r3, [r2, #24]
3d54: e3530000 cmp r3, #0
3d58: 1a000009 bne 3d84 <chown+0x80>
rtems_filesystem_freenode( &loc );
3d5c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
3d60: e3530000 cmp r3, #0 <== NOT EXECUTED
3d64: 11a00004 movne r0, r4 <== NOT EXECUTED
3d68: 11a0e00f movne lr, pc <== NOT EXECUTED
3d6c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3d70: eb0035bd bl 1146c <__errno> <== NOT EXECUTED
3d74: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3d78: e5803000 str r3, [r0] <== NOT EXECUTED
3d7c: e3e05000 mvn r5, #0
3d80: ea00000d b 3dbc <chown+0xb8>
}
result = (*loc.ops->chown_h)( &loc, owner, group );
3d84: e1a02005 mov r2, r5
3d88: e1a01006 mov r1, r6
3d8c: e1a00004 mov r0, r4
3d90: e1a0e00f mov lr, pc
3d94: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
3d98: e59d3010 ldr r3, [sp, #16]
3d9c: e3530000 cmp r3, #0
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 );
3da0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
3da4: 0a000004 beq 3dbc <chown+0xb8>
3da8: e593301c ldr r3, [r3, #28]
3dac: e3530000 cmp r3, #0
3db0: 11a00004 movne r0, r4
3db4: 11a0e00f movne lr, pc
3db8: 112fff13 bxne r3
return result;
}
3dbc: e1a00005 mov r0, r5
3dc0: e28dd018 add sp, sp, #24
3dc4: e8bd80f0 pop {r4, r5, r6, r7, pc}
00001d08 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
1d08: 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) {
1d0c: e59f50d4 ldr r5, [pc, #212] ; 1de8 <chroot+0xe0>
1d10: e59f30d4 ldr r3, [pc, #212] ; 1dec <chroot+0xe4>
1d14: e5954000 ldr r4, [r5]
1d18: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
1d1c: e24dd018 sub sp, sp, #24
1d20: 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) {
1d24: 1a000007 bne 1d48 <chroot+0x40>
rtems_libio_set_private_env(); /* try to set a new private env*/
1d28: eb000547 bl 324c <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
1d2c: e5953000 ldr r3, [r5]
1d30: e1530004 cmp r3, r4
1d34: 1a000003 bne 1d48 <chroot+0x40>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1d38: eb00337a bl eb28 <__errno>
1d3c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1d40: e5803000 str r3, [r0] <== NOT EXECUTED
1d44: ea000008 b 1d6c <chroot+0x64> <== NOT EXECUTED
}
result = chdir(pathname);
1d48: e1a00006 mov r0, r6
1d4c: eb0022e0 bl a8d4 <chdir>
if (result) {
1d50: e250c000 subs ip, r0, #0
1d54: 0a000006 beq 1d74 <chroot+0x6c>
rtems_set_errno_and_return_minus_one( errno );
1d58: eb003372 bl eb28 <__errno>
1d5c: e1a04000 mov r4, r0 <== NOT EXECUTED
1d60: eb003370 bl eb28 <__errno> <== NOT EXECUTED
1d64: e5903000 ldr r3, [r0] <== NOT EXECUTED
1d68: e5843000 str r3, [r4] <== NOT EXECUTED
1d6c: e3e00000 mvn r0, #0 <== NOT EXECUTED
1d70: ea00001a b 1de0 <chroot+0xd8> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
1d74: e1a0200c mov r2, ip
1d78: e59f0070 ldr r0, [pc, #112] ; 1df0 <chroot+0xe8>
1d7c: e3a01001 mov r1, #1
1d80: e28d3004 add r3, sp, #4
1d84: e58dc000 str ip, [sp]
1d88: eb000099 bl 1ff4 <rtems_filesystem_evaluate_path>
1d8c: e3500000 cmp r0, #0
1d90: 1afffff0 bne 1d58 <chroot+0x50>
/* 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);
1d94: e59f304c ldr r3, [pc, #76] ; 1de8 <chroot+0xe0>
1d98: e5930000 ldr r0, [r3]
1d9c: e5903024 ldr r3, [r0, #36] ; 0x24
1da0: e3530000 cmp r3, #0
1da4: 0a000004 beq 1dbc <chroot+0xb4>
1da8: e593301c ldr r3, [r3, #28]
1dac: e3530000 cmp r3, #0
1db0: 12800018 addne r0, r0, #24
1db4: 11a0e00f movne lr, pc
1db8: 112fff13 bxne r3
rtems_filesystem_root = loc;
1dbc: e59f3024 ldr r3, [pc, #36] ; 1de8 <chroot+0xe0>
1dc0: e28d4004 add r4, sp, #4
1dc4: e593c000 ldr ip, [r3]
1dc8: e8b4000f ldm r4!, {r0, r1, r2, r3}
1dcc: e28cc018 add ip, ip, #24
1dd0: e8ac000f stmia ip!, {r0, r1, r2, r3}
1dd4: e5943000 ldr r3, [r4]
1dd8: e58c3000 str r3, [ip]
1ddc: e3a00000 mov r0, #0
return 0;
}
1de0: e28dd018 add sp, sp, #24
1de4: e8bd8070 pop {r4, r5, r6, pc}
0000811c <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
811c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
8120: e3d27007 bics r7, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8124: e1a09000 mov r9, r0
8128: e1a04001 mov r4, r1
812c: e1a05003 mov r5, r3
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
8130: 0a000002 beq 8140 <devFS_evaluate_path+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
8134: eb00098d bl a770 <__errno> <== NOT EXECUTED
8138: e3a03001 mov r3, #1 <== NOT EXECUTED
813c: ea000005 b 8158 <devFS_evaluate_path+0x3c> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
8140: e5936000 ldr r6, [r3]
if (!device_name_table)
8144: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8148: 159fa090 ldrne sl, [pc, #144] ; 81e0 <devFS_evaluate_path+0xc4>
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
814c: 1a000019 bne 81b8 <devFS_evaluate_path+0x9c>
rtems_set_errno_and_return_minus_one( EFAULT );
8150: eb000986 bl a770 <__errno> <== NOT EXECUTED
8154: e3a0300e mov r3, #14 <== NOT EXECUTED
8158: e5803000 str r3, [r0] <== NOT EXECUTED
815c: e3e00000 mvn r0, #0 <== NOT EXECUTED
8160: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
8164: e5968000 ldr r8, [r6]
8168: e2581000 subs r1, r8, #0
816c: 0a00000f beq 81b0 <devFS_evaluate_path+0x94>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8170: eb000d34 bl b648 <strncmp>
8174: e3500000 cmp r0, #0
8178: 1a00000c bne 81b0 <devFS_evaluate_path+0x94>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
817c: e7d80004 ldrb r0, [r8, r4]
8180: e3500000 cmp r0, #0
8184: 1a000009 bne 81b0 <devFS_evaluate_path+0x94>
/* 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;
8188: e59f3054 ldr r3, [pc, #84] ; 81e4 <devFS_evaluate_path+0xc8>
818c: e5933000 ldr r3, [r3]
8190: e5933028 ldr r3, [r3, #40] ; 0x28
8194: e5853010 str r3, [r5, #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;
8198: e59f3048 ldr r3, [pc, #72] ; 81e8 <devFS_evaluate_path+0xcc>
819c: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
81a0: e59f3044 ldr r3, [pc, #68] ; 81ec <devFS_evaluate_path+0xd0>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
81a4: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
81a8: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
81ac: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
81b0: e2877001 add r7, r7, #1
81b4: e2866014 add r6, r6, #20
81b8: e59a3000 ldr r3, [sl]
81bc: e1570003 cmp r7, r3
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
81c0: e1a00009 mov r0, r9
81c4: 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++) {
81c8: 3affffe5 bcc 8164 <devFS_evaluate_path+0x48>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
81cc: eb000967 bl a770 <__errno>
81d0: e3a03002 mov r3, #2
81d4: e5803000 str r3, [r0]
81d8: e3e00000 mvn r0, #0
}
81dc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00001234 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
1234: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
1238: e59f7058 ldr r7, [pc, #88] ; 1298 <devFS_initialize+0x64>
123c: e5973000 ldr r3, [r7]
1240: e3a06014 mov r6, #20
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
1244: 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(
1248: e0000396 mul r0, r6, r3
124c: eb001a86 bl 7c6c <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
1250: e2505000 subs r5, r0, #0
1254: 1a000004 bne 126c <devFS_initialize+0x38>
rtems_set_errno_and_return_minus_one( ENOMEM );
1258: eb002544 bl a770 <__errno> <== NOT EXECUTED
125c: e3a0300c mov r3, #12 <== NOT EXECUTED
1260: e5803000 str r3, [r0] <== NOT EXECUTED
1264: e3e00000 mvn r0, #0 <== NOT EXECUTED
1268: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
memset(
126c: e5972000 ldr r2, [r7]
1270: e3a01000 mov r1, #0
1274: e0020296 mul r2, r6, r2
1278: eb00276a bl b028 <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;
127c: e59f3018 ldr r3, [pc, #24] ; 129c <devFS_initialize+0x68>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
1280: e2832038 add r2, r3, #56 ; 0x38
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
1284: 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;
1288: 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;
128c: 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;
1290: e3a00000 mov r0, #0
return 0;
}
1294: e8bd80f0 pop {r4, r5, r6, r7, pc}
000012a0 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
12a0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
12a4: 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') &&
12a8: e5d00000 ldrb r0, [r0]
12ac: e3500064 cmp r0, #100 ; 0x64
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
12b0: e1a05001 mov r5, r1
12b4: e58d2000 str r2, [sp]
12b8: e1a09003 mov r9, 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') &&
12bc: 1a000008 bne 12e4 <devFS_mknod+0x44>
12c0: e5d43001 ldrb r3, [r4, #1]
12c4: e3530065 cmp r3, #101 ; 0x65
12c8: 1a000005 bne 12e4 <devFS_mknod+0x44>
(path[2] == 'v') && (path[3] == '\0'))
12cc: e5d43002 ldrb r3, [r4, #2]
12d0: e3530076 cmp r3, #118 ; 0x76
12d4: 1a000002 bne 12e4 <devFS_mknod+0x44>
12d8: e5d40003 ldrb r0, [r4, #3]
12dc: e3500000 cmp r0, #0
12e0: 0a000039 beq 13cc <devFS_mknod+0x12c>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
12e4: e205aa0f and sl, r5, #61440 ; 0xf000
12e8: e35a0a02 cmp sl, #8192 ; 0x2000
12ec: 135a0a06 cmpne sl, #24576 ; 0x6000
12f0: 03a0a000 moveq sl, #0
12f4: 13a0a001 movne sl, #1
12f8: 0a000002 beq 1308 <devFS_mknod+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
12fc: eb00251b bl a770 <__errno> <== NOT EXECUTED
1300: e3a03016 mov r3, #22 <== NOT EXECUTED
1304: ea000008 b 132c <devFS_mknod+0x8c> <== NOT EXECUTED
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;
1308: e59d3028 ldr r3, [sp, #40] ; 0x28
130c: e5936000 ldr r6, [r3]
if (!device_name_table)
1310: e3560000 cmp r6, #0
1314: 13e07000 mvnne r7, #0
1318: 11a0800a movne r8, sl
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
131c: 159fb0ac ldrne fp, [pc, #172] ; 13d0 <devFS_mknod+0x130>
1320: 1a000010 bne 1368 <devFS_mknod+0xc8>
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 );
1324: eb002511 bl a770 <__errno> <== NOT EXECUTED
1328: e3a0300e mov r3, #14 <== NOT EXECUTED
132c: e5803000 str r3, [r0] <== NOT EXECUTED
1330: e3e00000 mvn r0, #0 <== NOT EXECUTED
1334: ea000024 b 13cc <devFS_mknod+0x12c> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
1338: e796300a ldr r3, [r6, sl]
133c: e2531000 subs r1, r3, #0
1340: 0a000005 beq 135c <devFS_mknod+0xbc>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
1344: eb0027df bl b2c8 <strcmp> <== NOT EXECUTED
1348: e3500000 cmp r0, #0 <== NOT EXECUTED
134c: 1a000003 bne 1360 <devFS_mknod+0xc0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EEXIST );
1350: eb002506 bl a770 <__errno> <== NOT EXECUTED
1354: e3a03011 mov r3, #17 <== NOT EXECUTED
1358: eafffff3 b 132c <devFS_mknod+0x8c> <== NOT EXECUTED
135c: e1a07008 mov r7, r8
/* 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++){
1360: e2888001 add r8, r8, #1
1364: e28aa014 add sl, sl, #20
1368: e59b3000 ldr r3, [fp]
136c: e1580003 cmp r8, r3
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
1370: e1a00004 mov r0, r4
/* 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++){
1374: 3affffef bcc 1338 <devFS_mknod+0x98>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
1378: e3770001 cmn r7, #1
137c: 1a000004 bne 1394 <devFS_mknod+0xf4>
rtems_set_errno_and_return_minus_one( ENOMEM );
1380: eb0024fa bl a770 <__errno> <== NOT EXECUTED
1384: e3a0300c mov r3, #12 <== NOT EXECUTED
1388: e5803000 str r3, [r0] <== NOT EXECUTED
138c: e1a00007 mov r0, r7 <== NOT EXECUTED
1390: ea00000d b 13cc <devFS_mknod+0x12c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
1394: e10f8000 mrs r8, CPSR
1398: e3883080 orr r3, r8, #128 ; 0x80
139c: e129f003 msr CPSR_fc, r3
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
13a0: e3a02014 mov r2, #20
13a4: e0030792 mul r3, r2, r7
device_name_table[slot].device_name_length = strlen(path);
13a8: e1a00004 mov r0, r4
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
13ac: e7864003 str r4, [r6, r3]
13b0: e0866003 add r6, r6, r3
device_name_table[slot].device_name_length = strlen(path);
13b4: eb00288b bl b5e8 <strlen>
device_name_table[slot].major = major;
13b8: e59d3000 ldr r3, [sp]
device_name_table[slot].minor = minor; device_name_table[slot].mode = mode;
13bc: e5865010 str r5, [r6, #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);
13c0: e9860209 stmib r6, {r0, r3, r9}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
13c4: e129f008 msr CPSR_fc, r8
13c8: e3a00000 mov r0, #0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
13cc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00001450 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
1450: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED
1454: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
1458: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
145c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
1460: e3a02000 mov r2, #0 <== NOT EXECUTED
1464: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
1468: e58d0014 str r0, [sp, #20] <== 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;
146c: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
1470: e283c00c add ip, r3, #12 <== NOT EXECUTED
1474: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
1478: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
147c: e2820008 add r0, r2, #8 <== NOT EXECUTED
1480: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
1484: e1a0200d mov r2, sp <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
1488: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
148c: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
1490: eb000f8e bl 52d0 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
1494: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
1498: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
149c: 1b001b53 blne 81f0 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
14a0: e28dd01c add sp, sp, #28 <== NOT EXECUTED
14a4: e8bd8800 pop {fp, pc} <== NOT EXECUTED
000014a8 <devFS_stat>:
struct stat *buf
)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
14a8: e5903000 ldr r3, [r0]
if (!the_dev)
14ac: e3530000 cmp r3, #0
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
14b0: 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)
14b4: 1a000004 bne 14cc <devFS_stat+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
14b8: eb0024ac bl a770 <__errno> <== NOT EXECUTED
14bc: e3a0300e mov r3, #14 <== NOT EXECUTED
14c0: e5803000 str r3, [r0] <== NOT EXECUTED
14c4: e3e00000 mvn r0, #0 <== NOT EXECUTED
14c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
14cc: 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 );
14d0: e593200c ldr r2, [r3, #12]
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
14d4: e5933008 ldr r3, [r3, #8]
14d8: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
14dc: 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 );
14e0: e5813018 str r3, [r1, #24]
buf->st_mode = the_dev->mode;
14e4: e3a00000 mov r0, #0
return 0;
}
14e8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000d1c0 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
d1c0: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
d1c4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
d1c8: e280c00c add ip, r0, #12 <== NOT EXECUTED
d1cc: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags;
d1d0: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
d1d4: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
d1d8: e3a03000 mov r3, #0 <== NOT EXECUTED
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
d1dc: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
d1e0: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
d1e4: e58d100c str r1, [sp, #12] <== NOT EXECUTED
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
d1e8: e58d0000 str r0, [sp] <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d1ec: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
d1f0: e1a0200d mov r2, sp <== NOT EXECUTED
d1f4: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED
d1f8: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
d1fc: eb00045b bl e370 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
d200: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
d204: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
d208: 1b0004df blne e58c <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
d20c: e28dd01c add sp, sp, #28 <== NOT EXECUTED
d210: e8bd8800 pop {fp, pc} <== NOT EXECUTED
00003a18 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3a18: e59030b4 ldr r3, [r0, #180] ; 0xb4
3a1c: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
3a20: e92d4030 push {r4, r5, lr}
3a24: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3a28: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3a2c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3a30: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
3a34: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
3a38: e3a05002 mov r5, #2 <== 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) {
3a3c: ea00000a b 3a6c <drainOutput+0x54> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
3a40: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3a44: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
3a48: e3a01000 mov r1, #0 <== NOT EXECUTED
3a4c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
3a50: e1a02001 mov r2, r1 <== NOT EXECUTED
3a54: eb0005af bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
3a58: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3a5c: 1b000741 blne 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3a60: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3a64: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
3a68: 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) {
3a6c: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED
3a70: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED
3a74: e1510002 cmp r1, r2 <== NOT EXECUTED
3a78: 1afffff0 bne 3a40 <drainOutput+0x28> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3a7c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
3a80: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00002520 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
2520: e92d4070 push {r4, r5, r6, lr}
2524: e24dd048 sub sp, sp, #72 ; 0x48
2528: e1a04001 mov r4, r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
252c: e1a0100d mov r1, sp
int dup2(
int fildes,
int fildes2
)
{
2530: e1a06000 mov r6, r0
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2534: eb000189 bl 2b60 <fstat>
if ( status == -1 )
2538: e3700001 cmn r0, #1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
253c: e1a0500d mov r5, sp
if ( status == -1 )
2540: 0a000009 beq 256c <dup2+0x4c>
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
2544: e1a0100d mov r1, sp
2548: e1a00004 mov r0, r4
254c: eb000183 bl 2b60 <fstat>
if ( status == -1 )
2550: e3700001 cmn r0, #1
2554: 0a000004 beq 256c <dup2+0x4c>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2558: e1a00006 mov r0, r6
255c: e1a02004 mov r2, r4 <== NOT EXECUTED
2560: e3a01000 mov r1, #0 <== NOT EXECUTED
2564: eb00007b bl 2758 <fcntl> <== NOT EXECUTED
2568: ea000000 b 2570 <dup2+0x50> <== NOT EXECUTED
256c: e3e00000 mvn r0, #0
}
2570: e28dd048 add sp, sp, #72 ; 0x48
2574: e8bd8070 pop {r4, r5, r6, pc}
00003518 <echo>:
* 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')) {
3518: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED
351c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
3520: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
3524: e1a04001 mov r4, r1 <== NOT EXECUTED
3528: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
352c: 0a000015 beq 3588 <echo+0x70> <== NOT EXECUTED
3530: e59f305c ldr r3, [pc, #92] ; 3594 <echo+0x7c> <== NOT EXECUTED
3534: e5933000 ldr r3, [r3] <== NOT EXECUTED
3538: e0833000 add r3, r3, r0 <== NOT EXECUTED
353c: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
3540: e2503009 subs r3, r0, #9 <== NOT EXECUTED
3544: 13a03001 movne r3, #1 <== NOT EXECUTED
3548: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED
354c: 0a00000d beq 3588 <echo+0x70> <== NOT EXECUTED
3550: e350000a cmp r0, #10 <== NOT EXECUTED
3554: 0a00000b beq 3588 <echo+0x70> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
3558: 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] = '^';
355c: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
3560: e1a0000d mov r0, sp <== NOT EXECUTED
3564: e3a01002 mov r1, #2 <== NOT EXECUTED
3568: 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;
356c: 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] = '^';
3570: e5cdc000 strb ip, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
3574: ebffff4d bl 32b0 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
3578: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
357c: e2833002 add r3, r3, #2 <== NOT EXECUTED
3580: 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')) {
3584: ea000001 b 3590 <echo+0x78> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
3588: e1a01004 mov r1, r4 <== NOT EXECUTED
358c: ebffff8b bl 33c0 <oproc> <== NOT EXECUTED
} }
3590: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
00002078 <endgrent>:
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
if (group_fp != NULL)
2078: e59f300c ldr r3, [pc, #12] ; 208c <endgrent+0x14> <== NOT EXECUTED
207c: e5930000 ldr r0, [r3] <== NOT EXECUTED
2080: e3500000 cmp r0, #0 <== NOT EXECUTED
2084: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
2088: ea003450 b f1d0 <fclose> <== NOT EXECUTED
00002090 <endpwent>:
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
if (passwd_fp != NULL)
2090: e59f300c ldr r3, [pc, #12] ; 20a4 <endpwent+0x14> <== NOT EXECUTED
2094: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
2098: e3500000 cmp r0, #0 <== NOT EXECUTED
209c: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
20a0: ea00344a b f1d0 <fclose> <== NOT EXECUTED
00003598 <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)
3598: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
359c: 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)
{
35a0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
35a4: e1a04000 mov r4, r0 <== NOT EXECUTED
35a8: e1a07001 mov r7, r1 <== NOT EXECUTED
if (tty->ccount == 0)
35ac: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return;
if (lineFlag) {
35b0: e3510000 cmp r1, #0 <== NOT EXECUTED
35b4: 0a000062 beq 3744 <erase+0x1ac> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
35b8: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED
35bc: e2132008 ands r2, r3, #8 <== NOT EXECUTED
tty->ccount = 0;
35c0: 05802020 streq r2, [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)) {
35c4: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
35c8: e2133010 ands r3, r3, #16 <== NOT EXECUTED
35cc: 1a00005c bne 3744 <erase+0x1ac> <== NOT EXECUTED
tty->ccount = 0;
35d0: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
35d4: e1a01004 mov r1, r4 <== NOT EXECUTED
35d8: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
35dc: ebffffcd bl 3518 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
35e0: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
35e4: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
35e8: 11a01004 movne r1, r4 <== NOT EXECUTED
35ec: 13a0000a movne r0, #10 <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
35f0: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
35f4: ea00000c b 362c <erase+0x94> <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
35f8: e2411001 sub r1, r1, #1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
35fc: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3600: e5841020 str r1, [r4, #32] <== NOT EXECUTED
3604: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3608: e3130008 tst r3, #8 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
360c: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3610: 0a000048 beq 3738 <erase+0x1a0> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
3614: e3570000 cmp r7, #0 <== NOT EXECUTED
3618: 1a000005 bne 3634 <erase+0x9c> <== NOT EXECUTED
361c: e3130010 tst r3, #16 <== NOT EXECUTED
3620: 1a000003 bne 3634 <erase+0x9c> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
3624: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
3628: e1a01004 mov r1, r4 <== NOT EXECUTED
} } if (!lineFlag) break; } }
362c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
3630: eaffffb8 b 3518 <echo> <== NOT EXECUTED
}
else if (c == '\t') {
3634: e3550009 cmp r5, #9 <== NOT EXECUTED
3638: 1a000020 bne 36c0 <erase+0x128> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
363c: e2033c02 and r3, r3, #512 ; 0x200 <== 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;
3640: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
3644: e596c000 ldr ip, [r6] <== NOT EXECUTED
3648: e3a02000 mov r2, #0 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
364c: ea00000d b 3688 <erase+0xf0> <== NOT EXECUTED
c = tty->cbuf[i++];
3650: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
3654: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED
if (c == '\t') {
3658: e3500009 cmp r0, #9 <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
365c: e08c8000 add r8, ip, r0 <== NOT EXECUTED
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
3660: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
3664: 0a000005 beq 3680 <erase+0xe8> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
3668: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED
366c: e3100020 tst r0, #32 <== NOT EXECUTED
3670: 0a000002 beq 3680 <erase+0xe8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
3674: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
3678: 12855002 addne r5, r5, #2 <== NOT EXECUTED
367c: ea000000 b 3684 <erase+0xec> <== NOT EXECUTED
}
else {
col++;
3680: e2855001 add r5, r5, #1 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
3684: e2822001 add r2, r2, #1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
3688: e1520001 cmp r2, r1 <== NOT EXECUTED
368c: 1affffef bne 3650 <erase+0xb8> <== NOT EXECUTED
3690: ea000006 b 36b0 <erase+0x118> <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
3694: e59f00bc ldr r0, [pc, #188] ; 3758 <erase+0x1c0> <== NOT EXECUTED
3698: e3a01001 mov r1, #1 <== NOT EXECUTED
369c: e1a02004 mov r2, r4 <== NOT EXECUTED
36a0: ebffff02 bl 32b0 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
36a4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
36a8: e2433001 sub r3, r3, #1 <== NOT EXECUTED
36ac: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
36b0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
36b4: e1530005 cmp r3, r5 <== NOT EXECUTED
36b8: cafffff5 bgt 3694 <erase+0xfc> <== NOT EXECUTED
36bc: ea00001d b 3738 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
36c0: e5962000 ldr r2, [r6] <== NOT EXECUTED
36c4: e2855001 add r5, r5, #1 <== NOT EXECUTED
36c8: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED
36cc: e3120020 tst r2, #32 <== NOT EXECUTED
36d0: 0a000009 beq 36fc <erase+0x164> <== NOT EXECUTED
36d4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
36d8: 0a000007 beq 36fc <erase+0x164> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
36dc: e59f0078 ldr r0, [pc, #120] ; 375c <erase+0x1c4> <== NOT EXECUTED
36e0: e3a01003 mov r1, #3 <== NOT EXECUTED
36e4: e1a02004 mov r2, r4 <== NOT EXECUTED
36e8: ebfffef0 bl 32b0 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
36ec: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
36f0: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
36f4: 12433001 subne r3, r3, #1 <== NOT EXECUTED
36f8: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
36fc: e5963000 ldr r3, [r6] <== NOT EXECUTED
3700: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED
3704: e3130020 tst r3, #32 <== NOT EXECUTED
3708: 0a000002 beq 3718 <erase+0x180> <== NOT EXECUTED
370c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3710: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
3714: 0a000007 beq 3738 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
3718: e59f003c ldr r0, [pc, #60] ; 375c <erase+0x1c4> <== NOT EXECUTED
371c: e3a01003 mov r1, #3 <== NOT EXECUTED
3720: e1a02004 mov r2, r4 <== NOT EXECUTED
3724: ebfffee1 bl 32b0 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3728: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
372c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3730: 12433001 subne r3, r3, #1 <== NOT EXECUTED
3734: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} } } if (!lineFlag)
3738: e3570000 cmp r7, #0 <== NOT EXECUTED
373c: 1a000001 bne 3748 <erase+0x1b0> <== NOT EXECUTED
3740: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
3744: e59f6014 ldr r6, [pc, #20] ; 3760 <erase+0x1c8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
3748: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
374c: e3510000 cmp r1, #0 <== NOT EXECUTED
3750: 1affffa8 bne 35f8 <erase+0x60> <== NOT EXECUTED
3754: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00002758 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
2758: e92d000e push {r1, r2, r3}
275c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2760: e59f31a4 ldr r3, [pc, #420] ; 290c <fcntl+0x1b4>
2764: e5933000 ldr r3, [r3]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
2768: e28d201c add r2, sp, #28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
276c: e1500003 cmp r0, r3
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
2770: e58d2000 str r2, [sp]
int fcntl(
int fd,
int cmd,
...
)
{
2774: e59d7018 ldr r7, [sp, #24]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2778: 2a000005 bcs 2794 <fcntl+0x3c>
iop = rtems_libio_iop( fd );
277c: e59f118c ldr r1, [pc, #396] ; 2910 <fcntl+0x1b8>
2780: e591c000 ldr ip, [r1]
2784: e08c4300 add r4, ip, r0, lsl #6
rtems_libio_check_is_open(iop);
2788: e5940014 ldr r0, [r4, #20]
278c: e3100c01 tst r0, #256 ; 0x100
2790: 1a000002 bne 27a0 <fcntl+0x48>
2794: eb0033da bl f704 <__errno> <== NOT EXECUTED
2798: e3a03009 mov r3, #9 <== NOT EXECUTED
279c: ea000045 b 28b8 <fcntl+0x160> <== NOT EXECUTED
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
27a0: e3570009 cmp r7, #9
27a4: 979ff107 ldrls pc, [pc, r7, lsl #2]
27a8: ea000040 b 28b0 <fcntl+0x158>
27ac: 000027d4 .word 0x000027d4
27b0: 00002840 .word 0x00002840
27b4: 0000284c .word 0x0000284c
27b8: 0000286c .word 0x0000286c
27bc: 00002878 .word 0x00002878
27c0: 000028a4 .word 0x000028a4
27c4: 000028a4 .word 0x000028a4
27c8: 000028a4 .word 0x000028a4
27cc: 000028a4 .word 0x000028a4
27d0: 000028a4 .word 0x000028a4
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
27d4: e5922000 ldr r2, [r2]
if ( fd2 )
27d8: e3520000 cmp r2, #0
27dc: 0a000003 beq 27f0 <fcntl+0x98>
diop = rtems_libio_iop( fd2 );
27e0: e1520003 cmp r2, r3 <== NOT EXECUTED
27e4: 23a0c000 movcs ip, #0 <== NOT EXECUTED
27e8: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED
27ec: ea000002 b 27fc <fcntl+0xa4> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
27f0: eb0001dc bl 2f68 <rtems_libio_allocate>
if ( diop == 0 ) {
27f4: e250c000 subs ip, r0, #0
27f8: 0a00003e beq 28f8 <fcntl+0x1a0>
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
27fc: e2846018 add r6, r4, #24
2800: e8b6000f ldm r6!, {r0, r1, r2, r3}
2804: e28c5018 add r5, ip, #24
2808: e8a5000f stmia r5!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
280c: e59f30fc ldr r3, [pc, #252] ; 2910 <fcntl+0x1b8>
2810: e5933000 ldr r3, [r3]
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2814: e5966000 ldr r6, [r6]
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
2818: e594003c ldr r0, [r4, #60] ; 0x3c
diop->file_info = iop->file_info;
281c: e5941038 ldr r1, [r4, #56] ; 0x38
diop->flags = iop->flags;
2820: e5942014 ldr r2, [r4, #20]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
2824: e063300c rsb r3, r3, ip
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2828: e5856000 str r6, [r5]
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
282c: e58c003c str r0, [ip, #60] ; 0x3c
diop->file_info = iop->file_info;
2830: e58c1038 str r1, [ip, #56] ; 0x38
diop->flags = iop->flags;
2834: e58c2014 str r2, [ip, #20]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
2838: e1a05343 asr r5, r3, #6
283c: ea00001f b 28c0 <fcntl+0x168>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
2840: e1a055a0 lsr r5, r0, #11
2844: e2055001 and r5, r5, #1
2848: ea00001e b 28c8 <fcntl+0x170>
* 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 ) )
284c: e5925000 ldr r5, [r2]
2850: e3550000 cmp r5, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
2854: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
2858: 03c00b02 biceq r0, r0, #2048 ; 0x800
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
285c: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
2860: 05840014 streq r0, [r4, #20]
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
2864: 0a000017 beq 28c8 <fcntl+0x170>
2868: ea00000b b 289c <fcntl+0x144>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
286c: eb000154 bl 2dc4 <rtems_libio_to_fcntl_flags>
2870: e1a05000 mov r5, r0
2874: ea000011 b 28c0 <fcntl+0x168>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
2878: e5920000 ldr r0, [r2]
287c: eb0001e6 bl 301c <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
2880: e5943014 ldr r3, [r4, #20]
2884: e59f2088 ldr r2, [pc, #136] ; 2914 <fcntl+0x1bc>
2888: e3c33c02 bic r3, r3, #512 ; 0x200
288c: e0002002 and r2, r0, r2
2890: e3c33001 bic r3, r3, #1
2894: e1823003 orr r3, r2, r3
2898: e5843014 str r3, [r4, #20]
289c: e3a05000 mov r5, #0
28a0: ea000008 b 28c8 <fcntl+0x170>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
28a4: eb003396 bl f704 <__errno>
28a8: e3a03086 mov r3, #134 ; 0x86
28ac: ea000001 b 28b8 <fcntl+0x160>
ret = -1;
break;
default:
errno = EINVAL;
28b0: eb003393 bl f704 <__errno>
28b4: e3a03016 mov r3, #22
28b8: e5803000 str r3, [r0]
28bc: ea00000d b 28f8 <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
28c0: e3550000 cmp r5, #0
28c4: ba00000c blt 28fc <fcntl+0x1a4>
if (iop->handlers->fcntl_h) {
28c8: e594303c ldr r3, [r4, #60] ; 0x3c
28cc: e5933030 ldr r3, [r3, #48] ; 0x30
28d0: e3530000 cmp r3, #0
28d4: 0a000008 beq 28fc <fcntl+0x1a4>
int err = (*iop->handlers->fcntl_h)( cmd, iop );
28d8: e1a01004 mov r1, r4
28dc: e1a00007 mov r0, r7
28e0: e1a0e00f mov lr, pc
28e4: e12fff13 bx r3
if (err) {
28e8: e2504000 subs r4, r0, #0
28ec: 0a000002 beq 28fc <fcntl+0x1a4>
errno = err;
28f0: eb003383 bl f704 <__errno> <== NOT EXECUTED
28f4: e5804000 str r4, [r0] <== NOT EXECUTED
28f8: e3e05000 mvn r5, #0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
28fc: e1a00005 mov r0, r5
2900: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
2904: e28dd00c add sp, sp, #12
2908: e12fff1e bx lr
00008d6c <fifo_open>:
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
8d6c: e59f3360 ldr r3, [pc, #864] ; 90d4 <fifo_open+0x368>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8d70: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr}
8d74: e1a07001 mov r7, r1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
8d78: e3a01000 mov r1, #0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8d7c: e1a06000 mov r6, r0
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
8d80: e1a02001 mov r2, r1
8d84: e5930000 ldr r0, [r3]
8d88: ebfff0e2 bl 5118 <rtems_semaphore_obtain>
8d8c: e250a000 subs sl, r0, #0
8d90: 13e05003 mvnne r5, #3
8d94: 1a0000cc bne 90cc <fifo_open+0x360>
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
8d98: e5964000 ldr r4, [r6] <== NOT EXECUTED
if (pipe == NULL) {
8d9c: e3540000 cmp r4, #0 <== NOT EXECUTED
8da0: 1a00004c bne 8ed8 <fifo_open+0x16c> <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
8da4: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED
8da8: ebffe4f8 bl 2190 <malloc> <== NOT EXECUTED
if (pipe == NULL)
8dac: e3500000 cmp r0, #0 <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
8db0: e1a04000 mov r4, r0 <== NOT EXECUTED
8db4: e1a08000 mov r8, r0 <== NOT EXECUTED
if (pipe == NULL)
8db8: 0a000044 beq 8ed0 <fifo_open+0x164> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
8dbc: e1a0100a mov r1, sl <== NOT EXECUTED
8dc0: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED
8dc4: eb001887 bl efe8 <memset> <== NOT EXECUTED
pipe->Size = PIPE_BUF;
8dc8: e3a00c02 mov r0, #512 ; 0x200 <== NOT EXECUTED
8dcc: e5840004 str r0, [r4, #4] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
8dd0: ebffe4ee bl 2190 <malloc> <== NOT EXECUTED
if (! pipe->Buffer)
8dd4: 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);
8dd8: e5840000 str r0, [r4] <== NOT EXECUTED
if (! pipe->Buffer)
8ddc: 0a000039 beq 8ec8 <fifo_open+0x15c> <== NOT EXECUTED
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
8de0: e59f52f0 ldr r5, [pc, #752] ; 90d8 <fifo_open+0x36c> <== NOT EXECUTED
8de4: e59f02f0 ldr r0, [pc, #752] ; 90dc <fifo_open+0x370> <== NOT EXECUTED
8de8: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
8dec: e1a0100a mov r1, sl <== NOT EXECUTED
8df0: e1830000 orr r0, r3, r0 <== NOT EXECUTED
8df4: e1a0200a mov r2, sl <== NOT EXECUTED
8df8: e284302c add r3, r4, #44 ; 0x2c <== NOT EXECUTED
8dfc: eb000837 bl aee0 <rtems_barrier_create> <== NOT EXECUTED
8e00: e2501000 subs r1, r0, #0 <== NOT EXECUTED
8e04: 1a00002d bne 8ec0 <fifo_open+0x154> <== 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(
8e08: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
8e0c: e59f02cc ldr r0, [pc, #716] ; 90e0 <fifo_open+0x374> <== NOT EXECUTED
8e10: e1a02001 mov r2, r1 <== NOT EXECUTED
8e14: e1830000 orr r0, r3, r0 <== NOT EXECUTED
8e18: e2843030 add r3, r4, #48 ; 0x30 <== NOT EXECUTED
8e1c: eb00082f bl aee0 <rtems_barrier_create> <== NOT EXECUTED
8e20: e2503000 subs r3, r0, #0 <== NOT EXECUTED
8e24: 1a000023 bne 8eb8 <fifo_open+0x14c> <== 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(
8e28: e5d52000 ldrb r2, [r5] <== NOT EXECUTED
8e2c: e59f02b0 ldr r0, [pc, #688] ; 90e4 <fifo_open+0x378> <== NOT EXECUTED
8e30: e284c028 add ip, r4, #40 ; 0x28 <== NOT EXECUTED
8e34: e1820000 orr r0, r2, r0 <== NOT EXECUTED
8e38: e3a01001 mov r1, #1 <== NOT EXECUTED
8e3c: e3a02010 mov r2, #16 <== NOT EXECUTED
8e40: e58dc000 str ip, [sp] <== NOT EXECUTED
8e44: ebfff021 bl 4ed0 <rtems_semaphore_create> <== NOT EXECUTED
8e48: e3500000 cmp r0, #0 <== NOT EXECUTED
8e4c: 1a000017 bne 8eb0 <fifo_open+0x144> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
8e50: e28d8004 add r8, sp, #4 <== NOT EXECUTED
8e54: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED
8e58: e1a02008 mov r2, r8 <== NOT EXECUTED
8e5c: e59f0284 ldr r0, [pc, #644] ; 90e8 <fifo_open+0x37c> <== NOT EXECUTED
8e60: ebfff662 bl 67f0 <_Objects_Get> <== NOT EXECUTED
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
8e64: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED
8e68: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED
8e6c: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
8e70: ebfff89c bl 70e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
8e74: e1a02008 mov r2, r8 <== NOT EXECUTED
8e78: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED
8e7c: e59f0264 ldr r0, [pc, #612] ; 90e8 <fifo_open+0x37c> <== NOT EXECUTED
8e80: ebfff65a bl 67f0 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
8e84: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED
8e88: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED
8e8c: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
8e90: ebfff894 bl 70e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
8e94: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
8e98: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED
8e9c: e2833001 add r3, r3, #1 <== NOT EXECUTED
8ea0: e5c53000 strb r3, [r5] <== NOT EXECUTED
c = 'a';
8ea4: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED
8ea8: 05c53000 strbeq r3, [r5] <== NOT EXECUTED
8eac: ea000009 b 8ed8 <fifo_open+0x16c> <== NOT EXECUTED
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
8eb0: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8eb4: eb000837 bl af98 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
8eb8: e598002c ldr r0, [r8, #44] ; 0x2c <== NOT EXECUTED
8ebc: eb000835 bl af98 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
8ec0: e5980000 ldr r0, [r8] <== NOT EXECUTED
8ec4: ebffe3e5 bl 1e60 <free> <== NOT EXECUTED
err_buf: free(pipe);
8ec8: e1a00008 mov r0, r8 <== NOT EXECUTED
8ecc: ebffe3e3 bl 1e60 <free> <== NOT EXECUTED
8ed0: e3e0500b mvn r5, #11 <== NOT EXECUTED
8ed4: ea00000d b 8f10 <fifo_open+0x1a4> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
8ed8: e3a01000 mov r1, #0 <== NOT EXECUTED
8edc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8ee0: e1a02001 mov r2, r1 <== NOT EXECUTED
8ee4: ebfff08b bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
8ee8: e5963000 ldr r3, [r6] <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
8eec: e3500000 cmp r0, #0 <== NOT EXECUTED
8ef0: 01a05000 moveq r5, r0 <== NOT EXECUTED
8ef4: 13e05003 mvnne r5, #3 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
8ef8: e3530000 cmp r3, #0 <== NOT EXECUTED
8efc: 1a000003 bne 8f10 <fifo_open+0x1a4> <== NOT EXECUTED
if (err)
8f00: e3550000 cmp r5, #0 <== NOT EXECUTED
pipe_free(pipe);
else
*pipep = pipe;
8f04: 05864000 streq r4, [r6] <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
8f08: 11a00004 movne r0, r4 <== NOT EXECUTED
8f0c: 1bffff4a blne 8c3c <pipe_free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
8f10: e59f31bc ldr r3, [pc, #444] ; 90d4 <fifo_open+0x368> <== NOT EXECUTED
8f14: e5930000 ldr r0, [r3] <== NOT EXECUTED
8f18: ebfff0c4 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
8f1c: e3550000 cmp r5, #0 <== NOT EXECUTED
8f20: 1a000069 bne 90cc <fifo_open+0x360> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
8f24: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
8f28: e2033006 and r3, r3, #6 <== NOT EXECUTED
8f2c: e3530004 cmp r3, #4 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
8f30: e5964000 ldr r4, [r6] <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
8f34: 0a000024 beq 8fcc <fifo_open+0x260> <== NOT EXECUTED
8f38: e3530006 cmp r3, #6 <== NOT EXECUTED
8f3c: 0a000047 beq 9060 <fifo_open+0x2f4> <== NOT EXECUTED
8f40: e3530002 cmp r3, #2 <== NOT EXECUTED
8f44: 1a000059 bne 90b0 <fifo_open+0x344> <== NOT EXECUTED
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
8f48: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8f4c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8f50: e3530000 cmp r3, #0 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8f54: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8f58: e2833001 add r3, r3, #1 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8f5c: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8f60: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
8f64: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8f68: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
8f6c: 0b000831 bleq b038 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Writers == 0) {
8f70: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
8f74: e3530000 cmp r3, #0 <== NOT EXECUTED
8f78: 1a00004c bne 90b0 <fifo_open+0x344> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
8f7c: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
8f80: e3130001 tst r3, #1 <== NOT EXECUTED
8f84: 1a000049 bne 90b0 <fifo_open+0x344> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
8f88: e5948024 ldr r8, [r4, #36] ; 0x24 <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
8f8c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8f90: ebfff0a6 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
8f94: e3a01000 mov r1, #0 <== NOT EXECUTED
8f98: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8f9c: eb00083b bl b090 <rtems_barrier_wait> <== NOT EXECUTED
8fa0: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8fa4: 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))
8fa8: 1a000043 bne 90bc <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8fac: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8fb0: ebfff058 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
8fb4: e3500000 cmp r0, #0 <== NOT EXECUTED
8fb8: 1a00003f bne 90bc <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
8fbc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
8fc0: e1580003 cmp r8, r3 <== NOT EXECUTED
8fc4: 0afffff0 beq 8f8c <fifo_open+0x220> <== NOT EXECUTED
8fc8: ea000038 b 90b0 <fifo_open+0x344> <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
8fcc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
8fd0: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8fd4: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
8fd8: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8fdc: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
8fe0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8fe4: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
8fe8: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8fec: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
8ff0: 0b000810 bleq b038 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
8ff4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
8ff8: e3530000 cmp r3, #0 <== NOT EXECUTED
8ffc: 1a00002b bne 90b0 <fifo_open+0x344> <== NOT EXECUTED
9000: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
9004: e3130001 tst r3, #1 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
9008: 05948020 ldreq r8, [r4, #32] <== NOT EXECUTED
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
900c: 0a000003 beq 9020 <fifo_open+0x2b4> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
9010: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9014: ebfff085 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
9018: e3e05005 mvn r5, #5 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
901c: ea000027 b 90c0 <fifo_open+0x354> <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
9020: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9024: ebfff081 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
9028: e3a01000 mov r1, #0 <== NOT EXECUTED
902c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
9030: eb000816 bl b090 <rtems_barrier_wait> <== NOT EXECUTED
9034: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
9038: e1a02001 mov r2, r1 <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
903c: 1a00001e bne 90bc <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
9040: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9044: ebfff033 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
9048: e3500000 cmp r0, #0 <== NOT EXECUTED
904c: 1a00001a bne 90bc <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
9050: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
9054: e1580003 cmp r8, r3 <== NOT EXECUTED
9058: 0afffff0 beq 9020 <fifo_open+0x2b4> <== NOT EXECUTED
905c: ea000013 b 90b0 <fifo_open+0x344> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
9060: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
9064: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
9068: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
906c: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
9070: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
9074: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
9078: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
907c: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED
9080: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
9084: 0b0007eb bleq b038 <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
9088: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
908c: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9090: e3530000 cmp r3, #0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
9094: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9098: e2833001 add r3, r3, #1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
909c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
90a0: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
90a4: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED
90a8: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
90ac: 0b0007e1 bleq b038 <rtems_barrier_release> <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
90b0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
90b4: ebfff05d bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
90b8: ea000003 b 90cc <fifo_open+0x360> <== NOT EXECUTED
90bc: e3e05003 mvn r5, #3 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
90c0: e1a00006 mov r0, r6 <== NOT EXECUTED
90c4: e1a01007 mov r1, r7 <== NOT EXECUTED
90c8: ebfffee8 bl 8c70 <pipe_release> <== NOT EXECUTED
return err; }
90cc: e1a00005 mov r0, r5
90d0: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc}
000029ac <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
29ac: e59f3100 ldr r3, [pc, #256] ; 2ab4 <fpathconf+0x108>
29b0: e5933000 ldr r3, [r3]
29b4: e1500003 cmp r0, r3
long fpathconf(
int fd,
int name
)
{
29b8: 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);
29bc: 2a000005 bcs 29d8 <fpathconf+0x2c>
iop = rtems_libio_iop(fd);
29c0: e59f30f0 ldr r3, [pc, #240] ; 2ab8 <fpathconf+0x10c>
29c4: e5933000 ldr r3, [r3]
29c8: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
29cc: e5903014 ldr r3, [r0, #20]
29d0: e3130c01 tst r3, #256 ; 0x100
29d4: 1a000002 bne 29e4 <fpathconf+0x38>
29d8: eb003349 bl f704 <__errno>
29dc: e3a03009 mov r3, #9
29e0: ea000003 b 29f4 <fpathconf+0x48>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
29e4: e3130002 tst r3, #2
29e8: 1a000004 bne 2a00 <fpathconf+0x54>
29ec: eb003344 bl f704 <__errno> <== NOT EXECUTED
29f0: e3a03016 mov r3, #22 <== NOT EXECUTED
29f4: e5803000 str r3, [r0]
29f8: e3e00000 mvn r0, #0
29fc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2a00: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
2a04: e351000b cmp r1, #11
2a08: 979ff101 ldrls pc, [pc, r1, lsl #2]
2a0c: ea000023 b 2aa0 <fpathconf+0xf4>
2a10: 00002a40 .word 0x00002a40
2a14: 00002a48 .word 0x00002a48
2a18: 00002a50 .word 0x00002a50
2a1c: 00002a58 .word 0x00002a58
2a20: 00002a60 .word 0x00002a60
2a24: 00002a68 .word 0x00002a68
2a28: 00002a70 .word 0x00002a70
2a2c: 00002a78 .word 0x00002a78
2a30: 00002a80 .word 0x00002a80
2a34: 00002a88 .word 0x00002a88
2a38: 00002a90 .word 0x00002a90
2a3c: 00002a98 .word 0x00002a98
case _PC_LINK_MAX:
return_value = the_limits->link_max;
2a40: e5930038 ldr r0, [r3, #56] ; 0x38
break;
2a44: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
2a48: e593003c ldr r0, [r3, #60] ; 0x3c
break;
2a4c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
2a50: e5930040 ldr r0, [r3, #64] ; 0x40
break;
2a54: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
2a58: e5930044 ldr r0, [r3, #68] ; 0x44
break;
2a5c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
2a60: e5930048 ldr r0, [r3, #72] ; 0x48
break;
2a64: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
2a68: e593004c ldr r0, [r3, #76] ; 0x4c
break;
2a6c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
2a70: e5930054 ldr r0, [r3, #84] ; 0x54
break;
2a74: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
2a78: e5930058 ldr r0, [r3, #88] ; 0x58
break;
2a7c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
2a80: e5930064 ldr r0, [r3, #100] ; 0x64
break;
2a84: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
2a88: e5930050 ldr r0, [r3, #80] ; 0x50
break;
2a8c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
2a90: e593005c ldr r0, [r3, #92] ; 0x5c
break;
2a94: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
2a98: e5930060 ldr r0, [r3, #96] ; 0x60
break;
2a9c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2aa0: eb003317 bl f704 <__errno>
2aa4: e3a03016 mov r3, #22
2aa8: e5803000 str r3, [r0]
2aac: e3e00000 mvn r0, #0
break;
}
return return_value;
}
2ab0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001e60 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
1e60: e59f3088 ldr r3, [pc, #136] ; 1ef0 <free+0x90>
1e64: e593200c ldr r2, [r3, #12]
1e68: e92d4030 push {r4, r5, lr}
1e6c: e2822001 add r2, r2, #1
if ( !ptr )
1e70: e2504000 subs r4, r0, #0
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
1e74: e583200c str r2, [r3, #12]
if ( !ptr )
1e78: 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()) &&
1e7c: e59f3070 ldr r3, [pc, #112] ; 1ef4 <free+0x94>
1e80: e5933000 ldr r3, [r3]
1e84: e3530003 cmp r3, #3
1e88: 1a000005 bne 1ea4 <free+0x44>
1e8c: eb000065 bl 2028 <malloc_is_system_state_OK>
1e90: e3500000 cmp r0, #0
1e94: 1a000002 bne 1ea4 <free+0x44>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
1e98: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1e9c: 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);
1ea0: ea000073 b 2074 <malloc_deferred_free> <== NOT EXECUTED
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1ea4: e59f304c ldr r3, [pc, #76] ; 1ef8 <free+0x98>
1ea8: e5933000 ldr r3, [r3]
1eac: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1eb0: 11a00004 movne r0, r4
1eb4: 11a0e00f movne lr, pc
1eb8: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
1ebc: e59f5038 ldr r5, [pc, #56] ; 1efc <free+0x9c>
1ec0: e1a01004 mov r1, r4
1ec4: e5950000 ldr r0, [r5]
1ec8: eb001301 bl 6ad4 <_Protected_heap_Free>
1ecc: e3500000 cmp r0, #0
1ed0: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
1ed4: 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",
1ed8: e59f0020 ldr r0, [pc, #32] ; 1f00 <free+0xa0> <== NOT EXECUTED
1edc: e2822018 add r2, r2, #24 <== NOT EXECUTED
1ee0: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
1ee4: e1a01004 mov r1, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1ee8: 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",
1eec: ea000364 b 2c84 <printk> <== NOT EXECUTED
00003144 <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
3144: e59f3058 ldr r3, [pc, #88] ; 31a4 <free_user_env+0x60> <== NOT EXECUTED
3148: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
314c: e92d4010 push {r4, lr} <== NOT EXECUTED
3150: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
3154: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
3158: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
315c: e3530000 cmp r3, #0 <== NOT EXECUTED
3160: 0a000004 beq 3178 <free_user_env+0x34> <== NOT EXECUTED
3164: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3168: e3530000 cmp r3, #0 <== NOT EXECUTED
316c: 12800004 addne r0, r0, #4 <== NOT EXECUTED
3170: 11a0e00f movne lr, pc <== NOT EXECUTED
3174: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
3178: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
317c: e3530000 cmp r3, #0 <== NOT EXECUTED
3180: 0a000004 beq 3198 <free_user_env+0x54> <== NOT EXECUTED
3184: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3188: e3530000 cmp r3, #0 <== NOT EXECUTED
318c: 12840018 addne r0, r4, #24 <== NOT EXECUTED
3190: 11a0e00f movne lr, pc <== NOT EXECUTED
3194: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
3198: e1a00004 mov r0, r4 <== NOT EXECUTED
} }
319c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
31a0: eafffbb1 b 206c <free> <== NOT EXECUTED
00019fd8 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
19fd8: e92d4030 push {r4, r5, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
19fdc: e2515000 subs r5, r1, #0
19fe0: 1a000002 bne 19ff0 <fstat+0x18>
rtems_set_errno_and_return_minus_one( EFAULT );
19fe4: ebffd1b5 bl e6c0 <__errno> 19fe8: e3a0300e mov r3, #14 19fec: ea000014 b 1a044 <fstat+0x6c>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
19ff0: e59f3080 ldr r3, [pc, #128] ; 1a078 <fstat+0xa0> 19ff4: e5933000 ldr r3, [r3] 19ff8: e1500003 cmp r0, r3
19ffc: 2a000008 bcs 1a024 <fstat+0x4c>
1a000: e59f3074 ldr r3, [pc, #116] ; 1a07c <fstat+0xa4> 1a004: e5934000 ldr r4, [r3] 1a008: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
1a00c: e5943014 ldr r3, [r4, #20] 1a010: e3130c01 tst r3, #256 ; 0x100
1a014: 0a000002 beq 1a024 <fstat+0x4c>
if ( !iop->handlers )
1a018: e594303c ldr r3, [r4, #60] ; 0x3c 1a01c: e3530000 cmp r3, #0
1a020: 1a000002 bne 1a030 <fstat+0x58>
rtems_set_errno_and_return_minus_one( EBADF );
1a024: ebffd1a5 bl e6c0 <__errno> 1a028: e3a03009 mov r3, #9 1a02c: ea000004 b 1a044 <fstat+0x6c>
if ( !iop->handlers->fstat_h )
1a030: e5933018 ldr r3, [r3, #24] 1a034: e3530000 cmp r3, #0
1a038: 1a000004 bne 1a050 <fstat+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a03c: ebffd19f bl e6c0 <__errno> <== NOT EXECUTED 1a040: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a044: e5803000 str r3, [r0]
1a048: e3e00000 mvn r0, #0
1a04c: e8bd8030 pop {r4, r5, pc}
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
1a050: e3a01000 mov r1, #0 1a054: e3a02048 mov r2, #72 ; 0x48 1a058: e1a00005 mov r0, r5 1a05c: ebffd3e1 bl efe8 <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
1a060: e2840018 add r0, r4, #24 1a064: e1a01005 mov r1, r5 1a068: e594303c ldr r3, [r4, #60] ; 0x3c 1a06c: e1a0e00f mov lr, pc 1a070: e593f018 ldr pc, [r3, #24]
}
1a074: e8bd8030 pop {r4, r5, pc}
00002c14 <fsync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2c14: e59f307c ldr r3, [pc, #124] ; 2c98 <fsync+0x84>
2c18: e5933000 ldr r3, [r3]
2c1c: e1500003 cmp r0, r3
#include <rtems/seterr.h>
int fsync(
int fd
)
{
2c20: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2c24: 2a00000d bcs 2c60 <fsync+0x4c>
iop = rtems_libio_iop( fd );
2c28: e59f306c ldr r3, [pc, #108] ; 2c9c <fsync+0x88>
2c2c: e5933000 ldr r3, [r3]
2c30: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2c34: e5903014 ldr r3, [r0, #20]
2c38: e3130c01 tst r3, #256 ; 0x100
2c3c: 0a000007 beq 2c60 <fsync+0x4c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
2c40: e3130004 tst r3, #4
2c44: 1a000002 bne 2c54 <fsync+0x40>
2c48: eb0032ad bl f704 <__errno>
2c4c: e3a03016 mov r3, #22
2c50: ea00000a b 2c80 <fsync+0x6c>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
2c54: e590303c ldr r3, [r0, #60] ; 0x3c
2c58: e3530000 cmp r3, #0
2c5c: 1a000002 bne 2c6c <fsync+0x58>
rtems_set_errno_and_return_minus_one( EBADF );
2c60: eb0032a7 bl f704 <__errno> <== NOT EXECUTED
2c64: e3a03009 mov r3, #9 <== NOT EXECUTED
2c68: ea000004 b 2c80 <fsync+0x6c> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
2c6c: e5933028 ldr r3, [r3, #40] ; 0x28
2c70: e3530000 cmp r3, #0
2c74: 1a000004 bne 2c8c <fsync+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
2c78: eb0032a1 bl f704 <__errno>
2c7c: e3a03086 mov r3, #134 ; 0x86
2c80: e5803000 str r3, [r0]
2c84: e3e00000 mvn r0, #0
2c88: e49df004 pop {pc} ; (ldr pc, [sp], #4)
return (*iop->handlers->fsync_h)( iop );
2c8c: e1a0e00f mov lr, pc
2c90: e12fff13 bx r3
}
2c94: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000a14c <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
a14c: e92d4070 push {r4, r5, r6, lr}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a150: e59f30d4 ldr r3, [pc, #212] ; a22c <ftruncate+0xe0>
a154: e5933000 ldr r3, [r3]
a158: e1500003 cmp r0, r3
int ftruncate(
int fd,
off_t length
)
{
a15c: e24dd014 sub sp, sp, #20
a160: e1a05001 mov r5, r1
a164: e1a06002 mov r6, r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a168: 2a000005 bcs a184 <ftruncate+0x38>
iop = rtems_libio_iop( fd );
a16c: e59f30bc ldr r3, [pc, #188] ; a230 <ftruncate+0xe4>
a170: e5934000 ldr r4, [r3]
a174: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
a178: e5943014 ldr r3, [r4, #20]
a17c: e3130c01 tst r3, #256 ; 0x100
a180: 1a000002 bne a190 <ftruncate+0x44>
a184: eb00114d bl e6c0 <__errno> <== NOT EXECUTED
a188: e3a03009 mov r3, #9 <== NOT EXECUTED
a18c: ea00001c b a204 <ftruncate+0xb8> <== NOT EXECUTED
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a190: e284e018 add lr, r4, #24
a194: e8be000f ldm lr!, {r0, r1, r2, r3}
a198: e1a0c00d mov ip, sp
a19c: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
a1a0: e5933010 ldr r3, [r3, #16]
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a1a4: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
a1a8: e3530000 cmp r3, #0
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a1ac: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h )
a1b0: 0a000011 beq a1fc <ftruncate+0xb0>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
a1b4: e1a0000d mov r0, sp
a1b8: e1a0e00f mov lr, pc
a1bc: e12fff13 bx r3
a1c0: e3500001 cmp r0, #1
a1c4: 1a000002 bne a1d4 <ftruncate+0x88>
rtems_set_errno_and_return_minus_one( EISDIR );
a1c8: eb00113c bl e6c0 <__errno>
a1cc: e3a03015 mov r3, #21
a1d0: ea00000b b a204 <ftruncate+0xb8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a1d4: e5943014 ldr r3, [r4, #20]
a1d8: e3130004 tst r3, #4
a1dc: 1a000002 bne a1ec <ftruncate+0xa0>
a1e0: eb001136 bl e6c0 <__errno> <== NOT EXECUTED
a1e4: e3a03016 mov r3, #22 <== NOT EXECUTED
a1e8: ea000005 b a204 <ftruncate+0xb8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
a1ec: e594303c ldr r3, [r4, #60] ; 0x3c
a1f0: e5933020 ldr r3, [r3, #32]
a1f4: e3530000 cmp r3, #0
a1f8: 1a000004 bne a210 <ftruncate+0xc4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
a1fc: eb00112f bl e6c0 <__errno> <== NOT EXECUTED
a200: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
a204: e5803000 str r3, [r0]
a208: e3e00000 mvn r0, #0
a20c: ea000004 b a224 <ftruncate+0xd8>
return (*iop->handlers->ftruncate_h)( iop, length );
a210: e1a00004 mov r0, r4
a214: e1a01005 mov r1, r5
a218: e1a02006 mov r2, r6
a21c: e1a0e00f mov lr, pc
a220: e12fff13 bx r3
}
a224: e28dd014 add sp, sp, #20
a228: e8bd8070 pop {r4, r5, r6, pc}
0001bd30 <getdents>:
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
1bd30: e59f30a8 ldr r3, [pc, #168] ; 1bde0 <getdents+0xb0> 1bd34: e5933000 ldr r3, [r3] 1bd38: e1500003 cmp r0, r3 1bd3c: 359f30a0 ldrcc r3, [pc, #160] ; 1bde4 <getdents+0xb4>
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
1bd40: e92d4070 push {r4, r5, r6, lr}
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
1bd44: 35934000 ldrcc r4, [r3] 1bd48: 23a04000 movcs r4, #0 1bd4c: 30844300 addcc r4, r4, r0, lsl #6
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
1bd50: e284e018 add lr, r4, #24
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
1bd54: e24dd014 sub sp, sp, #20 1bd58: e1a06001 mov r6, r1 1bd5c: e1a05002 mov r5, r2
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
1bd60: e8be000f ldm lr!, {r0, r1, r2, r3}
1bd64: e1a0c00d mov ip, sp
1bd68: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
1bd6c: e5933010 ldr r3, [r3, #16]
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
1bd70: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
1bd74: e3530000 cmp r3, #0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
1bd78: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h )
1bd7c: 0a00000d beq 1bdb8 <getdents+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
1bd80: e1a0000d mov r0, sp 1bd84: e1a0e00f mov lr, pc 1bd88: e12fff13 bx r3 1bd8c: e3500001 cmp r0, #1
1bd90: 0a000004 beq 1bda8 <getdents+0x78>
rtems_set_errno_and_return_minus_one( ENOTDIR );
1bd94: ebffce6b bl f748 <__errno> 1bd98: e3a03014 mov r3, #20 1bd9c: e5803000 str r3, [r0] 1bda0: e3e00000 mvn r0, #0 1bda4: ea00000b b 1bdd8 <getdents+0xa8>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
1bda8: e594303c ldr r3, [r4, #60] ; 0x3c 1bdac: e5933008 ldr r3, [r3, #8] 1bdb0: e3530000 cmp r3, #0
1bdb4: 1a000002 bne 1bdc4 <getdents+0x94>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1bdb8: ebffce62 bl f748 <__errno> <== NOT EXECUTED 1bdbc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1bdc0: eafffff5 b 1bd9c <getdents+0x6c> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
1bdc4: e1a00004 mov r0, r4 1bdc8: e1a01006 mov r1, r6 1bdcc: e1a02005 mov r2, r5 1bdd0: e1a0e00f mov lr, pc 1bdd4: e12fff13 bx r3
}
1bdd8: e28dd014 add sp, sp, #20
1bddc: e8bd8070 pop {r4, r5, r6, pc}
00002654 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
2654: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
2658: e59da01c ldr sl, [sp, #28]
265c: e1a06000 mov r6, r0
2660: e1a07001 mov r7, r1
2664: e1a04002 mov r4, r2
2668: e1a08003 mov r8, r3
FILE *fp;
int match;
init_etc_passwd_group();
266c: ebffffb7 bl 2550 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
2670: e59f00a4 ldr r0, [pc, #164] ; 271c <getgr_r+0xc8>
2674: e59f10a4 ldr r1, [pc, #164] ; 2720 <getgr_r+0xcc>
2678: eb00348c bl f8b0 <fopen>
267c: e2505000 subs r5, r0, #0
2680: 1a000003 bne 2694 <getgr_r+0x40>
errno = EINVAL;
2684: eb003284 bl f09c <__errno> <== NOT EXECUTED
2688: e3a03016 mov r3, #22 <== NOT EXECUTED
268c: e5803000 str r3, [r0] <== NOT EXECUTED
2690: ea00000c b 26c8 <getgr_r+0x74> <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
2694: e1a01004 mov r1, r4
2698: e1a02008 mov r2, r8
269c: e1a0300a mov r3, sl
26a0: e1a00005 mov r0, r5
26a4: ebfffef2 bl 2274 <scangr>
26a8: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
26ac: e1a01006 mov r1, r6
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
26b0: 1a000006 bne 26d0 <getgr_r+0x7c>
errno = EINVAL;
26b4: eb003278 bl f09c <__errno> <== NOT EXECUTED
26b8: e3a03016 mov r3, #22 <== NOT EXECUTED
26bc: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
26c0: e1a00005 mov r0, r5 <== NOT EXECUTED
26c4: eb0032c1 bl f1d0 <fclose> <== NOT EXECUTED
26c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
26cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
if (name) {
26d0: e3560000 cmp r6, #0
26d4: 0a000004 beq 26ec <getgr_r+0x98>
match = (strcmp(grp->gr_name, name) == 0);
26d8: e5940000 ldr r0, [r4]
26dc: eb0039dd bl 10e58 <strcmp>
26e0: e2700001 rsbs r0, r0, #1
26e4: 33a00000 movcc r0, #0
26e8: ea000003 b 26fc <getgr_r+0xa8>
}
else {
match = (grp->gr_gid == gid);
26ec: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
26f0: e1500007 cmp r0, r7 <== NOT EXECUTED
26f4: 13a00000 movne r0, #0 <== NOT EXECUTED
26f8: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
26fc: e3500000 cmp r0, #0
2700: 0affffe3 beq 2694 <getgr_r+0x40>
fclose(fp);
2704: e1a00005 mov r0, r5
2708: eb0032b0 bl f1d0 <fclose>
*result = grp;
270c: e59d3020 ldr r3, [sp, #32]
2710: e3a00000 mov r0, #0
2714: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
2718: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
000023ac <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
23ac: e92d4010 push {r4, lr} <== NOT EXECUTED
if (group_fp == NULL)
23b0: e59f402c ldr r4, [pc, #44] ; 23e4 <getgrent+0x38> <== NOT EXECUTED
23b4: e5940000 ldr r0, [r4] <== NOT EXECUTED
23b8: e3500000 cmp r0, #0 <== NOT EXECUTED
23bc: 0a000006 beq 23dc <getgrent+0x30> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
23c0: e2841008 add r1, r4, #8 <== NOT EXECUTED
23c4: e2842018 add r2, r4, #24 <== NOT EXECUTED
23c8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
23cc: ebffffa8 bl 2274 <scangr> <== NOT EXECUTED
23d0: e3500000 cmp r0, #0 <== NOT EXECUTED
23d4: 12840008 addne r0, r4, #8 <== NOT EXECUTED
23d8: 18bd8010 popne {r4, pc} <== NOT EXECUTED
23dc: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &grent;
}
23e0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00002758 <getgrgid>:
struct group *getgrgid(
gid_t gid
)
{
2758: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
275c: e59f1028 ldr r1, [pc, #40] ; 278c <getgrgid+0x34> <== NOT EXECUTED
}
struct group *getgrgid(
gid_t gid
)
{
2760: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
2764: e28dc004 add ip, sp, #4 <== NOT EXECUTED
2768: e2812010 add r2, r1, #16 <== NOT EXECUTED
276c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
2770: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
2774: e58dc000 str ip, [sp] <== NOT EXECUTED
2778: ebffffe9 bl 2724 <getgrgid_r> <== NOT EXECUTED
277c: e3500000 cmp r0, #0 <== NOT EXECUTED
2780: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
2784: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
2788: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00002724 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
2724: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
2728: e1a0c002 mov ip, r2 <== NOT EXECUTED
272c: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
2730: e58d3000 str r3, [sp] <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
2734: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
2738: e1a0300c mov r3, ip <== NOT EXECUTED
273c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
2740: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
2744: e1a0200e mov r2, lr <== NOT EXECUTED
2748: e3a00000 mov r0, #0 <== NOT EXECUTED
274c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
2750: ebffffbf bl 2654 <getgr_r> <== NOT EXECUTED
}
2754: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00002824 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
2824: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
2828: e59da01c ldr sl, [sp, #28]
282c: e1a06000 mov r6, r0
2830: e1a07001 mov r7, r1
2834: e1a04002 mov r4, r2
2838: e1a08003 mov r8, r3
FILE *fp;
int match;
init_etc_passwd_group();
283c: ebffff43 bl 2550 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
2840: e59f00a4 ldr r0, [pc, #164] ; 28ec <getpw_r+0xc8>
2844: e59f10a4 ldr r1, [pc, #164] ; 28f0 <getpw_r+0xcc>
2848: eb003418 bl f8b0 <fopen>
284c: e2505000 subs r5, r0, #0
2850: 1a000003 bne 2864 <getpw_r+0x40>
errno = EINVAL;
2854: eb003210 bl f09c <__errno> <== NOT EXECUTED
2858: e3a03016 mov r3, #22 <== NOT EXECUTED
285c: e5803000 str r3, [r0] <== NOT EXECUTED
2860: ea00000c b 2898 <getpw_r+0x74> <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
2864: e1a01004 mov r1, r4
2868: e1a02008 mov r2, r8
286c: e1a0300a mov r3, sl
2870: e1a00005 mov r0, r5
2874: ebfffedb bl 23e8 <scanpw>
2878: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
287c: e1a01006 mov r1, r6
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
2880: 1a000006 bne 28a0 <getpw_r+0x7c>
errno = EINVAL;
2884: eb003204 bl f09c <__errno> <== NOT EXECUTED
2888: e3a03016 mov r3, #22 <== NOT EXECUTED
288c: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
2890: e1a00005 mov r0, r5 <== NOT EXECUTED
2894: eb00324d bl f1d0 <fclose> <== NOT EXECUTED
2898: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
289c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
if (name) {
28a0: e3560000 cmp r6, #0
28a4: 0a000004 beq 28bc <getpw_r+0x98>
match = (strcmp(pwd->pw_name, name) == 0);
28a8: e5940000 ldr r0, [r4]
28ac: eb003969 bl 10e58 <strcmp>
28b0: e2700001 rsbs r0, r0, #1
28b4: 33a00000 movcc r0, #0
28b8: ea000003 b 28cc <getpw_r+0xa8>
}
else {
match = (pwd->pw_uid == uid);
28bc: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
28c0: e1500007 cmp r0, r7 <== NOT EXECUTED
28c4: 13a00000 movne r0, #0 <== NOT EXECUTED
28c8: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
28cc: e3500000 cmp r0, #0
28d0: 0affffe3 beq 2864 <getpw_r+0x40>
fclose(fp);
28d4: e1a00005 mov r0, r5
28d8: eb00323c bl f1d0 <fclose>
*result = pwd;
28dc: e59d3020 ldr r3, [sp, #32]
28e0: e3a00000 mov r0, #0
28e4: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
28e8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00002514 <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
2514: e92d4010 push {r4, lr} <== NOT EXECUTED
if (passwd_fp == NULL)
2518: e59f402c ldr r4, [pc, #44] ; 254c <getpwent+0x38> <== NOT EXECUTED
251c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
2520: e3500000 cmp r0, #0 <== NOT EXECUTED
2524: 0a000006 beq 2544 <getpwent+0x30> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
2528: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED
252c: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED
2530: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
2534: ebffffab bl 23e8 <scanpw> <== NOT EXECUTED
2538: e3500000 cmp r0, #0 <== NOT EXECUTED
253c: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED
2540: 18bd8010 popne {r4, pc} <== NOT EXECUTED
2544: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &pwent;
}
2548: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00002928 <getpwuid>:
struct passwd *getpwuid(
uid_t uid
)
{
2928: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
292c: e59f1028 ldr r1, [pc, #40] ; 295c <getpwuid+0x34> <== NOT EXECUTED
}
struct passwd *getpwuid(
uid_t uid
)
{
2930: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
2934: e28dc004 add ip, sp, #4 <== NOT EXECUTED
2938: e281201c add r2, r1, #28 <== NOT EXECUTED
293c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
2940: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
2944: e58dc000 str ip, [sp] <== NOT EXECUTED
2948: ebffffe9 bl 28f4 <getpwuid_r> <== NOT EXECUTED
294c: e3500000 cmp r0, #0 <== NOT EXECUTED
2950: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
2954: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
2958: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
000028f4 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
28f4: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
28f8: e1a0c002 mov ip, r2 <== NOT EXECUTED
28fc: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
2900: e58d3000 str r3, [sp] <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
2904: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
2908: e1a0300c mov r3, ip <== NOT EXECUTED
290c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
2910: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
2914: e1a0200e mov r2, lr <== NOT EXECUTED
2918: e3a00000 mov r0, #0 <== NOT EXECUTED
291c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
2920: ebffffbf bl 2824 <getpw_r> <== NOT EXECUTED
}
2924: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00001f04 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
1f04: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
1f08: e2504000 subs r4, r0, #0
1f0c: 1a000004 bne 1f24 <gettimeofday+0x20>
errno = EFAULT;
1f10: eb0031ea bl e6c0 <__errno> <== NOT EXECUTED
1f14: e3a0300e mov r3, #14 <== NOT EXECUTED
1f18: e5803000 str r3, [r0] <== NOT EXECUTED
1f1c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
1f20: ea00000c b 1f58 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
1f24: e10f5000 mrs r5, CPSR
1f28: e3853080 orr r3, r5, #128 ; 0x80
1f2c: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
1f30: e1a0000d mov r0, sp
1f34: eb000fcc bl 5e6c <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
1f38: e129f005 msr CPSR_fc, r5
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
1f3c: e59d3000 ldr r3, [sp]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
1f40: e59d0004 ldr r0, [sp, #4]
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
1f44: e3a01ffa mov r1, #1000 ; 0x3e8
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
1f48: e5843000 str r3, [r4]
time->tv_usec = useconds;
1f4c: eb0057a9 bl 17df8 <__aeabi_idiv>
1f50: e5840004 str r0, [r4, #4]
1f54: 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;
}
1f58: e8bd803c pop {r2, r3, r4, r5, pc}
00005264 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
5264: e92d000e push {r1, r2, r3}
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
5268: e59f3080 ldr r3, [pc, #128] ; 52f0 <ioctl+0x8c>
526c: e5933000 ldr r3, [r3]
5270: e1500003 cmp r0, r3
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
5274: e92d4001 push {r0, lr}
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
5278: 2a00000b bcs 52ac <ioctl+0x48>
iop = rtems_libio_iop( fd );
527c: e59f3070 ldr r3, [pc, #112] ; 52f4 <ioctl+0x90>
5280: e5933000 ldr r3, [r3]
5284: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
5288: e5903014 ldr r3, [r0, #20]
528c: e3130c01 tst r3, #256 ; 0x100
5290: 0a000005 beq 52ac <ioctl+0x48>
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
5294: 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 *);
5298: e28d2010 add r2, sp, #16
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
529c: e3530000 cmp r3, #0
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
52a0: e58d2000 str r2, [sp]
52a4: e59d200c ldr r2, [sp, #12]
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
52a8: 1a000002 bne 52b8 <ioctl+0x54>
rtems_set_errno_and_return_minus_one( EBADF );
52ac: eb0034cc bl 125e4 <__errno>
52b0: e3a03009 mov r3, #9
52b4: ea000004 b 52cc <ioctl+0x68>
if ( !iop->handlers->ioctl_h )
52b8: e5933010 ldr r3, [r3, #16]
52bc: e3530000 cmp r3, #0
52c0: 1a000004 bne 52d8 <ioctl+0x74>
rtems_set_errno_and_return_minus_one( ENOTSUP );
52c4: eb0034c6 bl 125e4 <__errno> <== NOT EXECUTED
52c8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
52cc: e5803000 str r3, [r0]
52d0: e3e00000 mvn r0, #0
52d4: ea000002 b 52e4 <ioctl+0x80>
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
52d8: e59d1008 ldr r1, [sp, #8]
52dc: e1a0e00f mov lr, pc
52e0: e12fff13 bx r3
return rc;
}
52e4: e8bd4008 pop {r3, lr}
52e8: e28dd00c add sp, sp, #12
52ec: e12fff1e bx lr
00003764 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
3764: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED
3768: e3130020 tst r3, #32 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
376c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3770: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f;
3774: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
3778: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
377c: e1a04001 mov r4, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC)
3780: 0a000007 beq 37a4 <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
3784: e59f2164 ldr r2, [pc, #356] ; 38f0 <iproc+0x18c> <== NOT EXECUTED
3788: e5922000 ldr r2, [r2] <== NOT EXECUTED
378c: e0822005 add r2, r2, r5 <== NOT EXECUTED
3790: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
3794: e2022003 and r2, r2, #3 <== NOT EXECUTED
3798: e3520001 cmp r2, #1 <== NOT EXECUTED
379c: 02855020 addeq r5, r5, #32 <== NOT EXECUTED
37a0: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
37a4: e355000d cmp r5, #13 <== NOT EXECUTED
37a8: 1a000005 bne 37c4 <iproc+0x60> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
37ac: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED
37b0: 1a00004c bne 38e8 <iproc+0x184> <== NOT EXECUTED
return 0; if (tty->termios.c_iflag & ICRNL)
37b4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
37b8: 03a0500d moveq r5, #13 <== NOT EXECUTED
37bc: 13a0500a movne r5, #10 <== NOT EXECUTED
37c0: ea000007 b 37e4 <iproc+0x80> <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
37c4: e355000a cmp r5, #10 <== NOT EXECUTED
37c8: 1a000003 bne 37dc <iproc+0x78> <== NOT EXECUTED
37cc: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
37d0: 03a0500a moveq r5, #10 <== NOT EXECUTED
37d4: 13a0500d movne r5, #13 <== NOT EXECUTED
37d8: ea000001 b 37e4 <iproc+0x80> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
37dc: e3550000 cmp r5, #0 <== NOT EXECUTED
37e0: 0a00002e beq 38a0 <iproc+0x13c> <== NOT EXECUTED
37e4: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
37e8: e3130002 tst r3, #2 <== NOT EXECUTED
37ec: 0a00002b beq 38a0 <iproc+0x13c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
37f0: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED
37f4: e1520005 cmp r2, r5 <== NOT EXECUTED
erase (tty, 0);
37f8: 01a00004 moveq r0, r4 <== NOT EXECUTED
37fc: 03a01000 moveq r1, #0 <== 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]) {
3800: 0a000004 beq 3818 <iproc+0xb4> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
3804: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED
3808: e1520005 cmp r2, r5 <== NOT EXECUTED
380c: 1a000003 bne 3820 <iproc+0xbc> <== NOT EXECUTED
erase (tty, 1);
3810: e1a00004 mov r0, r4 <== NOT EXECUTED
3814: e3a01001 mov r1, #1 <== NOT EXECUTED
3818: ebffff5e bl 3598 <erase> <== NOT EXECUTED
381c: ea00002f b 38e0 <iproc+0x17c> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
3820: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED
3824: e1520005 cmp r2, r5 <== NOT EXECUTED
3828: 0a00001a beq 3898 <iproc+0x134> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
382c: e355000a cmp r5, #10 <== NOT EXECUTED
3830: 1a000009 bne 385c <iproc+0xf8> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
3834: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
3838: 11a00005 movne r0, r5 <== NOT EXECUTED
383c: 11a01004 movne r1, r4 <== NOT EXECUTED
3840: 1bffff34 blne 3518 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3844: e284101c add r1, r4, #28 <== NOT EXECUTED
3848: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
384c: e3a0000a mov r0, #10 <== NOT EXECUTED
3850: e2832001 add r2, r3, #1 <== NOT EXECUTED
3854: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED
3858: ea00000d b 3894 <iproc+0x130> <== NOT EXECUTED
return 1; } else if ((c == tty->termios.c_cc[VEOL])
385c: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED
3860: e1520005 cmp r2, r5 <== NOT EXECUTED
3864: 0a000002 beq 3874 <iproc+0x110> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
3868: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED
386c: e1520005 cmp r2, r5 <== NOT EXECUTED
3870: 1a00000a bne 38a0 <iproc+0x13c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
3874: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
3878: 11a00005 movne r0, r5 <== NOT EXECUTED
387c: 11a01004 movne r1, r4 <== NOT EXECUTED
3880: 1bffff24 blne 3518 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3884: e284101c add r1, r4, #28 <== NOT EXECUTED
3888: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
388c: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED
3890: e2832001 add r2, r3, #1 <== NOT EXECUTED
3894: e5842020 str r2, [r4, #32] <== NOT EXECUTED
3898: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
389c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
38a0: e59f304c ldr r3, [pc, #76] ; 38f4 <iproc+0x190> <== NOT EXECUTED
38a4: e5933000 ldr r3, [r3] <== NOT EXECUTED
38a8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
38ac: e2433001 sub r3, r3, #1 <== NOT EXECUTED
38b0: e1520003 cmp r2, r3 <== NOT EXECUTED
38b4: aa00000b bge 38e8 <iproc+0x184> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
38b8: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
38bc: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
38c0: 11a00005 movne r0, r5 <== NOT EXECUTED
38c4: 11a01004 movne r1, r4 <== NOT EXECUTED
38c8: 1bffff12 blne 3518 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
38cc: e284101c add r1, r4, #28 <== NOT EXECUTED
38d0: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
38d4: e2832001 add r2, r3, #1 <== NOT EXECUTED
38d8: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED
38dc: e5842020 str r2, [r4, #32] <== NOT EXECUTED
38e0: e3a00000 mov r0, #0 <== NOT EXECUTED
38e4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
38e8: e3a00000 mov r0, #0 <== NOT EXECUTED
} return 0; }
38ec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00003184 <link>:
int link(
const char *existing,
const char *new
)
{
3184: e92d4070 push {r4, r5, r6, lr}
3188: e24dd034 sub sp, sp, #52 ; 0x34
318c: e1a05001 mov r5, r1
3190: e1a06000 mov r6, r0
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
3194: eb0036fd bl 10d90 <strlen>
3198: e28d4018 add r4, sp, #24
319c: e1a01000 mov r1, r0
31a0: e3a0c001 mov ip, #1
31a4: e1a00006 mov r0, r6
31a8: e3a02000 mov r2, #0
31ac: e1a03004 mov r3, r4
31b0: e58dc000 str ip, [sp]
31b4: ebfffebf bl 2cb8 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
31b8: e3500000 cmp r0, #0
31bc: 1a000014 bne 3214 <link+0x90>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
31c0: e28d6004 add r6, sp, #4
31c4: e1a00005 mov r0, r5
31c8: e28d1030 add r1, sp, #48 ; 0x30
31cc: e1a02006 mov r2, r6
31d0: eb0003c7 bl 40f4 <rtems_filesystem_get_start_loc>
if ( !parent_loc.ops->evalformake_h ) {
31d4: e59d3010 ldr r3, [sp, #16]
31d8: e5933004 ldr r3, [r3, #4]
31dc: e3530000 cmp r3, #0
31e0: 1a00000d bne 321c <link+0x98>
rtems_filesystem_freenode( &existing_loc );
31e4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
31e8: e3530000 cmp r3, #0 <== NOT EXECUTED
31ec: 0a000005 beq 3208 <link+0x84> <== NOT EXECUTED
31f0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
31f4: e3530000 cmp r3, #0 <== NOT EXECUTED
31f8: 0a000002 beq 3208 <link+0x84> <== NOT EXECUTED
31fc: e1a00004 mov r0, r4 <== NOT EXECUTED
3200: e1a0e00f mov lr, pc <== NOT EXECUTED
3204: e12fff13 bx r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3208: eb00314e bl f748 <__errno> <== NOT EXECUTED
320c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3210: e5803000 str r3, [r0]
3214: e3e05000 mvn r5, #0
3218: ea000053 b 336c <link+0x1e8>
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
321c: e59d0030 ldr r0, [sp, #48] ; 0x30
3220: e1a01006 mov r1, r6
3224: e0850000 add r0, r5, r0
3228: e28d202c add r2, sp, #44 ; 0x2c
322c: e1a0e00f mov lr, pc
3230: e12fff13 bx r3
if ( result != 0 ) {
3234: e2505000 subs r5, r0, #0
3238: 0a00000a beq 3268 <link+0xe4>
rtems_filesystem_freenode( &existing_loc );
323c: e59d3024 ldr r3, [sp, #36] ; 0x24
3240: e3530000 cmp r3, #0
3244: 0a000004 beq 325c <link+0xd8>
3248: e593301c ldr r3, [r3, #28]
324c: e3530000 cmp r3, #0
3250: 11a00004 movne r0, r4
3254: 11a0e00f movne lr, pc
3258: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
325c: eb003139 bl f748 <__errno>
3260: e5805000 str r5, [r0]
3264: eaffffea b 3214 <link+0x90>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
3268: e59d3028 ldr r3, [sp, #40] ; 0x28
326c: e59d2014 ldr r2, [sp, #20]
3270: e1520003 cmp r2, r3
3274: 0a000012 beq 32c4 <link+0x140>
rtems_filesystem_freenode( &existing_loc );
3278: e59d3024 ldr r3, [sp, #36] ; 0x24
327c: e3530000 cmp r3, #0
3280: 0a000004 beq 3298 <link+0x114>
3284: e593301c ldr r3, [r3, #28]
3288: e3530000 cmp r3, #0
328c: 11a00004 movne r0, r4
3290: 11a0e00f movne lr, pc
3294: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
3298: e59d3010 ldr r3, [sp, #16]
329c: e3530000 cmp r3, #0
32a0: 0a000004 beq 32b8 <link+0x134>
32a4: e593301c ldr r3, [r3, #28]
32a8: e3530000 cmp r3, #0
32ac: 128d0004 addne r0, sp, #4
32b0: 11a0e00f movne lr, pc
32b4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
32b8: eb003122 bl f748 <__errno>
32bc: e3a03012 mov r3, #18
32c0: eaffffd2 b 3210 <link+0x8c>
}
if ( !parent_loc.ops->link_h ) {
32c4: e59d3010 ldr r3, [sp, #16]
32c8: e5933008 ldr r3, [r3, #8]
32cc: e3530000 cmp r3, #0
32d0: 1a00000f bne 3314 <link+0x190>
rtems_filesystem_freenode( &existing_loc );
32d4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
32d8: e3530000 cmp r3, #0 <== NOT EXECUTED
32dc: 0a000004 beq 32f4 <link+0x170> <== NOT EXECUTED
32e0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
32e4: e3530000 cmp r3, #0 <== NOT EXECUTED
32e8: 11a00004 movne r0, r4 <== NOT EXECUTED
32ec: 11a0e00f movne lr, pc <== NOT EXECUTED
32f0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
32f4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
32f8: e3530000 cmp r3, #0 <== NOT EXECUTED
32fc: 0affffc1 beq 3208 <link+0x84> <== NOT EXECUTED
3300: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3304: e3530000 cmp r3, #0 <== NOT EXECUTED
3308: 128d0004 addne r0, sp, #4 <== NOT EXECUTED
330c: 1affffbb bne 3200 <link+0x7c> <== NOT EXECUTED
3310: eaffffbc b 3208 <link+0x84> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
3314: e1a01006 mov r1, r6
3318: e1a00004 mov r0, r4
331c: e59d202c ldr r2, [sp, #44] ; 0x2c
3320: e1a0e00f mov lr, pc
3324: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
3328: e59d3024 ldr r3, [sp, #36] ; 0x24
332c: e3530000 cmp r3, #0
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 );
3330: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc );
3334: 0a000004 beq 334c <link+0x1c8>
3338: e593301c ldr r3, [r3, #28]
333c: e3530000 cmp r3, #0
3340: 11a00004 movne r0, r4
3344: 11a0e00f movne lr, pc
3348: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
334c: e59d3010 ldr r3, [sp, #16]
3350: e3530000 cmp r3, #0
3354: 0a000004 beq 336c <link+0x1e8>
3358: e593301c ldr r3, [r3, #28]
335c: e3530000 cmp r3, #0
3360: 128d0004 addne r0, sp, #4
3364: 11a0e00f movne lr, pc
3368: 112fff13 bxne r3
return result;
}
336c: e1a00005 mov r0, r5
3370: e28dd034 add sp, sp, #52 ; 0x34
3374: e8bd8070 pop {r4, r5, r6, pc}
0001a094 <lseek>:
{
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
1a094: e59fc0ec ldr ip, [pc, #236] ; 1a188 <lseek+0xf4> 1a098: e59cc000 ldr ip, [ip] 1a09c: e150000c cmp r0, ip
off_t lseek(
int fd,
off_t offset,
int whence
)
{
1a0a0: e92d4870 push {r4, r5, r6, fp, lr}
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
1a0a4: 2a000005 bcs 1a0c0 <lseek+0x2c>
iop = rtems_libio_iop( fd );
1a0a8: e59fc0dc ldr ip, [pc, #220] ; 1a18c <lseek+0xf8> 1a0ac: e59c4000 ldr r4, [ip] 1a0b0: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
1a0b4: e5940014 ldr r0, [r4, #20] 1a0b8: e3100c01 tst r0, #256 ; 0x100
1a0bc: 1a000002 bne 1a0cc <lseek+0x38>
1a0c0: ebffd17e bl e6c0 <__errno> <== NOT EXECUTED 1a0c4: e3a03009 mov r3, #9 <== NOT EXECUTED 1a0c8: ea00001c b 1a140 <lseek+0xac> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
1a0cc: e594003c ldr r0, [r4, #60] ; 0x3c 1a0d0: e5900014 ldr r0, [r0, #20] 1a0d4: e3500000 cmp r0, #0
1a0d8: 1a000002 bne 1a0e8 <lseek+0x54>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a0dc: ebffd177 bl e6c0 <__errno> <== NOT EXECUTED 1a0e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1a0e4: ea000015 b 1a140 <lseek+0xac> <== NOT EXECUTED
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
1a0e8: e3530001 cmp r3, #1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
1a0ec: e284600c add r6, r4, #12
1a0f0: e8960060 ldm r6, {r5, r6}
switch ( whence ) {
1a0f4: 0a000006 beq 1a114 <lseek+0x80>
1a0f8: e3530002 cmp r3, #2
1a0fc: 0a000007 beq 1a120 <lseek+0x8c>
1a100: e3530000 cmp r3, #0
1a104: 1a00000b bne 1a138 <lseek+0xa4>
case SEEK_SET:
iop->offset = offset;
1a108: e584100c str r1, [r4, #12] 1a10c: e5842010 str r2, [r4, #16]
break;
1a110: ea00000e b 1a150 <lseek+0xbc>
case SEEK_CUR:
iop->offset += offset;
1a114: e091b005 adds fp, r1, r5 1a118: e0a2c006 adc ip, r2, r6 1a11c: ea000002 b 1a12c <lseek+0x98>
break;
case SEEK_END:
iop->offset = iop->size + offset;
1a120: e9941800 ldmib r4, {fp, ip}
1a124: e09bb001 adds fp, fp, r1
1a128: e0acc002 adc ip, ip, r2
1a12c: e584b00c str fp, [r4, #12]
1a130: e584c010 str ip, [r4, #16]
break;
1a134: ea000005 b 1a150 <lseek+0xbc>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
1a138: ebffd160 bl e6c0 <__errno> 1a13c: e3a03016 mov r3, #22 1a140: e5803000 str r3, [r0] 1a144: e3e02000 mvn r2, #0 1a148: e3e03000 mvn r3, #0 1a14c: ea00000a b 1a17c <lseek+0xe8>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1a150: e594c03c ldr ip, [r4, #60] ; 0x3c 1a154: e1a00004 mov r0, r4 1a158: e1a0e00f mov lr, pc 1a15c: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
1a160: e3700001 cmn r0, #1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1a164: e1a02000 mov r2, r0 1a168: e1a03001 mov r3, r1
if ( status == (off_t) -1 ) 1a16c: 1a000002 bne 1a17c <lseek+0xe8>
1a170: e3710001 cmn r1, #1
iop->offset = old_offset;
1a174: 0584500c streq r5, [r4, #12] 1a178: 05846010 streq r6, [r4, #16]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
1a17c: e1a01003 mov r1, r3
1a180: e1a00002 mov r0, r2
1a184: e8bd8870 pop {r4, r5, r6, fp, pc}
00002190 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
2190: e59f30d8 ldr r3, [pc, #216] ; 2270 <malloc+0xe0>
2194: e5932004 ldr r2, [r3, #4]
2198: e2822001 add r2, r2, #1
219c: e92d4070 push {r4, r5, r6, lr}
21a0: e5832004 str r2, [r3, #4]
21a4: e1a04000 mov r4, r0
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
21a8: ebffffb5 bl 2084 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
21ac: e3540000 cmp r4, #0
21b0: 0a00002b beq 2264 <malloc+0xd4>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
21b4: e59f30b8 ldr r3, [pc, #184] ; 2274 <malloc+0xe4>
21b8: e5933000 ldr r3, [r3]
21bc: e3530003 cmp r3, #3
21c0: 1a000002 bne 21d0 <malloc+0x40>
21c4: ebffff97 bl 2028 <malloc_is_system_state_OK>
21c8: e3500000 cmp r0, #0
21cc: 0a000024 beq 2264 <malloc+0xd4>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
21d0: e59f30a0 ldr r3, [pc, #160] ; 2278 <malloc+0xe8>
21d4: e3a02000 mov r2, #0
21d8: e5930000 ldr r0, [r3]
21dc: e1a01004 mov r1, r4
21e0: e1a03002 mov r3, r2
21e4: eb001227 bl 6a88 <_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 ) {
21e8: 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;
21ec: 11a05006 movne r5, r6
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
21f0: 1a00000c bne 2228 <malloc+0x98>
if (rtems_malloc_sbrk_helpers)
21f4: e59f3080 ldr r3, [pc, #128] ; 227c <malloc+0xec>
21f8: e5933000 ldr r3, [r3]
21fc: e3530000 cmp r3, #0
2200: 0a000004 beq 2218 <malloc+0x88>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
2204: e1a00004 mov r0, r4 <== NOT EXECUTED
2208: e1a0e00f mov lr, pc <== NOT EXECUTED
220c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
2210: e2505000 subs r5, r0, #0 <== NOT EXECUTED
2214: 1a000003 bne 2228 <malloc+0x98> <== NOT EXECUTED
errno = ENOMEM;
2218: eb003128 bl e6c0 <__errno>
221c: e3a0300c mov r3, #12
2220: e5803000 str r3, [r0]
return (void *) 0;
2224: ea00000f b 2268 <malloc+0xd8>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
2228: e59f3050 ldr r3, [pc, #80] ; 2280 <malloc+0xf0>
222c: e5933000 ldr r3, [r3]
2230: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
2234: 11a01004 movne r1, r4
2238: 11a00005 movne r0, r5
223c: 11a0e00f movne lr, pc
2240: 112fff13 bxne r3
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
2244: e59f3038 ldr r3, [pc, #56] ; 2284 <malloc+0xf4>
2248: e5933000 ldr r3, [r3]
224c: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
2250: 11a00005 movne r0, r5
2254: 11a0e00f movne lr, pc
2258: 1593f004 ldrne pc, [r3, #4]
225c: e1a06005 mov r6, r5
2260: ea000000 b 2268 <malloc+0xd8>
2264: e3a06000 mov r6, #0 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
2268: e1a00006 mov r0, r6
226c: e8bd8070 pop {r4, r5, r6, pc}
00002074 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
2074: 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 );
2078: e59f0000 ldr r0, [pc, #0] ; 2080 <malloc_deferred_free+0xc><== NOT EXECUTED
207c: ea000e73 b 5a50 <_Chain_Append> <== NOT EXECUTED
00002084 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
2084: 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)
2088: ea000000 b 2090 <malloc_deferred_frees_process+0xc>
free(to_be_freed);
208c: ebffff73 bl 1e60 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
2090: e59f000c ldr r0, [pc, #12] ; 20a4 <malloc_deferred_frees_process+0x20>
2094: eb000e81 bl 5aa0 <_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)
2098: e3500000 cmp r0, #0
209c: 1afffffa bne 208c <malloc_deferred_frees_process+0x8>
free(to_be_freed);
}
20a0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000c8a8 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
c8a8: e92d4013 push {r0, r1, r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
c8ac: e5904038 ldr r4, [r0, #56] ; 0x38
* 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 )
c8b0: e5943054 ldr r3, [r4, #84] ; 0x54
c8b4: e1530002 cmp r3, r2
c8b8: ba000003 blt c8cc <memfile_ftruncate+0x24>
c8bc: 1a000005 bne c8d8 <memfile_ftruncate+0x30>
c8c0: e5943050 ldr r3, [r4, #80] ; 0x50
c8c4: e1530001 cmp r3, r1
c8c8: 2a000002 bcs c8d8 <memfile_ftruncate+0x30>
return IMFS_memfile_extend( the_jnode, length );
c8cc: e1a00004 mov r0, r4 <== NOT EXECUTED
c8d0: ebffff9a bl c740 <IMFS_memfile_extend> <== NOT EXECUTED
c8d4: ea000008 b c8fc <memfile_ftruncate+0x54> <== NOT EXECUTED
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
c8d8: e5841050 str r1, [r4, #80] ; 0x50
c8dc: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
c8e0: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
c8e4: e3a01000 mov r1, #0
c8e8: e1a0000d mov r0, sp
c8ec: ebffd584 bl 1f04 <gettimeofday>
c8f0: e59d3000 ldr r3, [sp]
c8f4: e5843040 str r3, [r4, #64] ; 0x40
c8f8: e3a00000 mov r0, #0
return 0;
}
c8fc: e8bd801c pop {r2, r3, r4, pc}
0000c900 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
c900: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
c904: e5905038 ldr r5, [r0, #56] ; 0x38
if (the_jnode->type == IMFS_LINEAR_FILE) {
c908: e595304c ldr r3, [r5, #76] ; 0x4c
c90c: e3530006 cmp r3, #6
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
c910: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
c914: 1a00000b bne c948 <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
c918: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED
c91c: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED
c920: e1520003 cmp r2, r3 <== NOT EXECUTED
c924: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED
c928: ca000003 bgt c93c <memfile_lseek+0x3c> <== NOT EXECUTED
c92c: 1a000014 bne c984 <memfile_lseek+0x84> <== NOT EXECUTED
c930: e590100c ldr r1, [r0, #12] <== NOT EXECUTED
c934: e1510002 cmp r1, r2 <== NOT EXECUTED
c938: 9a000011 bls c984 <memfile_lseek+0x84> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
c93c: e584200c str r2, [r4, #12] <== NOT EXECUTED
c940: e5843010 str r3, [r4, #16] <== NOT EXECUTED
c944: ea00000e b c984 <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
c948: e1a00005 mov r0, r5
c94c: e284200c add r2, r4, #12
c950: e8920006 ldm r2, {r1, r2}
c954: ebffff79 bl c740 <IMFS_memfile_extend>
c958: e3500000 cmp r0, #0
c95c: 0a000005 beq c978 <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
c960: eb000756 bl e6c0 <__errno> <== NOT EXECUTED
c964: e3a0301c mov r3, #28 <== NOT EXECUTED
c968: e5803000 str r3, [r0] <== NOT EXECUTED
c96c: e3e04000 mvn r4, #0 <== NOT EXECUTED
c970: e3e03000 mvn r3, #0 <== NOT EXECUTED
c974: ea000004 b c98c <memfile_lseek+0x8c> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
c978: e2853050 add r3, r5, #80 ; 0x50
c97c: e893000c ldm r3, {r2, r3}
c980: e984000c stmib r4, {r2, r3}
} return iop->offset;
c984: e284400c add r4, r4, #12
c988: e8940018 ldm r4, {r3, r4}
}
c98c: e1a01004 mov r1, r4
c990: e1a00003 mov r0, r3
c994: e8bd8030 pop {r4, r5, pc}
0000cc24 <memfile_open>:
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
cc24: e5903014 ldr r3, [r0, #20]
cc28: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
cc2c: e92d4031 push {r0, r4, r5, lr}
cc30: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
cc34: e5904038 ldr r4, [r0, #56] ; 0x38
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
cc38: 0a000017 beq cc9c <memfile_open+0x78>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
cc3c: e594304c ldr r3, [r4, #76] ; 0x4c
cc40: e3530006 cmp r3, #6
cc44: 1a000014 bne cc9c <memfile_open+0x78>
uint32_t count = the_jnode->info.linearfile.size;
cc48: e594c050 ldr ip, [r4, #80] ; 0x50 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
cc4c: e3a02000 mov r2, #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;
cc50: e3a03005 mov r3, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
cc54: e3a00000 mov r0, #0 <== NOT EXECUTED
cc58: e3a01000 mov r1, #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)
cc5c: e35c0000 cmp ip, #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;
cc60: e584304c str r3, [r4, #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;
cc64: e5842060 str r2, [r4, #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;
cc68: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
cc6c: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED
cc70: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
cc74: e584205c str r2, [r4, #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;
cc78: e5842058 str r2, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
cc7c: 0a000006 beq cc9c <memfile_open+0x78> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
cc80: e1a02001 mov r2, r1 <== NOT EXECUTED
cc84: e1a01000 mov r1, r0 <== NOT EXECUTED
cc88: e1a00004 mov r0, r4 <== NOT EXECUTED
cc8c: e58dc000 str ip, [sp] <== NOT EXECUTED
cc90: ebffff40 bl c998 <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)
cc94: e3700001 cmn r0, #1 <== NOT EXECUTED
cc98: 0a000009 beq ccc4 <memfile_open+0xa0> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
cc9c: e5953014 ldr r3, [r5, #20]
cca0: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
cca4: 12843050 addne r3, r4, #80 ; 0x50
cca8: 1893000c ldmne r3, {r2, r3}
ccac: 1585200c strne r2, [r5, #12]
ccb0: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
ccb4: e2844050 add r4, r4, #80 ; 0x50
ccb8: e8940018 ldm r4, {r3, r4}
ccbc: e9850018 stmib r5, {r3, r4}
ccc0: e3a00000 mov r0, #0
return 0; }
ccc4: e8bd8038 pop {r3, r4, r5, pc}
00002298 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2298: 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) ) )
229c: e3110a0f tst r1, #61440 ; 0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
22a0: e24dd020 sub sp, sp, #32
22a4: e1a05001 mov r5, r1
22a8: e1a06000 mov r6, r0
22ac: e1a07002 mov r7, r2
22b0: 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) ) )
22b4: 1a000002 bne 22c4 <mknod+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
22b8: eb003100 bl e6c0 <__errno> <== NOT EXECUTED
22bc: e3a03016 mov r3, #22 <== NOT EXECUTED
22c0: ea000009 b 22ec <mknod+0x54> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
22c4: e28d4004 add r4, sp, #4
22c8: e28d101c add r1, sp, #28
22cc: e1a02004 mov r2, r4
22d0: eb000275 bl 2cac <rtems_filesystem_get_start_loc>
if ( !temp_loc.ops->evalformake_h ) {
22d4: e59d3010 ldr r3, [sp, #16]
22d8: e5933004 ldr r3, [r3, #4]
22dc: e3530000 cmp r3, #0
22e0: 1a000004 bne 22f8 <mknod+0x60>
rtems_set_errno_and_return_minus_one( ENOTSUP );
22e4: eb0030f5 bl e6c0 <__errno> <== NOT EXECUTED
22e8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
22ec: e5803000 str r3, [r0] <== NOT EXECUTED
22f0: e3e05000 mvn r5, #0
22f4: ea000022 b 2384 <mknod+0xec>
}
result = (*temp_loc.ops->evalformake_h)(
22f8: e59d001c ldr r0, [sp, #28]
22fc: e1a01004 mov r1, r4
2300: e0860000 add r0, r6, r0
2304: e28d2018 add r2, sp, #24
2308: e1a0e00f mov lr, pc
230c: e12fff13 bx r3
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
2310: e3500000 cmp r0, #0
2314: 1afffff5 bne 22f0 <mknod+0x58>
return -1;
if ( !temp_loc.ops->mknod_h ) {
2318: e59d3010 ldr r3, [sp, #16]
231c: e593c014 ldr ip, [r3, #20]
2320: e35c0000 cmp ip, #0
2324: 1a000006 bne 2344 <mknod+0xac>
rtems_filesystem_freenode( &temp_loc );
2328: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
232c: e3530000 cmp r3, #0 <== NOT EXECUTED
2330: 0affffeb beq 22e4 <mknod+0x4c> <== NOT EXECUTED
2334: e1a00004 mov r0, r4 <== NOT EXECUTED
2338: e1a0e00f mov lr, pc <== NOT EXECUTED
233c: e12fff13 bx r3 <== NOT EXECUTED
2340: eaffffe7 b 22e4 <mknod+0x4c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
2344: e1a01005 mov r1, r5
2348: e1a03008 mov r3, r8
234c: e58d4000 str r4, [sp]
2350: e1a02007 mov r2, r7
2354: e59d0018 ldr r0, [sp, #24]
2358: e1a0e00f mov lr, pc
235c: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
2360: e59d3010 ldr r3, [sp, #16]
2364: e3530000 cmp r3, #0
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 );
2368: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
236c: 0a000004 beq 2384 <mknod+0xec>
2370: e593301c ldr r3, [r3, #28]
2374: e3530000 cmp r3, #0
2378: 11a00004 movne r0, r4
237c: 11a0e00f movne lr, pc
2380: 112fff13 bxne r3
return result;
}
2384: e1a00005 mov r0, r5
2388: e28dd020 add sp, sp, #32
238c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00002418 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2418: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
241c: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2420: e24dd028 sub sp, sp, #40 ; 0x28
2424: e58d300c str r3, [sp, #12]
2428: e1a08000 mov r8, r0
242c: e1a07001 mov r7, r1
2430: e1a0b002 mov fp, r2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
2434: 8a000004 bhi 244c <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
2438: e1a00002 mov r0, r2
243c: eb002091 bl a688 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
2440: e3500000 cmp r0, #0
2444: e58d0010 str r0, [sp, #16]
2448: 1a000002 bne 2458 <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
244c: eb00309b bl e6c0 <__errno>
2450: e3a03016 mov r3, #22
2454: ea000039 b 2540 <mount+0x128>
{
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;
2458: e2575000 subs r5, r7, #0
245c: 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 : "/";
2460: e59f32ac ldr r3, [pc, #684] ; 2714 <mount+0x2fc>
2464: e3550000 cmp r5, #0
2468: 11a03007 movne r3, r7
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
246c: e1a0000b mov r0, fp
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2470: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
2474: eb003496 bl f6d4 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
2478: 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;
247c: e2806001 add r6, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
2480: 01a0a008 moveq sl, r8
2484: 0a000002 beq 2494 <mount+0x7c>
2488: e1a00008 mov r0, r8
248c: eb003490 bl f6d4 <strlen>
2490: e280a001 add sl, r0, #1
size_t target_length = strlen( target );
2494: e59d0004 ldr r0, [sp, #4]
2498: eb00348d bl f6d4 <strlen>
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 );
249c: e2861075 add r1, r6, #117 ; 0x75
24a0: e0811000 add r1, r1, r0
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
24a4: e58d0008 str r0, [sp, #8]
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 );
24a8: e081100a add r1, r1, sl
24ac: e3a00001 mov r0, #1
24b0: ebfffde2 bl 1c40 <calloc>
if ( mt_entry != NULL ) {
24b4: e2504000 subs r4, r0, #0
24b8: 0a00001e beq 2538 <mount+0x120>
char *str = (char *) mt_entry + sizeof( *mt_entry );
24bc: e2849074 add r9, r4, #116 ; 0x74
strcpy( str, filesystemtype );
24c0: e1a0100b mov r1, fp
24c4: e1a00009 mov r0, r9
24c8: eb003431 bl f594 <strcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
24cc: 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;
24d0: e0896006 add r6, r9, r6
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
24d4: e584906c str r9, [r4, #108] ; 0x6c
str += filesystemtype_size;
if ( source_or_null != NULL ) {
24d8: 0a000004 beq 24f0 <mount+0xd8>
strcpy( str, source_or_null );
24dc: e1a00006 mov r0, r6
24e0: e1a01008 mov r1, r8
24e4: eb00342a bl f594 <strcpy>
mt_entry->dev = str;
24e8: e5846070 str r6, [r4, #112] ; 0x70
str += source_size;
24ec: e086600a add r6, r6, sl
}
strcpy( str, target );
24f0: e59d1004 ldr r1, [sp, #4]
24f4: e1a00006 mov r0, r6
24f8: eb003425 bl f594 <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;
24fc: e59fe214 ldr lr, [pc, #532] ; 2718 <mount+0x300>
2500: e8be000f ldm lr!, {r0, r1, r2, r3}
2504: e284c038 add ip, r4, #56 ; 0x38
2508: e8ac000f stmia ip!, {r0, r1, r2, r3}
250c: e8be000f ldm lr!, {r0, r1, r2, r3}
2510: e8ac000f stmia ip!, {r0, r1, r2, r3}
2514: e89e000f ldm lr, {r0, r1, r2, r3}
2518: 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;
251c: e59d300c ldr r3, [sp, #12]
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
2520: e3550000 cmp r5, #0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
2524: 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;
2528: 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;
252c: 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 ) {
2530: 0a000037 beq 2614 <mount+0x1fc>
2534: ea000003 b 2548 <mount+0x130>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
2538: eb003060 bl e6c0 <__errno> <== NOT EXECUTED
253c: e3a0300c mov r3, #12 <== NOT EXECUTED
2540: e5803000 str r3, [r0]
2544: ea00006f b 2708 <mount+0x2f0>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
2548: e28d6014 add r6, sp, #20
254c: e3a0c001 mov ip, #1
2550: e1a00007 mov r0, r7
2554: e59d1008 ldr r1, [sp, #8]
2558: e3a02007 mov r2, #7
255c: e1a03006 mov r3, r6
2560: e58dc000 str ip, [sp]
2564: ebfffe1f bl 1de8 <rtems_filesystem_evaluate_path>
2568: e3700001 cmn r0, #1
256c: 0a000058 beq 26d4 <mount+0x2bc>
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
2570: e59d3020 ldr r3, [sp, #32]
2574: e5933010 ldr r3, [r3, #16]
2578: e3530000 cmp r3, #0
257c: 0a00001b beq 25f0 <mount+0x1d8>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
2580: e1a00006 mov r0, r6
2584: e1a0e00f mov lr, pc
2588: e12fff13 bx r3
258c: e3500001 cmp r0, #1
2590: 0a000003 beq 25a4 <mount+0x18c>
errno = ENOTDIR;
2594: eb003049 bl e6c0 <__errno>
2598: e3a03014 mov r3, #20
259c: e5803000 str r3, [r0]
goto cleanup_and_bail;
25a0: ea00004c b 26d8 <mount+0x2c0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
25a4: e59f0170 ldr r0, [pc, #368] ; 271c <mount+0x304>
25a8: e59d1014 ldr r1, [sp, #20]
25ac: ebffff7c bl 23a4 <rtems_filesystem_mount_iterate>
25b0: e3500000 cmp r0, #0
25b4: 0a000002 beq 25c4 <mount+0x1ac>
errno = EBUSY;
25b8: eb003040 bl e6c0 <__errno>
25bc: e3a03010 mov r3, #16
25c0: eafffff5 b 259c <mount+0x184>
* 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;
25c4: e59d1014 ldr r1, [sp, #20]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
25c8: 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;
25cc: e5841008 str r1, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
25d0: 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 ){
25d4: 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;
25d8: e5841010 str r1, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
25dc: 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 ){
25e0: 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;
25e4: 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;
25e8: 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 ){
25ec: 1a000002 bne 25fc <mount+0x1e4>
errno = ENOTSUP;
25f0: eb003032 bl e6c0 <__errno> <== NOT EXECUTED
25f4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
25f8: eaffffe7 b 259c <mount+0x184> <== NOT EXECUTED
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( mt_entry ) ) {
25fc: e1a00004 mov r0, r4
2600: e1a0e00f mov lr, pc
2604: e12fff13 bx r3
2608: e3500000 cmp r0, #0
260c: 0a00000b beq 2640 <mount+0x228>
2610: ea000030 b 26d8 <mount+0x2c0> <== NOT EXECUTED
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
2614: e59f3104 ldr r3, [pc, #260] ; 2720 <mount+0x308>
2618: e5932000 ldr r2, [r3]
261c: e2833004 add r3, r3, #4
2620: e1520003 cmp r2, r3
2624: 01a06005 moveq r6, r5
2628: 0a000004 beq 2640 <mount+0x228>
errno = EINVAL;
262c: eb003023 bl e6c0 <__errno> <== NOT EXECUTED
2630: e3a03016 mov r3, #22 <== NOT EXECUTED
2634: e5803000 str r3, [r0] <== NOT EXECUTED
2638: e1a06005 mov r6, r5 <== NOT EXECUTED
goto cleanup_and_bail;
263c: ea000025 b 26d8 <mount+0x2c0> <== NOT EXECUTED
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
2640: e59d104c ldr r1, [sp, #76] ; 0x4c
2644: e1a00004 mov r0, r4
2648: e59d3010 ldr r3, [sp, #16]
264c: e1a0e00f mov lr, pc
2650: e12fff13 bx r3
2654: e2507000 subs r7, r0, #0
2658: 0a000007 beq 267c <mount+0x264>
/*
* Try to undo the mount operation
*/
if ( loc.ops->unmount_h ) {
265c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
2660: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED
2664: e3530000 cmp r3, #0 <== NOT EXECUTED
2668: 0a00001a beq 26d8 <mount+0x2c0> <== NOT EXECUTED
loc.ops->unmount_h( mt_entry );
266c: e1a00004 mov r0, r4 <== NOT EXECUTED
2670: e1a0e00f mov lr, pc <== NOT EXECUTED
2674: e12fff13 bx r3 <== NOT EXECUTED
2678: ea000016 b 26d8 <mount+0x2c0> <== 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 );
267c: e59f60a0 ldr r6, [pc, #160] ; 2724 <mount+0x30c>
2680: e1a02007 mov r2, r7
2684: e1a01007 mov r1, r7
2688: e5960000 ldr r0, [r6]
268c: eb000aa1 bl 5118 <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 );
2690: e1a01004 mov r1, r4
2694: e59f0084 ldr r0, [pc, #132] ; 2720 <mount+0x308>
2698: eb000cec bl 5a50 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
269c: e5960000 ldr r0, [r6]
26a0: eb000ae2 bl 5230 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
26a4: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
26a8: 059f3078 ldreq r3, [pc, #120] ; 2728 <mount+0x310>
26ac: 0284401c addeq r4, r4, #28
26b0: 0593c000 ldreq ip, [r3]
26b4: 08b4000f ldmeq r4!, {r0, r1, r2, r3}
26b8: 028cc018 addeq ip, ip, #24
26bc: 08ac000f stmiaeq ip!, {r0, r1, r2, r3}
26c0: 05943000 ldreq r3, [r4]
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
26c4: 11a00007 movne r0, r7
rtems_filesystem_root = mt_entry->mt_fs_root;
26c8: 058c3000 streq r3, [ip]
26cc: 01a00005 moveq r0, r5
26d0: ea00000d b 270c <mount+0x2f4>
26d4: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
26d8: e1a00004 mov r0, r4
26dc: ebfffddf bl 1e60 <free>
if ( loc_to_free )
26e0: e3560000 cmp r6, #0
26e4: 0a000007 beq 2708 <mount+0x2f0>
rtems_filesystem_freenode( loc_to_free );
26e8: e596300c ldr r3, [r6, #12]
26ec: e3530000 cmp r3, #0
26f0: 0a000004 beq 2708 <mount+0x2f0>
26f4: e593301c ldr r3, [r3, #28]
26f8: e3530000 cmp r3, #0
26fc: 11a00006 movne r0, r6
2700: 11a0e00f movne lr, pc
2704: 112fff13 bxne r3
2708: e3e00000 mvn r0, #0
return -1;
}
270c: e28dd028 add sp, sp, #40 ; 0x28
2710: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000279c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
279c: e92d4010 push {r4, lr}
27a0: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
27a4: eb0030c4 bl eabc <fileno>
27a8: e3500002 cmp r0, #2
27ac: 8a00000b bhi 27e0 <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
27b0: e1d430bc ldrh r3, [r4, #12]
27b4: e3130080 tst r3, #128 ; 0x80
27b8: 0a00000a beq 27e8 <newlib_free_buffers+0x4c>
free( fp->_bf._base );
27bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
27c0: ebfffda6 bl 1e60 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
27c4: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
27c8: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
27cc: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
27d0: e5843010 str r3, [r4, #16] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
27d4: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
27d8: e5843000 str r3, [r4] <== NOT EXECUTED
27dc: ea000001 b 27e8 <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
27e0: e1a00004 mov r0, r4 <== NOT EXECUTED
27e4: eb003002 bl e7f4 <fclose> <== NOT EXECUTED
} return 0; }
27e8: e3a00000 mov r0, #0
27ec: e8bd8010 pop {r4, pc}
00002a10 <open>:
int open(
const char *pathname,
int flags,
...
)
{
2a10: e92d000e push {r1, r2, r3}
2a14: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
2a18: e24dd01c sub sp, sp, #28
2a1c: e59d503c ldr r5, [sp, #60] ; 0x3c
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
2a20: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
2a24: e2138001 ands r8, r3, #1
2a28: 13a08004 movne r8, #4
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
2a2c: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
2a30: 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;
2a34: 13888002 orrne r8, r8, #2
int open(
const char *pathname,
int flags,
...
)
{
2a38: e1a06000 mov r6, r0
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
2a3c: e58d3018 str r3, [sp, #24]
2a40: e59d9040 ldr r9, [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();
2a44: eb001e71 bl a410 <rtems_libio_allocate>
if ( iop == 0 ) {
2a48: e2504000 subs r4, r0, #0
2a4c: 03a05017 moveq r5, #23
2a50: 0a000077 beq 2c34 <open+0x224>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2a54: e1a00006 mov r0, r6
2a58: eb00331d bl f6d4 <strlen>
2a5c: e28d7004 add r7, sp, #4
2a60: e1a01000 mov r1, r0
2a64: e1a02008 mov r2, r8
2a68: e1a00006 mov r0, r6
2a6c: e3a08001 mov r8, #1
2a70: e1a03007 mov r3, r7
2a74: e58d8000 str r8, [sp]
2a78: ebfffcda bl 1de8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
2a7c: e3700001 cmn r0, #1
2a80: 1a00001f bne 2b04 <open+0xf4>
if ( errno != ENOENT ) {
2a84: eb002f0d bl e6c0 <__errno>
2a88: e5903000 ldr r3, [r0]
2a8c: e3530002 cmp r3, #2
2a90: 1a00000a bne 2ac0 <open+0xb0>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
2a94: e215ac02 ands sl, r5, #512 ; 0x200
2a98: 01a0700a moveq r7, sl
2a9c: 01a05003 moveq r5, r3
2aa0: 0a000056 beq 2c00 <open+0x1f0>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
2aa4: e1a00006 mov r0, r6
2aa8: e3891902 orr r1, r9, #32768 ; 0x8000
2aac: e3a02000 mov r2, #0
2ab0: e3a03000 mov r3, #0
2ab4: ebfffdf7 bl 2298 <mknod>
if ( rc ) {
2ab8: e250a000 subs sl, r0, #0
2abc: 0a000003 beq 2ad0 <open+0xc0>
rc = errno;
2ac0: eb002efe bl e6c0 <__errno>
2ac4: e3a07000 mov r7, #0
2ac8: e5905000 ldr r5, [r0]
goto done;
2acc: ea000049 b 2bf8 <open+0x1e8>
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
2ad0: e1a00006 mov r0, r6
2ad4: eb0032fe bl f6d4 <strlen>
2ad8: e1a03007 mov r3, r7
2adc: e1a01000 mov r1, r0
2ae0: e1a0200a mov r2, sl
2ae4: e1a00006 mov r0, r6
2ae8: e58d8000 str r8, [sp]
2aec: ebfffcbd bl 1de8 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
2af0: e3500000 cmp r0, #0
2af4: 11a0700a movne r7, sl
2af8: 13a0500d movne r5, #13
2afc: 1a00003f bne 2c00 <open+0x1f0>
2b00: ea000003 b 2b14 <open+0x104>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
2b04: e2053c0a and r3, r5, #2560 ; 0xa00
2b08: e3530c0a cmp r3, #2560 ; 0xa00
2b0c: 03a05011 moveq r5, #17
2b10: 0a00003a beq 2c00 <open+0x1f0>
* 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;
2b14: e28d701c add r7, sp, #28
2b18: e5373018 ldr r3, [r7, #-24]!
2b1c: e5843038 str r3, [r4, #56] ; 0x38
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2b20: e59d300c ldr r3, [sp, #12]
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
2b24: e1a00005 mov r0, r5
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2b28: e584303c str r3, [r4, #60] ; 0x3c
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
2b2c: e5948014 ldr r8, [r4, #20]
2b30: eb001e63 bl a4c4 <rtems_libio_fcntl_flags>
2b34: e180e008 orr lr, r0, r8
iop->pathinfo = loc;
2b38: e8b7000f ldm r7!, {r0, r1, r2, r3}
2b3c: e284c018 add ip, r4, #24
2b40: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !iop->handlers || !iop->handlers->open_h ) {
2b44: 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;
2b48: e5972000 ldr r2, [r7]
if ( !iop->handlers || !iop->handlers->open_h ) {
2b4c: e3530000 cmp r3, #0
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
2b50: 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 );
2b54: e584e014 str lr, [r4, #20]
iop->pathinfo = loc;
if ( !iop->handlers || !iop->handlers->open_h ) {
2b58: 0a000041 beq 2c64 <open+0x254>
2b5c: e593c000 ldr ip, [r3]
2b60: e35c0000 cmp ip, #0
2b64: 0a00003e beq 2c64 <open+0x254>
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
2b68: e1a01006 mov r1, r6
2b6c: e1a03009 mov r3, r9
2b70: e1a00004 mov r0, r4
2b74: e1a02005 mov r2, r5
2b78: e1a0e00f mov lr, pc
2b7c: e12fff1c bx ip
if ( rc ) {
2b80: e3500000 cmp r0, #0
2b84: 0a000003 beq 2b98 <open+0x188>
rc = errno;
2b88: eb002ecc bl e6c0 <__errno>
2b8c: e28d7004 add r7, sp, #4
2b90: e5905000 ldr r5, [r0]
goto done;
2b94: ea000017 b 2bf8 <open+0x1e8>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
2b98: e3150b01 tst r5, #1024 ; 0x400
2b9c: 0a000028 beq 2c44 <open+0x234>
rc = ftruncate( iop - rtems_libio_iops, 0 );
2ba0: e59f30c8 ldr r3, [pc, #200] ; 2c70 <open+0x260>
2ba4: e5930000 ldr r0, [r3]
2ba8: e0600004 rsb r0, r0, r4
2bac: e1a00340 asr r0, r0, #6
2bb0: e3a01000 mov r1, #0
2bb4: e3a02000 mov r2, #0
2bb8: eb001d63 bl a14c <ftruncate>
if ( rc ) {
2bbc: e2505000 subs r5, r0, #0
2bc0: 0a00001f beq 2c44 <open+0x234>
if(errno) rc = errno;
2bc4: eb002ebd bl e6c0 <__errno> <== NOT EXECUTED
2bc8: e5903000 ldr r3, [r0] <== NOT EXECUTED
2bcc: e3530000 cmp r3, #0 <== NOT EXECUTED
2bd0: 0a000001 beq 2bdc <open+0x1cc> <== NOT EXECUTED
2bd4: eb002eb9 bl e6c0 <__errno> <== NOT EXECUTED
2bd8: e5905000 ldr r5, [r0] <== NOT EXECUTED
close( iop - rtems_libio_iops );
2bdc: e59f308c ldr r3, [pc, #140] ; 2c70 <open+0x260> <== NOT EXECUTED
2be0: e5933000 ldr r3, [r3] <== NOT EXECUTED
2be4: e0634004 rsb r4, r3, r4 <== NOT EXECUTED
2be8: e1a00344 asr r0, r4, #6 <== NOT EXECUTED
2bec: eb001d2d bl a0a8 <close> <== NOT EXECUTED
2bf0: e3a04000 mov r4, #0 <== NOT EXECUTED
2bf4: e1a07004 mov r7, r4 <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
2bf8: e3550000 cmp r5, #0
2bfc: 0a000010 beq 2c44 <open+0x234>
if ( iop )
2c00: e3540000 cmp r4, #0
rtems_libio_free( iop );
2c04: 11a00004 movne r0, r4
2c08: 1b001de9 blne a3b4 <rtems_libio_free>
if ( loc_to_free )
2c0c: e3570000 cmp r7, #0
2c10: 0a000007 beq 2c34 <open+0x224>
rtems_filesystem_freenode( loc_to_free );
2c14: e597300c ldr r3, [r7, #12]
2c18: e3530000 cmp r3, #0
2c1c: 0a000004 beq 2c34 <open+0x224>
2c20: e593301c ldr r3, [r3, #28]
2c24: e3530000 cmp r3, #0
2c28: 11a00007 movne r0, r7
2c2c: 11a0e00f movne lr, pc
2c30: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
2c34: eb002ea1 bl e6c0 <__errno>
2c38: e5805000 str r5, [r0]
2c3c: e3e00000 mvn r0, #0
2c40: ea000003 b 2c54 <open+0x244>
}
return iop - rtems_libio_iops;
2c44: e59f3024 ldr r3, [pc, #36] ; 2c70 <open+0x260>
2c48: e5930000 ldr r0, [r3]
2c4c: e0604004 rsb r4, r0, r4
2c50: e1a00344 asr r0, r4, #6
}
2c54: e28dd01c add sp, sp, #28
2c58: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
2c5c: e28dd00c add sp, sp, #12
2c60: e12fff1e bx lr
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2c64: e28d7004 add r7, sp, #4 <== NOT EXECUTED
2c68: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED
2c6c: eaffffe3 b 2c00 <open+0x1f0> <== NOT EXECUTED
000029ac <open_dev_console>:
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
29ac: e3a01000 mov r1, #0
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
29b0: 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) {
29b4: e59f0048 ldr r0, [pc, #72] ; 2a04 <open_dev_console+0x58>
29b8: e1a02001 mov r2, r1
29bc: eb000013 bl 2a10 <open>
29c0: e3700001 cmn r0, #1
29c4: 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)
29c8: e59f0034 ldr r0, [pc, #52] ; 2a04 <open_dev_console+0x58>
29cc: e3a01001 mov r1, #1
29d0: e3a02000 mov r2, #0
29d4: eb00000d bl 2a10 <open>
29d8: e3700001 cmn r0, #1
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
29dc: 059f0024 ldreq r0, [pc, #36] ; 2a08 <open_dev_console+0x5c>
/*
* 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)
29e0: 0a000006 beq 2a00 <open_dev_console+0x54>
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
29e4: e59f0018 ldr r0, [pc, #24] ; 2a04 <open_dev_console+0x58>
29e8: e3a01001 mov r1, #1
29ec: e3a02000 mov r2, #0
29f0: eb000006 bl 2a10 <open>
29f4: e3700001 cmn r0, #1
29f8: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
29fc: e59f0008 ldr r0, [pc, #8] ; 2a0c <open_dev_console+0x60> <== NOT EXECUTED
2a00: eb000b58 bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
000033c0 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
33c0: e92d4011 push {r0, r4, lr}
int i;
if (tty->termios.c_oflag & OPOST) {
33c4: e5913034 ldr r3, [r1, #52] ; 0x34
33c8: e3130001 tst r3, #1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
33cc: e1a04001 mov r4, r1
33d0: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
33d4: 0a000047 beq 34f8 <oproc+0x138>
switch (c) {
33d8: e5dd2000 ldrb r2, [sp]
33dc: e2421008 sub r1, r2, #8
33e0: e3510005 cmp r1, #5
33e4: 979ff101 ldrls pc, [pc, r1, lsl #2]
33e8: ea00002e b 34a8 <oproc+0xe8>
33ec: 00003494 .word 0x00003494
33f0: 00003468 .word 0x00003468
33f4: 00003404 .word 0x00003404
33f8: 000034a8 .word 0x000034a8
33fc: 000034a8 .word 0x000034a8
3400: 00003430 .word 0x00003430
case '\n': if (tty->termios.c_oflag & ONLRET)
3404: e3130020 tst r3, #32
tty->column = 0;
3408: 13a03000 movne r3, #0
340c: 15843028 strne r3, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
3410: e5943034 ldr r3, [r4, #52] ; 0x34
3414: e3130004 tst r3, #4
3418: 0a000036 beq 34f8 <oproc+0x138>
rtems_termios_puts ("\r", 1, tty);
341c: e59f00e8 ldr r0, [pc, #232] ; 350c <oproc+0x14c>
3420: e3a01001 mov r1, #1
3424: e1a02004 mov r2, r4
3428: ebffffa0 bl 32b0 <rtems_termios_puts>
342c: ea00000b b 3460 <oproc+0xa0>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
3430: e3130010 tst r3, #16 <== NOT EXECUTED
3434: 0a000002 beq 3444 <oproc+0x84> <== NOT EXECUTED
3438: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
343c: e3520000 cmp r2, #0 <== NOT EXECUTED
3440: 0a000030 beq 3508 <oproc+0x148> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
3444: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0;
3448: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
344c: 0a000029 beq 34f8 <oproc+0x138> <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET)
3450: 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';
3454: e3a0300a mov r3, #10 <== NOT EXECUTED
3458: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
345c: 0a000025 beq 34f8 <oproc+0x138> <== NOT EXECUTED
tty->column = 0;
3460: e3a03000 mov r3, #0
3464: ea000022 b 34f4 <oproc+0x134>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
3468: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
346c: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
3470: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3474: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
3478: e2611008 rsb r1, r1, #8
347c: e0813002 add r3, r1, r2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3480: 1a00001b bne 34f4 <oproc+0x134>
tty->column += i;
3484: e5843028 str r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
3488: e1a02004 mov r2, r4
348c: e59f007c ldr r0, [pc, #124] ; 3510 <oproc+0x150>
3490: ea00001b b 3504 <oproc+0x144>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
3494: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3498: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
349c: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
34a0: ca000013 bgt 34f4 <oproc+0x134> <== NOT EXECUTED
34a4: ea000013 b 34f8 <oproc+0x138> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
34a8: e3130002 tst r3, #2
34ac: 0a000007 beq 34d0 <oproc+0x110>
c = toupper(c);
34b0: e59f305c ldr r3, [pc, #92] ; 3514 <oproc+0x154> <== NOT EXECUTED
34b4: e5933000 ldr r3, [r3] <== NOT EXECUTED
34b8: e0833002 add r3, r3, r2 <== NOT EXECUTED
34bc: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
34c0: e2033003 and r3, r3, #3 <== NOT EXECUTED
34c4: e3530002 cmp r3, #2 <== NOT EXECUTED
34c8: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
34cc: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
34d0: e59f303c ldr r3, [pc, #60] ; 3514 <oproc+0x154>
34d4: e5932000 ldr r2, [r3]
34d8: e5dd3000 ldrb r3, [sp]
34dc: e0823003 add r3, r2, r3
34e0: e5d33001 ldrb r3, [r3, #1]
34e4: e3130020 tst r3, #32
34e8: 1a000002 bne 34f8 <oproc+0x138>
tty->column++;
34ec: e5943028 ldr r3, [r4, #40] ; 0x28
34f0: e2833001 add r3, r3, #1
34f4: e5843028 str r3, [r4, #40] ; 0x28
break; } } rtems_termios_puts (&c, 1, tty);
34f8: e1a02004 mov r2, r4
34fc: e1a0000d mov r0, sp
3500: e3a01001 mov r1, #1
3504: ebffff69 bl 32b0 <rtems_termios_puts>
}
3508: e8bd8018 pop {r3, r4, pc}
0000cfac <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
cfac: e92d4070 push {r4, r5, r6, lr}
cfb0: 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)
cfb4: e28d5004 add r5, sp, #4
cfb8: e3a0c001 mov ip, #1
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
cfbc: e1a04000 mov r4, 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)
cfc0: e3a01003 mov r1, #3
cfc4: e59f0140 ldr r0, [pc, #320] ; d10c <pipe_create+0x160>
cfc8: e3a02007 mov r2, #7
cfcc: e1a03005 mov r3, r5
cfd0: e58dc000 str ip, [sp]
cfd4: ebffd383 bl 1de8 <rtems_filesystem_evaluate_path>
cfd8: e3500000 cmp r0, #0
cfdc: 0a000009 beq d008 <pipe_create+0x5c>
!= 0) {
if (errno != ENOENT)
cfe0: eb0005b6 bl e6c0 <__errno>
cfe4: e5903000 ldr r3, [r0]
cfe8: e3530002 cmp r3, #2
cfec: 1a000043 bne d100 <pipe_create+0x154>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
cff0: e59f0114 ldr r0, [pc, #276] ; d10c <pipe_create+0x160>
cff4: e59f1114 ldr r1, [pc, #276] ; d110 <pipe_create+0x164>
cff8: ebffd4a2 bl 2288 <mkdir>
cffc: e3500000 cmp r0, #0
d000: 0a000008 beq d028 <pipe_create+0x7c>
d004: ea00003d b d100 <pipe_create+0x154> <== NOT EXECUTED
return -1;
}
else
rtems_filesystem_freenode(&loc);
d008: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
d00c: e3530000 cmp r3, #0 <== NOT EXECUTED
d010: 0a000004 beq d028 <pipe_create+0x7c> <== NOT EXECUTED
d014: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
d018: e3530000 cmp r3, #0 <== NOT EXECUTED
d01c: 11a00005 movne r0, r5 <== NOT EXECUTED
d020: 11a0e00f movne lr, pc <== NOT EXECUTED
d024: 112fff13 bxne r3 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
d028: e28d5018 add r5, sp, #24
d02c: e59f10e0 ldr r1, [pc, #224] ; d114 <pipe_create+0x168>
d030: e3a0200a mov r2, #10
d034: e1a00005 mov r0, r5
d038: eb0007ae bl eef8 <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
d03c: e59f30d4 ldr r3, [pc, #212] ; d118 <pipe_create+0x16c>
d040: e1d3c0b0 ldrh ip, [r3]
d044: e1a0200c mov r2, ip
d048: e28cc001 add ip, ip, #1
d04c: e59f10c8 ldr r1, [pc, #200] ; d11c <pipe_create+0x170>
d050: e1c3c0b0 strh ip, [r3]
d054: e285000a add r0, r5, #10
d058: eb00084c bl f190 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
d05c: e1a00005 mov r0, r5
d060: e3a01d06 mov r1, #384 ; 0x180
d064: eb00019d bl d6e0 <mkfifo>
d068: e2506000 subs r6, r0, #0
d06c: 0a000001 beq d078 <pipe_create+0xcc>
if (errno != EEXIST){
d070: eb000592 bl e6c0 <__errno> <== NOT EXECUTED
d074: ea000021 b d100 <pipe_create+0x154> <== NOT EXECUTED
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);
d078: e1a00005 mov r0, r5
d07c: e3a01901 mov r1, #16384 ; 0x4000
d080: ebffd662 bl 2a10 <open>
if (filsdes[0] < 0) {
d084: 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);
d088: e5840000 str r0, [r4]
if (filsdes[0] < 0) {
d08c: aa000003 bge d0a0 <pipe_create+0xf4>
err = errno;
d090: eb00058a bl e6c0 <__errno>
d094: 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);
d098: e1a00005 mov r0, r5
d09c: ea000014 b d0f4 <pipe_create+0x148>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
d0a0: e59f3078 ldr r3, [pc, #120] ; d120 <pipe_create+0x174> <== NOT EXECUTED
d0a4: e5933000 ldr r3, [r3] <== NOT EXECUTED
d0a8: e1500003 cmp r0, r3 <== NOT EXECUTED
d0ac: 359f3070 ldrcc r3, [pc, #112] ; d124 <pipe_create+0x178> <== NOT EXECUTED
d0b0: 35936000 ldrcc r6, [r3] <== NOT EXECUTED
d0b4: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
d0b8: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
d0bc: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
d0c0: e5863014 str r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
d0c4: e28d0018 add r0, sp, #24 <== NOT EXECUTED
d0c8: e3a01001 mov r1, #1 <== NOT EXECUTED
d0cc: ebffd64f bl 2a10 <open> <== NOT EXECUTED
if (filsdes[1] < 0) {
d0d0: 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);
d0d4: e5840004 str r0, [r4, #4] <== NOT EXECUTED
if (filsdes[1] < 0) {
d0d8: a3a06000 movge r6, #0 <== NOT EXECUTED
d0dc: aa000003 bge d0f0 <pipe_create+0x144> <== NOT EXECUTED
err = errno;
d0e0: eb000576 bl e6c0 <__errno> <== NOT EXECUTED
d0e4: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
d0e8: e5940000 ldr r0, [r4] <== NOT EXECUTED
d0ec: ebfff3ed bl a0a8 <close> <== NOT EXECUTED
}
unlink(fifopath);
d0f0: e28d0018 add r0, sp, #24 <== NOT EXECUTED
d0f4: eb00017d bl d6f0 <unlink>
}
rtems_set_errno_and_return_minus_one(err);
d0f8: eb000570 bl e6c0 <__errno>
d0fc: e5806000 str r6, [r0]
}
d100: e3e00000 mvn r0, #0
d104: e28dd028 add sp, sp, #40 ; 0x28
d108: e8bd8070 pop {r4, r5, r6, pc}
00008c3c <pipe_free>:
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
8c3c: e92d4010 push {r4, lr} <== NOT EXECUTED
8c40: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
8c44: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED
8c48: eb0008d2 bl af98 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
8c4c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8c50: eb0008d0 bl af98 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
8c54: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8c58: ebfff107 bl 507c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
8c5c: e5940000 ldr r0, [r4] <== NOT EXECUTED
8c60: ebffe47e bl 1e60 <free> <== NOT EXECUTED
free(pipe);
8c64: e1a00004 mov r0, r4 <== NOT EXECUTED
}
8c68: e8bd4010 pop {r4, lr} <== NOT EXECUTED
{
rtems_barrier_delete(pipe->readBarrier);
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
free(pipe);
8c6c: eaffe47b b 1e60 <free> <== NOT EXECUTED
000088c8 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
88c8: e59f3054 ldr r3, [pc, #84] ; 8924 <pipe_ioctl+0x5c> <== NOT EXECUTED
88cc: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
88d0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
88d4: e1a04000 mov r4, r0 <== NOT EXECUTED
88d8: e1a05002 mov r5, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
88dc: 13e00015 mvnne r0, #21 <== NOT EXECUTED
88e0: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
if (buffer == NULL)
88e4: e3520000 cmp r2, #0 <== NOT EXECUTED
88e8: 03e0000d mvneq r0, #13 <== NOT EXECUTED
88ec: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
88f0: e3a01000 mov r1, #0 <== NOT EXECUTED
88f4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
88f8: e1a02001 mov r2, r1 <== NOT EXECUTED
88fc: ebfff205 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
8900: e2506000 subs r6, r0, #0 <== NOT EXECUTED
8904: 13e00003 mvnne r0, #3 <== NOT EXECUTED
8908: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
890c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8910: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
8914: e5853000 str r3, [r5] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8918: ebfff244 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
891c: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
8920: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00008860 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
8860: e3e0001c mvn r0, #28 <== NOT EXECUTED
8864: e12fff1e bx lr <== NOT EXECUTED
00008928 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8928: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
892c: e1a09001 mov r9, r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
8930: e3a01000 mov r1, #0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8934: e1a04000 mov r4, r0 <== NOT EXECUTED
8938: e1a05002 mov r5, r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
893c: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
8940: e1a02001 mov r2, r1 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8944: e1a0a003 mov sl, r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
8948: ebfff1f2 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
894c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
8950: 13e06003 mvnne r6, #3 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
8954: 01a0b00d moveq fp, sp <== NOT EXECUTED
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
8958: 0a000045 beq 8a74 <pipe_read+0x14c> <== NOT EXECUTED
895c: ea00004b b 8a90 <pipe_read+0x168> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
8960: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
8964: e3530000 cmp r3, #0 <== NOT EXECUTED
8968: 0a000043 beq 8a7c <pipe_read+0x154> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
896c: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED
8970: e2177001 ands r7, r7, #1 <== NOT EXECUTED
8974: 13e0700a mvnne r7, #10 <== NOT EXECUTED
8978: 1a000040 bne 8a80 <pipe_read+0x158> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
897c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
8980: e2833001 add r3, r3, #1 <== NOT EXECUTED
8984: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8988: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
898c: ebfff227 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
8990: e1a01007 mov r1, r7 <== NOT EXECUTED
8994: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8998: eb0009bc bl b090 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
899c: e1a01007 mov r1, r7 <== NOT EXECUTED
89a0: 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))
89a4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
89a8: 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))
89ac: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
89b0: ebfff1d8 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
89b4: e3500000 cmp r0, #0 <== NOT EXECUTED
89b8: 13e07003 mvnne r7, #3 <== NOT EXECUTED
89bc: 1a000031 bne 8a88 <pipe_read+0x160> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
89c0: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
89c4: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
89c8: e2433001 sub r3, r3, #1 <== NOT EXECUTED
89cc: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
89d0: 1a00002a bne 8a80 <pipe_read+0x158> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
89d4: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
89d8: e3520000 cmp r2, #0 <== NOT EXECUTED
89dc: 0affffdf beq 8960 <pipe_read+0x38> <== NOT EXECUTED
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
89e0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
89e4: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
89e8: e0667005 rsb r7, r6, r5 <== NOT EXECUTED
89ec: e1520007 cmp r2, r7 <== NOT EXECUTED
89f0: 31a07002 movcc r7, r2 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
89f4: e0638008 rsb r8, r3, r8 <== NOT EXECUTED
89f8: e5941000 ldr r1, [r4] <== NOT EXECUTED
if (chunk > chunk1) {
89fc: e1570008 cmp r7, r8 <== NOT EXECUTED
8a00: e0890006 add r0, r9, r6 <== 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);
8a04: d0811003 addle r1, r1, r3 <== NOT EXECUTED
8a08: d1a02007 movle r2, r7 <== NOT EXECUTED
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
8a0c: da000006 ble 8a2c <pipe_read+0x104> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
8a10: e0811003 add r1, r1, r3 <== NOT EXECUTED
8a14: e1a02008 mov r2, r8 <== NOT EXECUTED
8a18: eb001936 bl eef8 <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
8a1c: e0860008 add r0, r6, r8 <== NOT EXECUTED
8a20: e5941000 ldr r1, [r4] <== NOT EXECUTED
8a24: e0890000 add r0, r9, r0 <== NOT EXECUTED
8a28: e0682007 rsb r2, r8, r7 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
8a2c: eb001931 bl eef8 <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
8a30: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
8a34: e0870000 add r0, r7, r0 <== NOT EXECUTED
8a38: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
8a3c: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
8a40: eb003d3c bl 17f38 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
8a44: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
8a48: e0673003 rsb r3, r7, r3 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
8a4c: e3530000 cmp r3, #0 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
8a50: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
8a54: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
8a58: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
if (pipe->waitingWriters > 0)
8a5c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
8a60: e3530000 cmp r3, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
8a64: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8a68: 11a0100d movne r1, sp <== NOT EXECUTED
8a6c: 1b000971 blne b038 <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
8a70: e0866007 add r6, r6, r7 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
8a74: e1560005 cmp r6, r5 <== NOT EXECUTED
8a78: 3affffd5 bcc 89d4 <pipe_read+0xac> <== NOT EXECUTED
8a7c: e3a07000 mov r7, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
8a80: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8a84: ebfff1e9 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
if (read > 0)
8a88: e3560000 cmp r6, #0 <== NOT EXECUTED
8a8c: d1a06007 movle r6, r7 <== NOT EXECUTED
return read;
return ret;
}
8a90: e1a00006 mov r0, r6 <== NOT EXECUTED
8a94: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00008c70 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8c70: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
8c74: e5904000 ldr r4, [r0] <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8c78: e1a05001 mov r5, r1 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
8c7c: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8c80: e1a06000 mov r6, r0 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
8c84: e1a02001 mov r2, r1 <== NOT EXECUTED
8c88: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8c8c: ebfff121 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
8c90: e3500000 cmp r0, #0 <== NOT EXECUTED
8c94: 1a000010 bne 8cdc <pipe_release+0x6c> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
8c98: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
8c9c: e3150002 tst r5, #2 <== NOT EXECUTED
pipe->Readers --;
8ca0: 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);
8ca4: e2055006 and r5, r5, #6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
8ca8: 12433001 subne r3, r3, #1 <== NOT EXECUTED
8cac: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
8cb0: e3150004 tst r5, #4 <== NOT EXECUTED
pipe->Writers --;
8cb4: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED
8cb8: 12433001 subne r3, r3, #1 <== NOT EXECUTED
8cbc: 15843014 strne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
8cc0: e59f30a0 ldr r3, [pc, #160] ; 8d68 <pipe_release+0xf8> <== NOT EXECUTED
8cc4: e3a01000 mov r1, #0 <== NOT EXECUTED
8cc8: e5930000 ldr r0, [r3] <== NOT EXECUTED
8ccc: e1a02001 mov r2, r1 <== NOT EXECUTED
8cd0: ebfff110 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
8cd4: e3500000 cmp r0, #0 <== NOT EXECUTED
8cd8: 0a000000 beq 8ce0 <pipe_release+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
8cdc: ebfff2a1 bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8ce0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8ce4: ebfff151 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
8ce8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
8cec: e3530000 cmp r3, #0 <== NOT EXECUTED
8cf0: 1a000006 bne 8d10 <pipe_release+0xa0> <== NOT EXECUTED
8cf4: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED
8cf8: e3570000 cmp r7, #0 <== NOT EXECUTED
8cfc: 1a000003 bne 8d10 <pipe_release+0xa0> <== NOT EXECUTED
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
8d00: e1a00004 mov r0, r4 <== NOT EXECUTED
8d04: ebffffcc bl 8c3c <pipe_free> <== NOT EXECUTED
*pipep = NULL;
8d08: e5867000 str r7, [r6] <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
8d0c: ea000010 b 8d54 <pipe_release+0xe4> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
8d10: e2552004 subs r2, r5, #4 <== NOT EXECUTED
8d14: 13a02001 movne r2, #1 <== NOT EXECUTED
8d18: e3530000 cmp r3, #0 <== NOT EXECUTED
8d1c: 13a02000 movne r2, #0 <== NOT EXECUTED
8d20: e3520000 cmp r2, #0 <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
8d24: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
8d28: 1a000007 bne 8d4c <pipe_release+0xdc> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
8d2c: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED
8d30: e2553002 subs r3, r5, #2 <== NOT EXECUTED
8d34: 13a03001 movne r3, #1 <== NOT EXECUTED
8d38: e3520000 cmp r2, #0 <== NOT EXECUTED
8d3c: 13a03000 movne r3, #0 <== NOT EXECUTED
8d40: e3530000 cmp r3, #0 <== NOT EXECUTED
8d44: 0a000002 beq 8d54 <pipe_release+0xe4> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
8d48: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8d4c: e1a0100d mov r1, sp <== NOT EXECUTED
8d50: eb0008b8 bl b038 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
8d54: e59f300c ldr r3, [pc, #12] ; 8d68 <pipe_release+0xf8> <== NOT EXECUTED
8d58: e5930000 ldr r0, [r3] <== NOT EXECUTED
8d5c: ebfff133 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
8d60: e3a00000 mov r0, #0 <== NOT EXECUTED
8d64: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
00008a98 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8a98: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
8a9c: e2525000 subs r5, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8aa0: e1a04000 mov r4, r0 <== NOT EXECUTED
8aa4: e1a0b001 mov fp, r1 <== NOT EXECUTED
8aa8: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
8aac: 01a06005 moveq r6, r5 <== NOT EXECUTED
8ab0: 0a00005f beq 8c34 <pipe_write+0x19c> <== NOT EXECUTED
return 0;
if (! PIPE_LOCK(pipe))
8ab4: e3a01000 mov r1, #0 <== NOT EXECUTED
8ab8: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
8abc: e1a02001 mov r2, r1 <== NOT EXECUTED
8ac0: ebfff194 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
8ac4: e3500000 cmp r0, #0 <== NOT EXECUTED
8ac8: 13e06003 mvnne r6, #3 <== NOT EXECUTED
8acc: 1a000058 bne 8c34 <pipe_write+0x19c> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
8ad0: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED
8ad4: e3560000 cmp r6, #0 <== NOT EXECUTED
8ad8: 0a000022 beq 8b68 <pipe_write+0xd0> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
8adc: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED
8ae0: e1550009 cmp r5, r9 <== NOT EXECUTED
8ae4: 91a09005 movls r9, r5 <== NOT EXECUTED
8ae8: 83a09001 movhi r9, #1 <== NOT EXECUTED
8aec: e1a06000 mov r6, r0 <== NOT EXECUTED
8af0: ea000043 b 8c04 <pipe_write+0x16c> <== NOT EXECUTED
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
8af4: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED
8af8: e2177001 ands r7, r7, #1 <== NOT EXECUTED
8afc: 13e0700a mvnne r7, #10 <== NOT EXECUTED
8b00: 1a000042 bne 8c10 <pipe_write+0x178> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
8b04: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
8b08: e2833001 add r3, r3, #1 <== NOT EXECUTED
8b0c: e584301c str r3, [r4, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8b10: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8b14: ebfff1c5 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
8b18: e1a01007 mov r1, r7 <== NOT EXECUTED
8b1c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8b20: eb00095a bl b090 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8b24: e1a01007 mov r1, r7 <== NOT EXECUTED
8b28: 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))
8b2c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8b30: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
8b34: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8b38: ebfff176 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
8b3c: e3500000 cmp r0, #0 <== NOT EXECUTED
8b40: 13e07003 mvnne r7, #3 <== NOT EXECUTED
8b44: 1a000038 bne 8c2c <pipe_write+0x194> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
8b48: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
8b4c: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
8b50: e2433001 sub r3, r3, #1 <== NOT EXECUTED
8b54: e584301c str r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
8b58: 1a00002c bne 8c10 <pipe_write+0x178> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
8b5c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
8b60: e3530000 cmp r3, #0 <== NOT EXECUTED
8b64: 1a000001 bne 8b70 <pipe_write+0xd8> <== NOT EXECUTED
8b68: e3e0701f mvn r7, #31 <== NOT EXECUTED
8b6c: ea000027 b 8c10 <pipe_write+0x178> <== 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) {
8b70: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED
8b74: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
8b78: e062300a rsb r3, r2, sl <== NOT EXECUTED
8b7c: e1530009 cmp r3, r9 <== NOT EXECUTED
8b80: 3affffdb bcc 8af4 <pipe_write+0x5c> <== NOT EXECUTED
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
8b84: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
8b88: e1a0100a mov r1, sl <== NOT EXECUTED
8b8c: e0820000 add r0, r2, r0 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
8b90: e0667005 rsb r7, r6, r5 <== NOT EXECUTED
8b94: e1530007 cmp r3, r7 <== NOT EXECUTED
8b98: 31a07003 movcc r7, r3 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
8b9c: eb003ce5 bl 17f38 <__umodsi3> <== NOT EXECUTED
8ba0: e5943000 ldr r3, [r4] <== NOT EXECUTED
8ba4: e060a00a rsb sl, r0, sl <== NOT EXECUTED
if (chunk > chunk1) {
8ba8: e157000a cmp r7, sl <== NOT EXECUTED
8bac: e08b1006 add r1, fp, r6 <== NOT EXECUTED
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);
8bb0: d0830000 addle r0, r3, r0 <== NOT EXECUTED
8bb4: d1a02007 movle r2, r7 <== NOT EXECUTED
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
8bb8: da000006 ble 8bd8 <pipe_write+0x140> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
8bbc: e1a0200a mov r2, sl <== NOT EXECUTED
8bc0: e0830000 add r0, r3, r0 <== NOT EXECUTED
8bc4: eb0018cb bl eef8 <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
8bc8: e08a1006 add r1, sl, r6 <== NOT EXECUTED
8bcc: e5940000 ldr r0, [r4] <== NOT EXECUTED
8bd0: e08b1001 add r1, fp, r1 <== NOT EXECUTED
8bd4: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
8bd8: eb0018c6 bl eef8 <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
8bdc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
8be0: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
8be4: e0833007 add r3, r3, r7 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
8be8: e3520000 cmp r2, #0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
8bec: e584300c str r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
8bf0: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8bf4: 11a0100d movne r1, sp <== NOT EXECUTED
8bf8: 1b00090e blne b038 <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
8bfc: e0866007 add r6, r6, r7 <== NOT EXECUTED
8c00: e3a09001 mov r9, #1 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
8c04: e1560005 cmp r6, r5 <== NOT EXECUTED
8c08: 3affffd8 bcc 8b70 <pipe_write+0xd8> <== NOT EXECUTED
8c0c: e3a07000 mov r7, #0 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
8c10: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8c14: ebfff185 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
8c18: e3770020 cmn r7, #32 <== NOT EXECUTED
8c1c: 1a000002 bne 8c2c <pipe_write+0x194> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
8c20: eb00058d bl a25c <getpid> <== NOT EXECUTED
8c24: e3a0100d mov r1, #13 <== NOT EXECUTED
8c28: eb000701 bl a834 <kill> <== NOT EXECUTED
#endif
if (written > 0)
8c2c: e3560000 cmp r6, #0 <== NOT EXECUTED
8c30: d1a06007 movle r6, r7 <== NOT EXECUTED
return written;
return ret;
}
8c34: e1a00006 mov r0, r6 <== NOT EXECUTED
8c38: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001a234 <read>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a234: e59f30b0 ldr r3, [pc, #176] ; 1a2ec <read+0xb8> 1a238: e5933000 ldr r3, [r3] 1a23c: e1500003 cmp r0, r3
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
1a240: e92d4070 push {r4, r5, r6, lr}
1a244: e1a05001 mov r5, r1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a248: 2a000005 bcs 1a264 <read+0x30>
iop = rtems_libio_iop( fd );
1a24c: e59f309c ldr r3, [pc, #156] ; 1a2f0 <read+0xbc> 1a250: e5934000 ldr r4, [r3] 1a254: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
1a258: e5943014 ldr r3, [r4, #20] 1a25c: e3130c01 tst r3, #256 ; 0x100
1a260: 1a000002 bne 1a270 <read+0x3c>
1a264: ebffd115 bl e6c0 <__errno> 1a268: e3a03009 mov r3, #9 1a26c: ea00000f b 1a2b0 <read+0x7c>
rtems_libio_check_buffer( buffer );
1a270: e3510000 cmp r1, #0
1a274: 0a000004 beq 1a28c <read+0x58> rtems_libio_check_count( count );
1a278: e3520000 cmp r2, #0
1a27c: 01a00002 moveq r0, r2
1a280: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
1a284: e3130002 tst r3, #2
1a288: 1a000002 bne 1a298 <read+0x64>
1a28c: ebffd10b bl e6c0 <__errno> <== NOT EXECUTED 1a290: e3a03016 mov r3, #22 <== NOT EXECUTED 1a294: ea000005 b 1a2b0 <read+0x7c> <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
1a298: e594303c ldr r3, [r4, #60] ; 0x3c 1a29c: e5933008 ldr r3, [r3, #8] 1a2a0: e3530000 cmp r3, #0
1a2a4: 1a000004 bne 1a2bc <read+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a2a8: ebffd104 bl e6c0 <__errno> <== NOT EXECUTED 1a2ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a2b0: e5803000 str r3, [r0]
1a2b4: e3e00000 mvn r0, #0
1a2b8: e8bd8070 pop {r4, r5, r6, pc}
rc = (*iop->handlers->read_h)( iop, buffer, count );
1a2bc: e1a00004 mov r0, r4 1a2c0: e1a0e00f mov lr, pc 1a2c4: e12fff13 bx r3
if ( rc > 0 )
1a2c8: e3500000 cmp r0, #0
1a2cc: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
1a2d0: e284600c add r6, r4, #12
1a2d4: e8960060 ldm r6, {r5, r6}
1a2d8: e0952000 adds r2, r5, r0
1a2dc: e0a63fc0 adc r3, r6, r0, asr #31
1a2e0: e584200c str r2, [r4, #12]
1a2e4: e5843010 str r3, [r4, #16]
return rc;
}
1a2e8: e8bd8070 pop {r4, r5, r6, pc}
000050c4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
50c4: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
50c8: e2516000 subs r6, r1, #0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
50cc: e24dd018 sub sp, sp, #24
50d0: e1a05002 mov r5, r2
50d4: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
50d8: 1a000002 bne 50e8 <readlink+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
50dc: eb0030e2 bl 1146c <__errno> <== NOT EXECUTED
50e0: e3a0300e mov r3, #14 <== NOT EXECUTED
50e4: ea000028 b 518c <readlink+0xc8> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
50e8: eb003847 bl 1320c <strlen>
50ec: e28d4004 add r4, sp, #4
50f0: e3a0c000 mov ip, #0
50f4: e1a01000 mov r1, r0
50f8: e1a0200c mov r2, ip
50fc: e1a00007 mov r0, r7
5100: e1a03004 mov r3, r4
5104: e58dc000 str ip, [sp]
5108: ebfffb85 bl 3f24 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
510c: e3500000 cmp r0, #0
5110: 1a00001e bne 5190 <readlink+0xcc>
return -1;
if ( !loc.ops->node_type_h ){
5114: e59d2010 ldr r2, [sp, #16]
5118: e5923010 ldr r3, [r2, #16]
511c: e3530000 cmp r3, #0
5120: 0a000012 beq 5170 <readlink+0xac>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
5124: e1a00004 mov r0, r4
5128: e1a0e00f mov lr, pc
512c: e12fff13 bx r3
5130: e3500004 cmp r0, #4
5134: e59d2010 ldr r2, [sp, #16]
5138: 0a000009 beq 5164 <readlink+0xa0>
rtems_filesystem_freenode( &loc );
513c: e3520000 cmp r2, #0
5140: 0a000004 beq 5158 <readlink+0x94>
5144: e592301c ldr r3, [r2, #28]
5148: e3530000 cmp r3, #0
514c: 11a00004 movne r0, r4
5150: 11a0e00f movne lr, pc
5154: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
5158: eb0030c3 bl 1146c <__errno>
515c: e3a03016 mov r3, #22
5160: ea000009 b 518c <readlink+0xc8>
}
if ( !loc.ops->readlink_h ){
5164: e592303c ldr r3, [r2, #60] ; 0x3c
5168: e3530000 cmp r3, #0
516c: 1a000009 bne 5198 <readlink+0xd4>
rtems_filesystem_freenode( &loc );
5170: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
5174: e3530000 cmp r3, #0 <== NOT EXECUTED
5178: 11a00004 movne r0, r4 <== NOT EXECUTED
517c: 11a0e00f movne lr, pc <== NOT EXECUTED
5180: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
5184: eb0030b8 bl 1146c <__errno> <== NOT EXECUTED
5188: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
518c: e5803000 str r3, [r0]
5190: e3e05000 mvn r5, #0
5194: ea00000d b 51d0 <readlink+0x10c>
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
5198: e1a02005 mov r2, r5
519c: e1a01006 mov r1, r6
51a0: e1a00004 mov r0, r4
51a4: e1a0e00f mov lr, pc
51a8: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
51ac: e59d3010 ldr r3, [sp, #16]
51b0: e3530000 cmp r3, #0
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 );
51b4: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
51b8: 0a000004 beq 51d0 <readlink+0x10c>
51bc: e593301c ldr r3, [r3, #28]
51c0: e3530000 cmp r3, #0
51c4: 11a00004 movne r0, r4
51c8: 11a0e00f movne lr, pc
51cc: 112fff13 bxne r3
return result;
}
51d0: e1a00005 mov r0, r5
51d4: e28dd018 add sp, sp, #24
51d8: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003960 <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
3960: e59f3144 ldr r3, [pc, #324] ; 3aac <readv+0x14c>
3964: e5933000 ldr r3, [r3]
3968: e1500003 cmp r0, r3
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
396c: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
3970: e1a08002 mov r8, r2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
3974: 2a000005 bcs 3990 <readv+0x30>
iop = rtems_libio_iop( fd );
3978: e59f3130 ldr r3, [pc, #304] ; 3ab0 <readv+0x150>
397c: e5936000 ldr r6, [r3]
3980: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
3984: e5963014 ldr r3, [r6, #20]
3988: e3130c01 tst r3, #256 ; 0x100
398c: 1a000002 bne 399c <readv+0x3c>
3990: eb002ef4 bl f568 <__errno>
3994: e3a03009 mov r3, #9
3998: ea00001d b 3a14 <readv+0xb4> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
399c: e3130002 tst r3, #2
39a0: 0a000019 beq 3a0c <readv+0xac>
/*
* Argument validation on IO vector
*/
if ( !iov )
39a4: e3510000 cmp r1, #0
39a8: 0a000017 beq 3a0c <readv+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
39ac: e3520000 cmp r2, #0
39b0: da000015 ble 3a0c <readv+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
39b4: e3520b01 cmp r2, #1024 ; 0x400
39b8: ca000013 bgt 3a0c <readv+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
39bc: e596303c ldr r3, [r6, #60] ; 0x3c
39c0: e5933008 ldr r3, [r3, #8]
39c4: e3530000 cmp r3, #0
39c8: 1a000002 bne 39d8 <readv+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
39cc: eb002ee5 bl f568 <__errno>
39d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
39d4: ea00000e b 3a14 <readv+0xb4> <== NOT EXECUTED
39d8: e3a03000 mov r3, #0
39dc: e1a05001 mov r5, r1
39e0: e1a02001 mov r2, r1
39e4: e3a07001 mov r7, #1
39e8: e1a01003 mov r1, r3
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
39ec: e5920000 ldr r0, [r2]
39f0: e3500000 cmp r0, #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++ ) {
39f4: e2833001 add r3, r3, #1
ssize_t old;
if ( !iov[v].iov_base )
39f8: 0a000003 beq 3a0c <readv+0xac>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
39fc: e592c004 ldr ip, [r2, #4]
3a00: e081000c add r0, r1, ip
if ( total < old )
3a04: e1500001 cmp r0, r1
3a08: aa000003 bge 3a1c <readv+0xbc>
rtems_set_errno_and_return_minus_one( EINVAL );
3a0c: eb002ed5 bl f568 <__errno>
3a10: e3a03016 mov r3, #22
3a14: e5803000 str r3, [r0]
3a18: ea000011 b 3a64 <readv+0x104>
if ( iov[v].iov_len )
3a1c: e35c0000 cmp ip, #0
3a20: 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++ ) {
3a24: e1530008 cmp r3, r8
3a28: e2822008 add r2, r2, #8
3a2c: b1a01000 movlt r1, r0
3a30: baffffed blt 39ec <readv+0x8c>
/*
* 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 ) {
3a34: e3570000 cmp r7, #0
3a38: 13a04000 movne r4, #0 <== NOT EXECUTED
3a3c: 1a000018 bne 3aa4 <readv+0x144> <== NOT EXECUTED
3a40: e1a04007 mov r4, r7 <== NOT EXECUTED
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
3a44: e8950006 ldm r5, {r1, r2} <== NOT EXECUTED
3a48: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED
3a4c: e1a00006 mov r0, r6 <== NOT EXECUTED
3a50: e1a0e00f mov lr, pc <== NOT EXECUTED
3a54: e593f008 ldr pc, [r3, #8] <== NOT EXECUTED
if ( bytes < 0 )
3a58: e3500000 cmp r0, #0 <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3a5c: e2877001 add r7, r7, #1 <== NOT EXECUTED
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
3a60: aa000001 bge 3a6c <readv+0x10c> <== NOT EXECUTED
3a64: e3e04000 mvn r4, #0
3a68: ea00000d b 3aa4 <readv+0x144>
return -1;
if ( bytes > 0 ) {
3a6c: 0a000006 beq 3a8c <readv+0x12c>
iop->offset += bytes;
3a70: e286c00c add ip, r6, #12
3a74: e89c1800 ldm ip, {fp, ip}
3a78: e09b2000 adds r2, fp, r0 <== NOT EXECUTED
3a7c: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED
3a80: e586200c str r2, [r6, #12] <== NOT EXECUTED
3a84: e5863010 str r3, [r6, #16] <== NOT EXECUTED
total += bytes;
3a88: e0844000 add r4, r4, r0 <== NOT EXECUTED
}
if (bytes != iov[ v ].iov_len)
3a8c: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
3a90: e1500003 cmp r0, r3 <== NOT EXECUTED
3a94: 1a000002 bne 3aa4 <readv+0x144> <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3a98: e1570008 cmp r7, r8 <== NOT EXECUTED
3a9c: e2855008 add r5, r5, #8 <== NOT EXECUTED
3aa0: baffffe7 blt 3a44 <readv+0xe4> <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
3aa4: e1a00004 mov r0, r4
3aa8: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
0001a34c <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1a34c: e59f310c ldr r3, [pc, #268] ; 1a460 <realloc+0x114>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1a350: e59f210c ldr r2, [pc, #268] ; 1a464 <realloc+0x118> 1a354: e592c000 ldr ip, [r2]
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1a358: e5932010 ldr r2, [r3, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1a35c: e35c0003 cmp ip, #3
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1a360: e2822001 add r2, r2, #1
1a364: e92d40f1 push {r0, r4, r5, r6, r7, lr}
1a368: e5832010 str r2, [r3, #16]
1a36c: e1a04000 mov r4, r0
1a370: e1a05001 mov r5, r1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1a374: 1a000007 bne 1a398 <realloc+0x4c>
if (_Thread_Dispatch_disable_level > 0)
1a378: e59f30e8 ldr r3, [pc, #232] ; 1a468 <realloc+0x11c> 1a37c: e5933000 ldr r3, [r3] 1a380: e3530000 cmp r3, #0
1a384: 1a000032 bne 1a454 <realloc+0x108>
return (void *) 0;
if (_ISR_Nest_level > 0)
1a388: e59f30dc ldr r3, [pc, #220] ; 1a46c <realloc+0x120> 1a38c: e5933000 ldr r3, [r3] 1a390: e3530000 cmp r3, #0
1a394: 1a00002e bne 1a454 <realloc+0x108>
}
/*
* Continue with realloc().
*/
if ( !ptr )
1a398: e3540000 cmp r4, #0
1a39c: 1a000003 bne 1a3b0 <realloc+0x64>
return malloc( size );
1a3a0: e1a00005 mov r0, r5 1a3a4: ebff9f79 bl 2190 <malloc> 1a3a8: e1a04000 mov r4, r0 1a3ac: ea000029 b 1a458 <realloc+0x10c>
if ( !size ) {
1a3b0: e3550000 cmp r5, #0
1a3b4: 1a000003 bne 1a3c8 <realloc+0x7c>
free( ptr );
1a3b8: e1a00004 mov r0, r4 <== NOT EXECUTED 1a3bc: ebff9ea7 bl 1e60 <free> <== NOT EXECUTED 1a3c0: e1a04005 mov r4, r5 <== NOT EXECUTED
return (void *) 0;
1a3c4: ea000023 b 1a458 <realloc+0x10c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
1a3c8: e59f60a0 ldr r6, [pc, #160] ; 1a470 <realloc+0x124> 1a3cc: e1a01004 mov r1, r4 1a3d0: e5960000 ldr r0, [r6] 1a3d4: e1a0200d mov r2, sp 1a3d8: eb000055 bl 1a534 <_Protected_heap_Get_block_size> 1a3dc: e2507000 subs r7, r0, #0
1a3e0: 1a000004 bne 1a3f8 <realloc+0xac>
errno = EINVAL;
1a3e4: ebffd0b5 bl e6c0 <__errno> 1a3e8: e3a03016 mov r3, #22 1a3ec: e5803000 str r3, [r0] 1a3f0: e1a04007 mov r4, r7
return (void *) 0;
1a3f4: ea000017 b 1a458 <realloc+0x10c>
#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 ) ) {
1a3f8: e5960000 ldr r0, [r6] 1a3fc: e1a01004 mov r1, r4 1a400: e1a02005 mov r2, r5 1a404: eb00005b bl 1a578 <_Protected_heap_Resize_block> 1a408: e3500000 cmp r0, #0
1a40c: 1a000011 bne 1a458 <realloc+0x10c>
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
1a410: e1a00005 mov r0, r5 1a414: ebff9f5d bl 2190 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1a418: e59f3040 ldr r3, [pc, #64] ; 1a460 <realloc+0x114> 1a41c: e5932004 ldr r2, [r3, #4]
if ( !new_area ) {
1a420: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1a424: e2422001 sub r2, r2, #1 1a428: e5832004 str r2, [r3, #4]
if ( !new_area ) {
1a42c: 0a000008 beq 1a454 <realloc+0x108>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
1a430: e59d2000 ldr r2, [sp] 1a434: e1a01004 mov r1, r4 1a438: e1550002 cmp r5, r2 1a43c: 31a02005 movcc r2, r5 1a440: ebffd2ac bl eef8 <memcpy>
free( ptr );
1a444: e1a00004 mov r0, r4 1a448: ebff9e84 bl 1e60 <free> 1a44c: e1a04006 mov r4, r6
return new_area;
1a450: ea000000 b 1a458 <realloc+0x10c> 1a454: e3a04000 mov r4, #0
}
1a458: e1a00004 mov r0, r4
1a45c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
0000641c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
641c: e92d4070 push {r4, r5, r6, lr}
6420: e24dd030 sub sp, sp, #48 ; 0x30
6424: e1a06000 mov r6, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
6428: ebfff978 bl 4a10 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
642c: e2504000 subs r4, r0, #0
6430: e28d3018 add r3, sp, #24
6434: 1a000005 bne 6450 <rmdir+0x34>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
6438: e1a02003 mov r2, r3
643c: e1a00006 mov r0, r6
6440: e28d102c add r1, sp, #44 ; 0x2c
6444: eb0000c0 bl 674c <rtems_filesystem_get_start_loc>
6448: e1a05004 mov r5, r4
644c: ea000008 b 6474 <rmdir+0x58>
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
6450: e3a0c000 mov ip, #0
6454: e1a00006 mov r0, r6
6458: e1a01004 mov r1, r4
645c: e3a02002 mov r2, #2
6460: e58dc000 str ip, [sp]
6464: ebfff9b0 bl 4b2c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
6468: e3500000 cmp r0, #0
646c: 1a000077 bne 6650 <rmdir+0x234>
6470: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
6474: e28de018 add lr, sp, #24
6478: e8be000f ldm lr!, {r0, r1, r2, r3}
647c: e28dc004 add ip, sp, #4
6480: e8ac000f stmia ip!, {r0, r1, r2, r3}
6484: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
6488: e0864004 add r4, r6, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
648c: e58c3000 str r3, [ip]
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
6490: e1a00004 mov r0, r4
6494: eb003bb4 bl 1536c <strlen>
6498: e1a01000 mov r1, r0
649c: e1a00004 mov r0, r4
64a0: ebfff94a bl 49d0 <rtems_filesystem_prefix_separators>
64a4: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
64a8: e1a00006 mov r0, r6
64ac: eb003bae bl 1536c <strlen>
64b0: e28d4004 add r4, sp, #4
64b4: e3a0c000 mov ip, #0
64b8: e1a01000 mov r1, r0
64bc: e1a0200c mov r2, ip
64c0: e1a00006 mov r0, r6
64c4: e1a03004 mov r3, r4
64c8: e58dc000 str ip, [sp]
64cc: ebfff95e bl 4a4c <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
64d0: e3500000 cmp r0, #0
64d4: 0a00000b beq 6508 <rmdir+0xec>
if ( free_parentloc )
64d8: e3550000 cmp r5, #0
64dc: 0a00005b beq 6650 <rmdir+0x234>
rtems_filesystem_freenode( &parentloc );
64e0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
64e4: e3530000 cmp r3, #0 <== NOT EXECUTED
64e8: 0a000058 beq 6650 <rmdir+0x234> <== NOT EXECUTED
64ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
64f0: e3530000 cmp r3, #0 <== NOT EXECUTED
64f4: 0a000055 beq 6650 <rmdir+0x234> <== NOT EXECUTED
64f8: e28d0018 add r0, sp, #24 <== NOT EXECUTED
64fc: e1a0e00f mov lr, pc <== NOT EXECUTED
6500: e12fff13 bx r3 <== NOT EXECUTED
6504: ea000051 b 6650 <rmdir+0x234> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
6508: e59d2010 ldr r2, [sp, #16]
650c: e5923010 ldr r3, [r2, #16]
6510: e3530000 cmp r3, #0
rtems_filesystem_freenode( &loc );
6514: 0592301c ldreq r3, [r2, #28]
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
6518: 0a000021 beq 65a4 <rmdir+0x188>
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 ){
651c: e1a00004 mov r0, r4
6520: e1a0e00f mov lr, pc
6524: e12fff13 bx r3
6528: e3500001 cmp r0, #1
652c: 0a000014 beq 6584 <rmdir+0x168>
rtems_filesystem_freenode( &loc );
6530: e59d3010 ldr r3, [sp, #16]
6534: e3530000 cmp r3, #0
6538: 0a000004 beq 6550 <rmdir+0x134>
653c: e593301c ldr r3, [r3, #28]
6540: e3530000 cmp r3, #0
6544: 11a00004 movne r0, r4
6548: 11a0e00f movne lr, pc
654c: 112fff13 bxne r3
if ( free_parentloc )
6550: e3550000 cmp r5, #0
6554: 0a000007 beq 6578 <rmdir+0x15c>
rtems_filesystem_freenode( &parentloc );
6558: e59d3024 ldr r3, [sp, #36] ; 0x24
655c: e3530000 cmp r3, #0
6560: 0a000004 beq 6578 <rmdir+0x15c>
6564: e593301c ldr r3, [r3, #28]
6568: e3530000 cmp r3, #0
656c: 128d0018 addne r0, sp, #24
6570: 11a0e00f movne lr, pc
6574: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
6578: eb002ea3 bl 1200c <__errno>
657c: e3a03014 mov r3, #20
6580: ea000017 b 65e4 <rmdir+0x1c8>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
6584: e59d300c ldr r3, [sp, #12]
6588: e5933034 ldr r3, [r3, #52] ; 0x34
658c: e3530000 cmp r3, #0
6590: 1a000015 bne 65ec <rmdir+0x1d0>
rtems_filesystem_freenode( &loc );
6594: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
6598: e3530000 cmp r3, #0 <== NOT EXECUTED
659c: 0a000004 beq 65b4 <rmdir+0x198> <== NOT EXECUTED
65a0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
65a4: e3530000 cmp r3, #0 <== NOT EXECUTED
65a8: 11a00004 movne r0, r4 <== NOT EXECUTED
65ac: 11a0e00f movne lr, pc <== NOT EXECUTED
65b0: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
65b4: e3550000 cmp r5, #0 <== NOT EXECUTED
65b8: 0a000007 beq 65dc <rmdir+0x1c0> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
65bc: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
65c0: e3530000 cmp r3, #0 <== NOT EXECUTED
65c4: 0a000004 beq 65dc <rmdir+0x1c0> <== NOT EXECUTED
65c8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
65cc: e3530000 cmp r3, #0 <== NOT EXECUTED
65d0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
65d4: 11a0e00f movne lr, pc <== NOT EXECUTED
65d8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
65dc: eb002e8a bl 1200c <__errno> <== NOT EXECUTED
65e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
65e4: e5803000 str r3, [r0]
65e8: ea000018 b 6650 <rmdir+0x234>
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
65ec: e28d0018 add r0, sp, #24
65f0: e1a01004 mov r1, r4
65f4: e1a0e00f mov lr, pc
65f8: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
65fc: e59d3010 ldr r3, [sp, #16]
6600: e3530000 cmp r3, #0
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
6604: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc );
6608: 0a000004 beq 6620 <rmdir+0x204>
660c: e593301c ldr r3, [r3, #28]
6610: e3530000 cmp r3, #0
6614: 11a00004 movne r0, r4
6618: 11a0e00f movne lr, pc
661c: 112fff13 bxne r3
if ( free_parentloc )
6620: e3550000 cmp r5, #0
6624: 0a00000a beq 6654 <rmdir+0x238>
rtems_filesystem_freenode( &parentloc );
6628: e59d3024 ldr r3, [sp, #36] ; 0x24
662c: e3530000 cmp r3, #0
6630: 0a000007 beq 6654 <rmdir+0x238>
6634: e593301c ldr r3, [r3, #28]
6638: e3530000 cmp r3, #0
663c: 0a000004 beq 6654 <rmdir+0x238>
6640: e28d0018 add r0, sp, #24
6644: e1a0e00f mov lr, pc
6648: e12fff13 bx r3
664c: ea000000 b 6654 <rmdir+0x238>
6650: e3e06000 mvn r6, #0
return result;
}
6654: e1a00006 mov r0, r6
6658: e28dd030 add sp, sp, #48 ; 0x30
665c: e8bd8070 pop {r4, r5, r6, pc}
00012b40 <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;
}
12b40: e59f0000 ldr r0, [pc, #0] ; 12b48 <rtems_assoc_name_bad+0x8><== NOT EXECUTED 12b44: e12fff1e bx lr <== NOT EXECUTED
0000f314 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
f314: e92d4010 push {r4, lr}
f318: e1a04001 mov r4, r1
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
f31c: eb000006 bl f33c <rtems_assoc_ptr_by_local>
if (nap)
f320: e3500000 cmp r0, #0
f324: 0a000001 beq f330 <rtems_assoc_name_by_local+0x1c>
return nap->name;
return rtems_assoc_name_bad(local_value);
}
f328: e5900000 ldr r0, [r0]
f32c: 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);
f330: e1a00004 mov r0, r4
}
f334: 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);
f338: ea000e00 b 12b40 <rtems_assoc_name_bad> <== NOT EXECUTED
0000e5b8 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
e5b8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
e5bc: eb000022 bl e64c <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
e5c0: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
e5c4: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0;
}
e5c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00001820 <rtems_bsp_cmdline_get_param>:
size_t length
)
{
const char *p;
if ( !name )
1820: e3500000 cmp r0, #0
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
1824: e92d4070 push {r4, r5, r6, lr}
1828: e1a04001 mov r4, r1
182c: e1a05002 mov r5, r2
const char *p;
if ( !name )
1830: 0a00001c beq 18a8 <rtems_bsp_cmdline_get_param+0x88>
return NULL;
if ( !value )
1834: e3510000 cmp r1, #0
1838: 0a00001b beq 18ac <rtems_bsp_cmdline_get_param+0x8c>
return NULL;
if ( !length )
183c: e3520000 cmp r2, #0
1840: 0a000018 beq 18a8 <rtems_bsp_cmdline_get_param+0x88>
return NULL;
value[0] = '\0';
1844: e3a06000 mov r6, #0
1848: e5c16000 strb r6, [r1]
p = rtems_bsp_cmdline_get_param_raw( name );
184c: eb000018 bl 18b4 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
1850: e3500000 cmp r0, #0
1854: 0a000013 beq 18a8 <rtems_bsp_cmdline_get_param+0x88>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
1858: e2455001 sub r5, r5, #1
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
185c: e1a03006 mov r3, r6
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
value[i] = '\0';
1860: e1a01006 mov r1, r6
1864: ea000009 b 1890 <rtems_bsp_cmdline_get_param+0x70>
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
1868: e3520022 cmp r2, #34 ; 0x22
quotes++;
186c: 02866001 addeq r6, r6, #1
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
1870: 0a000003 beq 1884 <rtems_bsp_cmdline_get_param+0x64>
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
1874: e3160001 tst r6, #1
1878: 1a000001 bne 1884 <rtems_bsp_cmdline_get_param+0x64>
187c: e3520020 cmp r2, #32
1880: 0a000009 beq 18ac <rtems_bsp_cmdline_get_param+0x8c>
break;
value[i++] = *p++;
1884: e7c42003 strb r2, [r4, r3]
1888: e2833001 add r3, r3, #1
value[i] = '\0';
188c: e7c41003 strb r1, [r4, r3]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
1890: e7d02003 ldrb r2, [r0, r3]
1894: e3520000 cmp r2, #0
1898: 0a000003 beq 18ac <rtems_bsp_cmdline_get_param+0x8c>
189c: e1530005 cmp r3, r5
18a0: 3afffff0 bcc 1868 <rtems_bsp_cmdline_get_param+0x48>
18a4: ea000000 b 18ac <rtems_bsp_cmdline_get_param+0x8c> <== NOT EXECUTED
18a8: e3a04000 mov r4, #0
return NULL;
copy_string( p, value, length );
return value;
}
18ac: e1a00004 mov r0, r4
18b0: e8bd8070 pop {r4, r5, r6, pc}
000018dc <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
18dc: e92d4070 push {r4, r5, r6, lr}
18e0: e1a05000 mov r5, r0
18e4: e1a04001 mov r4, r1
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
18e8: ebffffcc bl 1820 <rtems_bsp_cmdline_get_param>
if ( !p )
18ec: e2506000 subs r6, r0, #0
18f0: 0a000018 beq 1958 <rtems_bsp_cmdline_get_param_rhs+0x7c>
return NULL;
rhs = &p[strlen(name)];
18f4: e1a00005 mov r0, r5
18f8: eb003791 bl f744 <strlen>
if ( *rhs != '=' )
18fc: e7d63000 ldrb r3, [r6, r0]
1900: e353003d cmp r3, #61 ; 0x3d
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
1904: e0866000 add r6, r6, r0
if ( *rhs != '=' )
1908: 1a000012 bne 1958 <rtems_bsp_cmdline_get_param_rhs+0x7c>
return NULL;
rhs++;
if ( *rhs == '\"' )
190c: e5d63001 ldrb r3, [r6, #1]
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
rhs++;
1910: e2866001 add r6, r6, #1
if ( *rhs == '\"' )
1914: e3530022 cmp r3, #34 ; 0x22
rhs++;
1918: 02866001 addeq r6, r6, #1
191c: e1a02004 mov r2, r4
1920: e3a0c000 mov ip, #0
1924: ea000000 b 192c <rtems_bsp_cmdline_get_param_rhs+0x50>
for ( d=value ; *rhs ; )
*d++ = *rhs++;
1928: e5421001 strb r1, [r2, #-1] <== NOT EXECUTED
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
192c: e7d6100c ldrb r1, [r6, ip]
1930: e3510000 cmp r1, #0
*d++ = *rhs++;
1934: e1a03002 mov r3, r2
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
1938: e28cc001 add ip, ip, #1
193c: e2822001 add r2, r2, #1
1940: 1afffff8 bne 1928 <rtems_bsp_cmdline_get_param_rhs+0x4c>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
1944: e5532001 ldrb r2, [r3, #-1]
1948: e3520022 cmp r2, #34 ; 0x22
194c: 02433001 subeq r3, r3, #1
d--;
*d = '\0';
1950: e5c31000 strb r1, [r3]
return value;
1954: ea000000 b 195c <rtems_bsp_cmdline_get_param_rhs+0x80>
1958: e3a04000 mov r4, #0 <== NOT EXECUTED
}
195c: e1a00004 mov r0, r4
1960: e8bd8070 pop {r4, r5, r6, pc}
00002414 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2414: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2418: e251a000 subs sl, r1, #0
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
241c: e24dd040 sub sp, sp, #64 ; 0x40
2420: e1a08000 mov r8, r0
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2424: 0a000059 beq 2590 <rtems_cpu_usage_report_with_plugin+0x17c>
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2428: e28d4030 add r4, sp, #48 ; 0x30
242c: e1a00004 mov r0, r4
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2430: e28d5028 add r5, sp, #40 ; 0x28
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2434: eb0014ee bl 77f4 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2438: e1a01004 mov r1, r4
243c: e1a02005 mov r2, r5
2440: e59f0150 ldr r0, [pc, #336] ; 2598 <rtems_cpu_usage_report_with_plugin+0x184>
2444: eb001e01 bl 9c50 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
2448: e1a00008 mov r0, r8
244c: e59f1148 ldr r1, [pc, #328] ; 259c <rtems_cpu_usage_report_with_plugin+0x188>
2450: e1a0e00f mov lr, pc
2454: e12fff1a bx sl
2458: e59f4140 ldr r4, [pc, #320] ; 25a0 <rtems_cpu_usage_report_with_plugin+0x18c>
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
245c: e59fb140 ldr fp, [pc, #320] ; 25a4 <rtems_cpu_usage_report_with_plugin+0x190>
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
2460: e5943004 ldr r3, [r4, #4]
2464: e3530000 cmp r3, #0
2468: 0a00003b beq 255c <rtems_cpu_usage_report_with_plugin+0x148>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
246c: e5936004 ldr r6, [r3, #4]
if ( information ) {
2470: e3560000 cmp r6, #0
2474: 13a07001 movne r7, #1
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
2478: 128d9018 addne r9, sp, #24
247c: 11a05004 movne r5, r4
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
2480: 1a00002f bne 2544 <rtems_cpu_usage_report_with_plugin+0x130>
2484: ea000034 b 255c <rtems_cpu_usage_report_with_plugin+0x148> <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
2488: e596301c ldr r3, [r6, #28]
248c: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
2490: e3540000 cmp r4, #0
2494: 0a000029 beq 2540 <rtems_cpu_usage_report_with_plugin+0x12c>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2498: e5940008 ldr r0, [r4, #8]
249c: eb00103c bl 6594 <rtems_object_get_name>
(*print)(
24a0: e28d3008 add r3, sp, #8
24a4: e5942008 ldr r2, [r4, #8]
24a8: e1a00008 mov r0, r8
24ac: e59f10f4 ldr r1, [pc, #244] ; 25a8 <rtems_cpu_usage_report_with_plugin+0x194>
24b0: e1a0e00f mov lr, pc
24b4: e12fff1a bx sl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
24b8: e2843084 add r3, r4, #132 ; 0x84
24bc: e893000c ldm r3, {r2, r3}
24c0: e58d2020 str r2, [sp, #32]
24c4: e58d3024 str r3, [sp, #36] ; 0x24
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
24c8: e59b2000 ldr r2, [fp]
24cc: e5943008 ldr r3, [r4, #8]
24d0: e5922008 ldr r2, [r2, #8]
24d4: e1520003 cmp r2, r3
24d8: 1a000006 bne 24f8 <rtems_cpu_usage_report_with_plugin+0xe4>
Timestamp_Control used;
_Timestamp_Subtract(
24dc: e59f00c8 ldr r0, [pc, #200] ; 25ac <rtems_cpu_usage_report_with_plugin+0x198>
24e0: e28d1030 add r1, sp, #48 ; 0x30
24e4: e1a02009 mov r2, r9
24e8: eb001dd8 bl 9c50 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
24ec: e28d0020 add r0, sp, #32
24f0: e1a01009 mov r1, r9
24f4: eb001d9a bl 9b64 <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
24f8: e28d203c add r2, sp, #60 ; 0x3c
24fc: e28d3038 add r3, sp, #56 ; 0x38
2500: e28d0020 add r0, sp, #32
2504: e28d1028 add r1, sp, #40 ; 0x28
2508: eb001daa bl 9bb8 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
250c: e3a01ffa mov r1, #1000 ; 0x3e8
2510: e59d0024 ldr r0, [sp, #36] ; 0x24
2514: eb006a6d bl 1ced0 <__aeabi_uidiv>
2518: e59d203c ldr r2, [sp, #60] ; 0x3c
251c: e58d2000 str r2, [sp]
2520: e59d2038 ldr r2, [sp, #56] ; 0x38
2524: e1a03000 mov r3, r0
2528: e58d2004 str r2, [sp, #4]
252c: e1a00008 mov r0, r8
2530: e59f1078 ldr r1, [pc, #120] ; 25b0 <rtems_cpu_usage_report_with_plugin+0x19c>
2534: e59d2020 ldr r2, [sp, #32]
2538: e1a0e00f mov lr, pc
253c: e12fff1a bx sl
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2540: e2877001 add r7, r7, #1
2544: e1d631b0 ldrh r3, [r6, #16]
2548: e1570003 cmp r7, r3
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
254c: e3a0100d mov r1, #13
2550: e28d2008 add r2, sp, #8
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2554: 9affffcb bls 2488 <rtems_cpu_usage_report_with_plugin+0x74>
2558: e1a04005 mov r4, r5
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
255c: e59f3050 ldr r3, [pc, #80] ; 25b4 <rtems_cpu_usage_report_with_plugin+0x1a0>
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2560: e2844004 add r4, r4, #4
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
2564: e1540003 cmp r4, r3
2568: 1affffbc bne 2460 <rtems_cpu_usage_report_with_plugin+0x4c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
256c: e3a01ffa mov r1, #1000 ; 0x3e8
2570: e59d002c ldr r0, [sp, #44] ; 0x2c
2574: eb006a55 bl 1ced0 <__aeabi_uidiv>
2578: e59f1038 ldr r1, [pc, #56] ; 25b8 <rtems_cpu_usage_report_with_plugin+0x1a4>
257c: e1a03000 mov r3, r0
2580: e59d2028 ldr r2, [sp, #40] ; 0x28
2584: e1a00008 mov r0, r8
2588: e1a0e00f mov lr, pc
258c: e12fff1a bx sl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
2590: e28dd040 add sp, sp, #64 ; 0x40
2594: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000e58c <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
e58c: e92d4010 push {r4, lr} <== NOT EXECUTED
e590: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
e594: e59f0018 ldr r0, [pc, #24] ; e5b4 <rtems_deviceio_errno+0x28><== NOT EXECUTED
e598: eb000006 bl e5b8 <rtems_assoc_remote_by_local> <== NOT EXECUTED
e59c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
e5a0: 0a000001 beq e5ac <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{
errno = rc;
e5a4: eb000045 bl e6c0 <__errno> <== NOT EXECUTED
e5a8: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
}
return -1;
}
e5ac: e3e00000 mvn r0, #0 <== NOT EXECUTED
e5b0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00006614 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
6614: e92d000e push {r1, r2, r3} <== NOT EXECUTED
6618: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
661c: e28d300c add r3, sp, #12 <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6620: e1a02003 mov r2, r3 <== NOT EXECUTED
6624: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
6628: e58d3000 str r3, [sp] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
662c: ebffff84 bl 6444 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
6630: e8bd4008 pop {r3, lr} <== NOT EXECUTED
6634: e28dd00c add sp, sp, #12 <== NOT EXECUTED
6638: e12fff1e bx lr <== NOT EXECUTED
00001de8 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1de8: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr}
int i = 0;
1dec: e3a0c000 mov ip, #0
/*
* Verify Input parameters.
*/
if ( !pathname )
1df0: e2505000 subs r5, r0, #0
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
int i = 0;
1df4: e58dc004 str ip, [sp, #4]
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1df8: e1a06001 mov r6, r1
1dfc: e1a04002 mov r4, r2
1e00: e1a07003 mov r7, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
1e04: 1a000002 bne 1e14 <rtems_filesystem_evaluate_path+0x2c>
rtems_set_errno_and_return_minus_one( EFAULT );
1e08: eb00322c bl e6c0 <__errno> <== NOT EXECUTED
1e0c: e3a0300e mov r3, #14 <== NOT EXECUTED
1e10: ea000003 b 1e24 <rtems_filesystem_evaluate_path+0x3c> <== NOT EXECUTED
if ( !pathloc )
1e14: e3530000 cmp r3, #0
1e18: 1a000004 bne 1e30 <rtems_filesystem_evaluate_path+0x48>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
1e1c: eb003227 bl e6c0 <__errno> <== NOT EXECUTED
1e20: e3a03005 mov r3, #5 <== NOT EXECUTED
1e24: e5803000 str r3, [r0] <== NOT EXECUTED
1e28: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e2c: ea00000a b 1e5c <rtems_filesystem_evaluate_path+0x74> <== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
1e30: e1a02003 mov r2, r3
1e34: e28d1004 add r1, sp, #4
1e38: eb00039b bl 2cac <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],
1e3c: e59d0004 ldr r0, [sp, #4]
1e40: e59dc01c ldr ip, [sp, #28]
1e44: e0601006 rsb r1, r0, r6
1e48: e1a02004 mov r2, r4
1e4c: e0850000 add r0, r5, r0
1e50: e1a03007 mov r3, r7
1e54: e58dc000 str ip, [sp]
1e58: ebffffaa bl 1d08 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
1e5c: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc}
00001d08 <rtems_filesystem_evaluate_relative_path>:
/*
* Verify Input parameters.
*/
if ( !pathname )
1d08: e3500000 cmp r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1d0c: e92d4030 push {r4, r5, lr}
1d10: e1a05002 mov r5, r2
1d14: e1a04003 mov r4, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
1d18: 1a000002 bne 1d28 <rtems_filesystem_evaluate_relative_path+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
1d1c: eb003267 bl e6c0 <__errno> <== NOT EXECUTED
1d20: e3a0300e mov r3, #14 <== NOT EXECUTED
1d24: ea000027 b 1dc8 <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc )
1d28: e3530000 cmp r3, #0
1d2c: 1a000002 bne 1d3c <rtems_filesystem_evaluate_relative_path+0x34>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
1d30: eb003262 bl e6c0 <__errno> <== NOT EXECUTED
1d34: e3a03005 mov r3, #5 <== NOT EXECUTED
1d38: ea000022 b 1dc8 <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
1d3c: e593c00c ldr ip, [r3, #12]
1d40: e59cc000 ldr ip, [ip]
1d44: e35c0000 cmp ip, #0
1d48: 0a00001c beq 1dc0 <rtems_filesystem_evaluate_relative_path+0xb8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
1d4c: e1a0e00f mov lr, pc
1d50: e12fff1c bx ip
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
1d54: e59d200c ldr r2, [sp, #12]
1d58: e2703001 rsbs r3, r0, #1
1d5c: 33a03000 movcc r3, #0
1d60: e3520000 cmp r2, #0
1d64: 03a03000 moveq r3, #0
1d68: e3530000 cmp r3, #0
1d6c: 08bd8030 popeq {r4, r5, pc}
if ( !pathloc->ops->node_type_h ){
1d70: e594200c ldr r2, [r4, #12]
1d74: e5923010 ldr r3, [r2, #16]
1d78: e3530000 cmp r3, #0
1d7c: 0a00000a beq 1dac <rtems_filesystem_evaluate_relative_path+0xa4>
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
1d80: e1a00004 mov r0, r4
1d84: e1a0e00f mov lr, pc
1d88: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1d8c: e2400003 sub r0, r0, #3
1d90: e3500001 cmp r0, #1
1d94: 83a00000 movhi r0, #0
1d98: 88bd8030 pophi {r4, r5, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
1d9c: e594200c ldr r2, [r4, #12]
1da0: e5923034 ldr r3, [r2, #52] ; 0x34
1da4: e3530000 cmp r3, #0
1da8: 1a000009 bne 1dd4 <rtems_filesystem_evaluate_relative_path+0xcc>
rtems_filesystem_freenode( pathloc );
1dac: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1db0: e3530000 cmp r3, #0 <== NOT EXECUTED
1db4: 11a00004 movne r0, r4 <== NOT EXECUTED
1db8: 11a0e00f movne lr, pc <== NOT EXECUTED
1dbc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1dc0: eb00323e bl e6c0 <__errno> <== NOT EXECUTED
1dc4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1dc8: e5803000 str r3, [r0] <== NOT EXECUTED
1dcc: e3e00000 mvn r0, #0 <== NOT EXECUTED
1dd0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
* 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 );
1dd4: e1a00004 mov r0, r4
1dd8: e1a01005 mov r1, r5
1ddc: e1a0e00f mov lr, pc
1de0: e12fff13 bx r3
}
}
return result;
}
1de4: e8bd8030 pop {r4, r5, pc}
00001b2c <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 )
{
1b2c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1b30: e59f20e4 ldr r2, [pc, #228] ; 1c1c <rtems_filesystem_initialize+0xf0>
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1b34: e59f60e4 ldr r6, [pc, #228] ; 1c20 <rtems_filesystem_initialize+0xf4>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1b38: e5922000 ldr r2, [r2]
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1b3c: e5963000 ldr r3, [r6]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1b40: e3520000 cmp r2, #0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1b44: 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 )
{
1b48: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1b4c: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
1b50: 059f00cc ldreq r0, [pc, #204] ; 1c24 <rtems_filesystem_initialize+0xf8>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1b54: 0a00000b beq 1b88 <rtems_filesystem_initialize+0x5c>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
1b58: e59f30c8 ldr r3, [pc, #200] ; 1c28 <rtems_filesystem_initialize+0xfc>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
1b5c: e3a05000 mov r5, #0
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
1b60: e5932000 ldr r2, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
1b64: e58d5000 str r5, [sp]
1b68: e5923004 ldr r3, [r2, #4]
1b6c: e2820008 add r0, r2, #8
1b70: e8900003 ldm r0, {r0, r1}
1b74: e5922000 ldr r2, [r2]
1b78: eb000226 bl 2418 <mount>
if ( status == -1 )
1b7c: e3700001 cmn r0, #1
1b80: 1a000001 bne 1b8c <rtems_filesystem_initialize+0x60>
rtems_fatal_error_occurred( 0xABCD0002 );
1b84: e59f00a0 ldr r0, [pc, #160] ; 1c2c <rtems_filesystem_initialize+0x100><== NOT EXECUTED
1b88: eb000ef6 bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
1b8c: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1b90: 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;
1b94: 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);
1b98: e3a01001 mov r1, #1
1b9c: e1a03004 mov r3, r4
1ba0: e1a02005 mov r2, r5
1ba4: e59f0084 ldr r0, [pc, #132] ; 1c30 <rtems_filesystem_initialize+0x104>
rtems_filesystem_root = loc;
1ba8: e1a07004 mov r7, r4
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1bac: e58d5000 str r5, [sp]
1bb0: eb00008c bl 1de8 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
1bb4: e596c000 ldr ip, [r6]
1bb8: e8b7000f ldm r7!, {r0, r1, r2, r3}
1bbc: e28cc018 add ip, ip, #24
1bc0: e8ac000f stmia ip!, {r0, r1, r2, r3}
1bc4: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1bc8: 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;
1bcc: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1bd0: e3a01001 mov r1, #1
1bd4: e1a03004 mov r3, r4
1bd8: e59f0050 ldr r0, [pc, #80] ; 1c30 <rtems_filesystem_initialize+0x104>
1bdc: e58d5000 str r5, [sp]
1be0: eb000080 bl 1de8 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
1be4: e596c000 ldr ip, [r6]
1be8: e8b4000f ldm r4!, {r0, r1, r2, r3}
1bec: e28cc004 add ip, ip, #4
1bf0: e8ac000f stmia ip!, {r0, r1, r2, r3}
1bf4: 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);
1bf8: e59f0034 ldr r0, [pc, #52] ; 1c34 <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;
1bfc: 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);
1c00: e59f1030 ldr r1, [pc, #48] ; 1c38 <rtems_filesystem_initialize+0x10c>
1c04: eb00019f bl 2288 <mkdir>
if ( status != 0 )
1c08: e3500000 cmp r0, #0
rtems_fatal_error_occurred( 0xABCD0003 );
1c0c: 159f0028 ldrne r0, [pc, #40] ; 1c3c <rtems_filesystem_initialize+0x110>
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
1c10: 1affffdc bne 1b88 <rtems_filesystem_initialize+0x5c>
* 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.
*/
}
1c14: e28dd018 add sp, sp, #24
1c18: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000a5d4 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
a5d4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a5d8: e1a06000 mov r6, r0
a5dc: e1a07001 mov r7, r1
a5e0: e3a00000 mov r0, #0
a5e4: e59f4090 ldr r4, [pc, #144] ; a67c <rtems_filesystem_iterate+0xa8>
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
a5e8: ea000004 b a600 <rtems_filesystem_iterate+0x2c>
stop = (*routine)( table_entry, routine_arg );
a5ec: e1a00004 mov r0, r4
a5f0: e1a01007 mov r1, r7
++table_entry;
a5f4: e2844008 add r4, r4, #8
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
a5f8: e1a0e00f mov lr, pc
a5fc: e12fff16 bx r6
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
a600: e5943000 ldr r3, [r4]
a604: e3530000 cmp r3, #0
a608: 0a000002 beq a618 <rtems_filesystem_iterate+0x44>
a60c: e3500000 cmp r0, #0
a610: 0afffff5 beq a5ec <rtems_filesystem_iterate+0x18>
a614: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
a618: e2504000 subs r4, r0, #0
a61c: 18bd81f0 popne {r4, r5, r6, r7, r8, pc}
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 );
a620: e59f3058 ldr r3, [pc, #88] ; a680 <rtems_filesystem_iterate+0xac>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
a624: e59f5058 ldr r5, [pc, #88] ; a684 <rtems_filesystem_iterate+0xb0>
a628: e5930000 ldr r0, [r3]
a62c: e1a01004 mov r1, r4
a630: e1a02004 mov r2, r4
a634: ebffeab7 bl 5118 <rtems_semaphore_obtain>
a638: e4958004 ldr r8, [r5], #4
rtems_libio_lock();
for (
a63c: ea000005 b a658 <rtems_filesystem_iterate+0x84>
!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 );
a640: e2880008 add r0, r8, #8
a644: e1a01007 mov r1, r7
a648: e1a0e00f mov lr, pc
a64c: e12fff16 bx r6
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a650: e5988000 ldr r8, [r8]
a654: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a658: e1580005 cmp r8, r5
a65c: 0a000001 beq a668 <rtems_filesystem_iterate+0x94>
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
a660: e3540000 cmp r4, #0
a664: 0afffff5 beq a640 <rtems_filesystem_iterate+0x6c>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a668: e59f3010 ldr r3, [pc, #16] ; a680 <rtems_filesystem_iterate+0xac>
a66c: e5930000 ldr r0, [r3]
a670: ebffeaee bl 5230 <rtems_semaphore_release>
a674: e1a00004 mov r0, r4
}
rtems_libio_unlock();
}
return stop;
}
a678: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000a6b0 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
a6b0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a6b4: e1a08001 mov r8, r1
a6b8: e1a06000 mov r6, r0
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
a6bc: eb001404 bl f6d4 <strlen>
filesystem_node *fsn = malloc( fsn_size );
a6c0: e2800011 add r0, r0, #17
a6c4: ebffdeb1 bl 2190 <malloc>
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
a6c8: e2504000 subs r4, r0, #0
a6cc: 1a000004 bne a6e4 <rtems_filesystem_register+0x34>
rtems_set_errno_and_return_minus_one( ENOMEM );
a6d0: eb000ffa bl e6c0 <__errno> <== NOT EXECUTED
a6d4: e3a0300c mov r3, #12 <== NOT EXECUTED
a6d8: e5803000 str r3, [r0] <== NOT EXECUTED
a6dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a6e0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
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 );
a6e4: e2847010 add r7, r4, #16
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
a6e8: e1a01006 mov r1, r6
a6ec: 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 );
a6f0: e59f5068 ldr r5, [pc, #104] ; a760 <rtems_filesystem_register+0xb0>
a6f4: eb0013a6 bl f594 <strcpy>
a6f8: e3a01000 mov r1, #0
a6fc: e1a02001 mov r2, r1
fsn->entry.type = type_storage;
a700: e5847008 str r7, [r4, #8]
fsn->entry.mount_h = mount_h;
a704: e584800c str r8, [r4, #12]
a708: e5950000 ldr r0, [r5]
a70c: ebffea81 bl 5118 <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
a710: e1a00006 mov r0, r6
a714: ebffffdb bl a688 <rtems_filesystem_get_mount_handler>
a718: e2506000 subs r6, r0, #0
a71c: 1a000006 bne a73c <rtems_filesystem_register+0x8c>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
a720: e1a01004 mov r1, r4
a724: e59f0038 ldr r0, [pc, #56] ; a764 <rtems_filesystem_register+0xb4>
a728: ebffecc8 bl 5a50 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a72c: e5950000 ldr r0, [r5]
a730: ebffeabe bl 5230 <rtems_semaphore_release>
a734: e1a00006 mov r0, r6
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
a738: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a73c: e5950000 ldr r0, [r5] <== NOT EXECUTED
a740: ebffeaba bl 5230 <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 );
a744: e1a00004 mov r0, r4 <== NOT EXECUTED
a748: ebffddc4 bl 1e60 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a74c: eb000fdb bl e6c0 <__errno> <== NOT EXECUTED
a750: e3a03016 mov r3, #22 <== NOT EXECUTED
a754: e5803000 str r3, [r0] <== NOT EXECUTED
a758: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_libio_unlock();
return 0;
}
a75c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0000a528 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
a528: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_chain_node *node = NULL;
if ( type == NULL ) {
a52c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a530: 1a000004 bne a548 <rtems_filesystem_unregister+0x20> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a534: eb001061 bl e6c0 <__errno> <== NOT EXECUTED
a538: e3a03016 mov r3, #22 <== NOT EXECUTED
a53c: e5803000 str r3, [r0] <== NOT EXECUTED
a540: e3e00000 mvn r0, #0 <== NOT EXECUTED
a544: e8bd80f0 pop {r4, r5, r6, r7, pc} <== 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 );
a548: e59f307c ldr r3, [pc, #124] ; a5cc <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
a54c: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
a550: e59f4078 ldr r4, [pc, #120] ; a5d0 <rtems_filesystem_unregister+0xa8><== NOT EXECUTED
a554: e5930000 ldr r0, [r3] <== NOT EXECUTED
a558: e1a02001 mov r2, r1 <== NOT EXECUTED
a55c: ebffeaed bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
a560: e4946004 ldr r6, [r4], #4 <== NOT EXECUTED
}
rtems_libio_lock();
for (
a564: ea00000d b a5a0 <rtems_filesystem_unregister+0x78> <== 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 ) {
a568: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
a56c: eb00137c bl f364 <strcmp> <== NOT EXECUTED
a570: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a574: 1a000008 bne a59c <rtems_filesystem_unregister+0x74> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a578: e1a00006 mov r0, r6 <== NOT EXECUTED
a57c: ebffed3e bl 5a7c <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( node );
free( fsn );
a580: e1a00006 mov r0, r6 <== NOT EXECUTED
a584: ebffde35 bl 1e60 <free> <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a588: e59f303c ldr r3, [pc, #60] ; a5cc <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
a58c: e5930000 ldr r0, [r3] <== NOT EXECUTED
a590: ebffeb26 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
a594: e1a00007 mov r0, r7 <== NOT EXECUTED
rtems_libio_unlock();
return 0;
a598: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a59c: e5966000 ldr r6, [r6] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a5a0: e1560004 cmp r6, r4 <== 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 ) {
a5a4: e1a01005 mov r1, r5 <== NOT EXECUTED
a5a8: 1affffee bne a568 <rtems_filesystem_unregister+0x40> <== NOT EXECUTED
a5ac: e59f3018 ldr r3, [pc, #24] ; a5cc <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
a5b0: e5930000 ldr r0, [r3] <== NOT EXECUTED
a5b4: ebffeb1d bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
a5b8: eb001040 bl e6c0 <__errno> <== NOT EXECUTED
a5bc: e3a03002 mov r3, #2 <== NOT EXECUTED
a5c0: e5803000 str r3, [r0] <== NOT EXECUTED
a5c4: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a5c8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000019ec <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
19ec: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
19f0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
19f4: e1a05001 mov r5, r1 <== NOT EXECUTED
19f8: e1a06000 mov r6, 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 );
19fc: eb003734 bl f6d4 <strlen> <== NOT EXECUTED
1a00: e28d4004 add r4, sp, #4 <== NOT EXECUTED
1a04: e1a01000 mov r1, r0 <== NOT EXECUTED
1a08: e3a02000 mov r2, #0 <== NOT EXECUTED
1a0c: e1a03004 mov r3, r4 <== NOT EXECUTED
1a10: e3a0c001 mov ip, #1 <== NOT EXECUTED
1a14: e1a00006 mov r0, r6 <== NOT EXECUTED
1a18: e58dc000 str ip, [sp] <== NOT EXECUTED
1a1c: eb0000f1 bl 1de8 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
1a20: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
1a24: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
1a28: e3530000 cmp r3, #0 <== 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 );
1a2c: e1a07000 mov r7, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
1a30: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
1a34: 1a000009 bne 1a60 <rtems_io_lookup_name+0x74> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1a38: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1a3c: e3530000 cmp r3, #0 <== NOT EXECUTED
1a40: 11a00004 movne r0, r4 <== NOT EXECUTED
1a44: 11a0e00f movne lr, pc <== NOT EXECUTED
1a48: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a4c: eb00331b bl e6c0 <__errno> <== NOT EXECUTED
1a50: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a54: e5803000 str r3, [r0] <== NOT EXECUTED
1a58: e3e00000 mvn r0, #0 <== NOT EXECUTED
1a5c: ea000026 b 1afc <rtems_io_lookup_name+0x110> <== NOT EXECUTED
}
node_type = (*loc.ops->node_type_h)( &loc );
1a60: e1a00004 mov r0, r4 <== NOT EXECUTED
1a64: e1a0e00f mov lr, pc <== NOT EXECUTED
1a68: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
1a6c: e3570000 cmp r7, #0 <== NOT EXECUTED
1a70: 03500002 cmpeq r0, #2 <== NOT EXECUTED
1a74: 03a0a000 moveq sl, #0 <== NOT EXECUTED
1a78: 13a0a001 movne sl, #1 <== NOT EXECUTED
1a7c: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED
1a80: 0a000008 beq 1aa8 <rtems_io_lookup_name+0xbc> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1a84: e3570000 cmp r7, #0 <== NOT EXECUTED
1a88: 0a000018 beq 1af0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
1a8c: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
1a90: e3530000 cmp r3, #0 <== NOT EXECUTED
1a94: 0a000015 beq 1af0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
1a98: e1a00004 mov r0, r4 <== NOT EXECUTED
1a9c: e1a0e00f mov lr, pc <== NOT EXECUTED
1aa0: e12fff13 bx r3 <== NOT EXECUTED
1aa4: ea000011 b 1af0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
1aa8: e5856000 str r6, [r5] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
1aac: e1a00006 mov r0, r6 <== NOT EXECUTED
1ab0: eb003707 bl f6d4 <strlen> <== NOT EXECUTED
1ab4: e5850004 str r0, [r5, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
1ab8: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED
1abc: e5853008 str r3, [r5, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
1ac0: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1ac4: e3570000 cmp r7, #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;
1ac8: e585300c str r3, [r5, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1acc: 0a000009 beq 1af8 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED
1ad0: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
1ad4: e3530000 cmp r3, #0 <== NOT EXECUTED
1ad8: 0a000006 beq 1af8 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED
1adc: e1a00004 mov r0, r4 <== NOT EXECUTED
1ae0: e1a0e00f mov lr, pc <== NOT EXECUTED
1ae4: e12fff13 bx r3 <== NOT EXECUTED
1ae8: e1a0000a mov r0, sl <== NOT EXECUTED
1aec: ea000002 b 1afc <rtems_io_lookup_name+0x110> <== NOT EXECUTED
1af0: e3a0000d mov r0, #13 <== NOT EXECUTED
1af4: ea000000 b 1afc <rtems_io_lookup_name+0x110> <== NOT EXECUTED
1af8: e3a00000 mov r0, #0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
1afc: e28dd018 add sp, sp, #24 <== NOT EXECUTED
1b00: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00001f6c <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
1f6c: e92d4011 push {r0, r4, lr}
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
1f70: e59f4098 ldr r4, [pc, #152] ; 2010 <rtems_libio_init+0xa4>
1f74: e5940000 ldr r0, [r4]
1f78: e3500000 cmp r0, #0
1f7c: 0a000013 beq 1fd0 <rtems_libio_init+0x64>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1f80: e3a01040 mov r1, #64 ; 0x40
1f84: ebffff2d bl 1c40 <calloc>
1f88: e59f3084 ldr r3, [pc, #132] ; 2014 <rtems_libio_init+0xa8>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
1f8c: 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,
1f90: e5830000 str r0, [r3]
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
1f94: 0280001a addeq r0, r0, #26
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)
1f98: 0a000015 beq 1ff4 <rtems_libio_init+0x88>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
1f9c: e59f3074 ldr r3, [pc, #116] ; 2018 <rtems_libio_init+0xac>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1fa0: 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;
1fa4: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1fa8: e3a03000 mov r3, #0
1fac: ea000000 b 1fb4 <rtems_libio_init+0x48>
iop->data1 = iop + 1;
1fb0: e500000c str r0, [r0, #-12]
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++)
1fb4: e2833001 add r3, r3, #1
1fb8: e1530001 cmp r3, r1
iop->data1 = iop + 1;
1fbc: e1a02000 mov r2, r0
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++)
1fc0: e2800040 add r0, r0, #64 ; 0x40
1fc4: 3afffff9 bcc 1fb0 <rtems_libio_init+0x44>
iop->data1 = iop + 1;
iop->data1 = NULL;
1fc8: e3a03000 mov r3, #0
1fcc: e5823034 str r3, [r2, #52] ; 0x34
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
1fd0: e59fc044 ldr ip, [pc, #68] ; 201c <rtems_libio_init+0xb0>
1fd4: e59f0044 ldr r0, [pc, #68] ; 2020 <rtems_libio_init+0xb4>
1fd8: e3a01001 mov r1, #1
1fdc: e3a02054 mov r2, #84 ; 0x54
1fe0: e3a03000 mov r3, #0
1fe4: e58dc000 str ip, [sp]
1fe8: eb000bb8 bl 4ed0 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
1fec: e3500000 cmp r0, #0
1ff0: 0a000000 beq 1ff8 <rtems_libio_init+0x8c>
rtems_fatal_error_occurred( rc );
1ff4: eb000ddb bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
1ff8: e59f3024 ldr r3, [pc, #36] ; 2024 <rtems_libio_init+0xb8>
1ffc: e5933000 ldr r3, [r3]
2000: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
2004: 11a0e00f movne lr, pc
2008: 112fff13 bxne r3
}
200c: e8bd8018 pop {r3, r4, pc}
0000324c <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
324c: 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);
3250: e3a00000 mov r0, #0
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
3254: 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);
3258: e1a01000 mov r1, r0
325c: e28d2018 add r2, sp, #24
3260: eb000a5a bl 5bd0 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
3264: e2508000 subs r8, r0, #0
3268: 1a000037 bne 334c <rtems_libio_set_private_env+0x100>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
326c: e59f40e4 ldr r4, [pc, #228] ; 3358 <rtems_libio_set_private_env+0x10c>
3270: e59f30e4 ldr r3, [pc, #228] ; 335c <rtems_libio_set_private_env+0x110>
3274: e5942000 ldr r2, [r4]
3278: e1520003 cmp r2, r3
327c: 1a00000f bne 32c0 <rtems_libio_set_private_env+0x74>
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
3280: e2800048 add r0, r0, #72 ; 0x48
3284: ebfffce7 bl 2628 <malloc>
if (!tmp)
3288: e2505000 subs r5, r0, #0
328c: 03a0801a moveq r8, #26
3290: 0a00002d beq 334c <rtems_libio_set_private_env+0x100>
#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);
3294: e1a00008 mov r0, r8
3298: e1a01004 mov r1, r4
329c: e59f20bc ldr r2, [pc, #188] ; 3360 <rtems_libio_set_private_env+0x114>
32a0: eb000a97 bl 5d04 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
32a4: e2506000 subs r6, r0, #0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
32a8: 05845000 streq r5, [r4]
#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) {
32ac: 0a000003 beq 32c0 <rtems_libio_set_private_env+0x74>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
32b0: e1a00005 mov r0, r5 <== NOT EXECUTED
32b4: ebfffb6c bl 206c <free> <== NOT EXECUTED
32b8: e1a08006 mov r8, r6 <== NOT EXECUTED
return sc;
32bc: ea000022 b 334c <rtems_libio_set_private_env+0x100> <== NOT EXECUTED
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
32c0: e59f6090 ldr r6, [pc, #144] ; 3358 <rtems_libio_set_private_env+0x10c>
32c4: e5967000 ldr r7, [r6]
32c8: e59f108c ldr r1, [pc, #140] ; 335c <rtems_libio_set_private_env+0x110>
32cc: e3a02048 mov r2, #72 ; 0x48
32d0: e1a00007 mov r0, r7
32d4: eb003021 bl f360 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
32d8: 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);
32dc: e28d4004 add r4, sp, #4
32e0: e3a05000 mov r5, #0
}
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*/
32e4: 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);
32e8: e3a01001 mov r1, #1
32ec: e1a03004 mov r3, r4
32f0: e1a02005 mov r2, r5
32f4: e59f0068 ldr r0, [pc, #104] ; 3364 <rtems_libio_set_private_env+0x118>
rtems_filesystem_root = loc;
32f8: e1a07004 mov r7, r4
* 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);
32fc: e58d5000 str r5, [sp]
3300: ebfffb3b bl 1ff4 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
3304: e596c000 ldr ip, [r6]
3308: e8b7000f ldm r7!, {r0, r1, r2, r3}
330c: e28cc018 add ip, ip, #24
3310: e8ac000f stmia ip!, {r0, r1, r2, r3}
3314: e5973000 ldr r3, [r7]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
3318: e1a02005 mov r2, r5
* 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;
331c: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
3320: e3a01001 mov r1, #1
3324: e1a03004 mov r3, r4
3328: e59f0034 ldr r0, [pc, #52] ; 3364 <rtems_libio_set_private_env+0x118>
332c: e58d5000 str r5, [sp]
3330: ebfffb2f bl 1ff4 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
3334: e596c000 ldr ip, [r6]
3338: e8b4000f ldm r4!, {r0, r1, r2, r3}
333c: e28cc004 add ip, ip, #4
3340: e8ac000f stmia ip!, {r0, r1, r2, r3}
3344: e5973000 ldr r3, [r7]
3348: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL;
}
334c: e1a00008 mov r0, r8
3350: e28dd01c add sp, sp, #28
3354: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000031a8 <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) {
31a8: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
31ac: e1a05000 mov r5, r0 <== 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);
31b0: e3a00000 mov r0, #0 <== NOT EXECUTED
31b4: e1a01000 mov r1, r0 <== NOT EXECUTED
31b8: e1a0200d mov r2, sp <== NOT EXECUTED
31bc: eb000a83 bl 5bd0 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
31c0: e2503000 subs r3, r0, #0 <== NOT EXECUTED
31c4: 1a00001b bne 3238 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
31c8: e59f1070 ldr r1, [pc, #112] ; 3240 <rtems_libio_share_private_env+0x98><== NOT EXECUTED
31cc: e5914000 ldr r4, [r1] <== NOT EXECUTED
31d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
31d4: e5942000 ldr r2, [r4] <== NOT EXECUTED
31d8: e1520003 cmp r2, r3 <== NOT EXECUTED
31dc: 1a000004 bne 31f4 <rtems_libio_share_private_env+0x4c> <== NOT EXECUTED
/* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
31e0: eb000af0 bl 5da8 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
31e4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
31e8: 1a000012 bne 3238 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
free_user_env(tmp);
31ec: e1a00004 mov r0, r4 <== NOT EXECUTED
31f0: ebffffd3 bl 3144 <free_user_env> <== NOT EXECUTED
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
31f4: e59f4044 ldr r4, [pc, #68] ; 3240 <rtems_libio_share_private_env+0x98><== NOT EXECUTED
31f8: e1a00005 mov r0, r5 <== NOT EXECUTED
31fc: e1a01004 mov r1, r4 <== NOT EXECUTED
3200: e28d2004 add r2, sp, #4 <== NOT EXECUTED
3204: eb000b04 bl 5e1c <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
3208: e2503000 subs r3, r0, #0 <== NOT EXECUTED
320c: 1a000006 bne 322c <rtems_libio_share_private_env+0x84> <== NOT EXECUTED
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
3210: e59f202c ldr r2, [pc, #44] ; 3244 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED
3214: e1a01004 mov r1, r4 <== NOT EXECUTED
3218: eb000ab9 bl 5d04 <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
321c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
3220: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED
3224: 05842000 streq r2, [r4] <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
3228: 0a000002 beq 3238 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
322c: e59f1014 ldr r1, [pc, #20] ; 3248 <rtems_libio_share_private_env+0xa0><== NOT EXECUTED
3230: e59f2008 ldr r2, [pc, #8] ; 3240 <rtems_libio_share_private_env+0x98><== NOT EXECUTED
3234: e5821000 str r1, [r2] <== NOT EXECUTED
return sc; }
3238: e1a00003 mov r0, r3 <== NOT EXECUTED
323c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
000065e8 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
65e8: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED
65ec: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
65f0: e28d300c add r3, sp, #12 <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
65f4: e1a02003 mov r2, r3 <== NOT EXECUTED
65f8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
65fc: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
...
)
{
va_list arglist;
va_start(arglist, printf_format);
6600: e58d3000 str r3, [sp] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6604: ebffff8e bl 6444 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
6608: e8bd4008 pop {r3, lr} <== NOT EXECUTED
660c: e28dd010 add sp, sp, #16 <== NOT EXECUTED
6610: e12fff1e bx lr <== NOT EXECUTED
00008868 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
if (!rtems_pipe_configured)
8868: e59f3048 ldr r3, [pc, #72] ; 88b8 <rtems_pipe_initialize+0x50>
886c: e5d33000 ldrb r3, [r3]
8870: e3530000 cmp r3, #0
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
8874: e92d4001 push {r0, lr}
if (!rtems_pipe_configured)
8878: 0a00000d beq 88b4 <rtems_pipe_initialize+0x4c>
return;
if (rtems_pipe_semaphore)
887c: e59fc038 ldr ip, [pc, #56] ; 88bc <rtems_pipe_initialize+0x54><== NOT EXECUTED
8880: e59c3000 ldr r3, [ip] <== NOT EXECUTED
8884: e3530000 cmp r3, #0 <== NOT EXECUTED
8888: 1a000009 bne 88b4 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
888c: e59f002c ldr r0, [pc, #44] ; 88c0 <rtems_pipe_initialize+0x58><== NOT EXECUTED
8890: e3a01001 mov r1, #1 <== NOT EXECUTED
8894: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED
8898: e58dc000 str ip, [sp] <== NOT EXECUTED
889c: ebfff18b bl 4ed0 <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)
88a0: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
88a4: 1bfff3af blne 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
88a8: ebfff08d bl 4ae4 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
rtems_pipe_no = now;
88ac: e59f3010 ldr r3, [pc, #16] ; 88c4 <rtems_pipe_initialize+0x5c><== NOT EXECUTED
88b0: e1c300b0 strh r0, [r3] <== NOT EXECUTED
}
88b4: e8bd8008 pop {r3, pc}
000015a8 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
15a8: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
15ac: e59f307c ldr r3, [pc, #124] ; 1630 <rtems_stack_checker_is_blown+0x88>
15b0: e5933000 ldr r3, [r3]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
15b4: e59300c8 ldr r0, [r3, #200] ; 0xc8
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
15b8: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
15bc: e15b0000 cmp fp, r0
15c0: 33a04000 movcc r4, #0
15c4: 3a000004 bcc 15dc <rtems_stack_checker_is_blown+0x34>
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
15c8: e59340c4 ldr r4, [r3, #196] ; 0xc4
15cc: e0804004 add r4, r0, r4
15d0: e15b0004 cmp fp, r4
15d4: 83a04000 movhi r4, #0
15d8: 93a04001 movls r4, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
15dc: e59f3050 ldr r3, [pc, #80] ; 1634 <rtems_stack_checker_is_blown+0x8c>
15e0: e5933000 ldr r3, [r3]
15e4: e3530000 cmp r3, #0
15e8: 03a01001 moveq r1, #1
15ec: 0a000005 beq 1608 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
15f0: e59f1040 ldr r1, [pc, #64] ; 1638 <rtems_stack_checker_is_blown+0x90>
15f4: e2800008 add r0, r0, #8
15f8: e3a02010 mov r2, #16
15fc: eb003647 bl ef20 <memcmp>
1600: e2701001 rsbs r1, r0, #1
1604: 33a01000 movcc r1, #0
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
1608: e3540000 cmp r4, #0
160c: 0a000002 beq 161c <rtems_stack_checker_is_blown+0x74>
1610: e3510000 cmp r1, #0
1614: 13a00000 movne r0, #0
1618: 18bd8810 popne {r4, fp, pc}
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
161c: e59f300c ldr r3, [pc, #12] ; 1630 <rtems_stack_checker_is_blown+0x88><== NOT EXECUTED
1620: e5930000 ldr r0, [r3] <== NOT EXECUTED
1624: ebffffb4 bl 14fc <Stack_check_report_blown_task> <== NOT EXECUTED
1628: e3a00001 mov r0, #1 <== NOT EXECUTED
return true; }
162c: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
000014ec <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
14ec: e59f1004 ldr r1, [pc, #4] ; 14f8 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
14f0: e3a00000 mov r0, #0 <== NOT EXECUTED
14f4: eaffffe3 b 1488 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
00001488 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1488: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
print_context = context;
148c: e59f4048 ldr r4, [pc, #72] ; 14dc <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
)
{
1490: e1a05001 mov r5, r1 <== NOT EXECUTED
1494: e1a06000 mov r6, r0 <== NOT EXECUTED
print_context = context; print_handler = print;
1498: 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;
149c: e5840008 str r0, [r4, #8] <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
14a0: e59f1038 ldr r1, [pc, #56] ; 14e0 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
14a4: e1a0e00f mov lr, pc <== NOT EXECUTED
14a8: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
14ac: e59f1030 ldr r1, [pc, #48] ; 14e4 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
14b0: e1a00006 mov r0, r6 <== NOT EXECUTED
14b4: e1a0e00f mov lr, pc <== NOT EXECUTED
14b8: 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 );
14bc: e59f0024 ldr r0, [pc, #36] ; 14e8 <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED
14c0: eb0013f6 bl 64a0 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
14c4: e3e00000 mvn r0, #0 <== NOT EXECUTED
14c8: ebffff9f bl 134c <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
14cc: e3a03000 mov r3, #0 <== NOT EXECUTED
print_handler = NULL;
14d0: 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;
14d4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
print_handler = NULL;
}
14d8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000add4 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
add4: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr}
double result;
char *end;
if ( !n )
add8: e2516000 subs r6, r1, #0
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
addc: e1a07000 mov r7, r0
ade0: e1a08002 mov r8, r2
double result;
char *end;
if ( !n )
ade4: 03a00009 moveq r0, #9
ade8: 0a00002e beq aea8 <rtems_string_to_double+0xd4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
adec: eb000b29 bl da98 <__errno>
adf0: e3a03000 mov r3, #0
adf4: e5803000 str r3, [r0]
*n = 0;
adf8: e3a04000 mov r4, #0
adfc: e3a03000 mov r3, #0
ae00: e8860018 stm r6, {r3, r4}
result = strtod( s, &end );
ae04: e1a00007 mov r0, r7
ae08: e1a0100d mov r1, sp
ae0c: eb001698 bl 10874 <strtod>
if ( endptr )
ae10: e3580000 cmp r8, #0
*endptr = end;
ae14: 159d3000 ldrne r3, [sp]
ae18: 15883000 strne r3, [r8]
if ( end == s )
ae1c: e59d3000 ldr r3, [sp]
ae20: e1530007 cmp r3, r7
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
ae24: e1a04000 mov r4, r0
ae28: e1a05001 mov r5, r1
if ( endptr )
*endptr = end;
if ( end == s )
ae2c: 03a0000b moveq r0, #11
ae30: 0a00001c beq aea8 <rtems_string_to_double+0xd4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ae34: eb000b17 bl da98 <__errno>
ae38: e5903000 ldr r3, [r0]
ae3c: e3530022 cmp r3, #34 ; 0x22
ae40: 1a000014 bne ae98 <rtems_string_to_double+0xc4>
ae44: e1a00004 mov r0, r4
ae48: e1a01005 mov r1, r5
ae4c: e3a02000 mov r2, #0
ae50: e3a03000 mov r3, #0
ae54: ebffdf64 bl 2bec <__cmpdf2>
ae58: e3500000 cmp r0, #0
ae5c: 0a000010 beq aea4 <rtems_string_to_double+0xd0>
ae60: e1a00004 mov r0, r4
ae64: e1a01005 mov r1, r5
ae68: e3e02000 mvn r2, #0
ae6c: e59f3038 ldr r3, [pc, #56] ; aeac <rtems_string_to_double+0xd8>
ae70: ebffdf59 bl 2bdc <__gedf2>
ae74: e3500000 cmp r0, #0
ae78: ca000009 bgt aea4 <rtems_string_to_double+0xd0>
ae7c: e1a00004 mov r0, r4 <== NOT EXECUTED
ae80: e1a01005 mov r1, r5 <== NOT EXECUTED
ae84: e3e02000 mvn r2, #0 <== NOT EXECUTED
ae88: e3e03601 mvn r3, #1048576 ; 0x100000 <== NOT EXECUTED
ae8c: ebffdf54 bl 2be4 <__ledf2> <== NOT EXECUTED
ae90: e3500000 cmp r0, #0 <== NOT EXECUTED
ae94: ba000002 blt aea4 <rtems_string_to_double+0xd0> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
ae98: e8860030 stm r6, {r4, r5}
ae9c: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
aea0: ea000000 b aea8 <rtems_string_to_double+0xd4>
aea4: e3a0000a mov r0, #10
}
aea8: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc}
0000aeb0 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
aeb0: e92d40f1 push {r0, r4, r5, r6, r7, lr}
float result;
char *end;
if ( !n )
aeb4: e2514000 subs r4, r1, #0
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
aeb8: e1a05000 mov r5, r0
aebc: e1a07002 mov r7, r2
float result;
char *end;
if ( !n )
aec0: 03a00009 moveq r0, #9
aec4: 0a000026 beq af64 <rtems_string_to_float+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
aec8: eb000af2 bl da98 <__errno>
aecc: e3a03000 mov r3, #0
aed0: e5803000 str r3, [r0]
*n = 0;
aed4: e3a03000 mov r3, #0
aed8: e5843000 str r3, [r4]
result = strtof( s, &end );
aedc: e1a00005 mov r0, r5
aee0: e1a0100d mov r1, sp
aee4: eb00164f bl 10828 <strtof>
if ( endptr )
aee8: e3570000 cmp r7, #0
*endptr = end;
aeec: 159d3000 ldrne r3, [sp]
aef0: 15873000 strne r3, [r7]
if ( end == s )
aef4: e59d3000 ldr r3, [sp]
aef8: e1530005 cmp r3, r5
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
aefc: e1a06000 mov r6, r0
if ( endptr )
*endptr = end;
if ( end == s )
af00: 03a0000b moveq r0, #11
af04: 0a000016 beq af64 <rtems_string_to_float+0xb4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
af08: eb000ae2 bl da98 <__errno>
af0c: e5903000 ldr r3, [r0]
af10: e3530022 cmp r3, #34 ; 0x22
af14: 1a00000e bne af54 <rtems_string_to_float+0xa4>
af18: e1a00006 mov r0, r6
af1c: e3a01000 mov r1, #0
af20: ebffdf7c bl 2d18 <__cmpsf2>
af24: e3500000 cmp r0, #0
af28: 0a00000c beq af60 <rtems_string_to_float+0xb0>
af2c: e1a00006 mov r0, r6
af30: e59f1030 ldr r1, [pc, #48] ; af68 <rtems_string_to_float+0xb8>
af34: ebffdf73 bl 2d08 <__gesf2>
af38: e3500000 cmp r0, #0
af3c: ca000007 bgt af60 <rtems_string_to_float+0xb0>
af40: e1a00006 mov r0, r6 <== NOT EXECUTED
af44: e3e01502 mvn r1, #8388608 ; 0x800000 <== NOT EXECUTED
af48: ebffdf70 bl 2d10 <__lesf2> <== NOT EXECUTED
af4c: e3500000 cmp r0, #0 <== NOT EXECUTED
af50: ba000002 blt af60 <rtems_string_to_float+0xb0> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
af54: e5846000 str r6, [r4]
af58: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
af5c: ea000000 b af64 <rtems_string_to_float+0xb4>
af60: e3a0000a mov r0, #10
}
af64: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
0000af6c <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
af6c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
long result;
char *end;
if ( !n )
af70: e2514000 subs r4, r1, #0
const char *s,
int *n,
char **endptr,
int base
)
{
af74: e1a05000 mov r5, r0
af78: e1a06002 mov r6, r2
af7c: e1a07003 mov r7, r3
long result;
char *end;
if ( !n )
af80: 03a00009 moveq r0, #9
af84: 0a00001c beq affc <rtems_string_to_int+0x90>
return RTEMS_INVALID_ADDRESS;
errno = 0;
af88: eb000ac2 bl da98 <__errno>
af8c: e3a03000 mov r3, #0
af90: e5803000 str r3, [r0]
*n = 0;
result = strtol( s, &end, base );
af94: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
af98: e5843000 str r3, [r4]
result = strtol( s, &end, base );
af9c: e1a00005 mov r0, r5
afa0: e1a0100d mov r1, sp
afa4: eb0016a2 bl 10a34 <strtol>
if ( endptr )
afa8: e3560000 cmp r6, #0
*endptr = end;
afac: 159d3000 ldrne r3, [sp]
afb0: 15863000 strne r3, [r6]
if ( end == s )
afb4: e59d3000 ldr r3, [sp]
afb8: e1530005 cmp r3, r5
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
afbc: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
afc0: 03a0000b moveq r0, #11
afc4: 0a00000c beq affc <rtems_string_to_int+0x90>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
afc8: eb000ab2 bl da98 <__errno>
afcc: e5903000 ldr r3, [r0]
afd0: e3530022 cmp r3, #34 ; 0x22
afd4: 1a000004 bne afec <rtems_string_to_int+0x80>
afd8: e3770106 cmn r7, #-2147483647 ; 0x80000001
afdc: 13570000 cmpne r7, #0
afe0: 0a000004 beq aff8 <rtems_string_to_int+0x8c>
afe4: e3570102 cmp r7, #-2147483648 ; 0x80000000 <== NOT EXECUTED
afe8: 0a000002 beq aff8 <rtems_string_to_int+0x8c> <== NOT EXECUTED
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
afec: e5847000 str r7, [r4]
aff0: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
aff4: ea000000 b affc <rtems_string_to_int+0x90>
aff8: e3a0000a mov r0, #10
}
affc: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
0000b164 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
b164: e92d40f1 push {r0, r4, r5, r6, r7, lr}
unsigned long result;
char *end;
if ( !n )
b168: e2514000 subs r4, r1, #0
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
b16c: e1a05000 mov r5, r0
b170: e1a06002 mov r6, r2
b174: e1a07003 mov r7, r3
unsigned long result;
char *end;
if ( !n )
b178: 03a00009 moveq r0, #9
b17c: 0a00001e beq b1fc <rtems_string_to_unsigned_char+0x98>
return RTEMS_INVALID_ADDRESS;
errno = 0;
b180: eb000a44 bl da98 <__errno>
b184: e3a03000 mov r3, #0
b188: e5803000 str r3, [r0]
*n = 0;
result = strtoul( s, &end, base );
b18c: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
b190: e5c43000 strb r3, [r4]
result = strtoul( s, &end, base );
b194: e1a00005 mov r0, r5
b198: e1a0100d mov r1, sp
b19c: eb001741 bl 10ea8 <strtoul>
if ( endptr )
b1a0: e3560000 cmp r6, #0
*endptr = end;
b1a4: 159d3000 ldrne r3, [sp]
b1a8: 15863000 strne r3, [r6]
if ( end == s )
b1ac: e59d3000 ldr r3, [sp]
b1b0: e1530005 cmp r3, r5
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
b1b4: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
b1b8: 03a0000b moveq r0, #11
b1bc: 0a00000e beq b1fc <rtems_string_to_unsigned_char+0x98>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
b1c0: eb000a34 bl da98 <__errno>
b1c4: e5903000 ldr r3, [r0]
b1c8: e3530022 cmp r3, #34 ; 0x22
b1cc: 1a000002 bne b1dc <rtems_string_to_unsigned_char+0x78>
b1d0: e2473001 sub r3, r7, #1 <== NOT EXECUTED
b1d4: e3730003 cmn r3, #3 <== NOT EXECUTED
b1d8: 8a000006 bhi b1f8 <rtems_string_to_unsigned_char+0x94> <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
b1dc: e35700ff cmp r7, #255 ; 0xff
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
b1e0: 95c47000 strbls r7, [r4]
b1e4: 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 ) {
b1e8: 9a000003 bls b1fc <rtems_string_to_unsigned_char+0x98>
errno = ERANGE;
b1ec: eb000a29 bl da98 <__errno> <== NOT EXECUTED
b1f0: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED
b1f4: e5803000 str r3, [r0] <== NOT EXECUTED
b1f8: e3a0000a mov r0, #10 <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
b1fc: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
00004250 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4250: e3500009 cmp r0, #9
4254: 012fff1e bxeq lr
4258: ca000016 bgt 42b8 <rtems_termios_baud_to_index+0x68>
425c: e3500004 cmp r0, #4
4260: 012fff1e bxeq lr
4264: ca00000a bgt 4294 <rtems_termios_baud_to_index+0x44>
4268: e3500001 cmp r0, #1
426c: 012fff1e bxeq lr
4270: ca000002 bgt 4280 <rtems_termios_baud_to_index+0x30>
4274: e3500000 cmp r0, #0
4278: 012fff1e bxeq lr
427c: ea000030 b 4344 <rtems_termios_baud_to_index+0xf4>
4280: e3500002 cmp r0, #2 <== NOT EXECUTED
4284: 012fff1e bxeq lr <== NOT EXECUTED
4288: e3500003 cmp r0, #3 <== NOT EXECUTED
428c: 1a00002c bne 4344 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
4290: e12fff1e bx lr <== NOT EXECUTED
4294: e3500006 cmp r0, #6 <== NOT EXECUTED
4298: 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;
429c: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
42a0: b12fff1e bxlt lr <== NOT EXECUTED
42a4: e3500007 cmp r0, #7 <== NOT EXECUTED
42a8: 012fff1e bxeq lr <== NOT EXECUTED
42ac: e3500008 cmp r0, #8 <== NOT EXECUTED
42b0: 1a000023 bne 4344 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
42b4: e12fff1e bx lr <== NOT EXECUTED
42b8: e350000e cmp r0, #14 <== NOT EXECUTED
42bc: 012fff1e bxeq lr <== NOT EXECUTED
42c0: ca000008 bgt 42e8 <rtems_termios_baud_to_index+0x98> <== NOT EXECUTED
42c4: e350000b cmp r0, #11 <== NOT EXECUTED
42c8: 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;
42cc: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
42d0: b12fff1e bxlt lr <== NOT EXECUTED
42d4: e350000c cmp r0, #12 <== NOT EXECUTED
42d8: 012fff1e bxeq lr <== NOT EXECUTED
42dc: e350000d cmp r0, #13 <== NOT EXECUTED
42e0: 1a000017 bne 4344 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
42e4: e12fff1e bx lr <== NOT EXECUTED
42e8: e59f305c ldr r3, [pc, #92] ; 434c <rtems_termios_baud_to_index+0xfc><== NOT EXECUTED
42ec: 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;
42f0: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
42f4: 012fff1e bxeq lr <== NOT EXECUTED
42f8: ca000005 bgt 4314 <rtems_termios_baud_to_index+0xc4> <== NOT EXECUTED
42fc: e350000f cmp r0, #15 <== NOT EXECUTED
4300: 012fff1e bxeq lr <== NOT EXECUTED
4304: e2433001 sub r3, r3, #1 <== NOT EXECUTED
4308: e1500003 cmp r0, r3 <== NOT EXECUTED
430c: 1a00000c bne 4344 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
4310: ea000007 b 4334 <rtems_termios_baud_to_index+0xe4> <== NOT EXECUTED
4314: e59f3034 ldr r3, [pc, #52] ; 4350 <rtems_termios_baud_to_index+0x100><== NOT EXECUTED
4318: 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;
431c: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4320: 012fff1e bxeq lr <== NOT EXECUTED
4324: e2833001 add r3, r3, #1 <== NOT EXECUTED
4328: e1500003 cmp r0, r3 <== NOT EXECUTED
432c: 1a000004 bne 4344 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
4330: ea000001 b 433c <rtems_termios_baud_to_index+0xec> <== 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;
4334: e3a00010 mov r0, #16 <== NOT EXECUTED
case B57600: baud_index = 16; break;
4338: e12fff1e bx lr <== NOT EXECUTED
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
433c: e3a00013 mov r0, #19 <== NOT EXECUTED
case B460800: baud_index = 19; break;
4340: e12fff1e bx lr <== NOT EXECUTED
4344: e3e00000 mvn r0, #0
default: baud_index = -1; break;
}
return baud_index;
}
4348: e12fff1e bx lr
00002d70 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
2d70: e59f3008 ldr r3, [pc, #8] ; 2d80 <rtems_termios_bufsize+0x10><== NOT EXECUTED
2d74: 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; }
2d78: e3a00000 mov r0, #0 <== NOT EXECUTED
2d7c: e12fff1e bx lr <== NOT EXECUTED
0000417c <rtems_termios_close>:
{
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);
417c: e59f2180 ldr r2, [pc, #384] ; 4304 <rtems_termios_close+0x188>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4180: e5903000 ldr r3, [r0]
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4184: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
4188: e92d4030 push {r4, r5, lr}
418c: e1a05000 mov r5, r0
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4190: e5920000 ldr r0, [r2]
4194: e1a02001 mov r2, r1
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4198: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
419c: eb0003dd bl 5118 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
41a0: e3500000 cmp r0, #0
41a4: 1a000022 bne 4234 <rtems_termios_close+0xb8>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
41a8: e5943008 ldr r3, [r4, #8]
41ac: e2433001 sub r3, r3, #1
41b0: e3530000 cmp r3, #0
41b4: e5843008 str r3, [r4, #8]
41b8: 1a00004c bne 42f0 <rtems_termios_close+0x174>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
41bc: e59420cc ldr r2, [r4, #204] ; 0xcc
41c0: e59f3140 ldr r3, [pc, #320] ; 4308 <rtems_termios_close+0x18c>
41c4: e0833282 add r3, r3, r2, lsl #5
41c8: e5931004 ldr r1, [r3, #4]
41cc: e3510000 cmp r1, #0
41d0: 0a000003 beq 41e4 <rtems_termios_close+0x68>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
41d4: e1a00004 mov r0, r4 <== NOT EXECUTED
41d8: e1a0e00f mov lr, pc <== NOT EXECUTED
41dc: e12fff11 bx r1 <== NOT EXECUTED
41e0: ea000006 b 4200 <rtems_termios_close+0x84> <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
41e4: e5940018 ldr r0, [r4, #24]
41e8: e1a02001 mov r2, r1
41ec: eb0003c9 bl 5118 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
41f0: e3500000 cmp r0, #0
41f4: 1a00000e bne 4234 <rtems_termios_close+0xb8>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
41f8: e1a00004 mov r0, r4
41fc: ebfffe05 bl 3a18 <drainOutput>
}
if (tty->device.outputUsesInterrupts
4200: e59430b4 ldr r3, [r4, #180] ; 0xb4
4204: e3530002 cmp r3, #2
4208: 1a00000a bne 4238 <rtems_termios_close+0xbc>
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
420c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED
4210: e3a01001 mov r1, #1 <== NOT EXECUTED
4214: eb0002ab bl 4cc8 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
4218: e3500000 cmp r0, #0 <== NOT EXECUTED
421c: 1a000004 bne 4234 <rtems_termios_close+0xb8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
4220: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED
4224: e3a01001 mov r1, #1 <== NOT EXECUTED
4228: eb0002a6 bl 4cc8 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
422c: e3500000 cmp r0, #0 <== NOT EXECUTED
4230: 0a000000 beq 4238 <rtems_termios_close+0xbc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
4234: eb00054b bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
} if (tty->device.lastClose)
4238: e594309c ldr r3, [r4, #156] ; 0x9c
423c: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
4240: 11a02005 movne r2, r5
4244: 1284000c addne r0, r4, #12
4248: 18900003 ldmne r0, {r0, r1}
424c: 11a0e00f movne lr, pc
4250: 112fff13 bxne r3
if (tty->forw == NULL) {
4254: e894000c ldm r4, {r2, r3}
4258: e3520000 cmp r2, #0
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
425c: 15823004 strne r3, [r2, #4]
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
4260: 1a000003 bne 4274 <rtems_termios_close+0xf8>
rtems_termios_ttyTail = tty->back;
4264: e59f10a0 ldr r1, [pc, #160] ; 430c <rtems_termios_close+0x190>
if ( rtems_termios_ttyTail != NULL ) {
4268: e3530000 cmp r3, #0
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
426c: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
4270: 15832000 strne r2, [r3]
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
4274: e5942004 ldr r2, [r4, #4]
4278: e5943000 ldr r3, [r4]
427c: e3520000 cmp r2, #0
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
4280: 15823000 strne r3, [r2]
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
4284: 1a000003 bne 4298 <rtems_termios_close+0x11c>
rtems_termios_ttyHead = tty->forw;
4288: e59f1080 ldr r1, [pc, #128] ; 4310 <rtems_termios_close+0x194>
if ( rtems_termios_ttyHead != NULL ) {
428c: e3530000 cmp r3, #0
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
4290: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
4294: 15832004 strne r2, [r3, #4]
}
}
else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
4298: e5940014 ldr r0, [r4, #20]
429c: eb000376 bl 507c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
42a0: e5940018 ldr r0, [r4, #24]
42a4: eb000374 bl 507c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
42a8: e594008c ldr r0, [r4, #140] ; 0x8c
42ac: eb000372 bl 507c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
42b0: e59430a0 ldr r3, [r4, #160] ; 0xa0
42b4: e3530000 cmp r3, #0
42b8: 0a000002 beq 42c8 <rtems_termios_close+0x14c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
42bc: e59430b4 ldr r3, [r4, #180] ; 0xb4
42c0: e3530002 cmp r3, #2
42c4: 1a000001 bne 42d0 <rtems_termios_close+0x154>
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
42c8: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
42cc: eb00036a bl 507c <rtems_semaphore_delete> <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
42d0: e5940058 ldr r0, [r4, #88] ; 0x58
42d4: ebfff6e1 bl 1e60 <free>
free (tty->rawOutBuf.theBuf);
42d8: e594007c ldr r0, [r4, #124] ; 0x7c
42dc: ebfff6df bl 1e60 <free>
free (tty->cbuf);
42e0: e594001c ldr r0, [r4, #28]
42e4: ebfff6dd bl 1e60 <free>
free (tty);
42e8: e1a00004 mov r0, r4
42ec: ebfff6db bl 1e60 <free>
} rtems_semaphore_release (rtems_termios_ttyMutex);
42f0: e59f300c ldr r3, [pc, #12] ; 4304 <rtems_termios_close+0x188>
42f4: e5930000 ldr r0, [r3]
42f8: eb0003cc bl 5230 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
42fc: e3a00000 mov r0, #0
4300: e8bd8030 pop {r4, r5, pc}
00002f74 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2f74: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2f78: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2f7c: e08c1001 add r1, ip, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2f80: 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)
{
2f84: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2f88: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2f8c: 1a000005 bne 2fa8 <rtems_termios_dequeue_characters+0x34> <== NOT EXECUTED
/* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId,
2f90: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED
2f94: e1a01002 mov r1, r2 <== NOT EXECUTED
2f98: eb00074a bl 4cc8 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
2f9c: e3500000 cmp r0, #0 <== NOT EXECUTED
2fa0: 0a00000c beq 2fd8 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2fa4: eb0009ef bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
2fa8: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED
2fac: e3530005 cmp r3, #5 <== NOT EXECUTED
2fb0: 1a000006 bne 2fd0 <rtems_termios_dequeue_characters+0x5c> <== NOT EXECUTED
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2fb4: e59f3024 ldr r3, [pc, #36] ; 2fe0 <rtems_termios_dequeue_characters+0x6c><== NOT EXECUTED
2fb8: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED
2fbc: e3530000 cmp r3, #0 <== NOT EXECUTED
2fc0: 0a000004 beq 2fd8 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2fc4: e1a0e00f mov lr, pc <== NOT EXECUTED
2fc8: e12fff13 bx r3 <== NOT EXECUTED
2fcc: ea000001 b 2fd8 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
2fd0: 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);
2fd4: eaffff6d b 2d90 <rtems_termios_refill_transmitter> <== NOT EXECUTED
} }
2fd8: e3a00000 mov r0, #0 <== NOT EXECUTED
2fdc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00002fe4 <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)
{
2fe4: e92d4ff7 push {r0, r1, r2, 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) {
2fe8: e59f32b8 ldr r3, [pc, #696] ; 32a8 <rtems_termios_enqueue_raw_characters+0x2c4><== 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)
{
2fec: 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) {
2ff0: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED
2ff4: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED
2ff8: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED
2ffc: 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)
{
3000: e1a0b001 mov fp, r1 <== 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);
3004: 11a05002 movne r5, r2 <== NOT EXECUTED
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
3008: 11a07003 movne r7, r3 <== 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);
300c: 13a06000 movne r6, #0 <== 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) {
3010: 1a00000e bne 3050 <rtems_termios_enqueue_raw_characters+0x6c><== 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);
3014: e1a08002 mov r8, r2 <== NOT EXECUTED
3018: e2843030 add r3, r4, #48 ; 0x30 <== 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,
301c: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED
3020: e58d2008 str r2, [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);
3024: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
3028: e1a09006 mov r9, r6 <== NOT EXECUTED
302c: e1a05006 mov r5, r6 <== NOT EXECUTED
3030: ea000091 b 327c <rtems_termios_enqueue_raw_characters+0x298><== NOT EXECUTED
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
3034: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
3038: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED
303c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED
3040: e1a0e00f mov lr, pc <== NOT EXECUTED
3044: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED
3048: e2866001 add r6, r6, #1 <== NOT EXECUTED
304c: e2455001 sub r5, r5, #1 <== 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--) {
3050: e3550000 cmp r5, #0 <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
3054: e1a01004 mov r1, r4 <== 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--) {
3058: 1afffff5 bne 3034 <rtems_termios_enqueue_raw_characters+0x50><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
305c: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
3060: e3530000 cmp r3, #0 <== NOT EXECUTED
3064: 1a00008c bne 329c <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED
3068: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
306c: e3530000 cmp r3, #0 <== NOT EXECUTED
3070: 0a000089 beq 329c <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
3074: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
3078: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
307c: e1a0e00f mov lr, pc <== NOT EXECUTED
3080: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
3084: e3a03001 mov r3, #1 <== NOT EXECUTED
3088: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
308c: ea000083 b 32a0 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
3090: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3094: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
3098: e7dba006 ldrb sl, [fp, r6] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
309c: 0a00000f beq 30e0 <rtems_termios_enqueue_raw_characters+0xfc><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
30a0: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED
30a4: e152000a cmp r2, sl <== NOT EXECUTED
30a8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED
30ac: 1a000007 bne 30d0 <rtems_termios_enqueue_raw_characters+0xec><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
30b0: e1530002 cmp r3, r2 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
30b4: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
30b8: 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;
30bc: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
30c0: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
30c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
30c8: e3a09001 mov r9, #1 <== NOT EXECUTED
30cc: ea000005 b 30e8 <rtems_termios_enqueue_raw_characters+0x104><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
30d0: e153000a cmp r3, sl <== NOT EXECUTED
/* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF;
30d4: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30d8: 03c33010 biceq r3, r3, #16 <== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
30dc: 0afffff8 beq 30c4 <rtems_termios_enqueue_raw_characters+0xe0><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
30e0: e3590000 cmp r9, #0 <== NOT EXECUTED
30e4: 0a000015 beq 3140 <rtems_termios_enqueue_raw_characters+0x15c><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
30e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30ec: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
30f0: e3530020 cmp r3, #32 <== NOT EXECUTED
30f4: 1a00005e bne 3274 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30f8: e10f7000 mrs r7, CPSR <== NOT EXECUTED
30fc: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED
3100: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
3104: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3108: 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;
310c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3110: 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;
3114: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3118: 0a000006 beq 3138 <rtems_termios_enqueue_raw_characters+0x154><== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
311c: 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,
3120: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3124: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3128: e0811003 add r1, r1, r3 <== NOT EXECUTED
312c: e3a02001 mov r2, #1 <== NOT EXECUTED
3130: e1a0e00f mov lr, pc <== NOT EXECUTED
3134: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3138: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
313c: ea00004c b 3274 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
3140: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
3144: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
3148: e2800001 add r0, r0, #1 <== NOT EXECUTED
314c: eb005379 bl 17f38 <__umodsi3> <== NOT EXECUTED
3150: e1a07000 mov r7, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3154: e10f2000 mrs r2, CPSR <== NOT EXECUTED
3158: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
315c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
3160: e58d2000 str r2, [sp] <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
3164: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
3168: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
316c: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
3170: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
3174: e0800007 add r0, r0, r7 <== NOT EXECUTED
3178: eb00536e bl 17f38 <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
317c: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED
3180: e1500003 cmp r0, r3 <== NOT EXECUTED
3184: 9a000025 bls 3220 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
3188: 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)
318c: e3130001 tst r3, #1 <== NOT EXECUTED
3190: 1a000022 bne 3220 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
3194: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3198: e3833001 orr r3, r3, #1 <== NOT EXECUTED
319c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
31a0: e59f3104 ldr r3, [pc, #260] ; 32ac <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
31a4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
31a8: e0023003 and r3, r2, r3 <== NOT EXECUTED
31ac: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
31b0: 1a00000e bne 31f0 <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
31b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
31b8: e3130020 tst r3, #32 <== NOT EXECUTED
31bc: 1a000002 bne 31cc <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
31c0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
31c4: e3530000 cmp r3, #0 <== NOT EXECUTED
31c8: 1a000014 bne 3220 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF;
31cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
31d0: e3833002 orr r3, r3, #2 <== NOT EXECUTED
31d4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
31d8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31dc: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
31e0: e3a02001 mov r2, #1 <== NOT EXECUTED
31e4: e1a0e00f mov lr, pc <== NOT EXECUTED
31e8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
31ec: ea00000b b 3220 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
31f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
31f4: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
31f8: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
31fc: 1a000007 bne 3220 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
3200: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
3204: 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;
3208: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
320c: e3530000 cmp r3, #0 <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
3210: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
tty->device.stopRemoteTx(tty->minor);
3214: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
3218: 11a0e00f movne lr, pc <== NOT EXECUTED
321c: 112fff13 bxne r3 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3220: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3224: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
3228: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
322c: e1570003 cmp r7, r3 <== NOT EXECUTED
dropped++;
3230: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
3234: 0a00000e beq 3274 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
3238: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
323c: e7c3a007 strb sl, [r3, r7] <== 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 )) {
3240: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
3244: e3530000 cmp r3, #0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
3248: e5847060 str r7, [r4, #96] ; 0x60 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
324c: 1a000008 bne 3274 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
3250: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
3254: e3530000 cmp r3, #0 <== NOT EXECUTED
3258: 0a000005 beq 3274 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
325c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3260: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
3264: e1a0e00f mov lr, pc <== NOT EXECUTED
3268: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
326c: e3a02001 mov r2, #1 <== NOT EXECUTED
3270: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED
3274: e2866001 add r6, r6, #1 <== NOT EXECUTED
3278: e2488001 sub r8, r8, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
327c: e3580000 cmp r8, #0 <== NOT EXECUTED
3280: 1affff82 bne 3090 <rtems_termios_enqueue_raw_characters+0xac><== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
3284: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
3288: e0833005 add r3, r3, r5 <== NOT EXECUTED
328c: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
3290: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
3294: eb0007e5 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
3298: ea000000 b 32a0 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED
329c: e3a05000 mov r5, #0 <== NOT EXECUTED
}
32a0: e1a00005 mov r0, r5 <== NOT EXECUTED
32a4: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
00003dd4 <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;
3dd4: e5903000 ldr r3, [r0]
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
3dd8: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
3ddc: e92d41f0 push {r4, r5, r6, r7, r8, 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;
3de0: e580100c str r1, [r0, #12]
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3de4: e5934034 ldr r4, [r3, #52] ; 0x34
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
3de8: e1a05000 mov r5, r0
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3dec: e1a02001 mov r2, r1
3df0: e5940018 ldr r0, [r4, #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;
3df4: e5957008 ldr r7, [r5, #8]
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3df8: eb0004c6 bl 5118 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3dfc: e2506000 subs r6, r0, #0
3e00: 1a0000d7 bne 4164 <rtems_termios_ioctl+0x390>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
3e04: e5953004 ldr r3, [r5, #4]
3e08: e3530004 cmp r3, #4
3e0c: 0a0000ab beq 40c0 <rtems_termios_ioctl+0x2ec>
3e10: 8a000005 bhi 3e2c <rtems_termios_ioctl+0x58>
3e14: e3530002 cmp r3, #2
3e18: 0a000029 beq 3ec4 <rtems_termios_ioctl+0xf0>
3e1c: 8a0000a0 bhi 40a4 <rtems_termios_ioctl+0x2d0>
3e20: e3530001 cmp r3, #1
3e24: 1a000010 bne 3e6c <rtems_termios_ioctl+0x98>
3e28: ea00001b b 3e9c <rtems_termios_ioctl+0xc8>
3e2c: e59f233c ldr r2, [pc, #828] ; 4170 <rtems_termios_ioctl+0x39c><== NOT EXECUTED
3e30: e1530002 cmp r3, r2 <== NOT EXECUTED
3e34: 0a0000bd beq 4130 <rtems_termios_ioctl+0x35c> <== NOT EXECUTED
3e38: 8a000002 bhi 3e48 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
3e3c: e3530005 cmp r3, #5 <== NOT EXECUTED
3e40: 1a000009 bne 3e6c <rtems_termios_ioctl+0x98> <== NOT EXECUTED
3e44: ea000099 b 40b0 <rtems_termios_ioctl+0x2dc> <== NOT EXECUTED
3e48: e59f2324 ldr r2, [pc, #804] ; 4174 <rtems_termios_ioctl+0x3a0><== NOT EXECUTED
3e4c: e1530002 cmp r3, r2 <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
3e50: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED
3e54: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED
3e58: 05832000 streq r2, [r3] <== 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) {
3e5c: 0a0000be beq 415c <rtems_termios_ioctl+0x388> <== NOT EXECUTED
3e60: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED
3e64: e1530002 cmp r3, r2 <== NOT EXECUTED
3e68: 0a000098 beq 40d0 <rtems_termios_ioctl+0x2fc> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
3e6c: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED
3e70: e59f3300 ldr r3, [pc, #768] ; 4178 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED
3e74: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
3e78: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
3e7c: e3530000 cmp r3, #0 <== NOT EXECUTED
3e80: 03a0600a moveq r6, #10 <== NOT EXECUTED
3e84: 0a0000b4 beq 415c <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
3e88: e1a00004 mov r0, r4 <== NOT EXECUTED
3e8c: e1a01005 mov r1, r5 <== NOT EXECUTED
3e90: e1a0e00f mov lr, pc <== NOT EXECUTED
3e94: e12fff13 bx r3 <== NOT EXECUTED
3e98: ea0000a2 b 4128 <rtems_termios_ioctl+0x354> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
3e9c: e5957008 ldr r7, [r5, #8]
3ea0: e284c030 add ip, r4, #48 ; 0x30
3ea4: e8bc000f ldm ip!, {r0, r1, r2, r3}
3ea8: e1a0e007 mov lr, r7
3eac: e8ae000f stmia lr!, {r0, r1, r2, r3}
3eb0: e8bc000f ldm ip!, {r0, r1, r2, r3}
3eb4: e8ae000f stmia lr!, {r0, r1, r2, r3}
3eb8: e59c3000 ldr r3, [ip]
3ebc: e58e3000 str r3, [lr]
break;
3ec0: ea0000a5 b 415c <rtems_termios_ioctl+0x388>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
3ec4: e595e008 ldr lr, [r5, #8]
3ec8: e8be000f ldm lr!, {r0, r1, r2, r3}
3ecc: e284c030 add ip, r4, #48 ; 0x30
3ed0: e8ac000f stmia ip!, {r0, r1, r2, r3}
3ed4: e8be000f ldm lr!, {r0, r1, r2, r3}
3ed8: 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) &&
3edc: e59420b8 ldr r2, [r4, #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;
3ee0: 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) &&
3ee4: 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;
3ee8: 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) &&
3eec: 0a000019 beq 3f58 <rtems_termios_ioctl+0x184>
3ef0: e5943030 ldr r3, [r4, #48] ; 0x30
3ef4: e3130b01 tst r3, #1024 ; 0x400
3ef8: 1a000016 bne 3f58 <rtems_termios_ioctl+0x184>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
3efc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3f00: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
3f04: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
3f08: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3f0c: e3130020 tst r3, #32 <== NOT EXECUTED
3f10: 0a000010 beq 3f58 <rtems_termios_ioctl+0x184> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3f14: e10f7000 mrs r7, CPSR <== NOT EXECUTED
3f18: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED
3f1c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
3f20: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3f24: e5942094 ldr r2, [r4, #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;
3f28: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3f2c: 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;
3f30: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3f34: 0a000006 beq 3f54 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3f38: 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,
3f3c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3f40: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3f44: e0811003 add r1, r1, r3 <== NOT EXECUTED
3f48: e3a02001 mov r2, #1 <== NOT EXECUTED
3f4c: e1a0e00f mov lr, pc <== NOT EXECUTED
3f50: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3f54: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
3f58: e59430b8 ldr r3, [r4, #184] ; 0xb8
3f5c: e3130b01 tst r3, #1024 ; 0x400
3f60: 0a000008 beq 3f88 <rtems_termios_ioctl+0x1b4>
3f64: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
3f68: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
3f6c: 1a000005 bne 3f88 <rtems_termios_ioctl+0x1b4> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
3f70: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3f74: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
3f78: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
3f7c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3f80: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
3f84: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
3f88: e59430b8 ldr r3, [r4, #184] ; 0xb8
3f8c: e3130c01 tst r3, #256 ; 0x100
3f90: 0a000010 beq 3fd8 <rtems_termios_ioctl+0x204>
3f94: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
3f98: e3530000 cmp r3, #0 <== NOT EXECUTED
3f9c: ba00000d blt 3fd8 <rtems_termios_ioctl+0x204> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
3fa0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3fa4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
3fa8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
3fac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3fb0: e3130004 tst r3, #4 <== NOT EXECUTED
3fb4: 0a000004 beq 3fcc <rtems_termios_ioctl+0x1f8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
3fb8: e59430b0 ldr r3, [r4, #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) &&
3fbc: e3530000 cmp r3, #0 <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
3fc0: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
3fc4: 11a0e00f movne lr, pc <== NOT EXECUTED
3fc8: 112fff13 bxne r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
3fcc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3fd0: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
3fd4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
3fd8: e5943038 ldr r3, [r4, #56] ; 0x38
3fdc: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
3fe0: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
3fe4: b3833c01 orrlt r3, r3, #256 ; 0x100
3fe8: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
3fec: e5943030 ldr r3, [r4, #48] ; 0x30
3ff0: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
3ff4: 159430b8 ldrne r3, [r4, #184] ; 0xb8
3ff8: 13833b01 orrne r3, r3, #1024 ; 0x400
3ffc: 158430b8 strne r3, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
4000: e5943030 ldr r3, [r4, #48] ; 0x30
4004: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
4008: 159430b8 ldrne r3, [r4, #184] ; 0xb8
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
400c: e594703c ldr r7, [r4, #60] ; 0x3c
if (tty->termios.c_iflag & IXOFF) {
tty->flow_ctrl |= FL_MDXOF;
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
tty->flow_ctrl |= FL_MDXON;
4010: 13833c02 orrne r3, r3, #512 ; 0x200
4014: 158430b8 strne r3, [r4, #184] ; 0xb8
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
4018: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
401c: 13a03000 movne r3, #0
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
4020: 1a000014 bne 4078 <rtems_termios_ioctl+0x2a4>
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;
4024: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED
4028: eb0002a5 bl 4ac4 <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] *
402c: e3a0100a mov r1, #10 <== NOT EXECUTED
4030: e0000098 mul r0, r8, r0 <== NOT EXECUTED
4034: eb004f2b bl 17ce8 <__aeabi_uidiv> <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
4038: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
403c: e3530000 cmp r3, #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] *
4040: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED
4044: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
4048: 0a000006 beq 4068 <rtems_termios_ioctl+0x294> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
404c: e3520000 cmp r2, #0 <== NOT EXECUTED
4050: 01a02000 moveq r2, r0 <== NOT EXECUTED
4054: 13a02000 movne r2, #0 <== 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;
4058: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
405c: e5842074 str r2, [r4, #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;
4060: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED
4064: ea000006 b 4084 <rtems_termios_ioctl+0x2b0> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
4068: e3520000 cmp r2, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
406c: 03a03001 moveq r3, #1 <== NOT EXECUTED
4070: 0584306c streq r3, [r4, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
4074: 0a000002 beq 4084 <rtems_termios_ioctl+0x2b0> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
4078: e5843074 str r3, [r4, #116] ; 0x74
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
407c: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
4080: e5843070 str r3, [r4, #112] ; 0x70
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
4084: e59430a8 ldr r3, [r4, #168] ; 0xa8
4088: e3530000 cmp r3, #0
408c: 0a000032 beq 415c <rtems_termios_ioctl+0x388>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
4090: e5940010 ldr r0, [r4, #16]
4094: e2841030 add r1, r4, #48 ; 0x30
4098: e1a0e00f mov lr, pc
409c: e12fff13 bx r3
40a0: ea00002d b 415c <rtems_termios_ioctl+0x388>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
40a4: e1a00004 mov r0, r4
40a8: ebfffe5a bl 3a18 <drainOutput>
break;
40ac: ea00002a b 415c <rtems_termios_ioctl+0x388>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
40b0: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
40b4: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED
40b8: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED
break;
40bc: ea000026 b 415c <rtems_termios_ioctl+0x388> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
40c0: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
40c4: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED
40c8: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED
break;
40cc: ea000022 b 415c <rtems_termios_ioctl+0x388> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
40d0: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED
40d4: e59f309c ldr r3, [pc, #156] ; 4178 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED
40d8: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
40dc: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
40e0: e3530000 cmp r3, #0 <== NOT EXECUTED
40e4: 0a000003 beq 40f8 <rtems_termios_ioctl+0x324> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
40e8: e1a00004 mov r0, r4 <== NOT EXECUTED
40ec: e1a0e00f mov lr, pc <== NOT EXECUTED
40f0: e12fff13 bx r3 <== NOT EXECUTED
40f4: e1a06000 mov r6, r0 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
40f8: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
40fc: e5932000 ldr r2, [r3] <== 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) {
4100: e59f3070 ldr r3, [pc, #112] ; 4178 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED
4104: e7933282 ldr r3, [r3, r2, lsl #5] <== NOT EXECUTED
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
4108: e3a01000 mov r1, #0 <== NOT EXECUTED
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
410c: e3530000 cmp r3, #0 <== NOT EXECUTED
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
4110: e58410d0 str r1, [r4, #208] ; 0xd0 <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
4114: e58420cc str r2, [r4, #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) {
4118: 0a00000f beq 415c <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
411c: e1a00004 mov r0, r4 <== NOT EXECUTED
4120: e1a0e00f mov lr, pc <== NOT EXECUTED
4124: e12fff13 bx r3 <== NOT EXECUTED
4128: e1a06000 mov r6, r0 <== NOT EXECUTED
412c: ea00000a b 415c <rtems_termios_ioctl+0x388> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
4130: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
4134: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
4138: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
413c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
4140: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
4144: e2842020 add r2, r4, #32 <== NOT EXECUTED
4148: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
414c: e0411002 sub r1, r1, r2 <== NOT EXECUTED
4150: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
4154: e0813003 add r3, r1, r3 <== NOT EXECUTED
4158: e5823000 str r3, [r2] <== NOT EXECUTED
} break; } rtems_semaphore_release (tty->osem);
415c: e5940018 ldr r0, [r4, #24]
4160: eb000432 bl 5230 <rtems_semaphore_release>
args->ioctl_return = sc;
4164: e585600c str r6, [r5, #12]
return sc; }
4168: e1a00006 mov r0, r6
416c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00004314 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4314: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr}
4318: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
431c: e59f23e0 ldr r2, [pc, #992] ; 4704 <rtems_termios_open+0x3f0>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4320: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4324: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4328: e1a09000 mov r9, r0
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
432c: e5920000 ldr r0, [r2]
4330: e1a02001 mov r2, r1
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4334: e1a0b003 mov fp, r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4338: eb000376 bl 5118 <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
433c: e2506000 subs r6, r0, #0
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
4340: 059f33c0 ldreq r3, [pc, #960] ; 4708 <rtems_termios_open+0x3f4>
4344: 05935000 ldreq r5, [r3]
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4348: 0a000007 beq 436c <rtems_termios_open+0x58>
434c: ea0000e2 b 46dc <rtems_termios_open+0x3c8> <== NOT EXECUTED
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
if ((tty->major == major) && (tty->minor == minor))
4350: e595300c ldr r3, [r5, #12]
4354: e1530009 cmp r3, r9
4358: 1a000002 bne 4368 <rtems_termios_open+0x54>
435c: e5953010 ldr r3, [r5, #16]
4360: e153000a cmp r3, sl
4364: 0a0000bb beq 4658 <rtems_termios_open+0x344>
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
4368: e5955000 ldr r5, [r5]
436c: e3550000 cmp r5, #0
4370: 1afffff6 bne 4350 <rtems_termios_open+0x3c>
4374: ea0000da b 46e4 <rtems_termios_open+0x3d0>
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
4378: e59f738c ldr r7, [pc, #908] ; 470c <rtems_termios_open+0x3f8>
437c: e5973004 ldr r3, [r7, #4]
4380: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4384: e5950064 ldr r0, [r5, #100] ; 0x64
4388: ebfff780 bl 2190 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
438c: e3500000 cmp r0, #0
} /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4390: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
4394: 1a000006 bne 43b4 <rtems_termios_open+0xa0>
free(tty);
4398: e1a00005 mov r0, r5 <== NOT EXECUTED
439c: ebfff6af bl 1e60 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
43a0: e59f335c ldr r3, [pc, #860] ; 4704 <rtems_termios_open+0x3f0><== NOT EXECUTED
43a4: e5930000 ldr r0, [r3] <== NOT EXECUTED
43a8: eb0003a0 bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
43ac: e3a0601a mov r6, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
43b0: ea0000c9 b 46dc <rtems_termios_open+0x3c8> <== NOT EXECUTED
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
43b4: e5973008 ldr r3, [r7, #8]
43b8: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
43bc: e5950088 ldr r0, [r5, #136] ; 0x88
43c0: ebfff772 bl 2190 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
43c4: e3500000 cmp r0, #0
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
43c8: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
43cc: 0a000006 beq 43ec <rtems_termios_open+0xd8>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
43d0: e5970000 ldr r0, [r7]
43d4: ebfff76d bl 2190 <malloc>
if (tty->cbuf == NULL) {
43d8: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
43dc: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) {
43e0: 1a000004 bne 43f8 <rtems_termios_open+0xe4>
free((void *)(tty->rawOutBuf.theBuf));
43e4: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED
43e8: ebfff69c bl 1e60 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
43ec: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED
43f0: ebfff69a bl 1e60 <free> <== NOT EXECUTED
43f4: eaffffe7 b 4398 <rtems_termios_open+0x84> <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
43f8: e59f3308 ldr r3, [pc, #776] ; 4708 <rtems_termios_open+0x3f4>
43fc: e5932000 ldr r2, [r3]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
4400: e3a03000 mov r3, #0
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL)
4404: e3520000 cmp r2, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
4408: e885000c stm r5, {r2, r3}
if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty;
440c: 15825004 strne r5, [r2, #4]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
4410: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
4414: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
4418: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
441c: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
4420: e58530e4 str r3, [r5, #228] ; 0xe4
tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL)
4424: e59f32e4 ldr r3, [pc, #740] ; 4710 <rtems_termios_open+0x3fc>
4428: e5932000 ldr r2, [r3]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
442c: e59f72d8 ldr r7, [pc, #728] ; 470c <rtems_termios_open+0x3f8>
tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL)
4430: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
4434: 05834000 streq r4, [r3]
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
4438: e59f22c8 ldr r2, [pc, #712] ; 4708 <rtems_termios_open+0x3f4>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
443c: e5d7300c ldrb r3, [r7, #12]
4440: e59f02cc ldr r0, [pc, #716] ; 4714 <rtems_termios_open+0x400>
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
4444: e5824000 str r4, [r2]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4448: e1830000 orr r0, r3, r0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
444c: e584a010 str sl, [r4, #16]
tty->major = major;
4450: e584900c str r9, [r4, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4454: e284c014 add ip, r4, #20
4458: e3a03000 mov r3, #0
445c: e3a01001 mov r1, #1
4460: e3a02054 mov r2, #84 ; 0x54
4464: e58dc000 str ip, [sp]
4468: eb000298 bl 4ed0 <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)
446c: e2503000 subs r3, r0, #0
4470: 1a000095 bne 46cc <rtems_termios_open+0x3b8>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4474: e5d7200c ldrb r2, [r7, #12]
4478: e59f0298 ldr r0, [pc, #664] ; 4718 <rtems_termios_open+0x404>
447c: e284c018 add ip, r4, #24
4480: e1820000 orr r0, r2, r0
4484: e3a01001 mov r1, #1
4488: e3a02054 mov r2, #84 ; 0x54
448c: e58dc000 str ip, [sp]
4490: eb00028e bl 4ed0 <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)
4494: e2501000 subs r1, r0, #0
4498: 1a00008b bne 46cc <rtems_termios_open+0x3b8>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
449c: e5d7300c ldrb r3, [r7, #12]
44a0: e59f0274 ldr r0, [pc, #628] ; 471c <rtems_termios_open+0x408>
44a4: e284c08c add ip, r4, #140 ; 0x8c
44a8: e1830000 orr r0, r3, r0
44ac: e3a02020 mov r2, #32
44b0: e1a03001 mov r3, r1
44b4: e58dc000 str ip, [sp]
44b8: eb000284 bl 4ed0 <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)
44bc: e250e000 subs lr, r0, #0
44c0: 1a000081 bne 46cc <rtems_termios_open+0x3b8>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
44c4: e8bb000f ldm fp!, {r0, r1, r2, r3}
44c8: e284c098 add ip, r4, #152 ; 0x98
44cc: e8ac000f stmia ip!, {r0, r1, r2, r3}
44d0: e89b000f ldm fp, {r0, r1, r2, r3}
44d4: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44d8: e59430b4 ldr r3, [r4, #180] ; 0xb4
44dc: e3530002 cmp r3, #2
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;
44e0: e584e094 str lr, [r4, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44e4: 1a000017 bne 4548 <rtems_termios_open+0x234>
sc = rtems_task_create (
44e8: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED
44ec: e59f022c ldr r0, [pc, #556] ; 4720 <rtems_termios_open+0x40c><== NOT EXECUTED
44f0: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED
44f4: e1830000 orr r0, r3, r0 <== NOT EXECUTED
44f8: e3a0100a mov r1, #10 <== NOT EXECUTED
44fc: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
4500: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
4504: e58de000 str lr, [sp] <== NOT EXECUTED
4508: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
450c: eb00036e bl 52cc <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)
4510: e250e000 subs lr, r0, #0 <== NOT EXECUTED
4514: 1a00006c bne 46cc <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
4518: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED
451c: e59f0200 ldr r0, [pc, #512] ; 4724 <rtems_termios_open+0x410><== NOT EXECUTED
4520: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED
4524: e1830000 orr r0, r3, r0 <== NOT EXECUTED
4528: e3a01009 mov r1, #9 <== NOT EXECUTED
452c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
4530: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
4534: e58de000 str lr, [sp] <== NOT EXECUTED
4538: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
453c: eb000362 bl 52cc <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)
4540: e3500000 cmp r0, #0 <== NOT EXECUTED
4544: 1a000060 bne 46cc <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
4548: e59430a0 ldr r3, [r4, #160] ; 0xa0
454c: e3530000 cmp r3, #0
4550: 0a000002 beq 4560 <rtems_termios_open+0x24c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
4554: e59430b4 ldr r3, [r4, #180] ; 0xb4
4558: e3530002 cmp r3, #2
455c: 1a00000b bne 4590 <rtems_termios_open+0x27c>
sc = rtems_semaphore_create (
4560: e59f31a4 ldr r3, [pc, #420] ; 470c <rtems_termios_open+0x3f8><== NOT EXECUTED
4564: e59f01bc ldr r0, [pc, #444] ; 4728 <rtems_termios_open+0x414><== NOT EXECUTED
4568: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED
456c: e3a01000 mov r1, #0 <== NOT EXECUTED
4570: e1830000 orr r0, r3, r0 <== NOT EXECUTED
4574: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED
4578: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED
457c: e1a03001 mov r3, r1 <== NOT EXECUTED
4580: e58dc000 str ip, [sp] <== NOT EXECUTED
4584: eb000251 bl 4ed0 <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)
4588: e3500000 cmp r0, #0 <== NOT EXECUTED
458c: 1a00004e bne 46cc <rtems_termios_open+0x3b8> <== NOT EXECUTED
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';
4590: 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;
4594: e58430b8 str r3, [r4, #184] ; 0xb8
/* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
4598: e5941064 ldr r1, [r4, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
459c: e594c064 ldr ip, [r4, #100] ; 0x64
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
45a0: e3a02003 mov r2, #3
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;
45a4: e0000c92 mul r0, r2, ip
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
45a8: e3a0c01c mov ip, #28
45ac: e5c4c042 strb ip, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
45b0: e28cc063 add ip, ip, #99 ; 0x63
45b4: e5c4c043 strb ip, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
45b8: e3a0c015 mov ip, #21
45bc: e5c4c044 strb ip, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
45c0: e3a0c004 mov ip, #4
45c4: e5c4c045 strb ip, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
45c8: e28cc00d add ip, ip, #13
45cc: e5c4c049 strb ip, [r4, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
45d0: e28cc002 add ip, ip, #2
45d4: e5c4c04a strb ip, [r4, #74] ; 0x4a
tty->termios.c_cc[VSUSP] = '\032';
45d8: e28cc007 add ip, ip, #7
45dc: e5c4c04b strb ip, [r4, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
45e0: e3a0c012 mov ip, #18
45e4: e5c4c04d strb ip, [r4, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
45e8: e3a0c00f mov ip, #15
45ec: e5c4c04e strb ip, [r4, #78] ; 0x4e
tty->termios.c_cc[VWERASE] = '\027';
45f0: e28cc008 add ip, ip, #8
45f4: e5c4c04f strb ip, [r4, #79] ; 0x4f
tty->termios.c_cc[VLNEXT] = '\026';
45f8: e3a0c016 mov ip, #22
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';
45fc: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
4600: e5c43051 strb r3, [r4, #81] ; 0x51
tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026';
4604: e5c4c050 strb ip, [r4, #80] ; 0x50
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
4608: e5c42041 strb r2, [r4, #65] ; 0x41
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
460c: e59f30f8 ldr r3, [pc, #248] ; 470c <rtems_termios_open+0x3f8>
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;
4610: e1a00120 lsr r0, r0, #2
/* * Bump name characer */ if (c++ == 'z')
4614: e5d3200c ldrb r2, [r3, #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;
4618: e58400c0 str r0, [r4, #192] ; 0xc0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
461c: e59f0108 ldr r0, [pc, #264] ; 472c <rtems_termios_open+0x418>
4620: e5840030 str r0, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
4624: e59f0104 ldr r0, [pc, #260] ; 4730 <rtems_termios_open+0x41c>
4628: e5840034 str r0, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
462c: e59f0100 ldr r0, [pc, #256] ; 4734 <rtems_termios_open+0x420>
4630: e5840038 str r0, [r4, #56] ; 0x38
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
4634: e59f00fc ldr r0, [pc, #252] ; 4738 <rtems_termios_open+0x424>
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
4638: e352007a cmp r2, #122 ; 0x7a
/* 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;
463c: e1a010a1 lsr r1, r1, #1
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
4640: e2822001 add r2, r2, #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; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
4644: e584003c str r0, [r4, #60] ; 0x3c
/* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
4648: e58410bc str r1, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
464c: e5c3200c strb r2, [r3, #12]
c = 'a';
4650: 03a02061 moveq r2, #97 ; 0x61
4654: 05c3200c strbeq r2, [r3, #12]
}
args->iop->data1 = tty;
if (!tty->refcount++) {
4658: e5953008 ldr r3, [r5, #8]
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
465c: e5982000 ldr r2, [r8]
if (!tty->refcount++) {
4660: e3530000 cmp r3, #0
4664: e2833001 add r3, r3, #1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
4668: e5825034 str r5, [r2, #52] ; 0x34
if (!tty->refcount++) {
466c: e5853008 str r3, [r5, #8]
4670: 1a000016 bne 46d0 <rtems_termios_open+0x3bc>
if (tty->device.firstOpen)
4674: e5953098 ldr r3, [r5, #152] ; 0x98
4678: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
467c: 11a00009 movne r0, r9
4680: 11a0100a movne r1, sl
4684: 11a02008 movne r2, r8
4688: 11a0e00f movne lr, pc
468c: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4690: e59530b4 ldr r3, [r5, #180] ; 0xb4
4694: e3530002 cmp r3, #2
4698: 1a00000c bne 46d0 <rtems_termios_open+0x3bc>
sc = rtems_task_start(tty->rxTaskId,
469c: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED
46a0: e59f1094 ldr r1, [pc, #148] ; 473c <rtems_termios_open+0x428><== NOT EXECUTED
46a4: e1a02005 mov r2, r5 <== NOT EXECUTED
46a8: eb0003ac bl 5560 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
46ac: e3500000 cmp r0, #0 <== NOT EXECUTED
46b0: 1a000005 bne 46cc <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
46b4: e1a02005 mov r2, r5 <== NOT EXECUTED
46b8: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED
46bc: e59f107c ldr r1, [pc, #124] ; 4740 <rtems_termios_open+0x42c><== NOT EXECUTED
46c0: eb0003a6 bl 5560 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
46c4: e3500000 cmp r0, #0 <== NOT EXECUTED
46c8: 0a000000 beq 46d0 <rtems_termios_open+0x3bc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
46cc: eb000425 bl 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
} } rtems_semaphore_release (rtems_termios_ttyMutex);
46d0: e59f302c ldr r3, [pc, #44] ; 4704 <rtems_termios_open+0x3f0>
46d4: e5930000 ldr r0, [r3]
46d8: eb0002d4 bl 5230 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
46dc: e1a00006 mov r0, r6
46e0: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
46e4: e3a00001 mov r0, #1
46e8: e3a010e8 mov r1, #232 ; 0xe8
46ec: ebfff553 bl 1c40 <calloc>
if (tty == NULL) {
46f0: e3500000 cmp r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
46f4: e1a05000 mov r5, r0
46f8: e1a04000 mov r4, r0
if (tty == NULL) {
46fc: 1affff1d bne 4378 <rtems_termios_open+0x64>
4700: eaffff26 b 43a0 <rtems_termios_open+0x8c> <== NOT EXECUTED
000032b0 <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) {
32b0: e59230b4 ldr r3, [r2, #180] ; 0xb4
32b4: e3530000 cmp r3, #0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
32b8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
32bc: e1a04002 mov r4, r2
32c0: e1a0a000 mov sl, r0
32c4: e1a06001 mov r6, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
32c8: 1a000005 bne 32e4 <rtems_termios_puts+0x34>
(*tty->device.write)(tty->minor, (void *)buf, len);
32cc: e1a01000 mov r1, r0
32d0: e1a02006 mov r2, r6
32d4: e5940010 ldr r0, [r4, #16]
32d8: e1a0e00f mov lr, pc
32dc: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
32e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
} newHead = tty->rawOutBuf.Head;
32e4: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED
32e8: e3a07000 mov r7, #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;
32ec: e3a09002 mov r9, #2 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
32f0: e3a0b001 mov fp, #1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
32f4: ea00002e b 33b4 <rtems_termios_puts+0x104> <== NOT EXECUTED
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
32f8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
32fc: e2850001 add r0, r5, #1 <== NOT EXECUTED
3300: eb00530c bl 17f38 <__umodsi3> <== NOT EXECUTED
3304: e1a05000 mov r5, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3308: e10f8000 mrs r8, CPSR <== NOT EXECUTED
330c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
3310: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
3314: ea00000a b 3344 <rtems_termios_puts+0x94> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
3318: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
331c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
3320: e3a01000 mov r1, #0 <== NOT EXECUTED
3324: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
3328: e1a02001 mov r2, r1 <== NOT EXECUTED
332c: eb000779 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
3330: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3334: 1b00090b blne 5768 <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3338: e10f8000 mrs r8, CPSR <== NOT EXECUTED
333c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
3340: 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) {
3344: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
3348: e1550003 cmp r5, r3 <== NOT EXECUTED
334c: 0afffff1 beq 3318 <rtems_termios_puts+0x68> <== 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++;
3350: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
3354: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED
3358: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
335c: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
3360: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3364: e3530000 cmp r3, #0 <== 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;
3368: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
336c: 1a00000d bne 33a8 <rtems_termios_puts+0xf8> <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
3370: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3374: e3130010 tst r3, #16 <== 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;
3378: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
337c: 13833020 orrne r3, r3, #32 <== NOT EXECUTED
3380: 158430b8 strne r3, [r4, #184] ; 0xb8 <== 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)) {
3384: 1a000006 bne 33a4 <rtems_termios_puts+0xf4> <== NOT EXECUTED
(*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3388: 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,
338c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3390: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3394: e0811003 add r1, r1, r3 <== NOT EXECUTED
3398: e3a02001 mov r2, #1 <== NOT EXECUTED
339c: e1a0e00f mov lr, pc <== NOT EXECUTED
33a0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
33a4: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
33a8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
} rtems_interrupt_enable (level); len--;
33ac: e2466001 sub r6, r6, #1 <== NOT EXECUTED
33b0: e2877001 add r7, r7, #1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
33b4: e3560000 cmp r6, #0 <== NOT EXECUTED
33b8: 1affffce bne 32f8 <rtems_termios_puts+0x48> <== NOT EXECUTED
33bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00003a84 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3a84: e92d4ff1 push {r0, 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;
3a88: e5903000 ldr r3, [r0] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3a8c: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
3a90: 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);
3a94: 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;
3a98: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3a9c: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3aa0: e1a02001 mov r2, r1 <== 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;
3aa4: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED
char *buffer = args->buffer;
3aa8: e58d3000 str r3, [sp] <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3aac: eb000599 bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
3ab0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3ab4: 1a0000c1 bne 3dc0 <rtems_termios_read+0x33c> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
3ab8: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED
3abc: e59f3304 ldr r3, [pc, #772] ; 3dc8 <rtems_termios_read+0x344><== NOT EXECUTED
3ac0: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
3ac4: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
3ac8: e3530000 cmp r3, #0 <== NOT EXECUTED
3acc: 0a000005 beq 3ae8 <rtems_termios_read+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3ad0: e1a01005 mov r1, r5 <== NOT EXECUTED
3ad4: e1a00004 mov r0, r4 <== NOT EXECUTED
3ad8: e1a0e00f mov lr, pc <== NOT EXECUTED
3adc: e12fff13 bx r3 <== NOT EXECUTED
3ae0: e1a06000 mov r6, r0 <== NOT EXECUTED
3ae4: ea0000b1 b 3db0 <rtems_termios_read+0x32c> <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
3ae8: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
3aec: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3af0: e1520003 cmp r2, r3 <== NOT EXECUTED
3af4: 1a00009a bne 3d64 <rtems_termios_read+0x2e0> <== NOT EXECUTED
tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
3af8: e59420a0 ldr r2, [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;
3afc: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
if (tty->device.pollRead != NULL
3b00: e3520000 cmp r2, #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;
3b04: e584302c str r3, [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;
3b08: e5846020 str r6, [r4, #32] <== NOT EXECUTED
3b0c: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
3b10: 0a00003b beq 3c04 <rtems_termios_read+0x180> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
3b14: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED
3b18: e3530000 cmp r3, #0 <== NOT EXECUTED
3b1c: 1a000038 bne 3c04 <rtems_termios_read+0x180> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
3b20: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3b24: e3130002 tst r3, #2 <== NOT EXECUTED
3b28: 0a00000d beq 3b64 <rtems_termios_read+0xe0> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
3b2c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3b30: e1a0e00f mov lr, pc <== NOT EXECUTED
3b34: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
3b38: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
3b3c: e1a01004 mov r1, r4 <== NOT EXECUTED
3b40: 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) {
3b44: aa000002 bge 3b54 <rtems_termios_read+0xd0> <== NOT EXECUTED
rtems_task_wake_after (1);
3b48: e3a00001 mov r0, #1 <== NOT EXECUTED
3b4c: eb00069b bl 55c0 <rtems_task_wake_after> <== NOT EXECUTED
3b50: eafffff5 b 3b2c <rtems_termios_read+0xa8> <== NOT EXECUTED
}
else {
if (siproc (n, tty))
3b54: ebffff67 bl 38f8 <siproc> <== NOT EXECUTED
3b58: e3500000 cmp r0, #0 <== NOT EXECUTED
3b5c: 0afffff2 beq 3b2c <rtems_termios_read+0xa8> <== NOT EXECUTED
3b60: ea00007f b 3d64 <rtems_termios_read+0x2e0> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
3b64: eb0003de bl 4ae4 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
3b68: e1a08000 mov r8, r0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
3b6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3b70: e1a0e00f mov lr, pc <== NOT EXECUTED
3b74: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
3b78: e3500000 cmp r0, #0 <== NOT EXECUTED
3b7c: aa000013 bge 3bd0 <rtems_termios_read+0x14c> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
3b80: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
3b84: e3530000 cmp r3, #0 <== NOT EXECUTED
3b88: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
3b8c: 0a000005 beq 3ba8 <rtems_termios_read+0x124> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
3b90: e3530000 cmp r3, #0 <== NOT EXECUTED
3b94: 0a00000a beq 3bc4 <rtems_termios_read+0x140> <== NOT EXECUTED
3b98: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3b9c: e3530000 cmp r3, #0 <== NOT EXECUTED
3ba0: 0a000007 beq 3bc4 <rtems_termios_read+0x140> <== NOT EXECUTED
3ba4: ea000001 b 3bb0 <rtems_termios_read+0x12c> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
3ba8: e3530000 cmp r3, #0 <== NOT EXECUTED
3bac: 0a00006c beq 3d64 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
3bb0: eb0003cb bl 4ae4 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
3bb4: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED
3bb8: e0680000 rsb r0, r8, r0 <== NOT EXECUTED
3bbc: e1500003 cmp r0, r3 <== NOT EXECUTED
3bc0: 8a000067 bhi 3d64 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; } } rtems_task_wake_after (1);
3bc4: e3a00001 mov r0, #1 <== NOT EXECUTED
3bc8: eb00067c bl 55c0 <rtems_task_wake_after> <== NOT EXECUTED
3bcc: eaffffe6 b 3b6c <rtems_termios_read+0xe8> <== NOT EXECUTED
}
else {
siproc (n, tty);
3bd0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
3bd4: e1a01004 mov r1, r4 <== NOT EXECUTED
3bd8: ebffff46 bl 38f8 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3bdc: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
3be0: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3be4: e1520003 cmp r2, r3 <== NOT EXECUTED
3be8: aa00005d bge 3d64 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
3bec: e3530000 cmp r3, #0 <== NOT EXECUTED
3bf0: 0affffdd beq 3b6c <rtems_termios_read+0xe8> <== NOT EXECUTED
3bf4: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
3bf8: e3530000 cmp r3, #0 <== NOT EXECUTED
3bfc: 0affffda beq 3b6c <rtems_termios_read+0xe8> <== NOT EXECUTED
3c00: eaffffd7 b 3b64 <rtems_termios_read+0xe0> <== 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;
3c04: e5948074 ldr r8, [r4, #116] ; 0x74 <== 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,
3c08: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED
3c0c: e3a0a001 mov sl, #1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3c10: e59f91b4 ldr r9, [pc, #436] ; 3dcc <rtems_termios_read+0x348><== NOT EXECUTED
3c14: ea000041 b 3d20 <rtems_termios_read+0x29c> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
3c18: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
3c1c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
3c20: e2800001 add r0, r0, #1 <== NOT EXECUTED
3c24: eb0050c3 bl 17f38 <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
3c28: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
3c2c: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
3c30: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
3c34: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
3c38: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED
3c3c: e0823003 add r3, r2, r3 <== NOT EXECUTED
3c40: e0600003 rsb r0, r0, r3 <== NOT EXECUTED
3c44: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
3c48: eb0050ba bl 17f38 <__umodsi3> <== NOT EXECUTED
3c4c: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED
3c50: e1500003 cmp r0, r3 <== NOT EXECUTED
3c54: 2a00001f bcs 3cd8 <rtems_termios_read+0x254> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
3c58: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3c5c: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
3c60: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
3c64: e59f3164 ldr r3, [pc, #356] ; 3dd0 <rtems_termios_read+0x34c><== NOT EXECUTED
3c68: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
3c6c: e59f015c ldr r0, [pc, #348] ; 3dd0 <rtems_termios_read+0x34c><== NOT EXECUTED
3c70: e0023003 and r3, r2, r3 <== NOT EXECUTED
3c74: e1530000 cmp r3, r0 <== NOT EXECUTED
3c78: 1a00000b bne 3cac <rtems_termios_read+0x228> <== NOT EXECUTED
3c7c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3c80: e3530000 cmp r3, #0 <== NOT EXECUTED
3c84: 0a000002 beq 3c94 <rtems_termios_read+0x210> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
3c88: 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))
3c8c: e3130020 tst r3, #32 <== NOT EXECUTED
3c90: 0a000005 beq 3cac <rtems_termios_read+0x228> <== 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,
3c94: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3c98: e1a0100b mov r1, fp <== NOT EXECUTED
3c9c: e3a02001 mov r2, #1 <== NOT EXECUTED
3ca0: e1a0e00f mov lr, pc <== NOT EXECUTED
3ca4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3ca8: ea00000a b 3cd8 <rtems_termios_read+0x254> <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
3cac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3cb0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
3cb4: 0a000007 beq 3cd8 <rtems_termios_read+0x254> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
3cb8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
3cbc: 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;
3cc0: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
3cc4: 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;
3cc8: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
tty->device.startRemoteTx(tty->minor);
3ccc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
3cd0: 11a0e00f movne lr, pc <== NOT EXECUTED
3cd4: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
3cd8: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3cdc: e3130002 tst r3, #2 <== NOT EXECUTED
3ce0: 0a000005 beq 3cfc <rtems_termios_read+0x278> <== NOT EXECUTED
if (siproc (c, tty))
3ce4: e1a00008 mov r0, r8 <== NOT EXECUTED
3ce8: e1a01004 mov r1, r4 <== NOT EXECUTED
3cec: ebffff01 bl 38f8 <siproc> <== NOT EXECUTED
3cf0: e3500000 cmp r0, #0 <== NOT EXECUTED
3cf4: 1a000007 bne 3d18 <rtems_termios_read+0x294> <== NOT EXECUTED
3cf8: ea000007 b 3d1c <rtems_termios_read+0x298> <== NOT EXECUTED
wait = 0;
}
else {
siproc (c, tty);
3cfc: e1a00008 mov r0, r8 <== NOT EXECUTED
3d00: e1a01004 mov r1, r4 <== NOT EXECUTED
3d04: ebfffefb bl 38f8 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3d08: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
3d0c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3d10: e1520003 cmp r2, r3 <== NOT EXECUTED
3d14: ba000000 blt 3d1c <rtems_termios_read+0x298> <== NOT EXECUTED
3d18: e3a0a000 mov sl, #0 <== NOT EXECUTED
wait = 0; } timeout = tty->rawInBufSemaphoreTimeout;
3d1c: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3d20: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
3d24: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
3d28: e1520003 cmp r2, r3 <== NOT EXECUTED
3d2c: 0a000004 beq 3d44 <rtems_termios_read+0x2c0> <== NOT EXECUTED
3d30: e5993000 ldr r3, [r9] <== NOT EXECUTED
3d34: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3d38: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3d3c: e1520003 cmp r2, r3 <== NOT EXECUTED
3d40: baffffb4 blt 3c18 <rtems_termios_read+0x194> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
3d44: e35a0000 cmp sl, #0 <== NOT EXECUTED
3d48: 0a000005 beq 3d64 <rtems_termios_read+0x2e0> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
3d4c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED
3d50: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
3d54: e1a02008 mov r2, r8 <== NOT EXECUTED
3d58: eb0004ee bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
3d5c: e3500000 cmp r0, #0 <== NOT EXECUTED
3d60: 0affffee beq 3d20 <rtems_termios_read+0x29c> <== NOT EXECUTED
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
while ( wait ) {
3d64: e3a03000 mov r3, #0 <== NOT EXECUTED
3d68: ea000007 b 3d8c <rtems_termios_read+0x308> <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
3d6c: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
3d70: e59d0000 ldr r0, [sp] <== NOT EXECUTED
3d74: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED
3d78: e2822001 add r2, r2, #1 <== NOT EXECUTED
3d7c: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED
3d80: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
count--;
3d84: e2477001 sub r7, r7, #1 <== NOT EXECUTED
3d88: e2833001 add r3, r3, #1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
3d8c: e3570000 cmp r7, #0 <== NOT EXECUTED
3d90: 0a000003 beq 3da4 <rtems_termios_read+0x320> <== NOT EXECUTED
3d94: e2841020 add r1, r4, #32 <== NOT EXECUTED
3d98: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
3d9c: e1520001 cmp r2, r1 <== NOT EXECUTED
3da0: bafffff1 blt 3d6c <rtems_termios_read+0x2e8> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
3da4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
3da8: e0677003 rsb r7, r7, r3 <== NOT EXECUTED
3dac: e5857018 str r7, [r5, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3db0: e3a03000 mov r3, #0 <== NOT EXECUTED
3db4: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3db8: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3dbc: eb00051b bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
return sc; }
3dc0: e1a00006 mov r0, r6 <== NOT EXECUTED
3dc4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00002d90 <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))
2d90: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED
2d94: e59f31d0 ldr r3, [pc, #464] ; 2f6c <rtems_termios_refill_transmitter+0x1dc><== NOT EXECUTED
2d98: e0023003 and r3, r2, r3 <== NOT EXECUTED
2d9c: e59f21cc ldr r2, [pc, #460] ; 2f70 <rtems_termios_refill_transmitter+0x1e0><== NOT EXECUTED
2da0: e1530002 cmp r3, r2 <== 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)
{
2da4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
2da8: 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))
2dac: 1a00000e bne 2dec <rtems_termios_refill_transmitter+0x5c> <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
2db0: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
2db4: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
2db8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
2dbc: e1a0e00f mov lr, pc <== NOT EXECUTED
2dc0: 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 (
2dc4: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2dc8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2dcc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2dd0: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2dd4: 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--;
2dd8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2ddc: e3811002 orr r1, r1, #2 <== NOT EXECUTED
2de0: 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--;
2de4: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level);
2de8: ea000011 b 2e34 <rtems_termios_refill_transmitter+0xa4> <== NOT EXECUTED
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
2dec: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED
2df0: e2033003 and r3, r3, #3 <== NOT EXECUTED
2df4: e3530002 cmp r3, #2 <== NOT EXECUTED
2df8: 1a000010 bne 2e40 <rtems_termios_refill_transmitter+0xb0> <== 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,
2dfc: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
2e00: e3a02001 mov r2, #1 <== NOT EXECUTED
2e04: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
2e08: e1a0e00f mov lr, pc <== NOT EXECUTED
2e0c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
2e10: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2e14: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2e18: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2e1c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2e20: 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--;
2e24: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2e28: e3c11002 bic r1, r1, #2 <== NOT EXECUTED
2e2c: 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--;
2e30: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2e34: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
2e38: e3a05001 mov r5, #1 <== NOT EXECUTED
2e3c: ea000048 b 2f64 <rtems_termios_refill_transmitter+0x1d4> <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2e40: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED
2e44: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED
2e48: e1520003 cmp r2, r3 <== NOT EXECUTED
2e4c: 1a000005 bne 2e68 <rtems_termios_refill_transmitter+0xd8> <== NOT EXECUTED
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
2e50: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED
2e54: e3530002 cmp r3, #2 <== NOT EXECUTED
/* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2e58: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED
2e5c: 0b0008f3 bleq 5230 <rtems_semaphore_release> <== NOT EXECUTED
2e60: e3a05000 mov r5, #0 <== NOT EXECUTED
2e64: ea00003e b 2f64 <rtems_termios_refill_transmitter+0x1d4> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
2e68: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2e6c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2e70: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
2e74: e3a02000 mov r2, #0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
2e78: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
2e7c: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2e80: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
2e84: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
2e88: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
2e8c: e0800003 add r0, r0, r3 <== NOT EXECUTED
2e90: eb005428 bl 17f38 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
2e94: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
2e98: e3530002 cmp r3, #2 <== 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;
2e9c: e1a06000 mov r6, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
2ea0: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2ea4: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED
2ea8: 0b0008e0 bleq 5230 <rtems_semaphore_release> <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
2eac: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
2eb0: e1560003 cmp r6, r3 <== NOT EXECUTED
2eb4: 1a00000a bne 2ee4 <rtems_termios_refill_transmitter+0x154> <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2eb8: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2ebc: e3a05000 mov r5, #0 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2ec0: e3530000 cmp r3, #0 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2ec4: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2ec8: 01a05003 moveq r5, r3 <== NOT EXECUTED
2ecc: 0a000023 beq 2f60 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2ed0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
2ed4: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
2ed8: e1a0e00f mov lr, pc <== NOT EXECUTED
2edc: e12fff13 bx r3 <== NOT EXECUTED
2ee0: ea00001e b 2f60 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
} } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
2ee4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
2ee8: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED
2eec: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED
2ef0: 1a00000a bne 2f20 <rtems_termios_refill_transmitter+0x190> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
2ef4: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2ef8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2efc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
2f00: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
2f04: e3822020 orr r2, r2, #32 <== NOT EXECUTED
2f08: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2f0c: e3a02001 mov r2, #1 <== NOT EXECUTED
2f10: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2f14: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
2f18: e3a05000 mov r5, #0 <== NOT EXECUTED
2f1c: ea00000f b 2f60 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
2f20: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
2f24: e1560003 cmp r6, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
2f28: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
2f2c: 95945080 ldrls r5, [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)) {
2f30: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
* Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail;
2f34: e0665005 rsb r5, r6, r5 <== 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)) {
2f38: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor,
2f3c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
2f40: 13a05001 movne r5, #1 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
2f44: e3a03001 mov r3, #1 <== NOT EXECUTED
2f48: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2f4c: e0811006 add r1, r1, r6 <== NOT EXECUTED
2f50: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
2f54: e1a02005 mov r2, r5 <== NOT EXECUTED
2f58: e1a0e00f mov lr, pc <== NOT EXECUTED
2f5c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
2f60: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED
} return nToSend; }
2f64: e1a00005 mov r0, r5 <== NOT EXECUTED
2f68: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000047b0 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
47b0: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
47b4: e1a04000 mov r4, r0 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
47b8: e3a05000 mov r5, #0 <== NOT EXECUTED
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
47bc: e28d6007 add r6, sp, #7 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
47c0: e1a0300d mov r3, sp <== NOT EXECUTED
47c4: e3a01002 mov r1, #2 <== NOT EXECUTED
47c8: e3a02000 mov r2, #0 <== NOT EXECUTED
47cc: e3a00003 mov r0, #3 <== NOT EXECUTED
47d0: eb0000e0 bl 4b58 <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) {
47d4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
47d8: e3130001 tst r3, #1 <== NOT EXECUTED
47dc: 0a000003 beq 47f0 <rtems_termios_rxdaemon+0x40> <== NOT EXECUTED
tty->rxTaskId = 0;
47e0: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
47e4: e1a00005 mov r0, r5 <== NOT EXECUTED
47e8: eb000309 bl 5414 <rtems_task_delete> <== NOT EXECUTED
47ec: eafffff3 b 47c0 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
47f0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
47f4: e1a0e00f mov lr, pc <== NOT EXECUTED
47f8: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
47fc: e3700001 cmn r0, #1 <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4800: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
4804: 0affffed beq 47c0 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
4808: e1a00004 mov r0, r4 <== NOT EXECUTED
480c: e1a01006 mov r1, r6 <== NOT EXECUTED
4810: e3a02001 mov r2, #1 <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
4814: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
4818: ebfff9f1 bl 2fe4 <rtems_termios_enqueue_raw_characters> <== NOT EXECUTED
481c: eaffffe7 b 47c0 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
00002d84 <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);
2d84: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED
2d88: e3a01002 mov r1, #2 <== NOT EXECUTED
2d8c: ea0007cd b 4cc8 <rtems_event_send> <== NOT EXECUTED
00004744 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
4744: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4748: e59f705c ldr r7, [pc, #92] ; 47ac <rtems_termios_txdaemon+0x68><== NOT EXECUTED
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
474c: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
4750: e3a05000 mov r5, #0 <== NOT EXECUTED
4754: e1a0300d mov r3, sp <== NOT EXECUTED
4758: e3a01002 mov r1, #2 <== NOT EXECUTED
475c: e3a02000 mov r2, #0 <== NOT EXECUTED
4760: e3a00003 mov r0, #3 <== NOT EXECUTED
4764: eb0000fb bl 4b58 <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) {
4768: e59d3000 ldr r3, [sp] <== NOT EXECUTED
476c: e3130001 tst r3, #1 <== 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);
4770: 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) {
4774: 0a000003 beq 4788 <rtems_termios_txdaemon+0x44> <== NOT EXECUTED
tty->txTaskId = 0;
4778: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
477c: e1a00005 mov r0, r5 <== NOT EXECUTED
4780: eb000323 bl 5414 <rtems_task_delete> <== NOT EXECUTED
4784: eafffff2 b 4754 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4788: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
478c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED
4790: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED
4794: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
4798: 11a0e00f movne lr, pc <== NOT EXECUTED
479c: 112fff13 bxne r3 <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
47a0: e1a00004 mov r0, r4 <== NOT EXECUTED
47a4: ebfff979 bl 2d90 <rtems_termios_refill_transmitter> <== NOT EXECUTED
47a8: eaffffe9 b 4754 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
00003958 <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;
3958: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
395c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
3960: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3964: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
3968: e1a04000 mov r4, r0
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
396c: e1a02001 mov r2, r1
3970: e5950018 ldr r0, [r5, #24]
3974: eb0005e7 bl 5118 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3978: e2506000 subs r6, r0, #0
397c: 1a000022 bne 3a0c <rtems_termios_write+0xb4>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
3980: e59520cc ldr r2, [r5, #204] ; 0xcc
3984: e59f3088 ldr r3, [pc, #136] ; 3a14 <rtems_termios_write+0xbc>
3988: e0833282 add r3, r3, r2, lsl #5
398c: e593300c ldr r3, [r3, #12]
3990: e3530000 cmp r3, #0
3994: 0a000005 beq 39b0 <rtems_termios_write+0x58>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
3998: e1a01004 mov r1, r4 <== NOT EXECUTED
399c: e1a00005 mov r0, r5 <== NOT EXECUTED
39a0: e1a0e00f mov lr, pc <== NOT EXECUTED
39a4: e12fff13 bx r3 <== NOT EXECUTED
39a8: e1a06000 mov r6, r0 <== NOT EXECUTED
39ac: ea000014 b 3a04 <rtems_termios_write+0xac> <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
39b0: e5953034 ldr r3, [r5, #52] ; 0x34
39b4: e3130001 tst r3, #1
uint32_t count = args->count;
39b8: 15948010 ldrne r8, [r4, #16]
char *buffer = args->buffer;
39bc: 1594a00c ldrne sl, [r4, #12]
39c0: 11a07006 movne r7, r6
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) {
39c4: 1a000004 bne 39dc <rtems_termios_write+0x84>
39c8: ea000007 b 39ec <rtems_termios_write+0x94> <== NOT EXECUTED
uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty);
39cc: e7da0007 ldrb r0, [sl, r7]
39d0: ebfffe7a bl 33c0 <oproc>
39d4: e2877001 add r7, r7, #1
39d8: e2488001 sub r8, r8, #1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
39dc: e3580000 cmp r8, #0
oproc (*buffer++, tty);
39e0: e1a01005 mov r1, r5
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
39e4: 1afffff8 bne 39cc <rtems_termios_write+0x74>
39e8: ea000003 b 39fc <rtems_termios_write+0xa4>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
39ec: e284000c add r0, r4, #12 <== NOT EXECUTED
39f0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
39f4: e1a02005 mov r2, r5 <== NOT EXECUTED
39f8: ebfffe2c bl 32b0 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
39fc: e5943010 ldr r3, [r4, #16]
3a00: e5843018 str r3, [r4, #24]
} rtems_semaphore_release (tty->osem);
3a04: e5950018 ldr r0, [r5, #24]
3a08: eb000608 bl 5230 <rtems_semaphore_release>
return sc; }
3a0c: e1a00006 mov r0, r6
3a10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00006444 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
6444: 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)
6448: e2107202 ands r7, r0, #536870912 ; 0x20000000 <== NOT EXECUTED
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
644c: e1a06000 mov r6, r0 <== NOT EXECUTED
6450: e1a09001 mov r9, r1 <== NOT EXECUTED
6454: e1a04002 mov r4, r2 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
6458: 0a00000d beq 6494 <rtems_verror+0x50> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
645c: e59f3160 ldr r3, [pc, #352] ; 65c4 <rtems_verror+0x180> <== NOT EXECUTED
6460: e5932000 ldr r2, [r3] <== NOT EXECUTED
6464: e3520000 cmp r2, #0 <== NOT EXECUTED
6468: e2822001 add r2, r2, #1 <== NOT EXECUTED
646c: e5832000 str r2, [r3] <== NOT EXECUTED
6470: 0a000003 beq 6484 <rtems_verror+0x40> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
6474: e59f314c ldr r3, [pc, #332] ; 65c8 <rtems_verror+0x184> <== NOT EXECUTED
6478: e5932000 ldr r2, [r3] <== NOT EXECUTED
647c: e2822001 add r2, r2, #1 <== NOT EXECUTED
6480: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
6484: e59f3138 ldr r3, [pc, #312] ; 65c4 <rtems_verror+0x180> <== NOT EXECUTED
6488: e5933000 ldr r3, [r3] <== NOT EXECUTED
648c: e3530002 cmp r3, #2 <== NOT EXECUTED
6490: ca000049 bgt 65bc <rtems_verror+0x178> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
6494: e59f3130 ldr r3, [pc, #304] ; 65cc <rtems_verror+0x188> <== NOT EXECUTED
6498: e5933000 ldr r3, [r3] <== NOT EXECUTED
649c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
64a0: eb0035a3 bl 13b34 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
64a4: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
64a8: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
64ac: 0a000001 beq 64b8 <rtems_verror+0x74> <== NOT EXECUTED
local_errno = errno;
64b0: eb0034ac bl 13768 <__errno> <== NOT EXECUTED
64b4: e5905000 ldr r5, [r0] <== 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);
64b8: e59fa10c ldr sl, [pc, #268] ; 65cc <rtems_verror+0x188> <== NOT EXECUTED
64bc: e59a3000 ldr r3, [sl] <== NOT EXECUTED
64c0: e1a02004 mov r2, r4 <== NOT EXECUTED
64c4: e1a01009 mov r1, r9 <== NOT EXECUTED
64c8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
64cc: eb004dbf bl 19bd0 <vfprintf> <== NOT EXECUTED
if (status)
64d0: e3580000 cmp r8, #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);
64d4: e1a04000 mov r4, r0 <== NOT EXECUTED
if (status)
64d8: 0a000008 beq 6500 <rtems_verror+0xbc> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
64dc: e59a3000 ldr r3, [sl] <== NOT EXECUTED
64e0: e1a00008 mov r0, r8 <== NOT EXECUTED
64e4: e593800c ldr r8, [r3, #12] <== NOT EXECUTED
64e8: ebffffd1 bl 6434 <rtems_status_text> <== NOT EXECUTED
64ec: e59f10dc ldr r1, [pc, #220] ; 65d0 <rtems_verror+0x18c> <== NOT EXECUTED
64f0: e1a02000 mov r2, r0 <== NOT EXECUTED
64f4: e1a00008 mov r0, r8 <== NOT EXECUTED
64f8: eb00364b bl 13e2c <fprintf> <== NOT EXECUTED
64fc: e0844000 add r4, r4, r0 <== NOT EXECUTED
if (local_errno)
6500: e3550000 cmp r5, #0 <== NOT EXECUTED
6504: 0a000015 beq 6560 <rtems_verror+0x11c> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
6508: da00000d ble 6544 <rtems_verror+0x100> <== NOT EXECUTED
650c: e1a00005 mov r0, r5 <== NOT EXECUTED
6510: eb003958 bl 14a78 <strerror> <== NOT EXECUTED
6514: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
6518: e3530000 cmp r3, #0 <== NOT EXECUTED
651c: 0a000008 beq 6544 <rtems_verror+0x100> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
6520: e59f30a4 ldr r3, [pc, #164] ; 65cc <rtems_verror+0x188> <== NOT EXECUTED
6524: e5933000 ldr r3, [r3] <== NOT EXECUTED
6528: e1a00005 mov r0, r5 <== NOT EXECUTED
652c: e593800c ldr r8, [r3, #12] <== NOT EXECUTED
6530: eb003950 bl 14a78 <strerror> <== NOT EXECUTED
6534: e59f1098 ldr r1, [pc, #152] ; 65d4 <rtems_verror+0x190> <== NOT EXECUTED
6538: e1a02000 mov r2, r0 <== NOT EXECUTED
653c: e1a00008 mov r0, r8 <== NOT EXECUTED
6540: ea000004 b 6558 <rtems_verror+0x114> <== NOT EXECUTED
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
6544: e59f3080 ldr r3, [pc, #128] ; 65cc <rtems_verror+0x188> <== NOT EXECUTED
6548: e5933000 ldr r3, [r3] <== NOT EXECUTED
654c: e59f1084 ldr r1, [pc, #132] ; 65d8 <rtems_verror+0x194> <== NOT EXECUTED
6550: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6554: e1a02005 mov r2, r5 <== NOT EXECUTED
6558: eb003633 bl 13e2c <fprintf> <== NOT EXECUTED
655c: e0844000 add r4, r4, r0 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
6560: e59f8064 ldr r8, [pc, #100] ; 65cc <rtems_verror+0x188> <== NOT EXECUTED
6564: e5983000 ldr r3, [r8] <== NOT EXECUTED
6568: e59f106c ldr r1, [pc, #108] ; 65dc <rtems_verror+0x198> <== NOT EXECUTED
656c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6570: eb00362d bl 13e2c <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
6574: e5983000 ldr r3, [r8] <== 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");
6578: e1a0a000 mov sl, r0 <== NOT EXECUTED
(void) fflush(stderr);
657c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6580: eb00356b bl 13b34 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
6584: e3160203 tst r6, #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");
6588: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
658c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
6590: e3570000 cmp r7, #0 <== NOT EXECUTED
6594: 0a000004 beq 65ac <rtems_verror+0x168> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
6598: e3a00000 mov r0, #0 <== NOT EXECUTED
659c: e59f103c ldr r1, [pc, #60] ; 65e0 <rtems_verror+0x19c> <== NOT EXECUTED
65a0: eb00001b bl 6614 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
65a4: e1a00005 mov r0, r5 <== NOT EXECUTED
65a8: eb0002e7 bl 714c <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
65ac: e59f1030 ldr r1, [pc, #48] ; 65e4 <rtems_verror+0x1a0> <== NOT EXECUTED
65b0: e1a00007 mov r0, r7 <== NOT EXECUTED
65b4: eb000016 bl 6614 <rtems_error> <== NOT EXECUTED
abort();
65b8: eb003461 bl 13744 <abort> <== NOT EXECUTED
65bc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return chars_written;
}
65c0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
000020a8 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
20a8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
20ac: e3a04000 mov r4, #0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20b0: e59fb0d4 ldr fp, [pc, #212] ; 218c <scanInt+0xe4>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
20b4: e59f90d4 ldr r9, [pc, #212] ; 2190 <scanInt+0xe8>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
20b8: e58d1000 str r1, [sp]
20bc: e1a05000 mov r5, r0
20c0: e3e08102 mvn r8, #-2147483648 ; 0x80000000
20c4: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
20c8: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
20cc: e5953004 ldr r3, [r5, #4]
20d0: e2433001 sub r3, r3, #1
20d4: e3530000 cmp r3, #0
20d8: e5853004 str r3, [r5, #4]
20dc: a5953000 ldrge r3, [r5]
20e0: a4d36001 ldrbge r6, [r3], #1
20e4: a5853000 strge r3, [r5]
20e8: aa000003 bge 20fc <scanInt+0x54>
20ec: e59b0000 ldr r0, [fp] <== NOT EXECUTED
20f0: e1a01005 mov r1, r5 <== NOT EXECUTED
20f4: eb003ac8 bl 10c1c <__srget_r> <== NOT EXECUTED
20f8: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
20fc: e356003a cmp r6, #58 ; 0x3a
2100: 0a000019 beq 216c <scanInt+0xc4>
break;
if (sign == 0) {
2104: e3540000 cmp r4, #0
2108: 1a000004 bne 2120 <scanInt+0x78>
if (c == '-') {
210c: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
2110: 02888001 addeq r8, r8, #1
2114: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
2118: 0affffeb beq 20cc <scanInt+0x24>
sign = -1;
limit++;
continue;
211c: e3a04001 mov r4, #1
}
sign = 1;
}
if (!isdigit(c))
2120: e5993000 ldr r3, [r9]
2124: e0833006 add r3, r3, r6
2128: e5d33001 ldrb r3, [r3, #1]
212c: e3130004 tst r3, #4
2130: 0a000013 beq 2184 <scanInt+0xdc>
return 0;
d = c - '0';
if ((i > (limit / 10))
2134: e1a00008 mov r0, r8
2138: e3a0100a mov r1, #10
213c: eb005bd0 bl 19084 <__aeabi_uidiv>
2140: e1570000 cmp r7, r0
2144: 8a00000e bhi 2184 <scanInt+0xdc>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
2148: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
214c: 1a000004 bne 2164 <scanInt+0xbc>
2150: e1a00008 mov r0, r8 <== NOT EXECUTED
2154: e3a0100a mov r1, #10 <== NOT EXECUTED
2158: eb005c5d bl 192d4 <__umodsi3> <== NOT EXECUTED
215c: e1560000 cmp r6, r0 <== NOT EXECUTED
2160: 8a000007 bhi 2184 <scanInt+0xdc> <== NOT EXECUTED
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
2164: e027679a mla r7, sl, r7, r6
2168: eaffffd7 b 20cc <scanInt+0x24>
} if (sign == 0)
216c: e3540000 cmp r4, #0
return 0;
*val = i * sign;
2170: 10030497 mulne r3, r7, r4
2174: 159d2000 ldrne r2, [sp]
2178: 13a00001 movne r0, #1
217c: 15823000 strne r3, [r2]
return 1;
2180: 1a000000 bne 2188 <scanInt+0xe0>
2184: e3a00000 mov r0, #0 <== NOT EXECUTED
}
2188: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00002194 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
2194: e92d41f0 push {r4, r5, r6, r7, r8, lr}
2198: e1a04002 mov r4, r2
int c;
*name = *bufp;
219c: 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)
{
21a0: e59d6018 ldr r6, [sp, #24]
int c;
*name = *bufp;
21a4: e5812000 str r2, [r1]
for (;;) {
c = getc(fp);
21a8: e59f70c0 ldr r7, [pc, #192] ; 2270 <scanString+0xdc>
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
21ac: e1a05000 mov r5, r0
21b0: e1a08003 mov r8, r3
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
21b4: e5953004 ldr r3, [r5, #4]
21b8: e2433001 sub r3, r3, #1
21bc: e3530000 cmp r3, #0
21c0: e5853004 str r3, [r5, #4]
21c4: a5953000 ldrge r3, [r5]
21c8: a4d30001 ldrbge r0, [r3], #1
21cc: a5853000 strge r3, [r5]
21d0: b5970000 ldrlt r0, [r7]
21d4: b1a01005 movlt r1, r5
21d8: bb003a8f bllt 10c1c <__srget_r>
if (c == ':') {
21dc: e350003a cmp r0, #58 ; 0x3a
21e0: 1a000002 bne 21f0 <scanString+0x5c>
if (nlFlag)
21e4: e3560000 cmp r6, #0
21e8: 0a000013 beq 223c <scanString+0xa8>
21ec: ea00001d b 2268 <scanString+0xd4> <== NOT EXECUTED
return 0;
break;
}
if (c == '\n') {
21f0: e350000a cmp r0, #10
21f4: 1a000002 bne 2204 <scanString+0x70>
if (!nlFlag)
21f8: e3560000 cmp r6, #0
21fc: 1a00000e bne 223c <scanString+0xa8>
2200: ea000018 b 2268 <scanString+0xd4> <== NOT EXECUTED
return 0;
break;
}
if (c == EOF)
2204: e3700001 cmn r0, #1
2208: 0a000016 beq 2268 <scanString+0xd4>
return 0;
if (*nleft < 2)
220c: e5983000 ldr r3, [r8]
2210: e3530001 cmp r3, #1
2214: 9a000013 bls 2268 <scanString+0xd4>
return 0;
**bufp = c;
2218: e5943000 ldr r3, [r4]
221c: e5c30000 strb r0, [r3]
++(*bufp);
2220: e5942000 ldr r2, [r4]
--(*nleft);
2224: e5983000 ldr r3, [r8]
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
2228: e2822001 add r2, r2, #1
--(*nleft);
222c: e2433001 sub r3, r3, #1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
2230: e5842000 str r2, [r4]
--(*nleft);
2234: e5883000 str r3, [r8]
}
2238: eaffffdd b 21b4 <scanString+0x20>
**bufp = '\0';
223c: e5943000 ldr r3, [r4]
2240: e3a02000 mov r2, #0
2244: e5c32000 strb r2, [r3]
++(*bufp);
2248: e5942000 ldr r2, [r4]
--(*nleft);
224c: e5983000 ldr r3, [r8]
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
2250: e2822001 add r2, r2, #1
--(*nleft);
2254: e2433001 sub r3, r3, #1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
2258: e5842000 str r2, [r4]
--(*nleft);
225c: e5883000 str r3, [r8]
2260: e3a00001 mov r0, #1
return 1;
2264: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
2268: e3a00000 mov r0, #0 <== NOT EXECUTED
}
226c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00002274 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
2274: e92d41f0 push {r4, r5, r6, r7, r8, lr}
2278: e24dd014 sub sp, sp, #20
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
227c: e28d6008 add r6, sp, #8
2280: e28d5004 add r5, sp, #4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
2284: e58d2008 str r2, [sp, #8]
2288: e58d3004 str r3, [sp, #4]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
228c: e3a08000 mov r8, #0
2290: e1a02006 mov r2, r6
2294: e1a03005 mov r3, r5
2298: e58d8000 str r8, [sp]
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
229c: e1a07000 mov r7, r0
22a0: e1a04001 mov r4, r1
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
22a4: ebffffba bl 2194 <scanString>
22a8: e1500008 cmp r0, r8
22ac: 0a00003b beq 23a0 <scangr+0x12c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
22b0: e1a00007 mov r0, r7
22b4: e2841004 add r1, r4, #4
22b8: e1a02006 mov r2, r6
22bc: e1a03005 mov r3, r5
22c0: e58d8000 str r8, [sp]
22c4: ebffffb2 bl 2194 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
22c8: e1500008 cmp r0, r8
22cc: 0a000033 beq 23a0 <scangr+0x12c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
22d0: e1a00007 mov r0, r7
22d4: e28d1010 add r1, sp, #16
22d8: ebffff72 bl 20a8 <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
22dc: e1500008 cmp r0, r8
22e0: 0a00002e beq 23a0 <scangr+0x12c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
22e4: e1a03005 mov r3, r5
22e8: e28d100c add r1, sp, #12
22ec: e1a00007 mov r0, r7
22f0: e1a02006 mov r2, r6
22f4: e3a05001 mov r5, #1
22f8: e58d5000 str r5, [sp]
22fc: ebffffa4 bl 2194 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2300: e1500008 cmp r0, r8
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
2304: 11dd31b0 ldrhne r3, [sp, #16]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2308: 159d100c ldrne 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;
230c: 11c430b8 strhne r3, [r4, #8]
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2310: 1a000003 bne 2324 <scangr+0xb0>
2314: ea000021 b 23a0 <scangr+0x12c> <== NOT EXECUTED
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',')
2318: e352002c cmp r2, #44 ; 0x2c
memcount++;
231c: 02855001 addeq r5, r5, #1
2320: e2888001 add r8, r8, #1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2324: e7d12008 ldrb r2, [r1, r8]
2328: e3520000 cmp r2, #0
232c: 1afffff9 bne 2318 <scangr+0xa4>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
2330: e1a05105 lsl r5, r5, #2
2334: e59d3004 ldr r3, [sp, #4]
2338: e2855013 add r5, r5, #19
233c: e1530005 cmp r3, r5
2340: 3a000016 bcc 23a0 <scangr+0x12c>
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
2344: e59d3008 ldr r3, [sp, #8]
2348: e283300f add r3, r3, #15
234c: e3c3300f bic r3, r3, #15
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
2350: e5831000 str r1, [r3]
/*
* 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);
2354: e584300c str r3, [r4, #12]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
2358: e59d300c ldr r3, [sp, #12]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
235c: e1a00002 mov r0, r2
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
2360: e2833001 add r3, r3, #1
2364: e2822001 add r2, r2, #1
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2368: ea000005 b 2384 <scangr+0x110>
if(*cp == ',') {
236c: e351002c cmp r1, #44 ; 0x2c
*cp = '\0';
2370: 05430001 strbeq r0, [r3, #-1]
grp->gr_mem[memcount++] = cp + 1;
2374: 0594100c ldreq r1, [r4, #12]
2378: 07813102 streq r3, [r1, r2, lsl #2]
237c: 02822001 addeq r2, r2, #1
2380: e2833001 add r3, r3, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2384: e5531001 ldrb r1, [r3, #-1]
2388: e3510000 cmp r1, #0
238c: 1afffff6 bne 236c <scangr+0xf8>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
2390: e594300c ldr r3, [r4, #12]
2394: e3a00001 mov r0, #1
2398: e7831102 str r1, [r3, r2, lsl #2]
return 1;
239c: ea000000 b 23a4 <scangr+0x130>
23a0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
23a4: e28dd014 add sp, sp, #20
23a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000023e8 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
23e8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
23ec: e24dd014 sub sp, sp, #20
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
23f0: e28d7008 add r7, sp, #8
23f4: e28d6004 add r6, sp, #4
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
23f8: e58d2008 str r2, [sp, #8]
23fc: e58d3004 str r3, [sp, #4]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2400: e3a08000 mov r8, #0
2404: e1a02007 mov r2, r7
2408: e1a03006 mov r3, r6
240c: e58d8000 str r8, [sp]
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
2410: e1a05000 mov r5, r0
2414: e1a04001 mov r4, r1
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2418: ebffff5d bl 2194 <scanString>
241c: e1500008 cmp r0, r8
2420: 0a000038 beq 2508 <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
2424: e1a00005 mov r0, r5
2428: e2841004 add r1, r4, #4
242c: e1a02007 mov r2, r7
2430: e1a03006 mov r3, r6
2434: e58d8000 str r8, [sp]
2438: ebffff55 bl 2194 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
243c: e1500008 cmp r0, r8
2440: 0a000030 beq 2508 <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
2444: e1a00005 mov r0, r5
2448: e28d1010 add r1, sp, #16
244c: ebffff15 bl 20a8 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2450: e1500008 cmp r0, r8
2454: 0a00002b beq 2508 <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
2458: e1a00005 mov r0, r5
245c: e28d100c add r1, sp, #12
2460: ebffff10 bl 20a8 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2464: e1500008 cmp r0, r8
2468: 0a000026 beq 2508 <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
246c: e1a00005 mov r0, r5
2470: e284100c add r1, r4, #12
2474: e1a02007 mov r2, r7
2478: e1a03006 mov r3, r6
247c: e58d8000 str r8, [sp]
2480: ebffff43 bl 2194 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2484: e1500008 cmp r0, r8
2488: 0a00001e beq 2508 <scanpw+0x120>
|| !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)
248c: e1a00005 mov r0, r5
2490: e2841010 add r1, r4, #16
2494: e1a02007 mov r2, r7
2498: e1a03006 mov r3, r6
249c: e58d8000 str r8, [sp]
24a0: ebffff3b bl 2194 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
24a4: e1500008 cmp r0, r8
24a8: 0a000016 beq 2508 <scanpw+0x120>
|| !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)
24ac: e1a00005 mov r0, r5
24b0: e2841014 add r1, r4, #20
24b4: e1a02007 mov r2, r7
24b8: e1a03006 mov r3, r6
24bc: e58d8000 str r8, [sp]
24c0: ebffff33 bl 2194 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
24c4: e1500008 cmp r0, r8
24c8: 0a00000e beq 2508 <scanpw+0x120>
|| !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))
24cc: e1a00005 mov r0, r5
24d0: e1a02007 mov r2, r7
24d4: e1a03006 mov r3, r6
24d8: e3a05001 mov r5, #1
24dc: e2841018 add r1, r4, #24
24e0: e58d5000 str r5, [sp]
24e4: ebffff2a bl 2194 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
24e8: e1500008 cmp r0, r8
24ec: 0a000005 beq 2508 <scanpw+0x120>
|| !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;
24f0: e1dd30bc ldrh r3, [sp, #12]
24f4: e1c430ba strh r3, [r4, #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;
24f8: e1dd31b0 ldrh r3, [sp, #16]
pwd->pw_gid = pwgid;
24fc: e1a00005 mov r0, r5
|| !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;
2500: e1c430b8 strh r3, [r4, #8]
pwd->pw_gid = pwgid; return 1;
2504: ea000000 b 250c <scanpw+0x124>
2508: e3a00000 mov r0, #0 <== NOT EXECUTED
}
250c: e28dd014 add sp, sp, #20
2510: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00002618 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
2618: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
261c: ebffffcb bl 2550 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
2620: e59f3020 ldr r3, [pc, #32] ; 2648 <setgrent+0x30> <== NOT EXECUTED
2624: e5930000 ldr r0, [r3] <== NOT EXECUTED
2628: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(group_fp);
262c: 1b0032e7 blne f1d0 <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
2630: e59f0014 ldr r0, [pc, #20] ; 264c <setgrent+0x34> <== NOT EXECUTED
2634: e59f1014 ldr r1, [pc, #20] ; 2650 <setgrent+0x38> <== NOT EXECUTED
2638: eb00349c bl f8b0 <fopen> <== NOT EXECUTED
263c: e59f3004 ldr r3, [pc, #4] ; 2648 <setgrent+0x30> <== NOT EXECUTED
2640: e5830000 str r0, [r3] <== NOT EXECUTED
}
2644: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000027e8 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
27e8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
27ec: ebffff57 bl 2550 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
27f0: e59f3020 ldr r3, [pc, #32] ; 2818 <setpwent+0x30> <== NOT EXECUTED
27f4: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
27f8: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(passwd_fp);
27fc: 1b003273 blne f1d0 <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
2800: e59f0014 ldr r0, [pc, #20] ; 281c <setpwent+0x34> <== NOT EXECUTED
2804: e59f1014 ldr r1, [pc, #20] ; 2820 <setpwent+0x38> <== NOT EXECUTED
2808: eb003428 bl f8b0 <fopen> <== NOT EXECUTED
280c: e59f3004 ldr r3, [pc, #4] ; 2818 <setpwent+0x30> <== NOT EXECUTED
2810: e5830004 str r0, [r3, #4] <== NOT EXECUTED
}
2814: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000038f8 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
38f8: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED
38fc: e59f3050 ldr r3, [pc, #80] ; 3954 <siproc+0x5c> <== NOT EXECUTED
3900: e0023003 and r3, r2, r3 <== NOT EXECUTED
3904: e3530000 cmp r3, #0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
3908: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
390c: e1a04001 mov r4, r1 <== NOT EXECUTED
3910: 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)) {
3914: 0a00000b beq 3948 <siproc+0x50> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3918: e3a01000 mov r1, #0 <== NOT EXECUTED
391c: e1a02001 mov r2, r1 <== NOT EXECUTED
3920: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
3924: eb0005fb bl 5118 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
3928: e1a01004 mov r1, r4 <== NOT EXECUTED
392c: e1a00005 mov r0, r5 <== NOT EXECUTED
3930: ebffff8b bl 3764 <iproc> <== NOT EXECUTED
3934: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
3938: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
393c: eb00063b bl 5230 <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
3940: e1a00005 mov r0, r5 <== NOT EXECUTED
3944: e8bd8030 pop {r4, r5, pc} <== 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);
3948: e1a00005 mov r0, r5 <== NOT EXECUTED
} return i; }
394c: 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);
3950: eaffff83 b 3764 <iproc> <== NOT EXECUTED
00003e48 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
3e48: e92d4070 push {r4, r5, r6, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
3e4c: e2515000 subs r5, r1, #0
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
3e50: e24dd018 sub sp, sp, #24
3e54: e1a06000 mov r6, r0
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
3e58: 1a000002 bne 3e68 <stat+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
3e5c: eb002e28 bl f704 <__errno>
3e60: e3a0300e mov r3, #14
3e64: ea000018 b 3ecc <stat+0x84>
status = rtems_filesystem_evaluate_path( path, strlen( path ),
3e68: eb00353c bl 11360 <strlen>
3e6c: e28d4004 add r4, sp, #4
3e70: e1a01000 mov r1, r0
3e74: e3a0c001 mov ip, #1
3e78: e1a00006 mov r0, r6
3e7c: e3a02000 mov r2, #0
3e80: e1a03004 mov r3, r4
3e84: e58dc000 str ip, [sp]
3e88: ebfffa14 bl 26e0 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
3e8c: e2501000 subs r1, r0, #0
3e90: 1a00000e bne 3ed0 <stat+0x88>
return -1;
if ( !loc.handlers->fstat_h ){
3e94: e59d300c ldr r3, [sp, #12]
3e98: e5933018 ldr r3, [r3, #24]
3e9c: e3530000 cmp r3, #0
3ea0: 1a00000c bne 3ed8 <stat+0x90>
rtems_filesystem_freenode( &loc );
3ea4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
3ea8: e3530000 cmp r3, #0 <== NOT EXECUTED
3eac: 0a000004 beq 3ec4 <stat+0x7c> <== NOT EXECUTED
3eb0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3eb4: e3530000 cmp r3, #0 <== NOT EXECUTED
3eb8: 11a00004 movne r0, r4 <== NOT EXECUTED
3ebc: 11a0e00f movne lr, pc <== NOT EXECUTED
3ec0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3ec4: eb002e0e bl f704 <__errno> <== NOT EXECUTED
3ec8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3ecc: e5803000 str r3, [r0]
3ed0: e3e05000 mvn r5, #0
3ed4: ea000010 b 3f1c <stat+0xd4>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
3ed8: e3a02048 mov r2, #72 ; 0x48
3edc: e1a00005 mov r0, r5
3ee0: eb0032c5 bl 109fc <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
3ee4: e1a01005 mov r1, r5
3ee8: e59d300c ldr r3, [sp, #12]
3eec: e1a00004 mov r0, r4
3ef0: e1a0e00f mov lr, pc
3ef4: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
3ef8: e59d3010 ldr r3, [sp, #16]
3efc: e3530000 cmp r3, #0
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat_h)( &loc, buf );
3f00: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
3f04: 0a000004 beq 3f1c <stat+0xd4>
3f08: e593301c ldr r3, [r3, #28]
3f0c: e3530000 cmp r3, #0
3f10: 11a00004 movne r0, r4
3f14: 11a0e00f movne lr, pc
3f18: 112fff13 bxne r3
return status;
}
3f1c: e1a00005 mov r0, r5
3f20: e28dd018 add sp, sp, #24
3f24: e8bd8070 pop {r4, r5, r6, pc}
0000417c <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
417c: e92d4070 push {r4, r5, r6, lr}
4180: e1a05001 mov r5, r1
4184: e24dd01c sub sp, sp, #28
4188: 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 );
418c: e28d1018 add r1, sp, #24
4190: e1a00005 mov r0, r5
4194: e1a0200d mov r2, sp
4198: ebffffd5 bl 40f4 <rtems_filesystem_get_start_loc>
if ( !loc.ops->evalformake_h ) {
419c: e59d300c ldr r3, [sp, #12]
41a0: e5933004 ldr r3, [r3, #4]
41a4: e3530000 cmp r3, #0
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
41a8: e1a0400d mov r4, sp
if ( !loc.ops->evalformake_h ) {
41ac: 0a000010 beq 41f4 <symlink+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
41b0: e59d0018 ldr r0, [sp, #24]
41b4: e1a0100d mov r1, sp
41b8: e0850000 add r0, r5, r0
41bc: e28d2014 add r2, sp, #20
41c0: e1a0e00f mov lr, pc
41c4: e12fff13 bx r3
if ( result != 0 )
41c8: e3500000 cmp r0, #0
41cc: 1a00000b bne 4200 <symlink+0x84>
return -1;
if ( !loc.ops->symlink_h ) {
41d0: e59d200c ldr r2, [sp, #12]
41d4: e5923038 ldr r3, [r2, #56] ; 0x38
41d8: e3530000 cmp r3, #0
41dc: 1a000009 bne 4208 <symlink+0x8c>
rtems_filesystem_freenode( &loc );
41e0: e592301c ldr r3, [r2, #28]
41e4: e3530000 cmp r3, #0
41e8: 11a0000d movne r0, sp
41ec: 11a0e00f movne lr, pc <== NOT EXECUTED
41f0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
41f4: eb002d53 bl f748 <__errno> <== NOT EXECUTED
41f8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
41fc: e5803000 str r3, [r0] <== NOT EXECUTED
4200: e3e05000 mvn r5, #0
4204: ea00000d b 4240 <symlink+0xc4>
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
4208: e1a01006 mov r1, r6
420c: e1a0000d mov r0, sp
4210: e59d2014 ldr r2, [sp, #20]
4214: e1a0e00f mov lr, pc
4218: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
421c: e59d300c ldr r3, [sp, #12]
4220: e3530000 cmp r3, #0
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);
4224: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
4228: 0a000004 beq 4240 <symlink+0xc4>
422c: e593301c ldr r3, [r3, #28]
4230: e3530000 cmp r3, #0
4234: 11a0000d movne r0, sp
4238: 11a0e00f movne lr, pc
423c: 112fff13 bxne r3
return result;
}
4240: e1a00005 mov r0, r5
4244: e28dd01c add sp, sp, #28
4248: e8bd8070 pop {r4, r5, r6, pc}
000041f4 <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
41f4: e3510000 cmp r1, #0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
41f8: e92d4030 push {r4, r5, lr}
41fc: e1a04002 mov r4, r2
4200: e1a05000 mov r5, r0
switch (opt) {
4204: 0a00000a beq 4234 <tcsetattr+0x40>
4208: e3510001 cmp r1, #1 <== NOT EXECUTED
420c: 0a000003 beq 4220 <tcsetattr+0x2c> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4210: eb002f0c bl fe48 <__errno> <== NOT EXECUTED
4214: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
4218: e5803000 str r3, [r0] <== NOT EXECUTED
421c: ea000009 b 4248 <tcsetattr+0x54> <== NOT EXECUTED
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
4220: e3a01003 mov r1, #3 <== NOT EXECUTED
4224: e3a02000 mov r2, #0 <== NOT EXECUTED
4228: eb001eaf bl bcec <ioctl> <== NOT EXECUTED
422c: e3500000 cmp r0, #0 <== NOT EXECUTED
4230: ba000004 blt 4248 <tcsetattr+0x54> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4234: e1a00005 mov r0, r5
4238: e1a02004 mov r2, r4
423c: e3a01002 mov r1, #2
} }
4240: e8bd4030 pop {r4, r5, lr}
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4244: ea001ea8 b bcec <ioctl>
} }
4248: e3e00000 mvn r0, #0
424c: e8bd8030 pop {r4, r5, pc}
0000d6f0 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
d6f0: e92d4070 push {r4, r5, r6, lr}
d6f4: e24dd030 sub sp, sp, #48 ; 0x30
d6f8: e1a06000 mov r6, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
d6fc: ebffd172 bl 1ccc <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
d700: e2504000 subs r4, r0, #0
d704: e28d3018 add r3, sp, #24
d708: 1a000005 bne d724 <unlink+0x34>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
d70c: e1a02003 mov r2, r3
d710: e1a00006 mov r0, r6
d714: e28d102c add r1, sp, #44 ; 0x2c
d718: ebffd563 bl 2cac <rtems_filesystem_get_start_loc>
d71c: e1a05004 mov r5, r4
d720: ea000008 b d748 <unlink+0x58>
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
d724: e3a0c000 mov ip, #0
d728: e1a00006 mov r0, r6
d72c: e1a01004 mov r1, r4
d730: e3a02002 mov r2, #2
d734: e58dc000 str ip, [sp]
d738: ebffd1aa bl 1de8 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
d73c: e3500000 cmp r0, #0
d740: 1a000072 bne d910 <unlink+0x220>
d744: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
d748: e28de018 add lr, sp, #24
d74c: e8be000f ldm lr!, {r0, r1, r2, r3}
d750: e28dc004 add ip, sp, #4
d754: e8ac000f stmia ip!, {r0, r1, r2, r3}
d758: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
d75c: e0864004 add r4, r6, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
d760: e58c3000 str r3, [ip]
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
d764: e1a00004 mov r0, r4
d768: eb0007d9 bl f6d4 <strlen>
d76c: e1a01000 mov r1, r0
d770: e1a00004 mov r0, r4
d774: ebffd144 bl 1c8c <rtems_filesystem_prefix_separators>
d778: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
d77c: e1a00006 mov r0, r6
d780: eb0007d3 bl f6d4 <strlen>
d784: e28d4004 add r4, sp, #4
d788: e3a0c000 mov ip, #0
d78c: e1a01000 mov r1, r0
d790: e1a0200c mov r2, ip
d794: e1a00006 mov r0, r6
d798: e1a03004 mov r3, r4
d79c: e58dc000 str ip, [sp]
d7a0: ebffd158 bl 1d08 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
d7a4: e3500000 cmp r0, #0
d7a8: 0a00000b beq d7dc <unlink+0xec>
if ( free_parentloc )
d7ac: e3550000 cmp r5, #0
d7b0: 0a000056 beq d910 <unlink+0x220>
rtems_filesystem_freenode( &parentloc );
d7b4: e59d3024 ldr r3, [sp, #36] ; 0x24
d7b8: e3530000 cmp r3, #0
d7bc: 0a000053 beq d910 <unlink+0x220>
d7c0: e593301c ldr r3, [r3, #28]
d7c4: e3530000 cmp r3, #0
d7c8: 0a000050 beq d910 <unlink+0x220>
d7cc: e28d0018 add r0, sp, #24
d7d0: e1a0e00f mov lr, pc
d7d4: e12fff13 bx r3
d7d8: ea00004c b d910 <unlink+0x220>
return -1;
}
if ( !loc.ops->node_type_h ) {
d7dc: e59d2010 ldr r2, [sp, #16]
d7e0: e5923010 ldr r3, [r2, #16]
d7e4: e3530000 cmp r3, #0
d7e8: 0a00001c beq d860 <unlink+0x170>
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 ) {
d7ec: e1a00004 mov r0, r4
d7f0: e1a0e00f mov lr, pc
d7f4: e12fff13 bx r3
d7f8: e3500001 cmp r0, #1
d7fc: e59d2010 ldr r2, [sp, #16]
d800: 1a000013 bne d854 <unlink+0x164>
rtems_filesystem_freenode( &loc );
d804: e3520000 cmp r2, #0
d808: 0a000004 beq d820 <unlink+0x130>
d80c: e592301c ldr r3, [r2, #28]
d810: e3530000 cmp r3, #0
d814: 11a00004 movne r0, r4
d818: 11a0e00f movne lr, pc
d81c: 112fff13 bxne r3
if ( free_parentloc )
d820: e3550000 cmp r5, #0
d824: 0a000007 beq d848 <unlink+0x158>
rtems_filesystem_freenode( &parentloc );
d828: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
d82c: e3530000 cmp r3, #0 <== NOT EXECUTED
d830: 0a000004 beq d848 <unlink+0x158> <== NOT EXECUTED
d834: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
d838: e3530000 cmp r3, #0 <== NOT EXECUTED
d83c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
d840: 11a0e00f movne lr, pc <== NOT EXECUTED
d844: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
d848: eb00039c bl e6c0 <__errno>
d84c: e3a03015 mov r3, #21
d850: ea000013 b d8a4 <unlink+0x1b4>
}
if ( !loc.ops->unlink_h ) {
d854: e592300c ldr r3, [r2, #12]
d858: e3530000 cmp r3, #0
d85c: 1a000012 bne d8ac <unlink+0x1bc>
rtems_filesystem_freenode( &loc );
d860: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
d864: e3530000 cmp r3, #0 <== NOT EXECUTED
d868: 11a00004 movne r0, r4 <== NOT EXECUTED
d86c: 11a0e00f movne lr, pc <== NOT EXECUTED
d870: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
d874: e3550000 cmp r5, #0 <== NOT EXECUTED
d878: 0a000007 beq d89c <unlink+0x1ac> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
d87c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
d880: e3530000 cmp r3, #0 <== NOT EXECUTED
d884: 0a000004 beq d89c <unlink+0x1ac> <== NOT EXECUTED
d888: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
d88c: e3530000 cmp r3, #0 <== NOT EXECUTED
d890: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
d894: 11a0e00f movne lr, pc <== NOT EXECUTED
d898: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
d89c: eb000387 bl e6c0 <__errno> <== NOT EXECUTED
d8a0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
d8a4: e5803000 str r3, [r0]
d8a8: ea000018 b d910 <unlink+0x220>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
d8ac: e28d0018 add r0, sp, #24
d8b0: e1a01004 mov r1, r4
d8b4: e1a0e00f mov lr, pc
d8b8: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
d8bc: e59d3010 ldr r3, [sp, #16]
d8c0: e3530000 cmp r3, #0
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
d8c4: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc );
d8c8: 0a000004 beq d8e0 <unlink+0x1f0>
d8cc: e593301c ldr r3, [r3, #28]
d8d0: e3530000 cmp r3, #0
d8d4: 11a00004 movne r0, r4
d8d8: 11a0e00f movne lr, pc
d8dc: 112fff13 bxne r3
if ( free_parentloc )
d8e0: e3550000 cmp r5, #0
d8e4: 0a00000a beq d914 <unlink+0x224>
rtems_filesystem_freenode( &parentloc );
d8e8: e59d3024 ldr r3, [sp, #36] ; 0x24
d8ec: e3530000 cmp r3, #0
d8f0: 0a000007 beq d914 <unlink+0x224>
d8f4: e593301c ldr r3, [r3, #28]
d8f8: e3530000 cmp r3, #0
d8fc: 0a000004 beq d914 <unlink+0x224>
d900: e28d0018 add r0, sp, #24
d904: e1a0e00f mov lr, pc
d908: e12fff13 bx r3
d90c: ea000000 b d914 <unlink+0x224>
d910: e3e06000 mvn r6, #0
return result;
}
d914: e1a00006 mov r0, r6
d918: e28dd030 add sp, sp, #48 ; 0x30
d91c: e8bd8070 pop {r4, r5, r6, pc}
0000855c <unmount>:
*/
int unmount(
const char *path
)
{
855c: e92d4030 push {r4, r5, lr}
8560: e24dd018 sub sp, sp, #24
8564: 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 ) )
8568: eb00337f bl 1536c <strlen>
856c: e28d4004 add r4, sp, #4
8570: e1a01000 mov r1, r0
8574: e3a0c001 mov ip, #1
8578: e1a00005 mov r0, r5
857c: e3a02000 mov r2, #0
8580: e1a03004 mov r3, r4
8584: e58dc000 str ip, [sp]
8588: ebfff167 bl 4b2c <rtems_filesystem_evaluate_path>
858c: e3500000 cmp r0, #0
8590: 1a00005b bne 8704 <unmount+0x1a8>
return -1;
mt_entry = loc.mt_entry;
8594: e59d5014 ldr r5, [sp, #20]
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
8598: e59d3004 ldr r3, [sp, #4]
859c: e595201c ldr r2, [r5, #28]
85a0: e1520003 cmp r2, r3
85a4: e59d3010 ldr r3, [sp, #16]
85a8: 0a000009 beq 85d4 <unmount+0x78>
/*
* 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 );
85ac: e3530000 cmp r3, #0
85b0: 0a000004 beq 85c8 <unmount+0x6c>
85b4: e593301c ldr r3, [r3, #28]
85b8: e3530000 cmp r3, #0
85bc: 11a00004 movne r0, r4
85c0: 11a0e00f movne lr, pc
85c4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
85c8: eb00268f bl 1200c <__errno>
85cc: e3a0300d mov r3, #13
85d0: ea000021 b 865c <unmount+0x100>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
85d4: e3530000 cmp r3, #0
85d8: 0a000004 beq 85f0 <unmount+0x94>
85dc: e593301c ldr r3, [r3, #28]
85e0: e3530000 cmp r3, #0
85e4: 11a00004 movne r0, r4
85e8: 11a0e00f movne lr, pc
85ec: 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;
85f0: e5953014 ldr r3, [r5, #20]
85f4: e5933028 ldr r3, [r3, #40] ; 0x28
85f8: e3530000 cmp r3, #0
85fc: 0a000003 beq 8610 <unmount+0xb4>
fs_root_loc = &mt_entry->mt_fs_root;
8600: e5953028 ldr r3, [r5, #40] ; 0x28
8604: e593302c ldr r3, [r3, #44] ; 0x2c
8608: e3530000 cmp r3, #0
860c: 1a000002 bne 861c <unmount+0xc0>
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 );
8610: eb00267d bl 1200c <__errno>
8614: e3a03086 mov r3, #134 ; 0x86
8618: ea00000f b 865c <unmount+0x100>
* 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 )
861c: e59f30ec ldr r3, [pc, #236] ; 8710 <unmount+0x1b4>
8620: e5933000 ldr r3, [r3]
8624: e5933014 ldr r3, [r3, #20]
8628: e1530005 cmp r3, r5
862c: 0a000008 beq 8654 <unmount+0xf8>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
8630: e59f00dc ldr r0, [pc, #220] ; 8714 <unmount+0x1b8>
8634: e595102c ldr r1, [r5, #44] ; 0x2c
8638: ebfff431 bl 5704 <rtems_filesystem_mount_iterate>
863c: e3500000 cmp r0, #0
8640: 1a000003 bne 8654 <unmount+0xf8>
* 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 )
8644: e1a00005 mov r0, r5
8648: ebfff1f8 bl 4e30 <rtems_libio_is_open_files_in_fs>
864c: e3500001 cmp r0, #1
8650: 1a000003 bne 8664 <unmount+0x108>
rtems_set_errno_and_return_minus_one( EBUSY );
8654: eb00266c bl 1200c <__errno>
8658: e3a03010 mov r3, #16
865c: e5803000 str r3, [r0]
8660: ea000027 b 8704 <unmount+0x1a8>
* 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 )
8664: e5953014 ldr r3, [r5, #20]
8668: e1a00005 mov r0, r5
866c: e1a0e00f mov lr, pc
8670: e593f028 ldr pc, [r3, #40] ; 0x28
8674: e2504000 subs r4, r0, #0
8678: 1a000021 bne 8704 <unmount+0x1a8>
* 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){
867c: e5953028 ldr r3, [r5, #40] ; 0x28
8680: e1a00005 mov r0, r5
8684: e1a0e00f mov lr, pc
8688: e593f02c ldr pc, [r3, #44] ; 0x2c
868c: e2501000 subs r1, r0, #0
8690: 0a000007 beq 86b4 <unmount+0x158>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
8694: e1a00005 mov r0, r5
8698: e5953014 ldr r3, [r5, #20]
869c: e1a0e00f mov lr, pc
86a0: e593f020 ldr pc, [r3, #32]
86a4: e3500000 cmp r0, #0 <== NOT EXECUTED
86a8: 0a000015 beq 8704 <unmount+0x1a8> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
86ac: e1a00004 mov r0, r4 <== NOT EXECUTED
86b0: eb000473 bl 9884 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
86b4: e59f405c ldr r4, [pc, #92] ; 8718 <unmount+0x1bc>
86b8: e1a02001 mov r2, r1
86bc: e5940000 ldr r0, [r4]
86c0: eb0002f0 bl 9288 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
86c4: e1a00005 mov r0, r5
86c8: eb000532 bl 9b98 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
86cc: e5940000 ldr r0, [r4]
86d0: eb000332 bl 93a0 <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 );
86d4: e5953014 ldr r3, [r5, #20]
86d8: e3530000 cmp r3, #0
86dc: 0a000004 beq 86f4 <unmount+0x198>
86e0: e593301c ldr r3, [r3, #28]
86e4: e3530000 cmp r3, #0
86e8: 12850008 addne r0, r5, #8
86ec: 11a0e00f movne lr, pc
86f0: 112fff13 bxne r3
free( mt_entry );
86f4: e1a00005 mov r0, r5
86f8: ebfff129 bl 4ba4 <free>
86fc: e3a00000 mov r0, #0
return 0;
8700: ea000000 b 8708 <unmount+0x1ac>
8704: e3e00000 mvn r0, #0
}
8708: e28dd018 add sp, sp, #24
870c: e8bd8030 pop {r4, r5, pc}
00005b4c <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
5b4c: e92d4070 push {r4, r5, r6, lr}
5b50: e24dd018 sub sp, sp, #24
5b54: e1a05001 mov r5, r1
5b58: 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 ) )
5b5c: eb002dff bl 11360 <strlen>
5b60: e28d4004 add r4, sp, #4
5b64: e1a01000 mov r1, r0
5b68: e3a0c001 mov ip, #1
5b6c: e1a00006 mov r0, r6
5b70: e3a02000 mov r2, #0
5b74: e1a03004 mov r3, r4
5b78: e58dc000 str ip, [sp]
5b7c: ebfff2d7 bl 26e0 <rtems_filesystem_evaluate_path>
5b80: e3500000 cmp r0, #0
5b84: 1a00000b bne 5bb8 <utime+0x6c>
return -1;
if ( !temp_loc.ops->utime_h ){
5b88: e59d2010 ldr r2, [sp, #16]
5b8c: e5923030 ldr r3, [r2, #48] ; 0x30
5b90: e3530000 cmp r3, #0
5b94: 1a000009 bne 5bc0 <utime+0x74>
rtems_filesystem_freenode( &temp_loc );
5b98: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
5b9c: e3530000 cmp r3, #0 <== NOT EXECUTED
5ba0: 11a00004 movne r0, r4 <== NOT EXECUTED
5ba4: 11a0e00f movne lr, pc <== NOT EXECUTED
5ba8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
5bac: eb0026d4 bl f704 <__errno> <== NOT EXECUTED
5bb0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5bb4: e5803000 str r3, [r0] <== NOT EXECUTED
5bb8: e3e05000 mvn r5, #0
5bbc: ea00000c b 5bf4 <utime+0xa8>
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
5bc0: e8950006 ldm r5, {r1, r2}
5bc4: e1a00004 mov r0, r4
5bc8: e1a0e00f mov lr, pc
5bcc: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
5bd0: e59d3010 ldr r3, [sp, #16]
5bd4: e3530000 cmp r3, #0
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 );
5bd8: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
5bdc: 0a000004 beq 5bf4 <utime+0xa8>
5be0: e593301c ldr r3, [r3, #28]
5be4: e3530000 cmp r3, #0
5be8: 11a00004 movne r0, r4
5bec: 11a0e00f movne lr, pc
5bf0: 112fff13 bxne r3
return result;
}
5bf4: e1a00005 mov r0, r5
5bf8: e28dd018 add sp, sp, #24
5bfc: e8bd8070 pop {r4, r5, r6, pc}
0001a474 <write>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a474: e59f30b0 ldr r3, [pc, #176] ; 1a52c <write+0xb8> 1a478: e5933000 ldr r3, [r3] 1a47c: e1500003 cmp r0, r3
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
1a480: e92d4070 push {r4, r5, r6, lr}
1a484: e1a05001 mov r5, r1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a488: 2a000005 bcs 1a4a4 <write+0x30>
iop = rtems_libio_iop( fd );
1a48c: e59f309c ldr r3, [pc, #156] ; 1a530 <write+0xbc> 1a490: e5934000 ldr r4, [r3] 1a494: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
1a498: e5943014 ldr r3, [r4, #20] 1a49c: e3130c01 tst r3, #256 ; 0x100
1a4a0: 1a000002 bne 1a4b0 <write+0x3c>
1a4a4: ebffd085 bl e6c0 <__errno> <== NOT EXECUTED 1a4a8: e3a03009 mov r3, #9 <== NOT EXECUTED 1a4ac: ea00000f b 1a4f0 <write+0x7c> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
1a4b0: e3510000 cmp r1, #0
1a4b4: 0a000004 beq 1a4cc <write+0x58> rtems_libio_check_count( count );
1a4b8: e3520000 cmp r2, #0
1a4bc: 01a00002 moveq r0, r2
1a4c0: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
1a4c4: e3130004 tst r3, #4
1a4c8: 1a000002 bne 1a4d8 <write+0x64>
1a4cc: ebffd07b bl e6c0 <__errno> <== NOT EXECUTED 1a4d0: e3a03016 mov r3, #22 <== NOT EXECUTED 1a4d4: ea000005 b 1a4f0 <write+0x7c> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
1a4d8: e594303c ldr r3, [r4, #60] ; 0x3c 1a4dc: e593300c ldr r3, [r3, #12] 1a4e0: e3530000 cmp r3, #0
1a4e4: 1a000004 bne 1a4fc <write+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a4e8: ebffd074 bl e6c0 <__errno> <== NOT EXECUTED
1a4ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a4f0: e5803000 str r3, [r0] <== NOT EXECUTED
1a4f4: e3e00000 mvn r0, #0 <== NOT EXECUTED
1a4f8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
1a4fc: e1a00004 mov r0, r4 1a500: e1a0e00f mov lr, pc 1a504: e12fff13 bx r3
if ( rc > 0 )
1a508: e3500000 cmp r0, #0
1a50c: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
1a510: e284600c add r6, r4, #12
1a514: e8960060 ldm r6, {r5, r6}
1a518: e0952000 adds r2, r5, r0
1a51c: e0a63fc0 adc r3, r6, r0, asr #31
1a520: e584200c str r2, [r4, #12]
1a524: e5843010 str r3, [r4, #16]
return rc;
}
1a528: e8bd8070 pop {r4, r5, r6, pc}
00005b04 <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
5b04: e59f3164 ldr r3, [pc, #356] ; 5c70 <writev+0x16c>
5b08: e5933000 ldr r3, [r3]
5b0c: e1500003 cmp r0, r3
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
5b10: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
5b14: e1a08002 mov r8, r2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
5b18: 2a000005 bcs 5b34 <writev+0x30>
iop = rtems_libio_iop( fd );
5b1c: e59f3150 ldr r3, [pc, #336] ; 5c74 <writev+0x170>
5b20: e5936000 ldr r6, [r3]
5b24: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
5b28: e5963014 ldr r3, [r6, #20]
5b2c: e3130c01 tst r3, #256 ; 0x100
5b30: 1a000002 bne 5b40 <writev+0x3c>
5b34: eb00268b bl f568 <__errno>
5b38: e3a03009 mov r3, #9
5b3c: ea000025 b 5bd8 <writev+0xd4>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5b40: e3130004 tst r3, #4
5b44: 0a000021 beq 5bd0 <writev+0xcc>
/*
* Argument validation on IO vector
*/
if ( !iov )
5b48: e3510000 cmp r1, #0
5b4c: 0a00001f beq 5bd0 <writev+0xcc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
5b50: e3520000 cmp r2, #0
5b54: da00001d ble 5bd0 <writev+0xcc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
5b58: e3520b01 cmp r2, #1024 ; 0x400
5b5c: ca00001b bgt 5bd0 <writev+0xcc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
5b60: e596303c ldr r3, [r6, #60] ; 0x3c
5b64: e593300c ldr r3, [r3, #12]
5b68: e3530000 cmp r3, #0
5b6c: 1a000002 bne 5b7c <writev+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
5b70: eb00267c bl f568 <__errno>
5b74: e3a03086 mov r3, #134 ; 0x86
5b78: ea000016 b 5bd8 <writev+0xd4>
5b7c: e3a03000 mov r3, #0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
5b80: e59fc0f0 ldr ip, [pc, #240] ; 5c78 <writev+0x174>
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 );
5b84: e1a05001 mov r5, r1
5b88: e1a02001 mov r2, r1
5b8c: e1a04003 mov r4, r3
5b90: e3a07001 mov r7, #1
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
5b94: e5921000 ldr r1, [r2]
5b98: e3510000 cmp r1, #0
* 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++ ) {
5b9c: e2833001 add r3, r3, #1
if ( !iov[v].iov_base )
5ba0: 0a00000a beq 5bd0 <writev+0xcc>
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 )
5ba4: e5920004 ldr r0, [r2, #4]
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
5ba8: e0841000 add r1, r4, r0
if ( total < old || total > SSIZE_MAX )
5bac: e1510004 cmp r1, r4
5bb0: a3a04000 movge r4, #0
5bb4: b3a04001 movlt r4, #1
5bb8: e151000c cmp r1, ip
5bbc: c3844001 orrgt r4, r4, #1
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 )
5bc0: e3500000 cmp r0, #0
5bc4: 13a07000 movne r7, #0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
5bc8: e3540000 cmp r4, #0
5bcc: 0a000003 beq 5be0 <writev+0xdc>
rtems_set_errno_and_return_minus_one( EINVAL );
5bd0: eb002664 bl f568 <__errno>
5bd4: e3a03016 mov r3, #22
5bd8: e5803000 str r3, [r0]
5bdc: ea000011 b 5c28 <writev+0x124>
* 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++ ) {
5be0: e1530008 cmp r3, r8
5be4: e2822008 add r2, r2, #8
5be8: b1a04001 movlt r4, r1
5bec: baffffe8 blt 5b94 <writev+0x90>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
5bf0: e3570000 cmp r7, #0
5bf4: 1a00001b bne 5c68 <writev+0x164>
5bf8: e1a04007 mov r4, r7
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
5bfc: e5952004 ldr r2, [r5, #4]
5c00: e3520000 cmp r2, #0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5c04: e2877001 add r7, r7, #1
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
5c08: 0a000013 beq 5c5c <writev+0x158>
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
5c0c: e5951000 ldr r1, [r5]
5c10: e596303c ldr r3, [r6, #60] ; 0x3c
5c14: e1a00006 mov r0, r6
5c18: e1a0e00f mov lr, pc
5c1c: e593f00c ldr pc, [r3, #12]
if ( bytes < 0 )
5c20: e3500000 cmp r0, #0
5c24: aa000001 bge 5c30 <writev+0x12c>
5c28: e3e04000 mvn r4, #0
5c2c: ea00000d b 5c68 <writev+0x164>
return -1;
if ( bytes > 0 ) {
5c30: 0a000006 beq 5c50 <writev+0x14c>
iop->offset += bytes;
5c34: e286c00c add ip, r6, #12
5c38: e89c1800 ldm ip, {fp, ip}
5c3c: e09b2000 adds r2, fp, r0
5c40: e0ac3fc0 adc r3, ip, r0, asr #31
5c44: e586200c str r2, [r6, #12]
5c48: e5863010 str r3, [r6, #16]
total += bytes;
5c4c: e0844000 add r4, r4, r0
}
if (bytes != iov[ v ].iov_len)
5c50: e5953004 ldr r3, [r5, #4]
5c54: e1500003 cmp r0, r3
5c58: 1a000002 bne 5c68 <writev+0x164>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5c5c: e1570008 cmp r7, r8
5c60: e2855008 add r5, r5, #8
5c64: baffffe4 blt 5bfc <writev+0xf8>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
5c68: e1a00004 mov r0, r4
5c6c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}