Annotated Report
00008058 <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 ) {
8058: e5903000 ldr r3, [r0] 805c: 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;
8060: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
8064: 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;
8068: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
806c: e3520006 cmp r2, #6 8070: 979ff102 ldrls pc, [pc, r2, lsl #2]
8074: ea000010 b 80bc <IMFS_Set_handlers+0x64> <== NOT EXECUTED 8078: 00008094 .word 0x00008094 <== NOT EXECUTED 807c: 0000809c .word 0x0000809c <== NOT EXECUTED 8080: 000080a4 .word 0x000080a4 <== NOT EXECUTED 8084: 000080a4 .word 0x000080a4 <== NOT EXECUTED 8088: 000080ac .word 0x000080ac <== NOT EXECUTED 808c: 000080ac .word 0x000080ac <== NOT EXECUTED 8090: 000080b4 .word 0x000080b4 <== NOT EXECUTED
case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers;
8094: e593300c ldr r3, [r3, #12] 8098: ea000006 b 80b8 <IMFS_Set_handlers+0x60>
break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers;
809c: e59f3020 ldr r3, [pc, #32] ; 80c4 <IMFS_Set_handlers+0x6c> 80a0: ea000004 b 80b8 <IMFS_Set_handlers+0x60>
break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers;
80a4: e59f301c ldr r3, [pc, #28] ; 80c8 <IMFS_Set_handlers+0x70> 80a8: ea000002 b 80b8 <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;
80ac: e5933008 ldr r3, [r3, #8] 80b0: ea000000 b 80b8 <IMFS_Set_handlers+0x60>
break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers;
80b4: e59f3010 ldr r3, [pc, #16] ; 80cc <IMFS_Set_handlers+0x74> 80b8: e5803008 str r3, [r0, #8]
break; } return 0; }
80bc: e3a00000 mov r0, #0 80c0: e12fff1e bx lr
0000adcc <IMFS_create_node>: IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
adcc: 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 )
add0: e2504000 subs r4, r0, #0
IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
add4: e1a05001 mov r5, r1 add8: e59d6014 ldr r6, [sp, #20] addc: e1a01002 mov r1, r2
IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL )
ade0: 01a07004 moveq r7, r4
ade4: 0a000041 beq aef0 <IMFS_create_node+0x124> return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
ade8: e59f2108 ldr r2, [pc, #264] ; aef8 <IMFS_create_node+0x12c> adec: e5922000 ldr r2, [r2] adf0: e592202c ldr r2, [r2, #44] ; 0x2c adf4: e1a00005 mov r0, r5 adf8: e1c32002 bic r2, r3, r2 adfc: ebffffc5 bl ad18 <IMFS_allocate_node>
if ( !node )
ae00: e2507000 subs r7, r0, #0
ae04: 0a000039 beq aef0 <IMFS_create_node+0x124> return NULL; /* * Set the type specific information */ switch (type) {
ae08: e2455001 sub r5, r5, #1 ae0c: e3550006 cmp r5, #6 ae10: 979ff105 ldrls pc, [pc, r5, lsl #2]
ae14: ea000025 b aeb0 <IMFS_create_node+0xe4> <== NOT EXECUTED ae18: 0000ae34 .word 0x0000ae34 <== NOT EXECUTED ae1c: 0000ae58 .word 0x0000ae58 <== NOT EXECUTED ae20: 0000ae50 .word 0x0000ae50 <== NOT EXECUTED ae24: 0000ae50 .word 0x0000ae50 <== NOT EXECUTED ae28: 0000ae80 .word 0x0000ae80 <== NOT EXECUTED ae2c: 0000ae68 .word 0x0000ae68 <== NOT EXECUTED ae30: 0000aea4 .word 0x0000aea4 <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
ae34: e2872054 add r2, r7, #84 ; 0x54
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
ae38: e2873050 add r3, r7, #80 ; 0x50
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
ae3c: e5872050 str r2, [r7, #80] ; 0x50
the_chain->permanent_null = NULL;
ae40: e3a02000 mov r2, #0 ae44: e5872054 str r2, [r7, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
ae48: e5873058 str r3, [r7, #88] ; 0x58 ae4c: ea00001c b aec4 <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;
ae50: e5963000 ldr r3, [r6] ae54: ea000013 b aea8 <IMFS_create_node+0xdc>
break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor;
ae58: 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;
ae5c: e5963000 ldr r3, [r6]
node->info.device.minor = info->device.minor;
ae60: e5872054 str r2, [r7, #84] ; 0x54 ae64: ea00000f b aea8 <IMFS_create_node+0xdc>
break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0;
ae68: e3a03000 mov r3, #0 <== NOT EXECUTED ae6c: e3a02000 mov r2, #0 <== NOT EXECUTED ae70: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED ae74: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED
node->info.linearfile.direct = 0;
ae78: e3a03000 mov r3, #0 <== NOT EXECUTED ae7c: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED
case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0;
ae80: 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;
ae84: e3a01000 mov r1, #0 ae88: e3a02000 mov r2, #0 ae8c: e5871050 str r1, [r7, #80] ; 0x50 ae90: e5872054 str r2, [r7, #84] ; 0x54
node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0;
ae94: 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;
ae98: e5873058 str r3, [r7, #88] ; 0x58
node->info.file.doubly_indirect = 0;
ae9c: e587305c str r3, [r7, #92] ; 0x5c
node->info.file.triply_indirect = 0; break;
aea0: ea000007 b aec4 <IMFS_create_node+0xf8>
case IMFS_FIFO: node->info.fifo.pipe = NULL;
aea4: e3a03000 mov r3, #0 aea8: e5873050 str r3, [r7, #80] ; 0x50
break;
aeac: ea000004 b aec4 <IMFS_create_node+0xf8>
default: assert(0);
aeb0: e59f0044 ldr r0, [pc, #68] ; aefc <IMFS_create_node+0x130> <== NOT EXECUTED aeb4: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED aeb8: e59f2040 ldr r2, [pc, #64] ; af00 <IMFS_create_node+0x134> <== NOT EXECUTED aebc: e59f3040 ldr r3, [pc, #64] ; af04 <IMFS_create_node+0x138> <== NOT EXECUTED aec0: ebfff7eb bl 8e74 <__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;
aec4: e5943010 ldr r3, [r4, #16] aec8: e5932034 ldr r2, [r3, #52] ; 0x34
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
aecc: e5923004 ldr r3, [r2, #4]
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
aed0: e5940000 ldr r0, [r4]
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
aed4: e2833001 add r3, r3, #1 aed8: 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;
aedc: e5870008 str r0, [r7, #8]
node->st_ino = ++fs_info->ino_count;
aee0: e5873038 str r3, [r7, #56] ; 0x38
RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node );
aee4: e2800050 add r0, r0, #80 ; 0x50 aee8: e1a01007 mov r1, r7 aeec: ebffe918 bl 5354 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; }
aef0: e1a00007 mov r0, r7 aef4: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003324 <IMFS_dump_directory>: rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory );
3324: e3500000 cmp r0, #0
void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) {
3328: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 332c: e1a05001 mov r5, r1
rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory );
3330: 059f00a4 ldreq r0, [pc, #164] ; 33dc <IMFS_dump_directory+0xb8> 3334: 03a01084 moveq r1, #132 ; 0x84 3338: 059f20a0 ldreq r2, [pc, #160] ; 33e0 <IMFS_dump_directory+0xbc> 333c: 059f30a0 ldreq r3, [pc, #160] ; 33e4 <IMFS_dump_directory+0xc0>
3340: 0a000005 beq 335c <IMFS_dump_directory+0x38> assert( level >= 0 );
3344: e3510000 cmp r1, #0
3348: aa000004 bge 3360 <IMFS_dump_directory+0x3c>
334c: e59f0088 ldr r0, [pc, #136] ; 33dc <IMFS_dump_directory+0xb8><== NOT EXECUTED 3350: e59f2088 ldr r2, [pc, #136] ; 33e0 <IMFS_dump_directory+0xbc><== NOT EXECUTED 3354: e59f308c ldr r3, [pc, #140] ; 33e8 <IMFS_dump_directory+0xc4><== NOT EXECUTED 3358: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 335c: eb0001da bl 3acc <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
3360: e590304c ldr r3, [r0, #76] ; 0x4c 3364: e3530001 cmp r3, #1 3368: 159f006c ldrne r0, [pc, #108] ; 33dc <IMFS_dump_directory+0xb8> 336c: 13a01088 movne r1, #136 ; 0x88 3370: 159f2068 ldrne r2, [pc, #104] ; 33e0 <IMFS_dump_directory+0xbc> 3374: 159f3070 ldrne r3, [pc, #112] ; 33ec <IMFS_dump_directory+0xc8>
3378: 1afffff7 bne 335c <IMFS_dump_directory+0x38> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
337c: e280a054 add sl, r0, #84 ; 0x54
the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
3380: 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, "...." );
3384: e59f8064 ldr r8, [pc, #100] ; 33f0 <IMFS_dump_directory+0xcc>
IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 );
3388: e2817001 add r7, r1, #1
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
338c: ea00000f b 33d0 <IMFS_dump_directory+0xac>
!rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node;
3390: e3a06000 mov r6, #0
for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." );
3394: 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++ )
3398: e2866001 add r6, r6, #1
fprintf(stdout, "...." );
339c: e5931008 ldr r1, [r3, #8] 33a0: e59f004c ldr r0, [pc, #76] ; 33f4 <IMFS_dump_directory+0xd0> 33a4: eb0034aa bl 10654 <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++ )
33a8: e1560005 cmp r6, r5
33ac: dafffff8 ble 3394 <IMFS_dump_directory+0x70> fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode );
33b0: e1a00004 mov r0, r4 33b4: ebffff7e bl 31b4 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
33b8: e594304c ldr r3, [r4, #76] ; 0x4c 33bc: e3530001 cmp r3, #1
IMFS_dump_directory( the_jnode, level + 1 );
33c0: 01a00004 moveq r0, r4 33c4: 01a01007 moveq r1, r7 33c8: 0bffffd5 bleq 3324 <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 ) {
33cc: e5944000 ldr r4, [r4]
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
33d0: e154000a cmp r4, sl
33d4: 1affffed bne 3390 <IMFS_dump_directory+0x6c> fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } }
33d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00008244 <IMFS_eval_path>: const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
8244: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8248: e24dd044 sub sp, sp, #68 ; 0x44 824c: e1a04003 mov r4, r3 8250: e58d0000 str r0, [sp] 8254: e1a06001 mov r6, r1 8258: e58d2004 str r2, [sp, #4]
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
825c: e5935000 ldr r5, [r3] 8260: e3a0b001 mov fp, #1 8264: e3a07000 mov r7, #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 );
8268: e28da008 add sl, sp, #8 826c: e28d8040 add r8, sp, #64 ; 0x40
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
8270: e59f9244 ldr r9, [pc, #580] ; 84bc <IMFS_eval_path+0x278>
/* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
8274: ea000061 b 8400 <IMFS_eval_path+0x1bc>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
8278: e59d1000 ldr r1, [sp] 827c: e1a03008 mov r3, r8 8280: e0810007 add r0, r1, r7 8284: e1a0200a mov r2, sl 8288: e1a01006 mov r1, r6 828c: eb0001f9 bl 8a78 <IMFS_get_token>
pathnamelen -= len; i += len; if ( !pathloc->node_access )
8290: e5943000 ldr r3, [r4] 8294: 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 );
8298: e1a0b000 mov fp, r0
pathnamelen -= len;
829c: e59de040 ldr lr, [sp, #64] ; 0x40
i += len; if ( !pathloc->node_access ) 82a0: 0a00004e beq 83e0 <IMFS_eval_path+0x19c> rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH )
82a4: e3500000 cmp r0, #0
82a8: 0a000005 beq 82c4 <IMFS_eval_path+0x80> if ( node->type == IMFS_DIRECTORY )
82ac: e595204c ldr r2, [r5, #76] ; 0x4c 82b0: e3520001 cmp r2, #1
82b4: 1a000002 bne 82c4 <IMFS_eval_path+0x80> /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
82b8: e5932030 ldr r2, [r3, #48] ; 0x30 82bc: e3120040 tst r2, #64 ; 0x40
82c0: 0a000078 beq 84a8 <IMFS_eval_path+0x264> if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) {
82c4: e35b0003 cmp fp, #3
*/ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len;
82c8: e06e6006 rsb r6, lr, r6
i += len;
82cc: e087700e add r7, r7, lr
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;
82d0: e1a05003 mov r5, r3
switch( type ) { 82d4: 0a000021 beq 8360 <IMFS_eval_path+0x11c>
82d8: e35b0004 cmp fp, #4
82dc: 0a000044 beq 83f4 <IMFS_eval_path+0x1b0>
82e0: e35b0002 cmp fp, #2
82e4: 1a000045 bne 8400 <IMFS_eval_path+0x1bc> case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
82e8: e5992000 ldr r2, [r9] 82ec: e5922018 ldr r2, [r2, #24] 82f0: e1530002 cmp r3, r2
82f4: 0a000041 beq 8400 <IMFS_eval_path+0x1bc> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) {
82f8: e5942010 ldr r2, [r4, #16]
/* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access ==
82fc: e592101c ldr r1, [r2, #28] 8300: e1530001 cmp r3, r1
8304: 1a00000f bne 8348 <IMFS_eval_path+0x104> */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node;
8308: e2828008 add r8, r2, #8 830c: e8b8000f ldm r8!, {r0, r1, r2, r3} 8310: e28dc02c add ip, sp, #44 ; 0x2c 8314: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
8318: e28d502c add r5, sp, #44 ; 0x2c 831c: e8b5000f ldm r5!, {r0, r1, r2, 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;
8320: e5985000 ldr r5, [r8]
*pathloc = newloc;
8324: e1a08004 mov r8, r4 8328: e8a8000f stmia r8!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
832c: e59d1000 ldr r1, [sp] 8330: e06e0007 rsb r0, lr, r7
if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc;
8334: e5885000 str r5, [r8]
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
8338: e0810000 add r0, r1, r0
*/ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node;
833c: e58c5000 str r5, [ip]
*pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
8340: e08e1006 add r1, lr, r6 8344: ea000046 b 8464 <IMFS_eval_path+0x220>
pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent )
8348: e5935008 ldr r5, [r3, #8] 834c: e3550000 cmp r5, #0
8350: 1a000025 bne 83ec <IMFS_eval_path+0x1a8> rtems_set_errno_and_return_minus_one( ENOENT );
8354: eb000e1a bl bbc4 <__errno> 8358: e580b000 str fp, [r0] 835c: ea000054 b 84b4 <IMFS_eval_path+0x270>
case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) {
8360: e593304c ldr r3, [r3, #76] ; 0x4c 8364: e3530003 cmp r3, #3
8368: 1a000006 bne 8388 <IMFS_eval_path+0x144> IMFS_evaluate_hard_link( pathloc, 0 );
836c: e1a00004 mov r0, r4 8370: e3a01000 mov r1, #0 8374: ebffff5d bl 80f0 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
8378: e5945000 ldr r5, [r4]
if ( !node )
837c: e3550000 cmp r5, #0
8380: 1a000008 bne 83a8 <IMFS_eval_path+0x164>
8384: ea00000a b 83b4 <IMFS_eval_path+0x170> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) {
8388: e3530004 cmp r3, #4
838c: 1a000005 bne 83a8 <IMFS_eval_path+0x164> result = IMFS_evaluate_sym_link( pathloc, 0 );
8390: e1a00004 mov r0, r4 8394: e3a01000 mov r1, #0 8398: ebffff6d bl 8154 <IMFS_evaluate_sym_link>
node = pathloc->node_access; if ( result == -1 )
839c: e3700001 cmn r0, #1
} else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access;
83a0: e5945000 ldr r5, [r4]
if ( result == -1 ) 83a4: 0a00003d beq 84a0 <IMFS_eval_path+0x25c> /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
83a8: e595304c ldr r3, [r5, #76] ; 0x4c 83ac: e3530001 cmp r3, #1
83b0: 0a000002 beq 83c0 <IMFS_eval_path+0x17c> rtems_set_errno_and_return_minus_one( ENOTDIR );
83b4: eb000e02 bl bbc4 <__errno> 83b8: e3a03014 mov r3, #20 83bc: ea00003b b 84b0 <IMFS_eval_path+0x26c>
/* * 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 ) {
83c0: e595e05c ldr lr, [r5, #92] ; 0x5c 83c4: e35e0000 cmp lr, #0
83c8: 1a000015 bne 8424 <IMFS_eval_path+0x1e0> /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
83cc: e1a00005 mov r0, r5 83d0: e1a0100a mov r1, sl 83d4: eb00017f bl 89d8 <IMFS_find_match_in_dir>
if ( !node )
83d8: e2505000 subs r5, r0, #0
83dc: 1a000002 bne 83ec <IMFS_eval_path+0x1a8> rtems_set_errno_and_return_minus_one( ENOENT );
83e0: eb000df7 bl bbc4 <__errno> 83e4: e3a03002 mov r3, #2 83e8: ea000030 b 84b0 <IMFS_eval_path+0x26c>
/* * Set the node access to the point we have found. */ pathloc->node_access = node;
83ec: e5845000 str r5, [r4] 83f0: ea000002 b 8400 <IMFS_eval_path+0x1bc>
case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
83f4: eb000df2 bl bbc4 <__errno> 83f8: e3a0305b mov r3, #91 ; 0x5b 83fc: ea00002b b 84b0 <IMFS_eval_path+0x26c>
/* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
8400: e35b0004 cmp fp, #4 8404: 135b0000 cmpne fp, #0
8408: 1affff9a bne 8278 <IMFS_eval_path+0x34> * 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 ) {
840c: e595304c ldr r3, [r5, #76] ; 0x4c 8410: e3530001 cmp r3, #1
8414: 1a000018 bne 847c <IMFS_eval_path+0x238> if ( node->info.directory.mt_fs != NULL ) {
8418: e595e05c ldr lr, [r5, #92] ; 0x5c 841c: e35e0000 cmp lr, #0
8420: 0a000015 beq 847c <IMFS_eval_path+0x238> newloc = node->info.directory.mt_fs->mt_fs_root;
8424: e28ee01c add lr, lr, #28 8428: e8be000f ldm lr!, {r0, r1, r2, r3} 842c: e28dc02c add ip, sp, #44 ; 0x2c 8430: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
8434: e28d502c add r5, sp, #44 ; 0x2c 8438: e8b5000f ldm r5!, {r0, r1, r2, r3} 843c: 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;
8440: e59ee000 ldr lr, [lr]
*pathloc = newloc;
8444: e8a5000f stmia r5!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8448: e59d1040 ldr r1, [sp, #64] ; 0x40 844c: e59d8000 ldr r8, [sp] 8450: e0610007 rsb r0, r1, r7
*/ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc;
8454: e585e000 str lr, [r5]
* NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root;
8458: e58ce000 str lr, [ip]
*pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len],
845c: e0880000 add r0, r8, r0 8460: e0861001 add r1, r6, r1 8464: e59d2004 ldr r2, [sp, #4] 8468: e1a03004 mov r3, r4 846c: e594c00c ldr ip, [r4, #12] 8470: e1a0e00f mov lr, pc 8474: e59cf000 ldr pc, [ip] 8478: ea000008 b 84a0 <IMFS_eval_path+0x25c>
flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
847c: e1a00004 mov r0, r4 8480: ebfffef4 bl 8058 <IMFS_Set_handlers>
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
8484: e5943000 ldr r3, [r4]
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8488: e59d1004 ldr r1, [sp, #4]
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
848c: e5932030 ldr r2, [r3, #48] ; 0x30
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8490: e1a03301 lsl r3, r1, #6
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
8494: e0032002 and r2, r3, r2 8498: e1520003 cmp r2, r3
849c: 1a000001 bne 84a8 <IMFS_eval_path+0x264> if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
84a0: e28dd044 add sp, sp, #68 ; 0x44 84a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES );
84a8: eb000dc5 bl bbc4 <__errno> 84ac: e3a0300d mov r3, #13 84b0: e5803000 str r3, [r0] 84b4: e3e00000 mvn r0, #0 84b8: eafffff8 b 84a0 <IMFS_eval_path+0x25c>
00008574 <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 */ ) {
8574: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8578: e24dd040 sub sp, sp, #64 ; 0x40 857c: e1a04001 mov r4, r1
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
8580: 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 */ ) {
8584: e58d2000 str r2, [sp] 8588: e1a07000 mov r7, r0
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
858c: eb00117d bl cb88 <strlen>
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
8590: e59f9238 ldr r9, [pc, #568] ; 87d0 <IMFS_evaluate_for_make+0x25c>
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
8594: e3a05000 mov r5, #0
* Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len );
8598: e28db004 add fp, sp, #4
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
859c: 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 );
85a0: e1a01008 mov r1, r8 85a4: e28d303c add r3, sp, #60 ; 0x3c 85a8: e0870005 add r0, r7, r5 85ac: e1a0200b mov r2, fp 85b0: eb000130 bl 8a78 <IMFS_get_token>
pathlen -= len; i += len; if ( !pathloc->node_access )
85b4: e5943000 ldr r3, [r4]
*/ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len;
85b8: e59da03c ldr sl, [sp, #60] ; 0x3c
i += len; if ( !pathloc->node_access )
85bc: e3530000 cmp r3, #0
*/ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len;
85c0: e06a8008 rsb r8, sl, r8
i += len; if ( !pathloc->node_access ) 85c4: 0a000067 beq 8768 <IMFS_evaluate_for_make+0x1f4> /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH )
85c8: e3500000 cmp r0, #0
85cc: 0a000005 beq 85e8 <IMFS_evaluate_for_make+0x74> if ( node->type == IMFS_DIRECTORY )
85d0: e596204c ldr r2, [r6, #76] ; 0x4c 85d4: e3520001 cmp r2, #1
85d8: 1a000002 bne 85e8 <IMFS_evaluate_for_make+0x74> /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
85dc: e5932030 ldr r2, [r3, #48] ; 0x30 85e0: e3120040 tst r2, #64 ; 0x40
85e4: 0a000074 beq 87bc <IMFS_evaluate_for_make+0x248> while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len;
85e8: e085500a add r5, r5, sl
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;
85ec: e1a06003 mov r6, r3
switch( type ) {
85f0: e3500004 cmp r0, #4 85f4: 979ff100 ldrls pc, [pc, r0, lsl #2]
85f8: eaffffe8 b 85a0 <IMFS_evaluate_for_make+0x2c> <== NOT EXECUTED 85fc: 00008724 .word 0x00008724 <== NOT EXECUTED 8600: 000085a0 .word 0x000085a0 <== NOT EXECUTED 8604: 00008610 .word 0x00008610 <== NOT EXECUTED 8608: 00008670 .word 0x00008670 <== NOT EXECUTED 860c: 00008730 .word 0x00008730 <== 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 )
8610: e5992000 ldr r2, [r9] 8614: e5922018 ldr r2, [r2, #24] 8618: e1530002 cmp r3, r2
861c: 0affffdf beq 85a0 <IMFS_evaluate_for_make+0x2c> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
8620: e594e010 ldr lr, [r4, #16] 8624: e59e201c ldr r2, [lr, #28] 8628: e1530002 cmp r3, r2
862c: 1a00000b bne 8660 <IMFS_evaluate_for_make+0xec> if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node;
8630: e28ee008 add lr, lr, #8 8634: e8be000f ldm lr!, {r0, r1, r2, r3} 8638: e28dc028 add ip, sp, #40 ; 0x28 863c: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
8640: e28d6028 add r6, sp, #40 ; 0x28 8644: e8b6000f ldm r6!, {r0, r1, r2, r3} 8648: e1a06004 mov r6, r4
if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node;
864c: e59ee000 ldr lr, [lr]
*pathloc = newloc;
8650: e8a6000f stmia r6!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
8654: e06a5005 rsb r5, sl, r5
if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc;
8658: e586e000 str lr, [r6] 865c: ea000022 b 86ec <IMFS_evaluate_for_make+0x178>
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent )
8660: e5936008 ldr r6, [r3, #8] 8664: e3560000 cmp r6, #0
8668: 1a00002b bne 871c <IMFS_evaluate_for_make+0x1a8>
866c: ea00003d b 8768 <IMFS_evaluate_for_make+0x1f4>
pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) {
8670: e593304c ldr r3, [r3, #76] ; 0x4c 8674: e3530003 cmp r3, #3
8678: 0a000001 beq 8684 <IMFS_evaluate_for_make+0x110> result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) {
867c: e3530004 cmp r3, #4
8680: 1a000004 bne 8698 <IMFS_evaluate_for_make+0x124> result = IMFS_evaluate_link( pathloc, 0 );
8684: e1a00004 mov r0, r4 8688: e3a01000 mov r1, #0 868c: ebffff8b bl 84c0 <IMFS_evaluate_link>
if ( result == -1 )
8690: e3700001 cmn r0, #1
8694: 0a000046 beq 87b4 <IMFS_evaluate_for_make+0x240> return -1; } node = pathloc->node_access;
8698: e5940000 ldr r0, [r4]
if ( !node )
869c: e3500000 cmp r0, #0
86a0: 0a00003c beq 8798 <IMFS_evaluate_for_make+0x224> /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
86a4: e590304c ldr r3, [r0, #76] ; 0x4c 86a8: e3530001 cmp r3, #1
86ac: 1a000039 bne 8798 <IMFS_evaluate_for_make+0x224> /* * 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 ) {
86b0: e590e05c ldr lr, [r0, #92] ; 0x5c 86b4: e35e0000 cmp lr, #0
86b8: 0a000013 beq 870c <IMFS_evaluate_for_make+0x198> newloc = node->info.directory.mt_fs->mt_fs_root;
86bc: e28ee01c add lr, lr, #28 86c0: e8be000f ldm lr!, {r0, r1, r2, r3} 86c4: e28dc028 add ip, sp, #40 ; 0x28 86c8: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
86cc: e28d6028 add r6, sp, #40 ; 0x28 86d0: e8b6000f ldm r6!, {r0, r1, r2, r3} 86d4: 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;
86d8: e59ee000 ldr lr, [lr]
*pathloc = newloc;
86dc: e8a6000f stmia r6!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
86e0: 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;
86e4: e586e000 str lr, [r6]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
86e8: e0635005 rsb r5, r3, r5
* 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;
86ec: e58ce000 str lr, [ip]
*pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
86f0: e0870005 add r0, r7, r5 86f4: e1a01004 mov r1, r4 86f8: e59d2000 ldr r2, [sp] 86fc: e594300c ldr r3, [r4, #12] 8700: e1a0e00f mov lr, pc 8704: e593f004 ldr pc, [r3, #4] 8708: ea000029 b 87b4 <IMFS_evaluate_for_make+0x240>
/* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
870c: e1a0100b mov r1, fp 8710: eb0000b0 bl 89d8 <IMFS_find_match_in_dir>
/* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node )
8714: e2506000 subs r6, r0, #0
8718: 0a000007 beq 873c <IMFS_evaluate_for_make+0x1c8> done = true; else pathloc->node_access = node;
871c: e5846000 str r6, [r4] 8720: eaffff9e b 85a0 <IMFS_evaluate_for_make+0x2c>
break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST );
8724: eb000d26 bl bbc4 <__errno> 8728: e3a03011 mov r3, #17 872c: ea000024 b 87c4 <IMFS_evaluate_for_make+0x250>
break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
8730: eb000d23 bl bbc4 <__errno> 8734: e3a0305b mov r3, #91 ; 0x5b 8738: ea000021 b 87c4 <IMFS_evaluate_for_make+0x250>
case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ];
873c: e59d303c ldr r3, [sp, #60] ; 0x3c 8740: e59d2000 ldr r2, [sp] 8744: e0633005 rsb r3, r3, r5 8748: e0873003 add r3, r7, r3 874c: e5823000 str r3, [r2] 8750: 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++) {
8754: ea000006 b 8774 <IMFS_evaluate_for_make+0x200>
if ( !IMFS_is_separator( path[ i ] ) )
8758: e353005c cmp r3, #92 ; 0x5c 875c: 1353002f cmpne r3, #47 ; 0x2f
/* * 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++) {
8760: e2855001 add r5, r5, #1
if ( !IMFS_is_separator( path[ i ] ) ) 8764: 0a000002 beq 8774 <IMFS_evaluate_for_make+0x200> rtems_set_errno_and_return_minus_one( ENOENT );
8768: eb000d15 bl bbc4 <__errno> 876c: e3a03002 mov r3, #2 8770: ea000013 b 87c4 <IMFS_evaluate_for_make+0x250>
/* * 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++) {
8774: e5d53000 ldrb r3, [r5] 8778: e3530000 cmp r3, #0
877c: 1afffff5 bne 8758 <IMFS_evaluate_for_make+0x1e4> /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc );
8780: e1a00004 mov r0, r4 8784: ebfffe33 bl 8058 <IMFS_Set_handlers>
/* * The returned node must be a directory */ node = pathloc->node_access;
8788: e5943000 ldr r3, [r4]
if ( node->type != IMFS_DIRECTORY )
878c: e593204c ldr r2, [r3, #76] ; 0x4c 8790: e3520001 cmp r2, #1
8794: 0a000002 beq 87a4 <IMFS_evaluate_for_make+0x230> rtems_set_errno_and_return_minus_one( ENOTDIR );
8798: eb000d09 bl bbc4 <__errno> 879c: e3a03014 mov r3, #20 87a0: ea000007 b 87c4 <IMFS_evaluate_for_make+0x250>
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
87a4: e5933030 ldr r3, [r3, #48] ; 0x30 87a8: e20330c0 and r3, r3, #192 ; 0xc0 87ac: e35300c0 cmp r3, #192 ; 0xc0
87b0: 1a000001 bne 87bc <IMFS_evaluate_for_make+0x248> if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
87b4: e28dd040 add sp, sp, #64 ; 0x40 87b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
*/ 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 );
87bc: eb000d00 bl bbc4 <__errno> 87c0: e3a0300d mov r3, #13 87c4: e5803000 str r3, [r0] 87c8: e3e00000 mvn r0, #0 87cc: eafffff8 b 87b4 <IMFS_evaluate_for_make+0x240>
000080f0 <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;
80f0: e5903000 ldr r3, [r0]
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK )
80f4: e593204c ldr r2, [r3, #76] ; 0x4c 80f8: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
80fc: e92d4030 push {r4, r5, lr} 8100: e1a04000 mov r4, r0 8104: e1a05001 mov r5, r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000);
8108: 159f0040 ldrne r0, [pc, #64] ; 8150 <IMFS_evaluate_hard_link+0x60> 810c: 1bfff3e8 blne 50b4 <rtems_fatal_error_occurred>
/* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node;
8110: e5933050 ldr r3, [r3, #80] ; 0x50 8114: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
8118: ebffffce bl 8058 <IMFS_Set_handlers>
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
811c: e5943000 ldr r3, [r4] 8120: e5933030 ldr r3, [r3, #48] ; 0x30
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8124: e1a05305 lsl r5, r5, #6
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
8128: e0053003 and r3, r5, r3 812c: e1530005 cmp r3, r5
8130: 1a000001 bne 813c <IMFS_evaluate_hard_link+0x4c>
8134: e3a00000 mov r0, #0
if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
8138: e8bd8030 pop {r4, r5, pc}
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES );
813c: eb000ea0 bl bbc4 <__errno> <== NOT EXECUTED 8140: e3a0300d mov r3, #13 <== NOT EXECUTED 8144: e5803000 str r3, [r0] <== NOT EXECUTED 8148: e3e00000 mvn r0, #0 <== NOT EXECUTED 814c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
000080d0 <IMFS_evaluate_permission>: /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
80d0: e5903000 ldr r3, [r0] <== NOT EXECUTED 80d4: e5933030 ldr r3, [r3, #48] ; 0x30 <== NOT EXECUTED 80d8: e1a01301 lsl r1, r1, #6 <== NOT EXECUTED 80dc: e0013003 and r3, r1, r3 <== NOT EXECUTED
return 1; return 0; }
80e0: e1530001 cmp r3, r1 <== NOT EXECUTED 80e4: 13a00000 movne r0, #0 <== NOT EXECUTED 80e8: 03a00001 moveq r0, #1 <== NOT EXECUTED 80ec: e12fff1e bx lr <== NOT EXECUTED
00008154 <IMFS_evaluate_sym_link>: int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8154: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
8158: e590e000 ldr lr, [r0]
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK )
815c: e59e304c ldr r3, [lr, #76] ; 0x4c 8160: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8164: e1a04000 mov r4, r0 8168: e1a05001 mov r5, r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000);
816c: 159f00c4 ldrne r0, [pc, #196] ; 8238 <IMFS_evaluate_sym_link+0xe4>
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8170: 1a000003 bne 8184 <IMFS_evaluate_sym_link+0x30> rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent )
8174: e59e3008 ldr r3, [lr, #8] 8178: e3530000 cmp r3, #0
817c: 1a000001 bne 8188 <IMFS_evaluate_sym_link+0x34> rtems_fatal_error_occurred( 0xBAD00000 );
8180: e59f00b4 ldr r0, [pc, #180] ; 823c <IMFS_evaluate_sym_link+0xe8><== NOT EXECUTED 8184: ebfff3ca bl 50b4 <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;
8188: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
818c: e59e3050 ldr r3, [lr, #80] ; 0x50 8190: e5d33000 ldrb r3, [r3] 8194: e353002f cmp r3, #47 ; 0x2f 8198: 1353005c cmpne r3, #92 ; 0x5c 819c: 13a06000 movne r6, #0 81a0: 03a06001 moveq r6, #1
81a4: 0a000001 beq 81b0 <IMFS_evaluate_sym_link+0x5c>
81a8: e3530000 cmp r3, #0
81ac: 1a000008 bne 81d4 <IMFS_evaluate_sym_link+0x80>
81b0: e59f3088 ldr r3, [pc, #136] ; 8240 <IMFS_evaluate_sym_link+0xec> 81b4: e593c000 ldr ip, [r3] 81b8: e28cc018 add ip, ip, #24 81bc: e8bc000f ldm ip!, {r0, r1, r2, r3} 81c0: e1a06004 mov r6, r4 81c4: e8a6000f stmia r6!, {r0, r1, r2, r3} 81c8: e59c2000 ldr r2, [ip] 81cc: e5862000 str r2, [r6] 81d0: e3a06001 mov r6, #1
* Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ),
81d4: e59e3050 ldr r3, [lr, #80] ; 0x50 81d8: e0836006 add r6, r3, r6 81dc: e1a00006 mov r0, r6 81e0: eb001268 bl cb88 <strlen>
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
81e4: e1a02005 mov r2, r5
&jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ),
81e8: e1a01000 mov r1, r0
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
81ec: e1a03004 mov r3, r4 81f0: e1a00006 mov r0, r6 81f4: eb000012 bl 8244 <IMFS_eval_path> 81f8: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node );
81fc: e1a00004 mov r0, r4 8200: ebffff94 bl 8058 <IMFS_Set_handlers>
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
8204: e5943000 ldr r3, [r4] 8208: e5933030 ldr r3, [r3, #48] ; 0x30
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
820c: e1a05305 lsl r5, r5, #6
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
8210: e0053003 and r3, r5, r3 8214: e1530005 cmp r3, r5
8218: 1a000001 bne 8224 <IMFS_evaluate_sym_link+0xd0> if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
821c: e1a00006 mov r0, r6 8220: e8bd8070 pop {r4, r5, r6, pc}
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES );
8224: eb000e66 bl bbc4 <__errno> <== NOT EXECUTED 8228: e3a0300d mov r3, #13 <== NOT EXECUTED 822c: e5803000 str r3, [r0] <== NOT EXECUTED 8230: e3e06000 mvn r6, #0 <== NOT EXECUTED 8234: eafffff8 b 821c <IMFS_evaluate_sym_link+0xc8> <== NOT EXECUTED
00008934 <IMFS_fifo_close>: } int IMFS_fifo_close( rtems_libio_t *iop ) {
8934: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8938: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
893c: e1a01000 mov r1, r0 <== NOT EXECUTED
} int IMFS_fifo_close( rtems_libio_t *iop ) {
8940: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop);
8944: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 8948: eb0007e3 bl a8dc <pipe_release> <== NOT EXECUTED
if (! err) {
894c: e2506000 subs r6, r0, #0 <== NOT EXECUTED 8950: 1a00000c bne 8988 <IMFS_fifo_close+0x54> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
8954: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8958: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 895c: 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)
8960: e1a00004 mov r0, r4 <== NOT EXECUTED 8964: eb0001f3 bl 9138 <rtems_libio_is_file_open> <== NOT EXECUTED 8968: e3500000 cmp r0, #0 <== NOT EXECUTED 896c: 1a00000a bne 899c <IMFS_fifo_close+0x68> <== NOT EXECUTED 8970: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 8974: e3530000 cmp r3, #0 <== NOT EXECUTED 8978: 1a000007 bne 899c <IMFS_fifo_close+0x68> <== NOT EXECUTED
free(jnode);
897c: e1a00004 mov r0, r4 <== NOT EXECUTED 8980: ebffe3f0 bl 1948 <free> <== NOT EXECUTED 8984: ea000004 b 899c <IMFS_fifo_close+0x68> <== NOT EXECUTED
} IMFS_FIFO_RETURN(err);
8988: aa000003 bge 899c <IMFS_fifo_close+0x68> <== NOT EXECUTED 898c: eb000c8c bl bbc4 <__errno> <== NOT EXECUTED 8990: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 8994: e5806000 str r6, [r0] <== NOT EXECUTED 8998: e3e06000 mvn r6, #0 <== NOT EXECUTED
}
899c: e1a00006 mov r0, r6 <== NOT EXECUTED 89a0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000881c <IMFS_fifo_ioctl>: void *buffer ) { int err; if (command == FIONBIO) {
881c: e59f3068 ldr r3, [pc, #104] ; 888c <IMFS_fifo_ioctl+0x70> <== NOT EXECUTED 8820: e1510003 cmp r1, r3 <== NOT EXECUTED
int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
8824: e92d4010 push {r4, lr} <== NOT EXECUTED 8828: e1a03000 mov r3, r0 <== NOT EXECUTED
int err; if (command == FIONBIO) {
882c: 1a00000b bne 8860 <IMFS_fifo_ioctl+0x44> <== NOT EXECUTED
if (buffer == NULL)
8830: e3520000 cmp r2, #0 <== NOT EXECUTED 8834: 03e0400d mvneq r4, #13 <== NOT EXECUTED 8838: 0a00000d beq 8874 <IMFS_fifo_ioctl+0x58> <== NOT EXECUTED
err = -EFAULT; else { if (*(int *)buffer)
883c: e5924000 ldr r4, [r2] <== NOT EXECUTED 8840: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 8844: e3540000 cmp r4, #0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
8848: 13822001 orrne r2, r2, #1 <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
884c: 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;
8850: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 8854: 13a04000 movne r4, #0 <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
8858: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 885c: ea000008 b 8884 <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED
return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
8860: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 8864: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 8868: eb000736 bl a548 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
886c: e2504000 subs r4, r0, #0 <== NOT EXECUTED 8870: aa000003 bge 8884 <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED 8874: eb000cd2 bl bbc4 <__errno> <== NOT EXECUTED 8878: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 887c: e5804000 str r4, [r0] <== NOT EXECUTED 8880: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
8884: e1a00004 mov r0, r4 <== NOT EXECUTED 8888: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000087d4 <IMFS_fifo_lseek>: rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
87d4: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
87d8: e58d0000 str r0, [sp] <== NOT EXECUTED 87dc: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 87e0: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 87e4: eb00073d bl a4e0 <pipe_lseek> <== NOT EXECUTED 87e8: e1a03000 mov r3, r0 <== NOT EXECUTED 87ec: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
87f0: 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);
87f4: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
87f8: aa000004 bge 8810 <IMFS_fifo_lseek+0x3c> <== NOT EXECUTED 87fc: eb000cf0 bl bbc4 <__errno> <== NOT EXECUTED 8800: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 8804: e5805000 str r5, [r0] <== NOT EXECUTED 8808: e3e03000 mvn r3, #0 <== NOT EXECUTED 880c: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
8810: e1a01004 mov r1, r4 <== NOT EXECUTED 8814: e1a00003 mov r0, r3 <== NOT EXECUTED 8818: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
000088e4 <IMFS_fifo_read>: ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
88e4: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
88e8: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
88ec: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
88f0: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 88f4: eb00078f bl a738 <pipe_read> <== NOT EXECUTED
if (err > 0)
88f8: e2505000 subs r5, r0, #0 <== NOT EXECUTED 88fc: da000005 ble 8918 <IMFS_fifo_read+0x34> <== NOT EXECUTED
IMFS_update_atime(jnode);
8900: e1a0000d mov r0, sp <== NOT EXECUTED 8904: e3a01000 mov r1, #0 <== NOT EXECUTED 8908: eb0001e0 bl 9090 <gettimeofday> <== NOT EXECUTED 890c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 8910: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 8914: ea000004 b 892c <IMFS_fifo_read+0x48> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
8918: 0a000003 beq 892c <IMFS_fifo_read+0x48> <== NOT EXECUTED 891c: eb000ca8 bl bbc4 <__errno> <== NOT EXECUTED 8920: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 8924: e5805000 str r5, [r0] <== NOT EXECUTED 8928: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
892c: e1a00005 mov r0, r5 <== NOT EXECUTED 8930: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00008890 <IMFS_fifo_write>: ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
8890: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8894: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
8898: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
889c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 88a0: eb000740 bl a5a8 <pipe_write> <== NOT EXECUTED
if (err > 0) {
88a4: e2505000 subs r5, r0, #0 <== NOT EXECUTED 88a8: da000006 ble 88c8 <IMFS_fifo_write+0x38> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
88ac: e1a0000d mov r0, sp <== NOT EXECUTED 88b0: e3a01000 mov r1, #0 <== NOT EXECUTED 88b4: eb0001f5 bl 9090 <gettimeofday> <== NOT EXECUTED 88b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 88bc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 88c0: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 88c4: ea000004 b 88dc <IMFS_fifo_write+0x4c> <== NOT EXECUTED
} IMFS_FIFO_RETURN(err);
88c8: 0a000003 beq 88dc <IMFS_fifo_write+0x4c> <== NOT EXECUTED 88cc: eb000cbc bl bbc4 <__errno> <== NOT EXECUTED 88d0: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 88d4: e5805000 str r5, [r0] <== NOT EXECUTED 88d8: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
88dc: e1a00005 mov r0, r5 <== NOT EXECUTED 88e0: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
0000d558 <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 ) {
d558: 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;
d55c: e1a0c000 mov ip, r0 d560: 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 ) {
d564: e1a05000 mov r5, r0 d568: 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;
d56c: e8bc000f ldm ip!, {r0, r1, r2, r3} d570: e1a0e00d mov lr, sp d574: e8ae000f stmia lr!, {r0, r1, r2, r3} d578: e59c3000 ldr r3, [ip] d57c: e58e3000 str r3, [lr]
/* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL;
d580: e3a03000 mov r3, #0 d584: e585301c str r3, [r5, #28]
do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
d588: e1a0500d mov r5, sp d58c: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode;
d590: e58d4000 str r4, [sp]
*/ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent;
d594: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
d598: ebfffd8c bl cbd0 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
d59c: e594204c ldr r2, [r4, #76] ; 0x4c d5a0: e3520001 cmp r2, #1
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
d5a4: e2843054 add r3, r4, #84 ; 0x54
d5a8: 1a000002 bne d5b8 <IMFS_fsunmount+0x60>
d5ac: e5942050 ldr r2, [r4, #80] ; 0x50 d5b0: e1520003 cmp r2, r3
d5b4: 1a000005 bne d5d0 <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 );
d5b8: e3a00000 mov r0, #0 d5bc: e1a0100d mov r1, sp d5c0: ebffd461 bl 274c <IMFS_unlink>
if (result != 0)
d5c4: e3500000 cmp r0, #0
d5c8: 1a00000c bne d600 <IMFS_fsunmount+0xa8>
d5cc: e1a04006 mov r4, r6
return -1; jnode = next; } if ( jnode != NULL ) {
d5d0: e3540000 cmp r4, #0
d5d4: 0a00000b beq d608 <IMFS_fsunmount+0xb0> if ( jnode->type == IMFS_DIRECTORY ) {
d5d8: e594304c ldr r3, [r4, #76] ; 0x4c d5dc: e3530001 cmp r3, #1
d5e0: 1affffe9 bne d58c <IMFS_fsunmount+0x34>
d5e4: e5943050 ldr r3, [r4, #80] ; 0x50 d5e8: e2842054 add r2, r4, #84 ; 0x54 d5ec: e1530002 cmp r3, r2
d5f0: 0affffe5 beq d58c <IMFS_fsunmount+0x34> if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL);
d5f4: e2534000 subs r4, r3, #0
d5f8: 1affffe3 bne d58c <IMFS_fsunmount+0x34>
d5fc: ea000001 b d608 <IMFS_fsunmount+0xb0> <== NOT EXECUTED d600: e3e00000 mvn r0, #0 <== NOT EXECUTED d604: ea000000 b d60c <IMFS_fsunmount+0xb4> <== NOT EXECUTED
d608: e3a00000 mov r0, #0
return 0; }
d60c: e28dd014 add sp, sp, #20 d610: e8bd8070 pop {r4, r5, r6, pc}
00008b40 <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,
8b40: e59fc0d4 ldr ip, [pc, #212] ; 8c1c <IMFS_initialize_support+0xdc> 8b44: 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 ) {
8b48: e92d41f0 push {r4, r5, r6, r7, r8, lr} 8b4c: e1a08002 mov r8, r2 8b50: e1a06003 mov r6, r3 8b54: e1a04000 mov r4, r0 8b58: 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,
8b5c: e3a02000 mov r2, #0 8b60: 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) {
8b64: e153000c cmp r3, ip 8b68: e2822001 add r2, r2, #1
8b6c: 0a000003 beq 8b80 <IMFS_initialize_support+0x40>
8b70: e3520006 cmp r2, #6 8b74: e1a03083 lsl r3, r3, #1
8b78: 1afffff9 bne 8b64 <IMFS_initialize_support+0x24>
8b7c: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid)
8b80: e59f5098 ldr r5, [pc, #152] ; 8c20 <IMFS_initialize_support+0xe0> 8b84: 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();
8b88: eb00087f bl ad8c <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;
8b8c: e59fe090 ldr lr, [pc, #144] ; 8c24 <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();
8b90: 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;
8b94: e8be000f ldm lr!, {r0, r1, r2, r3} 8b98: e284c038 add ip, r4, #56 ; 0x38 8b9c: e8ac000f stmia ip!, {r0, r1, r2, r3} 8ba0: e8be000f ldm lr!, {r0, r1, r2, r3} 8ba4: e8ac000f stmia ip!, {r0, r1, r2, r3} 8ba8: 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;
8bac: e5847028 str r7, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
8bb0: 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;
8bb4: 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 ) );
8bb8: e3a00001 mov r0, #1 8bbc: e3a01010 mov r1, #16 8bc0: eb0000bc bl 8eb8 <calloc>
if ( !fs_info ) {
8bc4: e3500000 cmp r0, #0
8bc8: 1a000006 bne 8be8 <IMFS_initialize_support+0xa8> free(temp_mt_entry->mt_fs_root.node_access);
8bcc: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 8bd0: ebffe35c bl 1948 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
8bd4: eb000bfa bl bbc4 <__errno> <== NOT EXECUTED 8bd8: e3a0300c mov r3, #12 <== NOT EXECUTED 8bdc: e5803000 str r3, [r0] <== NOT EXECUTED 8be0: e3e00000 mvn r0, #0 <== NOT EXECUTED 8be4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8be8: 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;
8bec: e594101c ldr r1, [r4, #28]
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1;
8bf0: e3a03001 mov r3, #1
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8bf4: e880000c stm r0, {r2, r3}
fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers;
8bf8: 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;
8bfc: e5808008 str r8, [r0, #8]
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8c00: 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;
8c04: 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;
8c08: e5813038 str r3, [r1, #56] ; 0x38
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8c0c: 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();
8c10: eb000634 bl a4e8 <rtems_pipe_initialize> 8c14: e3a00000 mov r0, #0
return 0; }
8c18: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00002454 <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 */ ) {
2454: e92d4070 push {r4, r5, r6, lr}
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
2458: 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 */ ) {
245c: e24dd048 sub sp, sp, #72 ; 0x48
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
2460: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
2464: e1d333b4 ldrh r3, [r3, #52] ; 0x34 2468: 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 */ ) {
246c: e1a05001 mov r5, r1 2470: 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 ) 2474: 9a000002 bls 2484 <IMFS_link+0x30> rtems_set_errno_and_return_minus_one( EMLINK );
2478: eb0039e7 bl 10c1c <__errno> 247c: e3a0301f mov r3, #31 2480: ea000012 b 24d0 <IMFS_link+0x7c>
/* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i );
2484: e1a00002 mov r0, r2 2488: eb003dbc bl 11b80 <strlen> 248c: e28d4004 add r4, sp, #4 2490: e1a01000 mov r1, r0 2494: e1a02004 mov r2, r4 2498: e28d3044 add r3, sp, #68 ; 0x44 249c: e1a00006 mov r0, r6 24a0: eb002c83 bl d6b4 <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(
24a4: e28dc028 add ip, sp, #40 ; 0x28 24a8: e1a00005 mov r0, r5 24ac: e1a02004 mov r2, r4 24b0: e3a01003 mov r1, #3 24b4: e59f3054 ldr r3, [pc, #84] ; 2510 <IMFS_link+0xbc> 24b8: e58dc000 str ip, [sp] 24bc: eb002974 bl ca94 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node )
24c0: e3500000 cmp r0, #0
24c4: 1a000004 bne 24dc <IMFS_link+0x88> rtems_set_errno_and_return_minus_one( ENOMEM );
24c8: eb0039d3 bl 10c1c <__errno> <== NOT EXECUTED 24cc: e3a0300c mov r3, #12 <== NOT EXECUTED
24d0: e5803000 str r3, [r0] 24d4: e3e00000 mvn r0, #0 24d8: ea00000a b 2508 <IMFS_link+0xb4>
/* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++;
24dc: e59d3028 ldr r3, [sp, #40] ; 0x28 24e0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 24e4: e2822001 add r2, r2, #1 24e8: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
24ec: e28d003c add r0, sp, #60 ; 0x3c 24f0: e3a01000 mov r1, #0 24f4: eb000240 bl 2dfc <gettimeofday> 24f8: e59d203c ldr r2, [sp, #60] ; 0x3c 24fc: e59d3028 ldr r3, [sp, #40] ; 0x28 2500: e5832048 str r2, [r3, #72] ; 0x48 2504: e3a00000 mov r0, #0
return 0; }
2508: e28dd048 add sp, sp, #72 ; 0x48 250c: e8bd8070 pop {r4, r5, r6, pc}
0000f8fc <IMFS_memfile_addblock>: ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode );
f8fc: e2503000 subs r3, r0, #0
MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) {
f900: e92d4030 push {r4, r5, lr}
block_p memory; block_p *block_entry_ptr; assert( the_jnode );
f904: 059f0060 ldreq r0, [pc, #96] ; f96c <IMFS_memfile_addblock+0x70> f908: 059f1060 ldreq r1, [pc, #96] ; f970 <IMFS_memfile_addblock+0x74> f90c: 059f2060 ldreq r2, [pc, #96] ; f974 <IMFS_memfile_addblock+0x78> f910: 059f3060 ldreq r3, [pc, #96] ; f978 <IMFS_memfile_addblock+0x7c>
f914: 0a000006 beq f934 <IMFS_memfile_addblock+0x38> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
f918: e593304c ldr r3, [r3, #76] ; 0x4c f91c: e3530005 cmp r3, #5
f920: 0a000004 beq f938 <IMFS_memfile_addblock+0x3c>
f924: e59f0040 ldr r0, [pc, #64] ; f96c <IMFS_memfile_addblock+0x70><== NOT EXECUTED f928: e59f104c ldr r1, [pc, #76] ; f97c <IMFS_memfile_addblock+0x80><== NOT EXECUTED f92c: e59f2040 ldr r2, [pc, #64] ; f974 <IMFS_memfile_addblock+0x78><== NOT EXECUTED f930: e59f3048 ldr r3, [pc, #72] ; f980 <IMFS_memfile_addblock+0x84><== NOT EXECUTED f934: ebfff7f2 bl d904 <__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 );
f938: e3a02001 mov r2, #1 f93c: ebfffeab bl f3f0 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
f940: e5904000 ldr r4, [r0] f944: 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 );
f948: e1a05000 mov r5, r0
if ( *block_entry_ptr )
f94c: 13a00000 movne r0, #0 f950: 18bd8030 popne {r4, r5, pc}
#if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block();
f954: ebfffe98 bl f3bc <memfile_alloc_block>
if ( !memory )
f958: e3500000 cmp r0, #0
return 1; *block_entry_ptr = memory;
f95c: 15850000 strne r0, [r5]
fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory )
f960: 03a00001 moveq r0, #1
return 1; *block_entry_ptr = memory;
f964: 11a00004 movne r0, r4
return 0; }
f968: e8bd8030 pop {r4, r5, pc}
0000f984 <IMFS_memfile_extend>: MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
f984: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
f988: e2504000 subs r4, r0, #0
MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
f98c: e1a05001 mov r5, r1 f990: e1a06002 mov r6, r2
/* * Perform internal consistency checks */ assert( the_jnode );
f994: 059f0134 ldreq r0, [pc, #308] ; fad0 <IMFS_memfile_extend+0x14c> f998: 059f1134 ldreq r1, [pc, #308] ; fad4 <IMFS_memfile_extend+0x150> f99c: 059f2134 ldreq r2, [pc, #308] ; fad8 <IMFS_memfile_extend+0x154> f9a0: 059f3134 ldreq r3, [pc, #308] ; fadc <IMFS_memfile_extend+0x158>
f9a4: 0a000006 beq f9c4 <IMFS_memfile_extend+0x40> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
f9a8: e594304c ldr r3, [r4, #76] ; 0x4c f9ac: e3530005 cmp r3, #5
f9b0: 0a000004 beq f9c8 <IMFS_memfile_extend+0x44>
f9b4: e59f0114 ldr r0, [pc, #276] ; fad0 <IMFS_memfile_extend+0x14c><== NOT EXECUTED f9b8: e59f1120 ldr r1, [pc, #288] ; fae0 <IMFS_memfile_extend+0x15c><== NOT EXECUTED f9bc: e59f2114 ldr r2, [pc, #276] ; fad8 <IMFS_memfile_extend+0x154><== NOT EXECUTED f9c0: e59f311c ldr r3, [pc, #284] ; fae4 <IMFS_memfile_extend+0x160><== NOT EXECUTED f9c4: ebfff7ce bl d904 <__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 )
f9c8: e59f3118 ldr r3, [pc, #280] ; fae8 <IMFS_memfile_extend+0x164> f9cc: e593b000 ldr fp, [r3] f9d0: e1a0312b lsr r3, fp, #2 f9d4: e2832001 add r2, r3, #1 f9d8: e0010293 mul r1, r3, r2 f9dc: e2811001 add r1, r1, #1 f9e0: e0020193 mul r2, r3, r1 f9e4: e3a03000 mov r3, #0 f9e8: e1530006 cmp r3, r6 f9ec: e2422001 sub r2, r2, #1 f9f0: e003029b mul r3, fp, r2
f9f4: ca000005 bgt fa10 <IMFS_memfile_extend+0x8c> f9f8: 1a000001 bne fa04 <IMFS_memfile_extend+0x80>
f9fc: e1530005 cmp r3, r5
fa00: 8a000002 bhi fa10 <IMFS_memfile_extend+0x8c> rtems_set_errno_and_return_minus_one( EINVAL );
fa04: eb000484 bl 10c1c <__errno> <== NOT EXECUTED fa08: e3a03016 mov r3, #22 <== NOT EXECUTED fa0c: ea000025 b faa8 <IMFS_memfile_extend+0x124> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
fa10: e5948054 ldr r8, [r4, #84] ; 0x54 fa14: e1560008 cmp r6, r8 fa18: e5947050 ldr r7, [r4, #80] ; 0x50
fa1c: ca000002 bgt fa2c <IMFS_memfile_extend+0xa8> fa20: 1a000028 bne fac8 <IMFS_memfile_extend+0x144>
fa24: e1550007 cmp r5, r7
fa28: 9a000026 bls fac8 <IMFS_memfile_extend+0x144> /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
fa2c: e1a0cfcb asr ip, fp, #31 fa30: e1a0300c mov r3, ip fa34: e1a0200b mov r2, fp fa38: e1a00005 mov r0, r5 fa3c: e1a01006 mov r1, r6 fa40: e58dc000 str ip, [sp] fa44: eb002ce2 bl 1add4 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
fa48: e59dc000 ldr ip, [sp] fa4c: e1a01008 mov r1, r8
/* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
fa50: e1a0a000 mov sl, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
fa54: e1a0200b mov r2, fp fa58: e1a00007 mov r0, r7 fa5c: e1a0300c mov r3, ip fa60: eb002cdb bl 1add4 <__divdi3> fa64: e1a08000 mov r8, r0 fa68: e1a07000 mov r7, r0
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
fa6c: ea000011 b fab8 <IMFS_memfile_extend+0x134>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
fa70: e1a00004 mov r0, r4 fa74: e1a01007 mov r1, r7 fa78: ebffff9f bl f8fc <IMFS_memfile_addblock> fa7c: e3500000 cmp r0, #0
fa80: 0a00000b beq fab4 <IMFS_memfile_extend+0x130>
fa84: ea000003 b fa98 <IMFS_memfile_extend+0x114> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block );
fa88: e1a01007 mov r1, r7 <== NOT EXECUTED fa8c: e1a00004 mov r0, r4 <== NOT EXECUTED fa90: ebfffefa bl f680 <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-- ) {
fa94: e2477001 sub r7, r7, #1 <== NOT EXECUTED fa98: e1570008 cmp r7, r8 <== NOT EXECUTED fa9c: 2afffff9 bcs fa88 <IMFS_memfile_extend+0x104> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC );
faa0: eb00045d bl 10c1c <__errno> <== NOT EXECUTED faa4: e3a0301c mov r3, #28 <== NOT EXECUTED faa8: e5803000 str r3, [r0] <== NOT EXECUTED faac: e3e00000 mvn r0, #0 <== NOT EXECUTED fab0: ea000005 b facc <IMFS_memfile_extend+0x148> <== NOT EXECUTED
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
fab4: e2877001 add r7, r7, #1 fab8: e157000a cmp r7, sl
fabc: 9affffeb bls fa70 <IMFS_memfile_extend+0xec> /* * Set the new length of the file. */ the_jnode->info.file.size = new_length;
fac0: e5846054 str r6, [r4, #84] ; 0x54 fac4: e5845050 str r5, [r4, #80] ; 0x50 fac8: e3a00000 mov r0, #0
return 0; }
facc: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc}
0000f3f0 <IMFS_memfile_get_block_pointer>: #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
f3f0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
f3f4: e2504000 subs r4, r0, #0
#endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
f3f8: e1a06001 mov r6, r1 f3fc: e1a08002 mov r8, r2
/* * Perform internal consistency checks */ assert( the_jnode );
f400: 059f01e8 ldreq r0, [pc, #488] ; f5f0 <IMFS_memfile_get_block_pointer+0x200> f404: 03a01fe2 moveq r1, #904 ; 0x388 f408: 059f21e4 ldreq r2, [pc, #484] ; f5f4 <IMFS_memfile_get_block_pointer+0x204> f40c: 059f31e4 ldreq r3, [pc, #484] ; f5f8 <IMFS_memfile_get_block_pointer+0x208>
f410: 0a000006 beq f430 <IMFS_memfile_get_block_pointer+0x40> if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE );
f414: e594304c ldr r3, [r4, #76] ; 0x4c f418: e3530005 cmp r3, #5
f41c: 0a000004 beq f434 <IMFS_memfile_get_block_pointer+0x44>
f420: e59f01c8 ldr r0, [pc, #456] ; f5f0 <IMFS_memfile_get_block_pointer+0x200><== NOT EXECUTED f424: e59f21c8 ldr r2, [pc, #456] ; f5f4 <IMFS_memfile_get_block_pointer+0x204><== NOT EXECUTED f428: e59f31cc ldr r3, [pc, #460] ; f5fc <IMFS_memfile_get_block_pointer+0x20c><== NOT EXECUTED f42c: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED f430: ebfff933 bl d904 <__assert_func> <== NOT EXECUTED
/* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) {
f434: e59f31c4 ldr r3, [pc, #452] ; f600 <IMFS_memfile_get_block_pointer+0x210> f438: e5935000 ldr r5, [r3] f43c: e1a05125 lsr r5, r5, #2 f440: e2453001 sub r3, r5, #1 f444: e1510003 cmp r1, r3
f448: 8a00000e bhi f488 <IMFS_memfile_get_block_pointer+0x98> fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) {
f44c: e3520000 cmp r2, #0
if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect;
f450: e5940058 ldr r0, [r4, #88] ; 0x58
if ( malloc_it ) { f454: 0a000007 beq f478 <IMFS_memfile_get_block_pointer+0x88> if ( !p ) {
f458: e3500000 cmp r0, #0
f45c: 1a000003 bne f470 <IMFS_memfile_get_block_pointer+0x80> p = memfile_alloc_block();
f460: ebffffd5 bl f3bc <memfile_alloc_block>
if ( !p )
f464: e3500000 cmp r0, #0
f468: 0a00005e beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> return 0; info->indirect = p;
f46c: e5840058 str r0, [r4, #88] ; 0x58
} return &info->indirect[ my_block ];
f470: e5940058 ldr r0, [r4, #88] ; 0x58 f474: ea000001 b f480 <IMFS_memfile_get_block_pointer+0x90>
} if ( !p )
f478: e3500000 cmp r0, #0
f47c: 0a000059 beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> return 0; return &info->indirect[ my_block ];
f480: e0800106 add r0, r0, r6, lsl #2 f484: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) {
f488: e2852001 add r2, r5, #1 <== NOT EXECUTED f48c: e0030295 mul r3, r5, r2 <== NOT EXECUTED f490: e2432001 sub r2, r3, #1 <== NOT EXECUTED f494: e1510002 cmp r1, r2 <== NOT EXECUTED f498: 8a00001b bhi f50c <IMFS_memfile_get_block_pointer+0x11c> <== NOT EXECUTED
#if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT;
f49c: e0656001 rsb r6, r5, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
f4a0: e1a00006 mov r0, r6 <== NOT EXECUTED f4a4: e1a01005 mov r1, r5 <== NOT EXECUTED f4a8: eb002b9c bl 1a320 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
f4ac: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
f4b0: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
f4b4: e1a00006 mov r0, r6 <== NOT EXECUTED f4b8: eb002b04 bl 1a0d0 <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect; if ( malloc_it ) {
f4bc: 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;
f4c0: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->doubly_indirect;
f4c4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( malloc_it ) {
f4c8: 0a000009 beq f4f4 <IMFS_memfile_get_block_pointer+0x104> <== NOT EXECUTED
if ( !p ) {
f4cc: e3530000 cmp r3, #0 <== NOT EXECUTED f4d0: 1a000003 bne f4e4 <IMFS_memfile_get_block_pointer+0xf4> <== NOT EXECUTED
p = memfile_alloc_block();
f4d4: ebffffb8 bl f3bc <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
f4d8: e2503000 subs r3, r0, #0 <== NOT EXECUTED f4dc: 0a000041 beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; info->doubly_indirect = p;
f4e0: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
} p1 = (block_p *)p[ doubly ];
f4e4: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED f4e8: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
f4ec: e3500000 cmp r0, #0 <== NOT EXECUTED f4f0: ea00002e b f5b0 <IMFS_memfile_get_block_pointer+0x1c0> <== NOT EXECUTED
} return (block_p *)&p1[ singly ]; } if ( !p )
f4f4: e3530000 cmp r3, #0 <== NOT EXECUTED f4f8: 0a00003a beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; p = (block_p *)p[ doubly ];
f4fc: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
if ( !p )
f500: e3500000 cmp r0, #0 <== NOT EXECUTED f504: 1a000035 bne f5e0 <IMFS_memfile_get_block_pointer+0x1f0> <== NOT EXECUTED f508: ea000036 b f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
#endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) {
f50c: e2831001 add r1, r3, #1 <== NOT EXECUTED f510: e0020195 mul r2, r5, r1 <== NOT EXECUTED f514: e2422001 sub r2, r2, #1 <== NOT EXECUTED f518: e1560002 cmp r6, r2 <== NOT EXECUTED f51c: 8a000031 bhi f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
f520: e0636006 rsb r6, r3, r6 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
f524: e1a01005 mov r1, r5 <== NOT EXECUTED f528: e1a00006 mov r0, r6 <== NOT EXECUTED f52c: eb002b7b bl 1a320 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
f530: e1a01005 mov r1, r5 <== NOT EXECUTED
*/ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
f534: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
f538: e1a00006 mov r0, r6 <== NOT EXECUTED f53c: eb002ae3 bl 1a0d0 <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
f540: 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;
f544: e1a06000 mov r6, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
f548: eb002ae0 bl 1a0d0 <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
f54c: 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;
f550: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
f554: e1a00006 mov r0, r6 <== NOT EXECUTED f558: eb002b70 bl 1a320 <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect; if ( malloc_it ) {
f55c: 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;
f560: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->triply_indirect;
f564: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if ( malloc_it ) {
f568: 0a000016 beq f5c8 <IMFS_memfile_get_block_pointer+0x1d8> <== NOT EXECUTED
if ( !p ) {
f56c: e3530000 cmp r3, #0 <== NOT EXECUTED f570: 1a000003 bne f584 <IMFS_memfile_get_block_pointer+0x194> <== NOT EXECUTED
p = memfile_alloc_block();
f574: ebffff90 bl f3bc <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
f578: e2503000 subs r3, r0, #0 <== NOT EXECUTED f57c: 0a000019 beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; info->triply_indirect = p;
f580: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED
} p1 = (block_p *) p[ triply ];
f584: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
f588: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ];
f58c: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
f590: 1a000003 bne f5a4 <IMFS_memfile_get_block_pointer+0x1b4> <== NOT EXECUTED
p1 = memfile_alloc_block();
f594: ebffff88 bl f3bc <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
f598: e2502000 subs r2, r0, #0 <== NOT EXECUTED f59c: 0a000011 beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; p[ triply ] = (block_p) p1;
f5a0: e5872000 str r2, [r7] <== NOT EXECUTED
} p2 = (block_p *)p1[ doubly ];
f5a4: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED f5a8: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED
if ( !p2 ) {
f5ac: e3500000 cmp r0, #0 <== NOT EXECUTED f5b0: 1a00000a bne f5e0 <IMFS_memfile_get_block_pointer+0x1f0> <== NOT EXECUTED
p2 = memfile_alloc_block();
f5b4: ebffff80 bl f3bc <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
f5b8: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0; p1[ doubly ] = (block_p) p2;
f5bc: 15850000 strne r0, [r5] <== NOT EXECUTED
} p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 )
f5c0: 1a000006 bne f5e0 <IMFS_memfile_get_block_pointer+0x1f0> <== NOT EXECUTED f5c4: ea000007 b f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p )
f5c8: e3530000 cmp r3, #0 <== NOT EXECUTED f5cc: 0a000005 beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== 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 ];
f5d0: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 )
f5d4: e3530000 cmp r3, #0 <== NOT EXECUTED f5d8: 0a000002 beq f5e8 <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
f5dc: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED f5e0: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED f5e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED f5e8: e3a00000 mov r0, #0 <== NOT EXECUTED
/* * This means the requested block number is out of range. */ return 0; }
f5ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0000ff0c <IMFS_memfile_read>: IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
ff0c: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
ff10: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
ff14: e1a06003 mov r6, r3 ff18: e1a08001 mov r8, r1 ff1c: e1a09002 mov r9, r2 ff20: e59d7030 ldr r7, [sp, #48] ; 0x30
/* * Perform internal consistency checks */ assert( the_jnode );
ff24: 059f024c ldreq r0, [pc, #588] ; 10178 <IMFS_memfile_read+0x26c> ff28: 03a01f93 moveq r1, #588 ; 0x24c ff2c: 059f2248 ldreq r2, [pc, #584] ; 1017c <IMFS_memfile_read+0x270> ff30: 059f3248 ldreq r3, [pc, #584] ; 10180 <IMFS_memfile_read+0x274>
ff34: 0a000007 beq ff58 <IMFS_memfile_read+0x4c> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ||
ff38: e594304c ldr r3, [r4, #76] ; 0x4c ff3c: e2432005 sub r2, r3, #5 ff40: e3520001 cmp r2, #1
ff44: 9a000004 bls ff5c <IMFS_memfile_read+0x50>
ff48: e59f0228 ldr r0, [pc, #552] ; 10178 <IMFS_memfile_read+0x26c><== NOT EXECUTED ff4c: e59f1230 ldr r1, [pc, #560] ; 10184 <IMFS_memfile_read+0x278><== NOT EXECUTED ff50: e59f2224 ldr r2, [pc, #548] ; 1017c <IMFS_memfile_read+0x270><== NOT EXECUTED ff54: e59f322c ldr r3, [pc, #556] ; 10188 <IMFS_memfile_read+0x27c><== NOT EXECUTED ff58: ebfff669 bl d904 <__assert_func> <== NOT EXECUTED
/* * Error checks on arguments */ assert( dest );
ff5c: e3560000 cmp r6, #0 ff60: 059f0210 ldreq r0, [pc, #528] ; 10178 <IMFS_memfile_read+0x26c> ff64: 059f1220 ldreq r1, [pc, #544] ; 1018c <IMFS_memfile_read+0x280> ff68: 059f220c ldreq r2, [pc, #524] ; 1017c <IMFS_memfile_read+0x270> ff6c: 059f321c ldreq r3, [pc, #540] ; 10190 <IMFS_memfile_read+0x284>
ff70: 0afffff8 beq ff58 <IMFS_memfile_read+0x4c> /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length )
ff74: e3570000 cmp r7, #0
ff78: 1a000004 bne ff90 <IMFS_memfile_read+0x84> rtems_set_errno_and_return_minus_one( EINVAL );
ff7c: eb000326 bl 10c1c <__errno> <== NOT EXECUTED ff80: e3a03016 mov r3, #22 <== NOT EXECUTED ff84: e5803000 str r3, [r0] <== NOT EXECUTED ff88: e3e07000 mvn r7, #0 <== NOT EXECUTED ff8c: ea000077 b 10170 <IMFS_memfile_read+0x264> <== NOT EXECUTED
/* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) {
ff90: e3530006 cmp r3, #6
ff94: 1a000012 bne ffe4 <IMFS_memfile_read+0xd8> unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start))
ff98: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED ff9c: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED ffa0: e1a0200a mov r2, sl <== NOT EXECUTED ffa4: e1a0300b mov r3, fp <== NOT EXECUTED ffa8: e3a01000 mov r1, #0 <== NOT EXECUTED ffac: e0522008 subs r2, r2, r8 <== NOT EXECUTED ffb0: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED ffb4: e1510003 cmp r1, r3 <== 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;
ffb8: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
ffbc: ca000002 bgt ffcc <IMFS_memfile_read+0xc0> <== NOT EXECUTED ffc0: 1a000002 bne ffd0 <IMFS_memfile_read+0xc4> <== NOT EXECUTED ffc4: e1570002 cmp r7, r2 <== NOT EXECUTED ffc8: 9a000000 bls ffd0 <IMFS_memfile_read+0xc4> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
ffcc: e068700a rsb r7, r8, sl <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
ffd0: e0811008 add r1, r1, r8 <== NOT EXECUTED ffd4: e1a00006 mov r0, r6 <== NOT EXECUTED ffd8: e1a02007 mov r2, r7 <== NOT EXECUTED ffdc: eb00051c bl 11454 <memcpy> <== NOT EXECUTED ffe0: ea00005d b 1015c <IMFS_memfile_read+0x250> <== 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 )
ffe4: e5943054 ldr r3, [r4, #84] ; 0x54 ffe8: e3a02000 mov r2, #0 ffec: e1520003 cmp r2, r3 fff0: 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;
fff4: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
fff8: e0872001 add r2, r7, r1
fffc: ca000004 bgt 10014 <IMFS_memfile_read+0x108> 10000: 1a000001 bne 1000c <IMFS_memfile_read+0x100>
10004: e1520005 cmp r2, r5
10008: 8a000001 bhi 10014 <IMFS_memfile_read+0x108>
1000c: e1a05007 mov r5, r7 10010: ea000000 b 10018 <IMFS_memfile_read+0x10c>
my_length = the_jnode->info.file.size - start;
10014: e0635005 rsb r5, r3, r5
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10018: e59f3174 ldr r3, [pc, #372] ; 10194 <IMFS_memfile_read+0x288> 1001c: e593a000 ldr sl, [r3] 10020: e1a0b00a mov fp, sl 10024: e1a0cfcb asr ip, fp, #31 10028: e1a0300c mov r3, ip 1002c: e1a00008 mov r0, r8 10030: e1a0200b mov r2, fp 10034: e1a01009 mov r1, r9 10038: e58dc000 str ip, [sp] 1003c: eb002c8e bl 1b27c <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10040: e59dc000 ldr ip, [sp]
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10044: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10048: e1a01009 mov r1, r9 1004c: e1a00008 mov r0, r8 10050: e1a0200b mov r2, fp 10054: e1a0300c mov r3, ip 10058: eb002b5d bl 1add4 <__divdi3>
if ( start_offset ) {
1005c: 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;
10060: e1a08000 mov r8, r0
if ( start_offset ) { 10064: 0a000013 beq 100b8 <IMFS_memfile_read+0x1ac> 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 );
10068: e1a00004 mov r0, r4 1006c: e1a01008 mov r1, r8 10070: e3a02000 mov r2, #0 10074: ebfffcdd bl f3f0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
10078: e3500000 cmp r0, #0 1007c: 059f00f4 ldreq r0, [pc, #244] ; 10178 <IMFS_memfile_read+0x26c> 10080: 059f1110 ldreq r1, [pc, #272] ; 10198 <IMFS_memfile_read+0x28c>
10084: 0a00002c beq 1013c <IMFS_memfile_read+0x230> if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
10088: 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;
1008c: e067a00a rsb sl, r7, sl 10090: e155000a cmp r5, sl 10094: 31a0a005 movcc sl, r5
to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
10098: e0811007 add r1, r1, r7 1009c: e1a00006 mov r0, r6 100a0: e1a0200a mov r2, sl 100a4: eb0004ea bl 11454 <memcpy>
dest += to_copy;
100a8: e086600a add r6, r6, sl
block++;
100ac: e2888001 add r8, r8, #1
my_length -= to_copy;
100b0: e06a5005 rsb r5, sl, r5 100b4: e1a0700a mov r7, sl
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
100b8: e59f30d4 ldr r3, [pc, #212] ; 10194 <IMFS_memfile_read+0x288>
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
100bc: e1a09003 mov r9, r3
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
100c0: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
100c4: ea00000f b 10108 <IMFS_memfile_read+0x1fc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
100c8: e1a00004 mov r0, r4 100cc: e1a01008 mov r1, r8 100d0: e3a02000 mov r2, #0 100d4: ebfffcc5 bl f3f0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
100d8: e3500000 cmp r0, #0 100dc: 059f0094 ldreq r0, [pc, #148] ; 10178 <IMFS_memfile_read+0x26c> 100e0: 059f10b4 ldreq r1, [pc, #180] ; 1019c <IMFS_memfile_read+0x290>
100e4: 0a000014 beq 1013c <IMFS_memfile_read+0x230> if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
100e8: e5901000 ldr r1, [r0] 100ec: e1a0200a mov r2, sl 100f0: e1a00006 mov r0, r6 100f4: eb0004d6 bl 11454 <memcpy>
dest += to_copy;
100f8: e086600a add r6, r6, sl
block++;
100fc: e2888001 add r8, r8, #1
my_length -= to_copy;
10100: e06a5005 rsb r5, sl, r5
copied += to_copy;
10104: 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 ) {
10108: e5993000 ldr r3, [r9] 1010c: e1550003 cmp r5, r3
10110: 2affffec bcs 100c8 <IMFS_memfile_read+0x1bc> * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) {
10114: e3550000 cmp r5, #0
10118: 0a00000f beq 1015c <IMFS_memfile_read+0x250> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1011c: e1a01008 mov r1, r8 10120: e1a00004 mov r0, r4 10124: e3a02000 mov r2, #0 10128: ebfffcb0 bl f3f0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
1012c: e2503000 subs r3, r0, #0
10130: 1a000004 bne 10148 <IMFS_memfile_read+0x23c>
10134: e59f003c ldr r0, [pc, #60] ; 10178 <IMFS_memfile_read+0x26c><== NOT EXECUTED 10138: e59f1060 ldr r1, [pc, #96] ; 101a0 <IMFS_memfile_read+0x294><== NOT EXECUTED 1013c: e59f2038 ldr r2, [pc, #56] ; 1017c <IMFS_memfile_read+0x270><== NOT EXECUTED 10140: e59f305c ldr r3, [pc, #92] ; 101a4 <IMFS_memfile_read+0x298><== NOT EXECUTED 10144: eaffff83 b ff58 <IMFS_memfile_read+0x4c> <== NOT EXECUTED
if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length );
10148: e1a00006 mov r0, r6 1014c: e5931000 ldr r1, [r3] 10150: e1a02005 mov r2, r5 10154: eb0004be bl 11454 <memcpy>
copied += my_length;
10158: e0857007 add r7, r5, r7
} IMFS_update_atime( the_jnode );
1015c: e28d0004 add r0, sp, #4 10160: e3a01000 mov r1, #0 10164: ebffcb24 bl 2dfc <gettimeofday> 10168: e59d3004 ldr r3, [sp, #4] 1016c: e5843040 str r3, [r4, #64] ; 0x40
return copied; }
10170: e1a00007 mov r0, r7 10174: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000f6cc <IMFS_memfile_remove>: */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) {
f6cc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
f6d0: e2504000 subs r4, r0, #0 f6d4: 059f012c ldreq r0, [pc, #300] ; f808 <IMFS_memfile_remove+0x13c> f6d8: 059f112c ldreq r1, [pc, #300] ; f80c <IMFS_memfile_remove+0x140> f6dc: 059f212c ldreq r2, [pc, #300] ; f810 <IMFS_memfile_remove+0x144> f6e0: 059f312c ldreq r3, [pc, #300] ; f814 <IMFS_memfile_remove+0x148>
f6e4: 0a000006 beq f704 <IMFS_memfile_remove+0x38> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
f6e8: e594304c ldr r3, [r4, #76] ; 0x4c f6ec: e3530005 cmp r3, #5
f6f0: 0a000004 beq f708 <IMFS_memfile_remove+0x3c>
f6f4: e59f010c ldr r0, [pc, #268] ; f808 <IMFS_memfile_remove+0x13c><== NOT EXECUTED f6f8: e59f1118 ldr r1, [pc, #280] ; f818 <IMFS_memfile_remove+0x14c><== NOT EXECUTED f6fc: e59f210c ldr r2, [pc, #268] ; f810 <IMFS_memfile_remove+0x144><== NOT EXECUTED f700: e59f3114 ldr r3, [pc, #276] ; f81c <IMFS_memfile_remove+0x150><== NOT EXECUTED f704: ebfff87e bl d904 <__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;
f708: e59f2110 ldr r2, [pc, #272] ; f820 <IMFS_memfile_remove+0x154>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
f70c: 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;
f710: e5925000 ldr r5, [r2]
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
f714: 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;
f718: e1a05125 lsr r5, r5, #2
*/ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free );
f71c: 12840058 addne r0, r4, #88 ; 0x58 f720: 11a01005 movne r1, r5 f724: 1bffffb6 blne f604 <memfile_free_blocks_in_table>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
f728: e594305c ldr r3, [r4, #92] ; 0x5c f72c: e3530000 cmp r3, #0 f730: 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++ ) {
f734: 159f70e4 ldrne r7, [pc, #228] ; f820 <IMFS_memfile_remove+0x154>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f738: 1a000008 bne f760 <IMFS_memfile_remove+0x94>
f73c: ea00000d b f778 <IMFS_memfile_remove+0xac>
} if ( info->doubly_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { if ( info->doubly_indirect[i] ) {
f740: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED f744: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED f748: e3520000 cmp r2, #0 <== NOT EXECUTED f74c: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED
memfile_free_blocks_in_table(
f750: 10830000 addne r0, r3, r0 <== NOT EXECUTED f754: 11a01005 movne r1, r5 <== NOT EXECUTED f758: 1bffffa9 blne f604 <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++ ) {
f75c: e2866001 add r6, r6, #1 <== NOT EXECUTED f760: e5973000 ldr r3, [r7] <== NOT EXECUTED f764: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED f768: 3afffff4 bcc f740 <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 );
f76c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED f770: e1a01005 mov r1, r5 <== NOT EXECUTED f774: ebffffa2 bl f604 <memfile_free_blocks_in_table> <== NOT EXECUTED
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
f778: e5943060 ldr r3, [r4, #96] ; 0x60 f77c: e3530000 cmp r3, #0 f780: 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++ ) {
f784: 159fa094 ldrne sl, [pc, #148] ; f820 <IMFS_memfile_remove+0x154>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f788: 1a000016 bne f7e8 <IMFS_memfile_remove+0x11c>
f78c: ea00001b b f800 <IMFS_memfile_remove+0x134>
} if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { p = (block_p *) info->triply_indirect[i];
f790: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED f794: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
f798: e3570000 cmp r7, #0 <== NOT EXECUTED
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
f79c: 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 */
f7a0: 0a000013 beq f7f4 <IMFS_memfile_remove+0x128> <== NOT EXECUTED f7a4: e3a08000 mov r8, #0 <== NOT EXECUTED f7a8: ea000006 b f7c8 <IMFS_memfile_remove+0xfc> <== NOT EXECUTED
break; for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) { if ( p[j] ) {
f7ac: e5973000 ldr r3, [r7] <== NOT EXECUTED f7b0: e3530000 cmp r3, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
f7b4: 11a00007 movne r0, r7 <== NOT EXECUTED f7b8: 11a01005 movne r1, r5 <== NOT EXECUTED f7bc: 1bffff90 blne f604 <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++ ) {
f7c0: e2888001 add r8, r8, #1 <== NOT EXECUTED f7c4: e2877004 add r7, r7, #4 <== NOT EXECUTED f7c8: e59a3000 ldr r3, [sl] <== NOT EXECUTED f7cc: e1580123 cmp r8, r3, lsr #2 <== NOT EXECUTED f7d0: 3afffff5 bcc f7ac <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(
f7d4: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED f7d8: e1a01005 mov r1, r5 <== NOT EXECUTED f7dc: e0800009 add r0, r0, r9 <== NOT EXECUTED f7e0: ebffff87 bl f604 <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++ ) {
f7e4: e2866001 add r6, r6, #1 <== NOT EXECUTED f7e8: e59a3000 ldr r3, [sl] <== NOT EXECUTED f7ec: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED f7f0: 3affffe6 bcc f790 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
} } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table(
f7f4: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED f7f8: e1a01005 mov r1, r5 <== NOT EXECUTED f7fc: ebffff80 bl f604 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free ); } return 0; }
f800: e3a00000 mov r0, #0 f804: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0000f680 <IMFS_memfile_remove_block>: MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) {
f680: 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 );
f684: e3a02000 mov r2, #0 <== NOT EXECUTED f688: ebffff58 bl f3f0 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
f68c: e2503000 subs r3, r0, #0 <== NOT EXECUTED f690: 059f0024 ldreq r0, [pc, #36] ; f6bc <IMFS_memfile_remove_block+0x3c><== NOT EXECUTED f694: 059f1024 ldreq r1, [pc, #36] ; f6c0 <IMFS_memfile_remove_block+0x40><== NOT EXECUTED f698: 059f2024 ldreq r2, [pc, #36] ; f6c4 <IMFS_memfile_remove_block+0x44><== NOT EXECUTED f69c: 059f3024 ldreq r3, [pc, #36] ; f6c8 <IMFS_memfile_remove_block+0x48><== NOT EXECUTED f6a0: 0bfff897 bleq d904 <__assert_func> <== NOT EXECUTED
if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0;
f6a4: 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;
f6a8: e5930000 ldr r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
f6ac: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
f6b0: ebffff39 bl f39c <memfile_free_block> <== NOT EXECUTED
} return 1; }
f6b4: e3a00001 mov r0, #1 <== NOT EXECUTED f6b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000fbdc <IMFS_memfile_write>: IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
fbdc: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
fbe0: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
fbe4: e1a08001 mov r8, r1 fbe8: e1a0a002 mov sl, r2 fbec: e1a06003 mov r6, r3 fbf0: e59d5030 ldr r5, [sp, #48] ; 0x30
/* * Perform internal consistency checks */ assert( the_jnode );
fbf4: 059f0204 ldreq r0, [pc, #516] ; fe00 <IMFS_memfile_write+0x224> fbf8: 059f1204 ldreq r1, [pc, #516] ; fe04 <IMFS_memfile_write+0x228> fbfc: 059f2204 ldreq r2, [pc, #516] ; fe08 <IMFS_memfile_write+0x22c> fc00: 059f3204 ldreq r3, [pc, #516] ; fe0c <IMFS_memfile_write+0x230>
fc04: 0a000006 beq fc24 <IMFS_memfile_write+0x48> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
fc08: e594304c ldr r3, [r4, #76] ; 0x4c fc0c: e3530005 cmp r3, #5
fc10: 0a000004 beq fc28 <IMFS_memfile_write+0x4c>
fc14: e59f01e4 ldr r0, [pc, #484] ; fe00 <IMFS_memfile_write+0x224><== NOT EXECUTED fc18: e59f11f0 ldr r1, [pc, #496] ; fe10 <IMFS_memfile_write+0x234><== NOT EXECUTED fc1c: e59f21e4 ldr r2, [pc, #484] ; fe08 <IMFS_memfile_write+0x22c><== NOT EXECUTED fc20: e59f31ec ldr r3, [pc, #492] ; fe14 <IMFS_memfile_write+0x238><== NOT EXECUTED fc24: ebfff736 bl d904 <__assert_func> <== NOT EXECUTED
/* * Error check arguments */ assert( source );
fc28: e3560000 cmp r6, #0 fc2c: 059f01cc ldreq r0, [pc, #460] ; fe00 <IMFS_memfile_write+0x224> fc30: 059f11e0 ldreq r1, [pc, #480] ; fe18 <IMFS_memfile_write+0x23c> fc34: 059f21cc ldreq r2, [pc, #460] ; fe08 <IMFS_memfile_write+0x22c> fc38: 059f31dc ldreq r3, [pc, #476] ; fe1c <IMFS_memfile_write+0x240>
fc3c: 0afffff8 beq fc24 <IMFS_memfile_write+0x48> /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length )
fc40: e3550000 cmp r5, #0
fc44: 1a000002 bne fc54 <IMFS_memfile_write+0x78> rtems_set_errno_and_return_minus_one( EINVAL );
fc48: eb0003f3 bl 10c1c <__errno> <== NOT EXECUTED fc4c: e3a03016 mov r3, #22 <== NOT EXECUTED fc50: ea00000e b fc90 <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 ) {
fc54: e5943054 ldr r3, [r4, #84] ; 0x54 fc58: e3530000 cmp r3, #0 fc5c: e0851001 add r1, r5, r1
fc60: ba000003 blt fc74 <IMFS_memfile_write+0x98> fc64: 1a00000c bne fc9c <IMFS_memfile_write+0xc0>
fc68: e5943050 ldr r3, [r4, #80] ; 0x50 fc6c: e1530001 cmp r3, r1
fc70: 2a000009 bcs fc9c <IMFS_memfile_write+0xc0> status = IMFS_memfile_extend( the_jnode, last_byte );
fc74: e1a00004 mov r0, r4 fc78: e3a02000 mov r2, #0 fc7c: ebffff40 bl f984 <IMFS_memfile_extend>
if ( status )
fc80: e3500000 cmp r0, #0
fc84: 0a000004 beq fc9c <IMFS_memfile_write+0xc0> rtems_set_errno_and_return_minus_one( ENOSPC );
fc88: eb0003e3 bl 10c1c <__errno> <== NOT EXECUTED fc8c: e3a0301c mov r3, #28 <== NOT EXECUTED fc90: e5803000 str r3, [r0] <== NOT EXECUTED fc94: e3e07000 mvn r7, #0 <== NOT EXECUTED fc98: ea000056 b fdf8 <IMFS_memfile_write+0x21c> <== NOT EXECUTED
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
fc9c: e59f317c ldr r3, [pc, #380] ; fe20 <IMFS_memfile_write+0x244> fca0: e5939000 ldr r9, [r3] fca4: e1a0b009 mov fp, r9 fca8: e1a0cfcb asr ip, fp, #31 fcac: e1a0300c mov r3, ip fcb0: e1a00008 mov r0, r8 fcb4: e1a0200b mov r2, fp fcb8: e1a0100a mov r1, sl fcbc: e58dc000 str ip, [sp] fcc0: eb002d6d bl 1b27c <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
fcc4: e59dc000 ldr ip, [sp]
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
fcc8: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
fccc: e1a0100a mov r1, sl fcd0: e1a00008 mov r0, r8 fcd4: e1a0200b mov r2, fp fcd8: e1a0300c mov r3, ip fcdc: eb002c3c bl 1add4 <__divdi3>
if ( start_offset ) {
fce0: 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;
fce4: e1a08000 mov r8, r0
if ( start_offset ) { fce8: 0a000013 beq fd3c <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 );
fcec: e1a01008 mov r1, r8 fcf0: e1a00004 mov r0, r4 fcf4: e3a02000 mov r2, #0 fcf8: ebfffdbc bl f3f0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
fcfc: e3500000 cmp r0, #0 fd00: 059f00f8 ldreq r0, [pc, #248] ; fe00 <IMFS_memfile_write+0x224> fd04: 03a01fc7 moveq r1, #796 ; 0x31c
fd08: 0a00002c beq fdc0 <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 );
fd0c: 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;
fd10: e067a009 rsb sl, r7, r9 fd14: e15a0005 cmp sl, r5 fd18: 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 );
fd1c: e0800007 add r0, r0, r7 fd20: e1a01006 mov r1, r6 fd24: e1a0200a mov r2, sl fd28: eb0005c9 bl 11454 <memcpy>
src += to_copy;
fd2c: e086600a add r6, r6, sl
block++;
fd30: e2888001 add r8, r8, #1
my_length -= to_copy;
fd34: e06a5005 rsb r5, sl, r5
copied += to_copy;
fd38: e1a0700a mov r7, sl
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
fd3c: e59f30dc ldr r3, [pc, #220] ; fe20 <IMFS_memfile_write+0x244>
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
fd40: e1a09003 mov r9, r3
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
fd44: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
fd48: ea00000f b fd8c <IMFS_memfile_write+0x1b0>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
fd4c: e1a00004 mov r0, r4 fd50: e1a01008 mov r1, r8 fd54: e3a02000 mov r2, #0 fd58: ebfffda4 bl f3f0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
fd5c: e3500000 cmp r0, #0 fd60: 059f0098 ldreq r0, [pc, #152] ; fe00 <IMFS_memfile_write+0x224> fd64: 03a01e33 moveq r1, #816 ; 0x330
fd68: 0a000014 beq fdc0 <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 );
fd6c: e1a01006 mov r1, r6 fd70: e5900000 ldr r0, [r0] fd74: e1a0200a mov r2, sl fd78: eb0005b5 bl 11454 <memcpy>
src += to_copy;
fd7c: e086600a add r6, r6, sl
block++;
fd80: e2888001 add r8, r8, #1
my_length -= to_copy;
fd84: 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(
fd88: 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 ) {
fd8c: e5993000 ldr r3, [r9] fd90: e1550003 cmp r5, r3
fd94: 2affffec bcs fd4c <IMFS_memfile_write+0x170> */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) {
fd98: e3550000 cmp r5, #0
fd9c: 0a00000f beq fde0 <IMFS_memfile_write+0x204> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
fda0: e1a01008 mov r1, r8 fda4: e1a00004 mov r0, r4 fda8: e3a02000 mov r2, #0 fdac: ebfffd8f bl f3f0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
fdb0: e3500000 cmp r0, #0
fdb4: 1a000004 bne fdcc <IMFS_memfile_write+0x1f0>
fdb8: e59f0040 ldr r0, [pc, #64] ; fe00 <IMFS_memfile_write+0x224><== NOT EXECUTED fdbc: e59f1060 ldr r1, [pc, #96] ; fe24 <IMFS_memfile_write+0x248><== NOT EXECUTED fdc0: e59f2040 ldr r2, [pc, #64] ; fe08 <IMFS_memfile_write+0x22c><== NOT EXECUTED fdc4: e59f305c ldr r3, [pc, #92] ; fe28 <IMFS_memfile_write+0x24c><== NOT EXECUTED fdc8: eaffff95 b fc24 <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 );
fdcc: e5900000 ldr r0, [r0] fdd0: e1a01006 mov r1, r6 fdd4: e1a02005 mov r2, r5 fdd8: eb00059d bl 11454 <memcpy>
my_length = 0; copied += to_copy;
fddc: e0877005 add r7, r7, r5
} IMFS_mtime_ctime_update( the_jnode );
fde0: e28d0004 add r0, sp, #4 fde4: e3a01000 mov r1, #0 fde8: ebffcc03 bl 2dfc <gettimeofday> fdec: e59d3004 ldr r3, [sp, #4] fdf0: e5843048 str r3, [r4, #72] ; 0x48 fdf4: e5843044 str r3, [r4, #68] ; 0x44
return copied; }
fdf8: e1a00007 mov r0, r7 fdfc: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00008c28 <IMFS_mknod>: const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
8c28: e92d40f0 push {r4, r5, r6, r7, lr} 8c2c: e24dd040 sub sp, sp, #64 ; 0x40 8c30: e1a04001 mov r4, r1 8c34: e1a07000 mov r7, r0 8c38: e1a06002 mov r6, r2 8c3c: 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 );
8c40: eb000fd0 bl cb88 <strlen> 8c44: e28d303c add r3, sp, #60 ; 0x3c 8c48: e1a01000 mov r1, r0 8c4c: e28d2004 add r2, sp, #4 8c50: e1a00007 mov r0, r7 8c54: ebffff87 bl 8a78 <IMFS_get_token>
/* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) )
8c58: e2043a0f and r3, r4, #61440 ; 0xf000 8c5c: e3530901 cmp r3, #16384 ; 0x4000
8c60: 0a00000e beq 8ca0 <IMFS_mknod+0x78> type = IMFS_DIRECTORY; else if ( S_ISREG(mode) )
8c64: e3530902 cmp r3, #32768 ; 0x8000 8c68: 03a01005 moveq r1, #5
8c6c: 0a00000c beq 8ca4 <IMFS_mknod+0x7c> type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
8c70: e3530a06 cmp r3, #24576 ; 0x6000 8c74: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
8c78: 058d6028 streq r6, [sp, #40] ; 0x28 8c7c: 058d502c streq r5, [sp, #44] ; 0x2c 8c80: 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) ) { 8c84: 0a000006 beq 8ca4 <IMFS_mknod+0x7c> type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode))
8c88: e3530a01 cmp r3, #4096 ; 0x1000 8c8c: 03a01007 moveq r1, #7
8c90: 0a000003 beq 8ca4 <IMFS_mknod+0x7c> type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL );
8c94: eb000bca bl bbc4 <__errno> <== NOT EXECUTED 8c98: e3a03016 mov r3, #22 <== NOT EXECUTED 8c9c: ea00000b b 8cd0 <IMFS_mknod+0xa8> <== NOT EXECUTED
8ca0: 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(
8ca4: e28dc028 add ip, sp, #40 ; 0x28 8ca8: e59d0054 ldr r0, [sp, #84] ; 0x54 8cac: e1a03004 mov r3, r4 8cb0: e28d2004 add r2, sp, #4 8cb4: e58dc000 str ip, [sp] 8cb8: eb000843 bl adcc <IMFS_create_node>
new_name, mode, &info ); if ( !new_node )
8cbc: e3500000 cmp r0, #0 8cc0: 13a00000 movne r0, #0
8cc4: 1a000003 bne 8cd8 <IMFS_mknod+0xb0> rtems_set_errno_and_return_minus_one( ENOMEM );
8cc8: eb000bbd bl bbc4 <__errno> <== NOT EXECUTED 8ccc: e3a0300c mov r3, #12 <== NOT EXECUTED 8cd0: e5803000 str r3, [r0] <== NOT EXECUTED 8cd4: e3e00000 mvn r0, #0 <== NOT EXECUTED
return 0; }
8cd8: e28dd040 add sp, sp, #64 ; 0x40 8cdc: e8bd80f0 pop {r4, r5, r6, r7, pc}
000025cc <IMFS_mount>: rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
25cc: e5903008 ldr r3, [r0, #8]
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
25d0: e593204c ldr r2, [r3, #76] ; 0x4c 25d4: e3520001 cmp r2, #1
#include <rtems/seterr.h> int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
25d8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 25dc: 0a000004 beq 25f4 <IMFS_mount+0x28> rtems_set_errno_and_return_minus_one( ENOTDIR );
25e0: eb00398d bl 10c1c <__errno> <== NOT EXECUTED 25e4: e3a03014 mov r3, #20 <== NOT EXECUTED 25e8: e5803000 str r3, [r0] <== NOT EXECUTED 25ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 25f0: 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;
25f4: e583005c str r0, [r3, #92] ; 0x5c 25f8: e3a00000 mov r0, #0
return 0; }
25fc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
000031b4 <IMFS_print_jnode>: */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) {
31b4: e92d4030 push {r4, r5, lr}
assert( the_jnode );
31b8: e2504000 subs r4, r0, #0 31bc: 059f0130 ldreq r0, [pc, #304] ; 32f4 <IMFS_print_jnode+0x140> 31c0: 03a01038 moveq r1, #56 ; 0x38 31c4: 059f212c ldreq r2, [pc, #300] ; 32f8 <IMFS_print_jnode+0x144> 31c8: 059f312c ldreq r3, [pc, #300] ; 32fc <IMFS_print_jnode+0x148>
31cc: 0a00002f beq 3290 <IMFS_print_jnode+0xdc> fprintf(stdout, "%s", the_jnode->name );
31d0: e59f5128 ldr r5, [pc, #296] ; 3300 <IMFS_print_jnode+0x14c> 31d4: e5953000 ldr r3, [r5] 31d8: e284000c add r0, r4, #12 31dc: e5931008 ldr r1, [r3, #8] 31e0: eb00351b bl 10654 <fputs>
switch( the_jnode->type ) {
31e4: e594204c ldr r2, [r4, #76] ; 0x4c 31e8: e2423001 sub r3, r2, #1 31ec: e3530006 cmp r3, #6 31f0: 979ff103 ldrls pc, [pc, r3, lsl #2]
31f4: ea000034 b 32cc <IMFS_print_jnode+0x118> <== NOT EXECUTED 31f8: 00003214 .word 0x00003214 <== NOT EXECUTED 31fc: 00003228 .word 0x00003228 <== NOT EXECUTED 3200: 00003270 .word 0x00003270 <== NOT EXECUTED 3204: 00003294 .word 0x00003294 <== NOT EXECUTED 3208: 00003258 .word 0x00003258 <== NOT EXECUTED 320c: 0000323c .word 0x0000323c <== NOT EXECUTED 3210: 000032b0 .word 0x000032b0 <== NOT EXECUTED
case IMFS_DIRECTORY: fprintf(stdout, "/" );
3214: e5953000 ldr r3, [r5] 3218: e3a0002f mov r0, #47 ; 0x2f 321c: e5931008 ldr r1, [r3, #8] 3220: eb0034c6 bl 10540 <fputc>
break;
3224: ea00002f b 32e8 <IMFS_print_jnode+0x134>
case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
3228: e5952000 ldr r2, [r5] 322c: e5943054 ldr r3, [r4, #84] ; 0x54 3230: e5920008 ldr r0, [r2, #8] 3234: e59f10c8 ldr r1, [pc, #200] ; 3304 <IMFS_print_jnode+0x150> 3238: ea000003 b 324c <IMFS_print_jnode+0x98>
the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)",
323c: e5952000 ldr r2, [r5] <== NOT EXECUTED 3240: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3244: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 3248: e59f10b8 ldr r1, [pc, #184] ; 3308 <IMFS_print_jnode+0x154><== NOT EXECUTED
324c: e5942050 ldr r2, [r4, #80] ; 0x50 3250: eb00349e bl 104d0 <fprintf>
(uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break;
3254: ea000023 b 32e8 <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 ")",
3258: e5953000 ldr r3, [r5] 325c: e5942050 ldr r2, [r4, #80] ; 0x50 3260: e5930008 ldr r0, [r3, #8] 3264: e59f10a0 ldr r1, [pc, #160] ; 330c <IMFS_print_jnode+0x158> 3268: eb003498 bl 104d0 <fprintf>
(uint32_t)the_jnode->info.file.size ); #endif break;
326c: ea00001d b 32e8 <IMFS_print_jnode+0x134>
case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" );
3270: e5953000 ldr r3, [r5] <== NOT EXECUTED 3274: e59f0094 ldr r0, [pc, #148] ; 3310 <IMFS_print_jnode+0x15c><== NOT EXECUTED 3278: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 327c: eb0034f4 bl 10654 <fputs> <== NOT EXECUTED
assert(0);
3280: e59f006c ldr r0, [pc, #108] ; 32f4 <IMFS_print_jnode+0x140><== NOT EXECUTED 3284: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 3288: e59f2068 ldr r2, [pc, #104] ; 32f8 <IMFS_print_jnode+0x144><== NOT EXECUTED 328c: e59f3080 ldr r3, [pc, #128] ; 3314 <IMFS_print_jnode+0x160><== NOT EXECUTED 3290: eb00020d bl 3acc <__assert_func> <== NOT EXECUTED
break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" );
3294: e5953000 ldr r3, [r5] <== NOT EXECUTED 3298: e59f0070 ldr r0, [pc, #112] ; 3310 <IMFS_print_jnode+0x15c><== NOT EXECUTED 329c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 32a0: eb0034eb bl 10654 <fputs> <== NOT EXECUTED
assert(0);
32a4: e59f0048 ldr r0, [pc, #72] ; 32f4 <IMFS_print_jnode+0x140> <== NOT EXECUTED 32a8: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 32ac: eafffff5 b 3288 <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" );
32b0: e5953000 ldr r3, [r5] <== NOT EXECUTED 32b4: e59f005c ldr r0, [pc, #92] ; 3318 <IMFS_print_jnode+0x164> <== NOT EXECUTED 32b8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 32bc: eb0034e4 bl 10654 <fputs> <== NOT EXECUTED
assert(0);
32c0: e59f002c ldr r0, [pc, #44] ; 32f4 <IMFS_print_jnode+0x140> <== NOT EXECUTED 32c4: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 32c8: eaffffee b 3288 <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break; default: fprintf(stdout, " bad type %d\n", the_jnode->type );
32cc: e5953000 ldr r3, [r5] <== NOT EXECUTED 32d0: e59f1044 ldr r1, [pc, #68] ; 331c <IMFS_print_jnode+0x168> <== NOT EXECUTED 32d4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 32d8: eb00347c bl 104d0 <fprintf> <== NOT EXECUTED
assert(0);
32dc: e59f0010 ldr r0, [pc, #16] ; 32f4 <IMFS_print_jnode+0x140> <== NOT EXECUTED 32e0: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 32e4: eaffffe7 b 3288 <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break; } puts("");
32e8: e59f0030 ldr r0, [pc, #48] ; 3320 <IMFS_print_jnode+0x16c>
}
32ec: e8bd4030 pop {r4, r5, lr}
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
32f0: ea003ba3 b 12184 <puts>
0000260c <IMFS_readlink>: ) { IMFS_jnode_t *node; int i; node = loc->node_access;
260c: e5903000 ldr r3, [r0]
if ( node->type != IMFS_SYM_LINK )
2610: e593004c ldr r0, [r3, #76] ; 0x4c 2614: e3500004 cmp r0, #4
int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) {
2618: e52de004 push {lr} ; (str lr, [sp, #-4]!)
IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK )
261c: 03a00000 moveq r0, #0
2620: 0a000006 beq 2640 <IMFS_readlink+0x34> rtems_set_errno_and_return_minus_one( EINVAL );
2624: eb00397c bl 10c1c <__errno> <== NOT EXECUTED 2628: e3a03016 mov r3, #22 <== NOT EXECUTED 262c: e5803000 str r3, [r0] <== NOT EXECUTED 2630: e3e00000 mvn r0, #0 <== NOT EXECUTED 2634: 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];
2638: 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++ )
263c: e2800001 add r0, r0, #1 2640: e1500002 cmp r0, r2 2644: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 2648: e593c050 ldr ip, [r3, #80] ; 0x50 264c: e7dcc000 ldrb ip, [ip, r0] 2650: e35c0000 cmp ip, #0
2654: 1afffff7 bne 2638 <IMFS_readlink+0x2c> buf[i] = node->info.sym_link.name[i]; return i; }
2658: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000265c <IMFS_rename>: rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) {
265c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access;
2660: e5914000 ldr r4, [r1] <== NOT EXECUTED
rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) {
2664: e1a05002 mov r5, r2 <== NOT EXECUTED
IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
2668: e1a01003 mov r1, r3 <== NOT EXECUTED 266c: e284000c add r0, r4, #12 <== NOT EXECUTED 2670: e3a02020 mov r2, #32 <== NOT EXECUTED 2674: eb003d59 bl 11be0 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
2678: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 267c: e3530000 cmp r3, #0 <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
2680: 11a00004 movne r0, r4 <== NOT EXECUTED 2684: 1b001193 blne 6cd8 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access;
2688: e5953000 ldr r3, [r5] <== 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 );
268c: e1a01004 mov r1, r4 <== NOT EXECUTED 2690: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED
the_jnode->Parent = new_parent;
2694: e5843008 str r3, [r4, #8] <== NOT EXECUTED 2698: eb001183 bl 6cac <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode );
269c: e1a0000d mov r0, sp <== NOT EXECUTED 26a0: e3a01000 mov r1, #0 <== NOT EXECUTED 26a4: eb0001d4 bl 2dfc <gettimeofday> <== NOT EXECUTED 26a8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
return 0; }
26ac: e3a00000 mov r0, #0 <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode );
26b0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
return 0; }
26b4: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00008d94 <IMFS_stat>: { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access;
8d94: e5903000 ldr r3, [r0]
switch ( the_jnode->type ) {
8d98: e593204c ldr r2, [r3, #76] ; 0x4c 8d9c: e2422002 sub r2, r2, #2
int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
8da0: e92d4800 push {fp, lr}
IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) {
8da4: e3520005 cmp r2, #5 8da8: 979ff102 ldrls pc, [pc, r2, lsl #2]
8dac: ea000012 b 8dfc <IMFS_stat+0x68> <== NOT EXECUTED 8db0: 00008dc8 .word 0x00008dc8 <== NOT EXECUTED 8db4: 00008dfc .word 0x00008dfc <== NOT EXECUTED 8db8: 00008de8 .word 0x00008de8 <== NOT EXECUTED 8dbc: 00008ddc .word 0x00008ddc <== NOT EXECUTED 8dc0: 00008ddc .word 0x00008ddc <== NOT EXECUTED 8dc4: 00008de8 .word 0x00008de8 <== NOT EXECUTED
case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
8dc8: e2832050 add r2, r3, #80 ; 0x50 8dcc: e8921004 ldm r2, {r2, ip} 8dd0: e581c01c str ip, [r1, #28] 8dd4: e5812018 str r2, [r1, #24]
break;
8dd8: ea00000c b 8e10 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size;
8ddc: e283c050 add ip, r3, #80 ; 0x50 8de0: e89c1800 ldm ip, {fp, ip} 8de4: ea000001 b 8df0 <IMFS_stat+0x5c>
case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0;
8de8: e3a0b000 mov fp, #0 <== NOT EXECUTED 8dec: e3a0c000 mov ip, #0 <== NOT EXECUTED
8df0: e581b020 str fp, [r1, #32] 8df4: e581c024 str ip, [r1, #36] ; 0x24
break;
8df8: ea000004 b 8e10 <IMFS_stat+0x7c>
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
8dfc: eb000b70 bl bbc4 <__errno> <== NOT EXECUTED 8e00: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8e04: e5803000 str r3, [r0] <== NOT EXECUTED 8e08: e3e00000 mvn r0, #0 <== NOT EXECUTED 8e0c: 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;
8e10: e5932030 ldr r2, [r3, #48] ; 0x30 8e14: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
8e18: e5932038 ldr r2, [r3, #56] ; 0x38 8e1c: 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;
8e20: e5932040 ldr r2, [r3, #64] ; 0x40 8e24: 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 );
8e28: e5902010 ldr r2, [r0, #16]
buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
8e2c: 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 );
8e30: 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;
8e34: 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 );
8e38: e5922000 ldr r2, [r2]
buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
8e3c: 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;
8e40: 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 =
8e44: 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;
8e48: 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;
8e4c: 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;
8e50: 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;
8e54: 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;
8e58: 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 =
8e5c: e59f000c ldr r0, [pc, #12] ; 8e70 <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;
8e60: 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 =
8e64: 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;
8e68: e3a00000 mov r0, #0
return 0; }
8e6c: e8bd8800 pop {fp, pc}
000026b8 <IMFS_symlink>: int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
26b8: e92d40f0 push {r4, r5, r6, r7, lr} 26bc: e1a05000 mov r5, r0 26c0: 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 );
26c4: e1a00002 mov r0, r2
int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
26c8: e1a07002 mov r7, r2 26cc: 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 );
26d0: eb003d2a bl 11b80 <strlen> 26d4: e28d4004 add r4, sp, #4 26d8: e1a01000 mov r1, r0 26dc: e1a02004 mov r2, r4 26e0: e28d303c add r3, sp, #60 ; 0x3c 26e4: e1a00007 mov r0, r7 26e8: eb002bf1 bl d6b4 <IMFS_get_token>
/* * Duplicate link name */ info.sym_link.name = strdup(link_name);
26ec: e1a00006 mov r0, r6 26f0: eb003d0e bl 11b30 <strdup>
if (info.sym_link.name == NULL) {
26f4: 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);
26f8: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) { 26fc: 0a00000b beq 2730 <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(
2700: e28dc028 add ip, sp, #40 ; 0x28 2704: e1a00005 mov r0, r5 2708: e1a02004 mov r2, r4 270c: e3a01004 mov r1, #4 2710: e59f3030 ldr r3, [pc, #48] ; 2748 <IMFS_symlink+0x90> 2714: e58dc000 str ip, [sp] 2718: eb0028dd bl ca94 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) {
271c: e3500000 cmp r0, #0 2720: 13a00000 movne r0, #0
2724: 1a000005 bne 2740 <IMFS_symlink+0x88> free(info.sym_link.name);
2728: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 272c: eb000189 bl 2d58 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
2730: eb003939 bl 10c1c <__errno> <== NOT EXECUTED 2734: e3a0300c mov r3, #12 <== NOT EXECUTED 2738: e5803000 str r3, [r0] <== NOT EXECUTED 273c: e3e00000 mvn r0, #0 <== NOT EXECUTED
} return 0; }
2740: e28dd040 add sp, sp, #64 ; 0x40 2744: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000274c <IMFS_unlink>: int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
274c: 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;
2750: e5915000 ldr r5, [r1]
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) {
2754: e595304c ldr r3, [r5, #76] ; 0x4c 2758: e3530003 cmp r3, #3
int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
275c: e24dd01c sub sp, sp, #28 2760: e1a04001 mov r4, r1 2764: e1a06000 mov r6, r0
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2768: 1a000025 bne 2804 <IMFS_unlink+0xb8> if ( !node->info.hard_link.link_node )
276c: e595e050 ldr lr, [r5, #80] ; 0x50 2770: e35e0000 cmp lr, #0
2774: 1a000003 bne 2788 <IMFS_unlink+0x3c> rtems_set_errno_and_return_minus_one( EINVAL );
2778: eb003927 bl 10c1c <__errno> <== NOT EXECUTED 277c: e3a03016 mov r3, #22 <== NOT EXECUTED 2780: e5803000 str r3, [r0] <== NOT EXECUTED 2784: ea000014 b 27dc <IMFS_unlink+0x90> <== NOT EXECUTED
the_link = *loc;
2788: e1a07001 mov r7, r1 278c: e8b7000f ldm r7!, {r0, r1, r2, r3} 2790: e1a0c00d mov ip, sp 2794: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
2798: e28d801c add r8, sp, #28 279c: 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;
27a0: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
27a4: 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;
27a8: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
27ac: eb002907 bl cbd0 <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)
27b0: e5953050 ldr r3, [r5, #80] ; 0x50 27b4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 27b8: e3520001 cmp r2, #1
27bc: 1a000008 bne 27e4 <IMFS_unlink+0x98> { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
27c0: e1a0100d mov r1, sp 27c4: e1a00006 mov r0, r6 27c8: e59d3008 ldr r3, [sp, #8] 27cc: e1a0e00f mov lr, pc 27d0: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
27d4: e3500000 cmp r0, #0
27d8: 0a000009 beq 2804 <IMFS_unlink+0xb8>
27dc: e3e00000 mvn r0, #0 27e0: ea00000c b 2818 <IMFS_unlink+0xcc>
return -1; } else { node->info.hard_link.link_node->st_nlink --;
27e4: e2422001 sub r2, r2, #1 27e8: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
27ec: e28d0014 add r0, sp, #20 27f0: e3a01000 mov r1, #0 27f4: eb000180 bl 2dfc <gettimeofday> 27f8: e5953050 ldr r3, [r5, #80] ; 0x50 27fc: e59d2014 ldr r2, [sp, #20] 2800: e5832048 str r2, [r3, #72] ; 0x48
/* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc );
2804: e1a00006 mov r0, r6 2808: e1a01004 mov r1, r4 280c: e5943008 ldr r3, [r4, #8] 2810: e1a0e00f mov lr, pc 2814: e593f034 ldr pc, [r3, #52] ; 0x34
return result; }
2818: e28dd01c add sp, sp, #28 281c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00002820 <IMFS_unmount>: rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
2820: e5903008 ldr r3, [r0, #8]
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
2824: e593204c ldr r2, [r3, #76] ; 0x4c 2828: e3520001 cmp r2, #1
#include <rtems/seterr.h> int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
282c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2830: 0a000002 beq 2840 <IMFS_unmount+0x20> rtems_set_errno_and_return_minus_one( ENOTDIR );
2834: eb0038f8 bl 10c1c <__errno> <== NOT EXECUTED 2838: e3a03014 mov r3, #20 <== NOT EXECUTED 283c: ea000004 b 2854 <IMFS_unmount+0x34> <== NOT EXECUTED
/* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL )
2840: e593205c ldr r2, [r3, #92] ; 0x5c 2844: e3520000 cmp r2, #0
2848: 1a000004 bne 2860 <IMFS_unmount+0x40> rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
284c: eb0038f2 bl 10c1c <__errno> <== NOT EXECUTED 2850: e3a03016 mov r3, #22 <== NOT EXECUTED 2854: e5803000 str r3, [r0] <== NOT EXECUTED 2858: e3e00000 mvn r0, #0 <== NOT EXECUTED 285c: 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;
2860: e3a00000 mov r0, #0 2864: e583005c str r0, [r3, #92] ; 0x5c
return 0; }
2868: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001b28 <RTEMS_Malloc_Initialize>: #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) {
1b28: e59f30c8 ldr r3, [pc, #200] ; 1bf8 <RTEMS_Malloc_Initialize+0xd0> 1b2c: e5933000 ldr r3, [r3] 1b30: e3530000 cmp r3, #0
void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) {
1b34: e92d4070 push {r4, r5, r6, lr} 1b38: e1a04000 mov r4, r0 1b3c: e1a05001 mov r5, r1 1b40: e1a06002 mov r6, r2
/* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)();
1b44: 11a0e00f movne lr, pc 1b48: 1593f000 ldrne pc, [r3]
} /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize();
1b4c: ebffffe1 bl 1ad8 <malloc_deferred_frees_initialize>
/* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) {
1b50: e59f30a4 ldr r3, [pc, #164] ; 1bfc <RTEMS_Malloc_Initialize+0xd4> 1b54: e5933000 ldr r3, [r3] 1b58: e3530000 cmp r3, #0
1b5c: 0a000006 beq 1b7c <RTEMS_Malloc_Initialize+0x54> void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
1b60: e1a00004 mov r0, r4 <== NOT EXECUTED 1b64: e1a01006 mov r1, r6 <== NOT EXECUTED 1b68: e1a0e00f mov lr, pc <== NOT EXECUTED 1b6c: e593f000 ldr pc, [r3] <== NOT EXECUTED
heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
1b70: e0845005 add r5, r4, r5 <== NOT EXECUTED 1b74: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 1b78: 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 (
1b7c: e59f307c ldr r3, [pc, #124] ; 1c00 <RTEMS_Malloc_Initialize+0xd8> 1b80: e5d31000 ldrb r1, [r3] 1b84: e3510000 cmp r1, #0
1b88: 1a000005 bne 1ba4 <RTEMS_Malloc_Initialize+0x7c> !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace()
1b8c: e59f3070 ldr r3, [pc, #112] ; 1c04 <RTEMS_Malloc_Initialize+0xdc> 1b90: e5d33028 ldrb r3, [r3, #40] ; 0x28 1b94: e3530000 cmp r3, #0
) { memset( heap_begin, 0, heap_size );
1b98: 11a00004 movne r0, r4 1b9c: 11a02005 movne r2, r5 1ba0: 1b002a51 blne c4ec <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 ) {
1ba4: e59f3054 ldr r3, [pc, #84] ; 1c00 <RTEMS_Malloc_Initialize+0xd8> 1ba8: e5d33000 ldrb r3, [r3] 1bac: e3530000 cmp r3, #0
1bb0: 1a000008 bne 1bd8 <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 );
1bb4: e59f304c ldr r3, [pc, #76] ; 1c08 <RTEMS_Malloc_Initialize+0xe0> 1bb8: e1a01004 mov r1, r4 1bbc: e5930000 ldr r0, [r3] 1bc0: e1a02005 mov r2, r5 1bc4: e3a03004 mov r3, #4 1bc8: eb000f0c bl 5800 <_Heap_Initialize>
RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) {
1bcc: e3500000 cmp r0, #0
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
1bd0: 0280001a addeq r0, r0, #26 1bd4: 0b000d36 bleq 50b4 <rtems_fatal_error_occurred>
} } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
1bd8: e59f3028 ldr r3, [pc, #40] ; 1c08 <RTEMS_Malloc_Initialize+0xe0> 1bdc: e59f4028 ldr r4, [pc, #40] ; 1c0c <RTEMS_Malloc_Initialize+0xe4> 1be0: e5930000 ldr r0, [r3] 1be4: e5945000 ldr r5, [r4] 1be8: eb0011db bl 635c <_Protected_heap_Get_size> 1bec: e0800005 add r0, r0, r5 1bf0: e5840000 str r0, [r4]
printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif }
1bf4: e8bd8070 pop {r4, r5, r6, pc}
00002db8 <Stack_check_Dump_threads_usage>: static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) {
2db8: 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 )
2dbc: e250a000 subs sl, r0, #0 <== NOT EXECUTED 2dc0: 0a000043 beq 2ed4 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
return; if ( !print_handler )
2dc4: e59f310c ldr r3, [pc, #268] ; 2ed8 <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED 2dc8: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 2dcc: e3570000 cmp r7, #0 <== NOT EXECUTED 2dd0: 0a00003f beq 2ed4 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) {
2dd4: e37a0001 cmn sl, #1 <== NOT EXECUTED
} else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
2dd8: 159a60f0 ldrne r6, [sl, #240] ; 0xf0 <== NOT EXECUTED
current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack;
2ddc: 128a40c0 addne r4, sl, #192 ; 0xc0 <== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) {
2de0: 1a000005 bne 2dfc <Stack_check_Dump_threads_usage+0x44> <== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
2de4: e59f40f0 ldr r4, [pc, #240] ; 2edc <Stack_check_Dump_threads_usage+0x124><== NOT EXECUTED 2de8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 2dec: e3530000 cmp r3, #0 <== NOT EXECUTED 2df0: 13a06000 movne r6, #0 <== NOT EXECUTED 2df4: 11a0a006 movne sl, r6 <== NOT EXECUTED 2df8: 0a000035 beq 2ed4 <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);
2dfc: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 2e00: e2899010 add r9, r9, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
2e04: e2455010 sub r5, r5, #16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
2e08: e1a00009 mov r0, r9 <== NOT EXECUTED 2e0c: e1a01005 mov r1, r5 <== NOT EXECUTED 2e10: ebffffda bl 2d80 <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
2e14: e2508000 subs r8, r0, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
2e18: 10899005 addne r9, r9, r5 <== NOT EXECUTED 2e1c: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED
else used = 0; if ( the_thread ) {
2e20: e35a0000 cmp sl, #0 <== NOT EXECUTED 2e24: e59f30ac ldr r3, [pc, #172] ; 2ed8 <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED 2e28: 0a00000c beq 2e60 <Stack_check_Dump_threads_usage+0xa8> <== NOT EXECUTED
(*print_handler)(
2e2c: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 2e30: e28d2008 add r2, sp, #8 <== NOT EXECUTED 2e34: e1a0000a mov r0, sl <== NOT EXECUTED 2e38: e3a01005 mov r1, #5 <== NOT EXECUTED 2e3c: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 2e40: eb001543 bl 8354 <rtems_object_get_name> <== NOT EXECUTED 2e44: e1a0200a mov r2, sl <== NOT EXECUTED 2e48: e1a03000 mov r3, r0 <== NOT EXECUTED 2e4c: e59f108c ldr r1, [pc, #140] ; 2ee0 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED 2e50: e1a00009 mov r0, r9 <== NOT EXECUTED 2e54: e1a0e00f mov lr, pc <== NOT EXECUTED 2e58: e12fff17 bx r7 <== NOT EXECUTED 2e5c: ea000004 b 2e74 <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 );
2e60: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2e64: e59f1078 ldr r1, [pc, #120] ; 2ee4 <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED 2e68: e3e02000 mvn r2, #0 <== NOT EXECUTED 2e6c: e1a0e00f mov lr, pc <== NOT EXECUTED 2e70: e12fff17 bx r7 <== NOT EXECUTED
} (*print_handler)(
2e74: e5943000 ldr r3, [r4] <== NOT EXECUTED 2e78: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 2e7c: e59f4054 ldr r4, [pc, #84] ; 2ed8 <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED 2e80: e58d6000 str r6, [sp] <== NOT EXECUTED 2e84: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 2e88: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2e8c: e0823003 add r3, r2, r3 <== NOT EXECUTED 2e90: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 2e94: e59f104c ldr r1, [pc, #76] ; 2ee8 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED 2e98: e1a0e00f mov lr, pc <== NOT EXECUTED 2e9c: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) {
2ea0: e5943000 ldr r3, [r4] <== NOT EXECUTED 2ea4: e3530000 cmp r3, #0 <== NOT EXECUTED 2ea8: 1a000004 bne 2ec0 <Stack_check_Dump_threads_usage+0x108> <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
2eac: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 2eb0: e59f1034 ldr r1, [pc, #52] ; 2eec <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED 2eb4: e1a0e00f mov lr, pc <== NOT EXECUTED 2eb8: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 2ebc: ea000004 b 2ed4 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
} else { (*print_handler)( print_context, "%8" PRId32 "\n", used );
2ec0: e1a02008 mov r2, r8 <== NOT EXECUTED 2ec4: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 2ec8: e59f1020 ldr r1, [pc, #32] ; 2ef0 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED 2ecc: e1a0e00f mov lr, pc <== NOT EXECUTED 2ed0: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
} }
2ed4: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED
00002d80 <Stack_check_find_high_water_mark>: /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS;
2d80: e2800010 add r0, r0, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
2d84: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 2d88: e0801001 add r1, r0, r1 <== NOT EXECUTED
if (*base != U32_PATTERN)
2d8c: e59f3020 ldr r3, [pc, #32] ; 2db4 <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++)
2d90: ea000003 b 2da4 <Stack_check_find_high_water_mark+0x24> <== NOT EXECUTED
if (*base != U32_PATTERN)
2d94: e5902000 ldr r2, [r0] <== NOT EXECUTED 2d98: e1520003 cmp r2, r3 <== NOT EXECUTED 2d9c: 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++)
2da0: e2800004 add r0, r0, #4 <== NOT EXECUTED 2da4: e1500001 cmp r0, r1 <== NOT EXECUTED 2da8: 3afffff9 bcc 2d94 <Stack_check_find_high_water_mark+0x14> <== NOT EXECUTED 2dac: e3a00000 mov r0, #0 <== NOT EXECUTED
if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; }
2db0: e12fff1e bx lr <== NOT EXECUTED
00009928 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing;
9928: e59f3120 ldr r3, [pc, #288] ; 9a50 <_CORE_mutex_Seize_interrupt_trylock+0x128> 992c: e5933000 ldr r3, [r3]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
9930: e3a02000 mov r2, #0 9934: e5832034 str r2, [r3, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
9938: e590c050 ldr ip, [r0, #80] ; 0x50 993c: e15c0002 cmp ip, r2
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) {
9940: e52de004 push {lr} ; (str lr, [sp, #-4]!)
9944: 0a00002c beq 99fc <_CORE_mutex_Seize_interrupt_trylock+0xd4> the_mutex->lock = CORE_MUTEX_LOCKED;
9948: e5802050 str r2, [r0, #80] ; 0x50
*/ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
994c: e5902048 ldr r2, [r0, #72] ; 0x48
executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id;
9950: e593c008 ldr ip, [r3, #8]
the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
9954: e3520002 cmp r2, #2
executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id;
9958: e580c060 str ip, [r0, #96] ; 0x60
the_mutex->nest_count = 1;
995c: e3a0c001 mov ip, #1 9960: e580c054 str ip, [r0, #84] ; 0x54
executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing;
9964: e580305c str r3, [r0, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9968: 0a000001 beq 9974 <_CORE_mutex_Seize_interrupt_trylock+0x4c>
996c: e3520003 cmp r2, #3
9970: 1a000004 bne 9988 <_CORE_mutex_Seize_interrupt_trylock+0x60> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++;
9974: e593c01c ldr ip, [r3, #28]
} if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
9978: e3520003 cmp r2, #3
_Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++;
997c: e28c2001 add r2, ip, #1 9980: e583201c str r2, [r3, #28]
} if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9984: 0a000000 beq 998c <_CORE_mutex_Seize_interrupt_trylock+0x64> _ISR_Enable( *level_p );
9988: ea00002a b 9a38 <_CORE_mutex_Seize_interrupt_trylock+0x110>
*/ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling;
998c: e590204c ldr r2, [r0, #76] ; 0x4c
current = executing->current_priority;
9990: e593c014 ldr ip, [r3, #20]
if ( current == ceiling ) {
9994: e15c0002 cmp ip, r2
9998: 1a000000 bne 99a0 <_CORE_mutex_Seize_interrupt_trylock+0x78> _ISR_Enable( *level_p );
999c: ea000025 b 9a38 <_CORE_mutex_Seize_interrupt_trylock+0x110>
return 0; } if ( current > ceiling ) { 99a0: 9a00000b bls 99d4 <_CORE_mutex_Seize_interrupt_trylock+0xac> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
99a4: e59f30a8 ldr r3, [pc, #168] ; 9a54 <_CORE_mutex_Seize_interrupt_trylock+0x12c> 99a8: e5932000 ldr r2, [r3] 99ac: e2822001 add r2, r2, #1 99b0: e5832000 str r2, [r3] 99b4: e5913000 ldr r3, [r1] 99b8: e129f003 msr CPSR_fc, r3
_Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority(
99bc: e3a02000 mov r2, #0 99c0: e590104c ldr r1, [r0, #76] ; 0x4c 99c4: e590005c ldr r0, [r0, #92] ; 0x5c 99c8: ebfff278 bl 63b0 <_Thread_Change_priority>
the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch();
99cc: ebfff3d8 bl 6934 <_Thread_Enable_dispatch> 99d0: ea00001a b 9a40 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
99d4: e3a02006 mov r2, #6 99d8: e5832034 str r2, [r3, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */
99dc: e3a02000 mov r2, #0 99e0: e5802054 str r2, [r0, #84] ; 0x54
_Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED;
99e4: e2822001 add r2, r2, #1 99e8: e5802050 str r2, [r0, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */
99ec: e593201c ldr r2, [r3, #28] 99f0: e2422001 sub r2, r2, #1 99f4: e583201c str r2, [r3, #28]
_ISR_Enable( *level_p );
99f8: ea00000e b 9a38 <_CORE_mutex_Seize_interrupt_trylock+0x110>
/* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) {
99fc: e590205c ldr r2, [r0, #92] ; 0x5c 9a00: e1520003 cmp r2, r3
9a04: 1a00000f bne 9a48 <_CORE_mutex_Seize_interrupt_trylock+0x120> switch ( the_mutex->Attributes.lock_nesting_behavior ) {
9a08: e5903040 ldr r3, [r0, #64] ; 0x40 9a0c: e3530000 cmp r3, #0
9a10: 0a000002 beq 9a20 <_CORE_mutex_Seize_interrupt_trylock+0xf8>
9a14: e3530001 cmp r3, #1
9a18: 1a00000a bne 9a48 <_CORE_mutex_Seize_interrupt_trylock+0x120>
9a1c: ea000003 b 9a30 <_CORE_mutex_Seize_interrupt_trylock+0x108><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++;
9a20: e5903054 ldr r3, [r0, #84] ; 0x54 9a24: e2833001 add r3, r3, #1 9a28: e5803054 str r3, [r0, #84] ; 0x54
_ISR_Enable( *level_p );
9a2c: ea000001 b 9a38 <_CORE_mutex_Seize_interrupt_trylock+0x110>
return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
9a30: e3a03002 mov r3, #2 <== NOT EXECUTED 9a34: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
9a38: e5913000 ldr r3, [r1] 9a3c: e129f003 msr CPSR_fc, r3 9a40: e3a00000 mov r0, #0 9a44: e49df004 pop {pc} ; (ldr pc, [sp], #4) 9a48: e3a00001 mov r0, #1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
9a4c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00006e90 <_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 ) {
6e90: 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;
6e94: e5913014 ldr r3, [r1, #20]
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
6e98: e281503c add r5, r1, #60 ; 0x3c 6e9c: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
6ea0: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
6ea4: 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 ) )
6ea8: 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 ];
6eac: 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;
6eb0: e581503c str r5, [r1, #60] ; 0x3c 6eb4: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
6eb8: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
6ebc: 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 ];
6ec0: 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;
6ec4: 159f8154 ldrne r8, [pc, #340] ; 7020 <_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 ) ) 6ec8: 1a000023 bne 6f5c <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
6ecc: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
6ed0: e10f5000 mrs r5, CPSR 6ed4: e3854080 orr r4, r5, #128 ; 0x80 6ed8: 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;
6edc: e3e06000 mvn r6, #0 6ee0: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6ee4: ea00000b b 6f18 <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
6ee8: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
6eec: e1530006 cmp r3, r6
6ef0: 9a00000a bls 6f20 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile (
6ef4: e10fa000 mrs sl, CPSR 6ef8: e129f005 msr CPSR_fc, r5 6efc: 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) ) {
6f00: e594a010 ldr sl, [r4, #16] 6f04: e117000a tst r7, sl
6f08: 1a000001 bne 6f14 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
6f0c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 6f10: eaffffee b 6ed0 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next;
6f14: 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 ) ) {
6f18: e1540008 cmp r4, r8
6f1c: 1afffff1 bne 6ee8 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
6f20: e590c030 ldr ip, [r0, #48] ; 0x30 6f24: 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 ) ) {
6f28: e1a0c005 mov ip, r5
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6f2c: 1a000038 bne 7014 <_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 )
6f30: 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;
6f34: e3a03000 mov r3, #0 6f38: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority ) 6f3c: 0a00002a beq 6fec <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
6f40: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
6f44: e5814000 str r4, [r1]
the_node->previous = previous_node;
6f48: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
6f4c: 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;
6f50: e5831000 str r1, [r3]
search_node->previous = the_node;
6f54: e5841004 str r1, [r4, #4]
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
6f58: ea000021 b 6fe4 <_Thread_queue_Enqueue_priority+0x154>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1;
6f5c: e5d86000 ldrb r6, [r8] 6f60: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
6f64: e10f5000 mrs r5, CPSR 6f68: e3854080 orr r4, r5, #128 ; 0x80 6f6c: e129f004 msr CPSR_fc, r4
_ISR_Disable( level ); search_thread = (Thread_Control *) header->last;
6f70: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
6f74: ea00000b b 6fa8 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
6f78: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
6f7c: e1530006 cmp r3, r6
6f80: 2a00000a bcs 6fb0 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile (
6f84: e10fa000 mrs sl, CPSR 6f88: e129f005 msr CPSR_fc, r5 6f8c: 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) ) {
6f90: e594a010 ldr sl, [r4, #16] 6f94: e117000a tst r7, sl
6f98: 1a000001 bne 6fa4 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
6f9c: e129f005 msr CPSR_fc, r5 6fa0: eaffffed b 6f5c <_Thread_queue_Enqueue_priority+0xcc>
_ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *)
6fa4: 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 ) ) {
6fa8: e154000c cmp r4, ip
6fac: 1afffff1 bne 6f78 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
6fb0: e590c030 ldr ip, [r0, #48] ; 0x30 6fb4: 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 ) ) {
6fb8: e1a0c005 mov ip, r5
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6fbc: 1a000014 bne 7014 <_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 )
6fc0: 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;
6fc4: e3a03000 mov r3, #0 6fc8: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority ) 6fcc: 0a000006 beq 6fec <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
6fd0: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
6fd4: e8810018 stm r1, {r3, r4}
search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
6fd8: 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;
6fdc: e5841000 str r1, [r4]
next_node->previous = the_node;
6fe0: e5831004 str r1, [r3, #4] 6fe4: e129f005 msr CPSR_fc, r5 6fe8: ea000007 b 700c <_Thread_queue_Enqueue_priority+0x17c> 6fec: 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;
6ff0: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
6ff4: e5814000 str r4, [r1]
the_node->previous = previous_node;
6ff8: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
6ffc: 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;
7000: e5831000 str r1, [r3]
search_node->previous = the_node;
7004: e5841004 str r1, [r4, #4] 7008: e129f00c msr CPSR_fc, ip 700c: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7010: 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;
7014: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
7018: e5900030 ldr r0, [r0, #48] ; 0x30
}
701c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00014a24 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
14a24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 14a28: e24dd020 sub sp, sp, #32 14a2c: e28d3014 add r3, sp, #20 14a30: 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;
14a34: e3a09000 mov r9, #0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
14a38: e283a004 add sl, r3, #4 14a3c: 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);
14a40: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
14a44: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14a48: e2803040 add r3, r0, #64 ; 0x40
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
14a4c: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
14a50: e58d9018 str r9, [sp, #24]
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
14a54: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
14a58: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
14a5c: e58d5010 str r5, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
14a60: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14a64: e58d3000 str r3, [sp]
* @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
14a68: e1a04000 mov r4, r0
*/ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a6c: 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 );
14a70: 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;
14a74: e28d2014 add r2, sp, #20 14a78: 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;
14a7c: e59f2168 ldr r2, [pc, #360] ; 14bec <_Timer_server_Body+0x1c8> 14a80: e5923000 ldr r3, [r2]
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
14a84: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a88: e1a02005 mov r2, r5 14a8c: e0611003 rsb r1, r1, r3
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot;
14a90: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a94: e1a0000b mov r0, fp 14a98: eb000ffe bl 18a98 <_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();
14a9c: e59f314c ldr r3, [pc, #332] ; 14bf0 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
14aa0: 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();
14aa4: 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 ) {
14aa8: e1560002 cmp r6, r2
14aac: 9a000004 bls 14ac4 <_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 );
14ab0: e0621006 rsb r1, r2, r6 14ab4: e1a00007 mov r0, r7 14ab8: e1a02005 mov r2, r5 14abc: eb000ff5 bl 18a98 <_Watchdog_Adjust_to_chain> 14ac0: ea000003 b 14ad4 <_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 );
14ac4: 30662002 rsbcc r2, r6, r2 14ac8: 31a00007 movcc r0, r7 14acc: 33a01001 movcc r1, #1 14ad0: 3b000fc8 blcc 189f8 <_Watchdog_Adjust>
} watchdogs->last_snapshot = snapshot;
14ad4: 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 );
14ad8: e5940078 ldr r0, [r4, #120] ; 0x78 14adc: eb000228 bl 15384 <_Chain_Get>
if ( timer == NULL ) {
14ae0: e2501000 subs r1, r0, #0
14ae4: 0a00000a beq 14b14 <_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 ) {
14ae8: e5913038 ldr r3, [r1, #56] ; 0x38 14aec: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
14af0: 02811010 addeq r1, r1, #16 14af4: 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 ) { 14af8: 0a000003 beq 14b0c <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
14afc: e3530003 cmp r3, #3
14b00: 1afffff4 bne 14ad8 <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
14b04: e2811010 add r1, r1, #16 14b08: e1a00007 mov r0, r7 14b0c: eb00100e bl 18b4c <_Watchdog_Insert> 14b10: eafffff0 b 14ad8 <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
14b14: e10f3000 mrs r3, CPSR 14b18: e3832080 orr r2, r3, #128 ; 0x80 14b1c: e129f002 msr CPSR_fc, r2
* body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) {
14b20: e59d2014 ldr r2, [sp, #20] 14b24: e152000a cmp r2, sl
14b28: 1a000005 bne 14b44 <_Timer_server_Body+0x120> ts->insert_chain = NULL;
14b2c: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
14b30: 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 ) ) {
14b34: e59d3008 ldr r3, [sp, #8] 14b38: e1530008 cmp r3, r8
14b3c: 1a000002 bne 14b4c <_Timer_server_Body+0x128>
14b40: ea000015 b 14b9c <_Timer_server_Body+0x178>
14b44: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 14b48: eaffffcb b 14a7c <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
14b4c: e10f2000 mrs r2, CPSR 14b50: e3823080 orr r3, r2, #128 ; 0x80 14b54: e129f003 msr CPSR_fc, r3
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
14b58: e59d3008 ldr r3, [sp, #8]
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain))
14b5c: e1530008 cmp r3, r8
14b60: 0a00000b beq 14b94 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
14b64: 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 ) {
14b68: e3530000 cmp r3, #0
the_chain->first = new_first;
14b6c: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
14b70: e5815004 str r5, [r1, #4]
14b74: 0a000006 beq 14b94 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE;
14b78: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
14b7c: 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 );
14b80: e2830020 add r0, r3, #32 14b84: e8900003 ldm r0, {r0, r1} 14b88: e1a0e00f mov lr, pc 14b8c: e593f01c ldr pc, [r3, #28]
}
14b90: eaffffed b 14b4c <_Timer_server_Body+0x128> 14b94: e129f002 msr CPSR_fc, r2 14b98: eaffffb5 b 14a74 <_Timer_server_Body+0x50>
} else { ts->active = false;
14b9c: e5c4907c strb r9, [r4, #124] ; 0x7c 14ba0: e59f304c ldr r3, [pc, #76] ; 14bf4 <_Timer_server_Body+0x1d0> 14ba4: e5932000 ldr r2, [r3] 14ba8: e2822001 add r2, r2, #1 14bac: e5832000 str r2, [r3]
/* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING );
14bb0: e3a01008 mov r1, #8 14bb4: e5940000 ldr r0, [r4] 14bb8: eb000d42 bl 180c8 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
14bbc: e1a00004 mov r0, r4 14bc0: ebffff6b bl 14974 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
14bc4: e1a00004 mov r0, r4 14bc8: ebffff7f bl 149cc <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
14bcc: eb000aae bl 1768c <_Thread_Enable_dispatch>
ts->active = true;
14bd0: e3a03001 mov r3, #1 14bd4: 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 );
14bd8: e59d0004 ldr r0, [sp, #4] 14bdc: eb001033 bl 18cb0 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14be0: e59d0000 ldr r0, [sp] 14be4: eb001031 bl 18cb0 <_Watchdog_Remove> 14be8: eaffffa1 b 14a74 <_Timer_server_Body+0x50>
00020a64 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; }
20a64: e3a00000 mov r0, #0 <== NOT EXECUTED 20a68: e12fff1e bx lr <== NOT EXECUTED
00016d54 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL();
16d54: e1a04000 mov r4, r0 16d58: eb000228 bl 17600 <___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();
16d5c: ebffffe0 bl 16ce4 <libc_wrapup>
rtems_shutdown_executive(status);
16d60: e1a00004 mov r0, r4 16d64: eb00003b bl 16e58 <rtems_shutdown_executive>
16d68: eafffffe b 16d68 <_exit+0x14> <== NOT EXECUTED
00033418 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg );
33418: e1a00001 mov r0, r1 <== NOT EXECUTED 3341c: e1a01002 mov r1, r2 <== NOT EXECUTED 33420: e1a02003 mov r2, r3 <== NOT EXECUTED 33424: eaffff8b b 33258 <fcntl> <== NOT EXECUTED
00020a44 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); }
20a44: e3a00001 mov r0, #1 <== NOT EXECUTED 20a48: e12fff1e bx lr <== NOT EXECUTED
000090e8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp );
90e8: eaffffe8 b 9090 <gettimeofday> <== NOT EXECUTED
00020a5c <_kill_r>: #include <reent.h> int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; }
20a5c: e3a00000 mov r0, #0 <== NOT EXECUTED 20a60: e12fff1e bx lr <== NOT EXECUTED
00022db0 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new );
22db0: e1a00001 mov r0, r1 <== NOT EXECUTED 22db4: e1a01002 mov r1, r2 <== NOT EXECUTED 22db8: eaffff68 b 22b60 <link> <== NOT EXECUTED
00022fac <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf );
22fac: e1a00001 mov r0, r1 <== NOT EXECUTED 22fb0: e1a01002 mov r1, r2 <== NOT EXECUTED 22fb4: eaffffc4 b 22ecc <lstat> <== NOT EXECUTED
00016e3c <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size );
16e3c: e1a00001 mov r0, r1 <== NOT EXECUTED 16e40: e1a01002 mov r1, r2 <== NOT EXECUTED 16e44: ea00000e b 16e84 <realloc> <== NOT EXECUTED
00051f28 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
51f28: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
/* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old );
51f2c: e1a00001 mov r0, r1 <== NOT EXECUTED
int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
51f30: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 51f34: e1a05001 mov r5, r1 <== NOT EXECUTED 51f38: e1a06002 mov r6, r2 <== NOT EXECUTED
/* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old );
51f3c: ebfec9c4 bl 4654 <rtems_filesystem_dirname> <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
51f40: e2507000 subs r7, r0, #0 <== NOT EXECUTED 51f44: 1a000019 bne 51fb0 <_rename_r+0x88> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
51f48: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 51f4c: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 51f50: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 51f54: 0a000001 beq 51f60 <_rename_r+0x38> <== NOT EXECUTED 51f58: e3530000 cmp r3, #0 <== NOT EXECUTED 51f5c: 1a000009 bne 51f88 <_rename_r+0x60> <== NOT EXECUTED 51f60: e59f33ac ldr r3, [pc, #940] ; 52314 <_rename_r+0x3ec> <== NOT EXECUTED 51f64: e593e000 ldr lr, [r3] <== NOT EXECUTED 51f68: e28ee018 add lr, lr, #24 <== NOT EXECUTED 51f6c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 51f70: e28dc018 add ip, sp, #24 <== NOT EXECUTED 51f74: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 51f78: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51f7c: e3a04000 mov r4, #0 <== NOT EXECUTED 51f80: e58c3000 str r3, [ip] <== NOT EXECUTED 51f84: ea000013 b 51fd8 <_rename_r+0xb0> <== NOT EXECUTED 51f88: e59f3384 ldr r3, [pc, #900] ; 52314 <_rename_r+0x3ec> <== NOT EXECUTED 51f8c: e593e000 ldr lr, [r3] <== NOT EXECUTED 51f90: e28ee004 add lr, lr, #4 <== NOT EXECUTED 51f94: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 51f98: e28dc018 add ip, sp, #24 <== NOT EXECUTED 51f9c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 51fa0: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51fa4: e1a04007 mov r4, r7 <== NOT EXECUTED 51fa8: e58c3000 str r3, [ip] <== NOT EXECUTED 51fac: ea000009 b 51fd8 <_rename_r+0xb0> <== NOT EXECUTED
else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
51fb0: e3a0c000 mov ip, #0 <== NOT EXECUTED 51fb4: e1a00005 mov r0, r5 <== NOT EXECUTED 51fb8: e1a01007 mov r1, r7 <== NOT EXECUTED 51fbc: e3a02002 mov r2, #2 <== NOT EXECUTED 51fc0: e28d3018 add r3, sp, #24 <== NOT EXECUTED 51fc4: e58dc000 str ip, [sp] <== NOT EXECUTED 51fc8: ebfec9e9 bl 4774 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 )
51fcc: e3500000 cmp r0, #0 <== NOT EXECUTED 51fd0: 03a04001 moveq r4, #1 <== NOT EXECUTED 51fd4: 1a000025 bne 52070 <_rename_r+0x148> <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
51fd8: e28de018 add lr, sp, #24 <== NOT EXECUTED 51fdc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 51fe0: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 51fe4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 51fe8: e59e3000 ldr r3, [lr] <== NOT EXECUTED
name = old + old_parent_pathlen;
51fec: e0855007 add r5, r5, r7 <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
51ff0: e58c3000 str r3, [ip] <== NOT EXECUTED
name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
51ff4: e1a00005 mov r0, r5 <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen;
51ff8: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
51ffc: ebffb329 bl 3eca8 <strlen> <== NOT EXECUTED 52000: e1a01000 mov r1, r0 <== NOT EXECUTED 52004: e1a00005 mov r0, r5 <== NOT EXECUTED 52008: ebfec985 bl 4624 <rtems_filesystem_prefix_separators> <== NOT EXECUTED 5200c: e0855000 add r5, r5, r0 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
52010: e1a00005 mov r0, r5 <== NOT EXECUTED
* Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
52014: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
52018: ebffb322 bl 3eca8 <strlen> <== NOT EXECUTED 5201c: e3a0c000 mov ip, #0 <== NOT EXECUTED 52020: e1a01000 mov r1, r0 <== NOT EXECUTED 52024: e1a0200c mov r2, ip <== NOT EXECUTED 52028: e1a00005 mov r0, r5 <== NOT EXECUTED 5202c: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED 52030: e58dc000 str ip, [sp] <== NOT EXECUTED 52034: ebfec996 bl 4694 <rtems_filesystem_evaluate_relative_path> <== NOT EXECUTED
0, &old_loc, false ); if ( result != 0 ) {
52038: e2505000 subs r5, r0, #0 <== NOT EXECUTED 5203c: 0a00000d beq 52078 <_rename_r+0x150> <== NOT EXECUTED
if ( free_old_parentloc )
52040: e3540000 cmp r4, #0 <== NOT EXECUTED 52044: 0a000007 beq 52068 <_rename_r+0x140> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
52048: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 5204c: e3530000 cmp r3, #0 <== NOT EXECUTED 52050: 0a000004 beq 52068 <_rename_r+0x140> <== NOT EXECUTED 52054: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52058: e3530000 cmp r3, #0 <== NOT EXECUTED 5205c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52060: 11a0e00f movne lr, pc <== NOT EXECUTED 52064: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
52068: ebff9894 bl 382c0 <__errno> <== NOT EXECUTED 5206c: e5805000 str r5, [r0] <== NOT EXECUTED 52070: e3e06000 mvn r6, #0 <== NOT EXECUTED 52074: ea0000a3 b 52308 <_rename_r+0x3e0> <== NOT EXECUTED
/* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
52078: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 5207c: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 52080: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 52084: 13a05000 movne r5, #0 <== NOT EXECUTED 52088: 03a05001 moveq r5, #1 <== NOT EXECUTED 5208c: 0a000001 beq 52098 <_rename_r+0x170> <== NOT EXECUTED 52090: e3530000 cmp r3, #0 <== NOT EXECUTED 52094: 1a000009 bne 520c0 <_rename_r+0x198> <== NOT EXECUTED 52098: e59f3274 ldr r3, [pc, #628] ; 52314 <_rename_r+0x3ec> <== NOT EXECUTED 5209c: e593e000 ldr lr, [r3] <== NOT EXECUTED 520a0: e28ee018 add lr, lr, #24 <== NOT EXECUTED 520a4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 520a8: e28dc004 add ip, sp, #4 <== NOT EXECUTED 520ac: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 520b0: e59e3000 ldr r3, [lr] <== NOT EXECUTED 520b4: e3a00001 mov r0, #1 <== NOT EXECUTED 520b8: e58c3000 str r3, [ip] <== NOT EXECUTED 520bc: ea000008 b 520e4 <_rename_r+0x1bc> <== NOT EXECUTED 520c0: e59f324c ldr r3, [pc, #588] ; 52314 <_rename_r+0x3ec> <== NOT EXECUTED 520c4: e593e000 ldr lr, [r3] <== NOT EXECUTED 520c8: e28ee004 add lr, lr, #4 <== NOT EXECUTED 520cc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 520d0: e28dc004 add ip, sp, #4 <== NOT EXECUTED 520d4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 520d8: e59e3000 ldr r3, [lr] <== NOT EXECUTED 520dc: e58c3000 str r3, [ip] <== NOT EXECUTED 520e0: e1a00005 mov r0, r5 <== NOT EXECUTED
if ( !new_parent_loc.ops->evalformake_h ) {
520e4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 520e8: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 520ec: e3530000 cmp r3, #0 <== NOT EXECUTED 520f0: 0a00004d beq 5222c <_rename_r+0x304> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
520f4: e28d5004 add r5, sp, #4 <== NOT EXECUTED 520f8: e0860000 add r0, r6, r0 <== NOT EXECUTED 520fc: e1a01005 mov r1, r5 <== NOT EXECUTED 52100: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 52104: e1a0e00f mov lr, pc <== NOT EXECUTED 52108: e12fff13 bx r3 <== NOT EXECUTED
if ( result != 0 ) {
5210c: e2506000 subs r6, r0, #0 <== NOT EXECUTED 52110: 0a00001c beq 52188 <_rename_r+0x260> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
52114: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52118: e3530000 cmp r3, #0 <== NOT EXECUTED 5211c: 0a000004 beq 52134 <_rename_r+0x20c> <== NOT EXECUTED 52120: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52124: e3530000 cmp r3, #0 <== NOT EXECUTED 52128: 11a00005 movne r0, r5 <== NOT EXECUTED 5212c: 11a0e00f movne lr, pc <== NOT EXECUTED 52130: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
52134: e3540000 cmp r4, #0 <== NOT EXECUTED 52138: 0a000007 beq 5215c <_rename_r+0x234> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
5213c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52140: e3530000 cmp r3, #0 <== NOT EXECUTED 52144: 0a000004 beq 5215c <_rename_r+0x234> <== NOT EXECUTED 52148: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5214c: e3530000 cmp r3, #0 <== NOT EXECUTED 52150: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52154: 11a0e00f movne lr, pc <== NOT EXECUTED 52158: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
5215c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52160: e3530000 cmp r3, #0 <== NOT EXECUTED 52164: 0a000004 beq 5217c <_rename_r+0x254> <== NOT EXECUTED 52168: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5216c: e3530000 cmp r3, #0 <== NOT EXECUTED 52170: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52174: 11a0e00f movne lr, pc <== NOT EXECUTED 52178: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
5217c: ebff984f bl 382c0 <__errno> <== NOT EXECUTED 52180: e5806000 str r6, [r0] <== NOT EXECUTED 52184: eaffffb9 b 52070 <_rename_r+0x148> <== NOT EXECUTED
/* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
52188: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 5218c: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 52190: e1520003 cmp r2, r3 <== NOT EXECUTED 52194: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52198: 0a00001b beq 5220c <_rename_r+0x2e4> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
5219c: e3530000 cmp r3, #0 <== NOT EXECUTED 521a0: 0a000004 beq 521b8 <_rename_r+0x290> <== NOT EXECUTED 521a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 521a8: e3530000 cmp r3, #0 <== NOT EXECUTED 521ac: 11a00005 movne r0, r5 <== NOT EXECUTED 521b0: 11a0e00f movne lr, pc <== NOT EXECUTED 521b4: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
521b8: e3540000 cmp r4, #0 <== NOT EXECUTED 521bc: 0a000007 beq 521e0 <_rename_r+0x2b8> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
521c0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 521c4: e3530000 cmp r3, #0 <== NOT EXECUTED 521c8: 0a000004 beq 521e0 <_rename_r+0x2b8> <== NOT EXECUTED 521cc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 521d0: e3530000 cmp r3, #0 <== NOT EXECUTED 521d4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 521d8: 11a0e00f movne lr, pc <== NOT EXECUTED 521dc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
521e0: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 521e4: e3530000 cmp r3, #0 <== NOT EXECUTED 521e8: 0a000004 beq 52200 <_rename_r+0x2d8> <== NOT EXECUTED 521ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 521f0: e3530000 cmp r3, #0 <== NOT EXECUTED 521f4: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 521f8: 11a0e00f movne lr, pc <== NOT EXECUTED 521fc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
52200: ebff982e bl 382c0 <__errno> <== NOT EXECUTED 52204: e3a03012 mov r3, #18 <== NOT EXECUTED 52208: ea00001b b 5227c <_rename_r+0x354> <== NOT EXECUTED
} if ( !new_parent_loc.ops->rename_h ) {
5220c: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 52210: e35c0000 cmp ip, #0 <== NOT EXECUTED 52214: 1a00001a bne 52284 <_rename_r+0x35c> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
52218: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5221c: e3530000 cmp r3, #0 <== NOT EXECUTED 52220: 11a00005 movne r0, r5 <== NOT EXECUTED 52224: 11a0e00f movne lr, pc <== NOT EXECUTED 52228: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
5222c: e3540000 cmp r4, #0 <== NOT EXECUTED 52230: 0a000007 beq 52254 <_rename_r+0x32c> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
52234: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52238: e3530000 cmp r3, #0 <== NOT EXECUTED 5223c: 0a000004 beq 52254 <_rename_r+0x32c> <== NOT EXECUTED 52240: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52244: e3530000 cmp r3, #0 <== NOT EXECUTED 52248: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 5224c: 11a0e00f movne lr, pc <== NOT EXECUTED 52250: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
52254: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52258: e3530000 cmp r3, #0 <== NOT EXECUTED 5225c: 0a000004 beq 52274 <_rename_r+0x34c> <== NOT EXECUTED 52260: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52264: e3530000 cmp r3, #0 <== NOT EXECUTED 52268: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 5226c: 11a0e00f movne lr, pc <== NOT EXECUTED 52270: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
52274: ebff9811 bl 382c0 <__errno> <== NOT EXECUTED 52278: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5227c: e5803000 str r3, [r0] <== NOT EXECUTED 52280: eaffff7a b 52070 <_rename_r+0x148> <== NOT EXECUTED
} result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
52284: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 52288: e28d0018 add r0, sp, #24 <== NOT EXECUTED 5228c: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 52290: e1a02005 mov r2, r5 <== NOT EXECUTED 52294: e1a0e00f mov lr, pc <== NOT EXECUTED 52298: e12fff1c bx ip <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
5229c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 522a0: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
522a4: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
522a8: 0a000004 beq 522c0 <_rename_r+0x398> <== NOT EXECUTED 522ac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 522b0: e3530000 cmp r3, #0 <== NOT EXECUTED 522b4: 11a00005 movne r0, r5 <== NOT EXECUTED 522b8: 11a0e00f movne lr, pc <== NOT EXECUTED 522bc: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
522c0: e3540000 cmp r4, #0 <== NOT EXECUTED 522c4: 0a000007 beq 522e8 <_rename_r+0x3c0> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
522c8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 522cc: e3530000 cmp r3, #0 <== NOT EXECUTED 522d0: 0a000004 beq 522e8 <_rename_r+0x3c0> <== NOT EXECUTED 522d4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 522d8: e3530000 cmp r3, #0 <== NOT EXECUTED 522dc: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 522e0: 11a0e00f movne lr, pc <== NOT EXECUTED 522e4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
522e8: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 522ec: e3530000 cmp r3, #0 <== NOT EXECUTED 522f0: 0a000004 beq 52308 <_rename_r+0x3e0> <== NOT EXECUTED 522f4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 522f8: e3530000 cmp r3, #0 <== NOT EXECUTED 522fc: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52300: 11a0e00f movne lr, pc <== NOT EXECUTED 52304: 112fff13 bxne r3 <== NOT EXECUTED
return result; }
52308: e1a00006 mov r0, r6 <== NOT EXECUTED 5230c: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 52310: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00005c88 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf );
5c88: e1a00001 mov r0, r1 <== NOT EXECUTED 5c8c: e1a01002 mov r1, r2 <== NOT EXECUTED 5c90: eaffffc4 b 5ba8 <stat> <== NOT EXECUTED
0000bb38 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path );
bb38: e1a00001 mov r0, r1 <== NOT EXECUTED bb3c: eaffff5c b b8b4 <unlink> <== NOT EXECUTED
0002191c <chdir>: #include <rtems/seterr.h> int chdir( const char *pathname ) {
2191c: e92d4030 push {r4, r5, lr}
rtems_filesystem_location_info_t loc; int result; if ( !pathname )
21920: e2505000 subs r5, r0, #0
#include <rtems/seterr.h> int chdir( const char *pathname ) {
21924: e24dd018 sub sp, sp, #24
rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 21928: 1a000002 bne 21938 <chdir+0x1c> rtems_set_errno_and_return_minus_one( EFAULT );
2192c: eb005a63 bl 382c0 <__errno> 21930: e3a0300e mov r3, #14 21934: ea000025 b 219d0 <chdir+0xb4>
/* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
21938: eb0074da bl 3eca8 <strlen>
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
2193c: e28d4004 add r4, sp, #4 21940: e3a0c001 mov ip, #1
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
21944: e1a01000 mov r1, r0
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
21948: e1a0200c mov r2, ip 2194c: e1a00005 mov r0, r5 21950: e1a03004 mov r3, r4 21954: e58dc000 str ip, [sp] 21958: ebff8b85 bl 4774 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 )
2195c: e3500000 cmp r0, #0
21960: 1a00001b bne 219d4 <chdir+0xb8> return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) {
21964: e59d2010 ldr r2, [sp, #16] 21968: e5923010 ldr r3, [r2, #16] 2196c: e3530000 cmp r3, #0
21970: 1a000007 bne 21994 <chdir+0x78> rtems_filesystem_freenode( &loc );
21974: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21978: e3530000 cmp r3, #0 <== NOT EXECUTED 2197c: 11a00004 movne r0, r4 <== NOT EXECUTED 21980: 11a0e00f movne lr, pc <== NOT EXECUTED 21984: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
21988: eb005a4c bl 382c0 <__errno> <== NOT EXECUTED 2198c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21990: ea00000e b 219d0 <chdir+0xb4> <== NOT EXECUTED
} if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
21994: e1a00004 mov r0, r4 21998: e1a0e00f mov lr, pc 2199c: e12fff13 bx r3 219a0: e3500001 cmp r0, #1
219a4: 0a00000c beq 219dc <chdir+0xc0> rtems_filesystem_freenode( &loc );
219a8: e59d3010 ldr r3, [sp, #16] 219ac: e3530000 cmp r3, #0
219b0: 0a000004 beq 219c8 <chdir+0xac>
219b4: e593301c ldr r3, [r3, #28] 219b8: e3530000 cmp r3, #0 219bc: 11a00004 movne r0, r4 219c0: 11a0e00f movne lr, pc 219c4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
219c8: eb005a3c bl 382c0 <__errno> 219cc: e3a03014 mov r3, #20 219d0: e5803000 str r3, [r0] 219d4: e3e00000 mvn r0, #0 219d8: ea000012 b 21a28 <chdir+0x10c>
} rtems_filesystem_freenode( &rtems_filesystem_current );
219dc: e59f304c ldr r3, [pc, #76] ; 21a30 <chdir+0x114> 219e0: e5930000 ldr r0, [r3] 219e4: e5903010 ldr r3, [r0, #16] 219e8: e3530000 cmp r3, #0
219ec: 0a000004 beq 21a04 <chdir+0xe8>
219f0: e593301c ldr r3, [r3, #28] 219f4: e3530000 cmp r3, #0 219f8: 12800004 addne r0, r0, #4 219fc: 11a0e00f movne lr, pc 21a00: 112fff13 bxne r3
rtems_filesystem_current = loc;
21a04: e59f3024 ldr r3, [pc, #36] ; 21a30 <chdir+0x114> 21a08: e28d4004 add r4, sp, #4 21a0c: e593c000 ldr ip, [r3] 21a10: e8b4000f ldm r4!, {r0, r1, r2, r3} 21a14: e28cc004 add ip, ip, #4 21a18: e8ac000f stmia ip!, {r0, r1, r2, r3} 21a1c: e5943000 ldr r3, [r4] 21a20: e58c3000 str r3, [ip] 21a24: e3a00000 mov r0, #0
return 0; }
21a28: e28dd018 add sp, sp, #24 21a2c: e8bd8030 pop {r4, r5, pc}
0000448c <chmod>: int chmod( const char *path, mode_t mode ) {
448c: e92d4070 push {r4, r5, r6, lr} 4490: e24dd018 sub sp, sp, #24 4494: e1a05001 mov r5, r1 4498: 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 );
449c: eb00ea01 bl 3eca8 <strlen> 44a0: e28d4004 add r4, sp, #4 44a4: e1a01000 mov r1, r0 44a8: e3a0c001 mov ip, #1 44ac: e1a00006 mov r0, r6 44b0: e3a02000 mov r2, #0 44b4: e1a03004 mov r3, r4 44b8: e58dc000 str ip, [sp] 44bc: eb0000ac bl 4774 <rtems_filesystem_evaluate_path>
if ( status != 0 )
44c0: e3500000 cmp r0, #0
44c4: 1a00000d bne 4500 <chmod+0x74> return -1; if ( !loc.handlers ){
44c8: e59d300c ldr r3, [sp, #12] 44cc: e3530000 cmp r3, #0
44d0: 1a00000c bne 4508 <chmod+0x7c> rtems_filesystem_freenode( &loc );
44d4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 44d8: e3530000 cmp r3, #0 <== NOT EXECUTED 44dc: 0a000004 beq 44f4 <chmod+0x68> <== NOT EXECUTED 44e0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 44e4: e3530000 cmp r3, #0 <== NOT EXECUTED 44e8: 11a00004 movne r0, r4 <== NOT EXECUTED 44ec: 11a0e00f movne lr, pc <== NOT EXECUTED 44f0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
44f4: eb00cf71 bl 382c0 <__errno> <== NOT EXECUTED 44f8: e3a03009 mov r3, #9 <== NOT EXECUTED 44fc: e5803000 str r3, [r0] <== NOT EXECUTED
4500: e3e05000 mvn r5, #0 4504: ea00001a b 4574 <chmod+0xe8>
} if ( !loc.handlers->fchmod_h ){
4508: e593301c ldr r3, [r3, #28] 450c: e3530000 cmp r3, #0
4510: 1a00000a bne 4540 <chmod+0xb4> rtems_filesystem_freenode( &loc );
4514: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4518: e3530000 cmp r3, #0 <== NOT EXECUTED 451c: 0a000004 beq 4534 <chmod+0xa8> <== NOT EXECUTED 4520: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4524: e3530000 cmp r3, #0 <== NOT EXECUTED 4528: 11a00004 movne r0, r4 <== NOT EXECUTED 452c: 11a0e00f movne lr, pc <== NOT EXECUTED 4530: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4534: eb00cf61 bl 382c0 <__errno> <== NOT EXECUTED 4538: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 453c: eaffffee b 44fc <chmod+0x70> <== NOT EXECUTED
} result = (*loc.handlers->fchmod_h)( &loc, mode );
4540: e1a01005 mov r1, r5 4544: e1a00004 mov r0, r4 4548: e1a0e00f mov lr, pc 454c: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
4550: e59d3010 ldr r3, [sp, #16] 4554: 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 );
4558: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 455c: 0a000004 beq 4574 <chmod+0xe8>
4560: e593301c ldr r3, [r3, #28] 4564: e3530000 cmp r3, #0 4568: 11a00004 movne r0, r4 456c: 11a0e00f movne lr, pc 4570: 112fff13 bxne r3
return result; }
4574: e1a00005 mov r0, r5 4578: e28dd018 add sp, sp, #24 457c: e8bd8070 pop {r4, r5, r6, pc}
00021a34 <chown>: int chown( const char *path, uid_t owner, gid_t group ) {
21a34: e92d40f0 push {r4, r5, r6, r7, lr} 21a38: e1a01801 lsl r1, r1, #16 21a3c: e24dd018 sub sp, sp, #24 21a40: e1a02802 lsl r2, r2, #16 21a44: e1a06821 lsr r6, r1, #16 21a48: e1a05822 lsr r5, r2, #16 21a4c: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
21a50: eb007494 bl 3eca8 <strlen> 21a54: e28d4004 add r4, sp, #4 21a58: e1a01000 mov r1, r0 21a5c: e3a0c001 mov ip, #1 21a60: e1a00007 mov r0, r7 21a64: e3a02000 mov r2, #0 21a68: e1a03004 mov r3, r4 21a6c: e58dc000 str ip, [sp] 21a70: ebff8b3f bl 4774 <rtems_filesystem_evaluate_path> 21a74: e3500000 cmp r0, #0
21a78: 1a00000b bne 21aac <chown+0x78> return -1; if ( !loc.ops->chown_h ) {
21a7c: e59d2010 ldr r2, [sp, #16] 21a80: e5923018 ldr r3, [r2, #24] 21a84: e3530000 cmp r3, #0
21a88: 1a000009 bne 21ab4 <chown+0x80> rtems_filesystem_freenode( &loc );
21a8c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21a90: e3530000 cmp r3, #0 <== NOT EXECUTED 21a94: 11a00004 movne r0, r4 <== NOT EXECUTED 21a98: 11a0e00f movne lr, pc <== NOT EXECUTED 21a9c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
21aa0: eb005a06 bl 382c0 <__errno> <== NOT EXECUTED 21aa4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21aa8: e5803000 str r3, [r0] <== NOT EXECUTED
21aac: e3e05000 mvn r5, #0 21ab0: ea00000d b 21aec <chown+0xb8>
} result = (*loc.ops->chown_h)( &loc, owner, group );
21ab4: e1a02005 mov r2, r5 21ab8: e1a01006 mov r1, r6 21abc: e1a00004 mov r0, r4 21ac0: e1a0e00f mov lr, pc 21ac4: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
21ac8: e59d3010 ldr r3, [sp, #16] 21acc: 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 );
21ad0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 21ad4: 0a000004 beq 21aec <chown+0xb8>
21ad8: e593301c ldr r3, [r3, #28] 21adc: e3530000 cmp r3, #0 21ae0: 11a00004 movne r0, r4 21ae4: 11a0e00f movne lr, pc 21ae8: 112fff13 bxne r3
return result; }
21aec: e1a00005 mov r0, r5 21af0: e28dd018 add sp, sp, #24 21af4: e8bd80f0 pop {r4, r5, r6, r7, pc}
00021af8 <chroot>: #include <rtems/seterr.h> int chroot( const char *pathname ) {
21af8: 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) {
21afc: e59f50d4 ldr r5, [pc, #212] ; 21bd8 <chroot+0xe0> 21b00: e59f30d4 ldr r3, [pc, #212] ; 21bdc <chroot+0xe4> 21b04: e5954000 ldr r4, [r5] 21b08: e1540003 cmp r4, r3
#include <rtems/seterr.h> int chroot( const char *pathname ) {
21b0c: e24dd018 sub sp, sp, #24 21b10: 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) { 21b14: 1a000007 bne 21b38 <chroot+0x40> rtems_libio_set_private_env(); /* try to set a new private env*/
21b18: eb0005d8 bl 23280 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
21b1c: e5953000 ldr r3, [r5] 21b20: e1530004 cmp r3, r4
21b24: 1a000003 bne 21b38 <chroot+0x40> rtems_set_errno_and_return_minus_one( ENOTSUP );
21b28: eb0059e4 bl 382c0 <__errno> <== NOT EXECUTED 21b2c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21b30: e5803000 str r3, [r0] <== NOT EXECUTED 21b34: ea000008 b 21b5c <chroot+0x64> <== NOT EXECUTED
} result = chdir(pathname);
21b38: e1a00006 mov r0, r6 21b3c: ebffff76 bl 2191c <chdir>
if (result) {
21b40: e250c000 subs ip, r0, #0
21b44: 0a000006 beq 21b64 <chroot+0x6c> rtems_set_errno_and_return_minus_one( errno );
21b48: eb0059dc bl 382c0 <__errno> <== NOT EXECUTED 21b4c: e1a04000 mov r4, r0 <== NOT EXECUTED 21b50: eb0059da bl 382c0 <__errno> <== NOT EXECUTED 21b54: e5903000 ldr r3, [r0] <== NOT EXECUTED 21b58: e5843000 str r3, [r4] <== NOT EXECUTED 21b5c: e3e00000 mvn r0, #0 <== NOT EXECUTED 21b60: ea00001a b 21bd0 <chroot+0xd8> <== NOT EXECUTED
} /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
21b64: e1a0200c mov r2, ip 21b68: e59f0070 ldr r0, [pc, #112] ; 21be0 <chroot+0xe8> 21b6c: e3a01001 mov r1, #1 21b70: e28d3004 add r3, sp, #4 21b74: e58dc000 str ip, [sp] 21b78: ebff8afd bl 4774 <rtems_filesystem_evaluate_path> 21b7c: e3500000 cmp r0, #0
21b80: 1afffff0 bne 21b48 <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);
21b84: e59f304c ldr r3, [pc, #76] ; 21bd8 <chroot+0xe0> 21b88: e5930000 ldr r0, [r3] 21b8c: e5903024 ldr r3, [r0, #36] ; 0x24 21b90: e3530000 cmp r3, #0
21b94: 0a000004 beq 21bac <chroot+0xb4>
21b98: e593301c ldr r3, [r3, #28] 21b9c: e3530000 cmp r3, #0 21ba0: 12800018 addne r0, r0, #24 21ba4: 11a0e00f movne lr, pc 21ba8: 112fff13 bxne r3
rtems_filesystem_root = loc;
21bac: e59f3024 ldr r3, [pc, #36] ; 21bd8 <chroot+0xe0> 21bb0: e28d4004 add r4, sp, #4 21bb4: e593c000 ldr ip, [r3] 21bb8: e8b4000f ldm r4!, {r0, r1, r2, r3} 21bbc: e28cc018 add ip, ip, #24 21bc0: e8ac000f stmia ip!, {r0, r1, r2, r3} 21bc4: e5943000 ldr r3, [r4] 21bc8: e58c3000 str r3, [ip] 21bcc: e3a00000 mov r0, #0
return 0; }
21bd0: e28dd018 add sp, sp, #24 21bd4: e8bd8070 pop {r4, r5, r6, pc}
00007fa8 <devFS_evaluate_path>: const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
7fa8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access;
7fac: e5935000 ldr r5, [r3]
if (!device_name_table)
7fb0: e3550000 cmp r5, #0
const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
7fb4: e1a04003 mov r4, r3 7fb8: e1a09000 mov r9, r0 7fbc: e1a08001 mov r8, r1
rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table)
7fc0: 13a06000 movne r6, #0
rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
7fc4: 159fa090 ldrne sl, [pc, #144] ; 805c <devFS_evaluate_path+0xb4>
rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 7fc8: 1a000019 bne 8034 <devFS_evaluate_path+0x8c> rtems_set_errno_and_return_minus_one( EFAULT );
7fcc: eb000613 bl 9820 <__errno> <== NOT EXECUTED 7fd0: e3a0300e mov r3, #14 <== NOT EXECUTED 7fd4: e5803000 str r3, [r0] <== NOT EXECUTED 7fd8: e3e00000 mvn r0, #0 <== NOT EXECUTED 7fdc: 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)
7fe0: e5957000 ldr r7, [r5] 7fe4: e2571000 subs r1, r7, #0
7fe8: 0a00000f beq 802c <devFS_evaluate_path+0x84> continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
7fec: eb0009c1 bl a6f8 <strncmp> 7ff0: e3500000 cmp r0, #0
7ff4: 1a00000c bne 802c <devFS_evaluate_path+0x84> continue; if (device_name_table[i].device_name[pathnamelen] != '\0')
7ff8: e7d70008 ldrb r0, [r7, r8] 7ffc: e3500000 cmp r0, #0
8000: 1a000009 bne 802c <devFS_evaluate_path+0x84> /* 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;
8004: e59f3054 ldr r3, [pc, #84] ; 8060 <devFS_evaluate_path+0xb8> 8008: e5933000 ldr r3, [r3] 800c: e5933028 ldr r3, [r3, #40] ; 0x28 8010: e5843010 str r3, [r4, #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;
8014: e59f3048 ldr r3, [pc, #72] ; 8064 <devFS_evaluate_path+0xbc> 8018: e5843008 str r3, [r4, #8]
pathloc->ops = &devFS_ops;
801c: e59f3044 ldr r3, [pc, #68] ; 8068 <devFS_evaluate_path+0xc0>
if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i];
8020: e5845000 str r5, [r4]
pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops;
8024: e584300c str r3, [r4, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0;
8028: 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++) {
802c: e2866001 add r6, r6, #1 8030: e2855014 add r5, r5, #20 8034: e59a3000 ldr r3, [sl] 8038: e1560003 cmp r6, r3
if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
803c: e1a00009 mov r0, r9 8040: e1a02008 mov r2, r8
/* 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++) { 8044: 3affffe5 bcc 7fe0 <devFS_evaluate_path+0x38> pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT );
8048: eb0005f4 bl 9820 <__errno> 804c: e3a03002 mov r3, #2 8050: e5803000 str r3, [r0] 8054: e3e00000 mvn r0, #0
}
8058: 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 ) {
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 ) {
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: eb001a29 bl 7af8 <_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: eb002170 bl 9820 <__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: eb002396 bl a0d8 <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: eb002147 bl 9820 <__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: eb00213d bl 9820 <__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: eb00240b bl a378 <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: eb002132 bl 9820 <__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: eb002126 bl 9820 <__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: eb0024b7 bl a698 <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: eb000f5a bl 5200 <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: 1b001af2 blne 806c <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: eb0020d8 bl 9820 <__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)
0000a428 <device_read>: ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) {
a428: 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;
a42c: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
a430: e280c00c add ip, r0, #12 <== NOT EXECUTED a434: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags;
a438: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
a43c: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
a440: e3a03000 mov r3, #0 <== NOT EXECUTED
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count;
a444: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
a448: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer;
a44c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop;
a450: 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;
a454: 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(
a458: e1a0200d mov r2, sp <== NOT EXECUTED a45c: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED a460: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a464: eb0003eb bl b418 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
a468: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
a46c: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
a470: 1b0004fb blne b864 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved; }
a474: e28dd01c add sp, sp, #28 <== NOT EXECUTED a478: e8bd8800 pop {fp, pc} <== NOT EXECUTED
00003368 <drainOutput>: drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3368: e59030b4 ldr r3, [r0, #180] ; 0xb4 336c: e3530000 cmp r3, #0
/* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) {
3370: e92d4030 push {r4, r5, lr} 3374: e1a04000 mov r4, r0
rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3378: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
337c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3380: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3384: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait;
3388: 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) {
338c: ea00000a b 33bc <drainOutput+0x54> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
3390: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
3394: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
3398: e3a01000 mov r1, #0 <== NOT EXECUTED 339c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 33a0: e1a02001 mov r2, r1 <== NOT EXECUTED 33a4: eb0005af bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
33a8: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
33ac: 1b000740 blne 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
33b0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 33b4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 33b8: 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) {
33bc: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 33c0: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 33c4: e1510002 cmp r1, r2 <== NOT EXECUTED 33c8: 1afffff0 bne 3390 <drainOutput+0x28> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
33cc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 33d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000253c <dup2>: int dup2( int fildes, int fildes2 ) {
253c: e92d4070 push {r4, r5, r6, lr} 2540: e24dd048 sub sp, sp, #72 ; 0x48 2544: e1a04001 mov r4, r1
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
2548: e1a0100d mov r1, sp
int dup2( int fildes, int fildes2 ) {
254c: e1a06000 mov r6, r0
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
2550: eb00019b bl 2bc4 <fstat>
if ( status == -1 )
2554: e3700001 cmn r0, #1
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
2558: e1a0500d mov r5, sp
if ( status == -1 ) 255c: 0a000009 beq 2588 <dup2+0x4c> /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf );
2560: e1a0100d mov r1, sp 2564: e1a00004 mov r0, r4 2568: eb000195 bl 2bc4 <fstat>
if ( status == -1 )
256c: e3700001 cmn r0, #1
2570: 0a000004 beq 2588 <dup2+0x4c> /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 );
2574: e1a00006 mov r0, r6 <== NOT EXECUTED 2578: e1a02004 mov r2, r4 <== NOT EXECUTED 257c: e3a01000 mov r1, #0 <== NOT EXECUTED 2580: eb00008d bl 27bc <fcntl> <== NOT EXECUTED 2584: ea000000 b 258c <dup2+0x50> <== NOT EXECUTED
2588: e3e00000 mvn r0, #0
}
258c: e28dd048 add sp, sp, #72 ; 0x48 2590: e8bd8070 pop {r4, r5, r6, pc}
00002e68 <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')) {
2e68: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 2e6c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) {
2e70: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 2e74: e1a04001 mov r4, r1 <== NOT EXECUTED 2e78: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2e7c: 0a000015 beq 2ed8 <echo+0x70> <== NOT EXECUTED 2e80: e59f305c ldr r3, [pc, #92] ; 2ee4 <echo+0x7c> <== NOT EXECUTED 2e84: e5933000 ldr r3, [r3] <== NOT EXECUTED 2e88: e0833000 add r3, r3, r0 <== NOT EXECUTED 2e8c: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 2e90: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2e94: 13a03001 movne r3, #1 <== NOT EXECUTED 2e98: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 2e9c: 0a00000d beq 2ed8 <echo+0x70> <== NOT EXECUTED 2ea0: e350000a cmp r0, #10 <== NOT EXECUTED 2ea4: 0a00000b beq 2ed8 <echo+0x70> <== NOT EXECUTED
char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40;
2ea8: 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] = '^';
2eac: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
2eb0: e1a0000d mov r0, sp <== NOT EXECUTED 2eb4: e3a01002 mov r1, #2 <== NOT EXECUTED 2eb8: 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;
2ebc: 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] = '^';
2ec0: e5cdc000 strb ip, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
2ec4: ebffff4d bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
2ec8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2ecc: e2833002 add r3, r3, #2 <== NOT EXECUTED 2ed0: 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')) {
2ed4: ea000001 b 2ee0 <echo+0x78> <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty);
2ed8: e1a01004 mov r1, r4 <== NOT EXECUTED 2edc: ebffff8b bl 2d10 <oproc> <== NOT EXECUTED
} }
2ee0: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
0002218c <endgrent>: group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL)
2218c: e59f300c ldr r3, [pc, #12] ; 221a0 <endgrent+0x14> <== NOT EXECUTED 22190: e5930000 ldr r0, [r3] <== NOT EXECUTED 22194: e3500000 cmp r0, #0 <== NOT EXECUTED 22198: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
2219c: ea005894 b 383f4 <fclose> <== NOT EXECUTED
000221a4 <endpwent>: passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL)
221a4: e59f300c ldr r3, [pc, #12] ; 221b8 <endpwent+0x14> <== NOT EXECUTED 221a8: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 221ac: e3500000 cmp r0, #0 <== NOT EXECUTED 221b0: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
221b4: ea00588e b 383f4 <fclose> <== NOT EXECUTED
00002ee8 <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)
2ee8: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 2eec: 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) {
2ef0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 2ef4: e1a04000 mov r4, r0 <== NOT EXECUTED 2ef8: e1a07001 mov r7, r1 <== NOT EXECUTED
if (tty->ccount == 0)
2efc: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return; if (lineFlag) {
2f00: e3510000 cmp r1, #0 <== NOT EXECUTED 2f04: 0a000062 beq 3094 <erase+0x1ac> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
2f08: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 2f0c: e2132008 ands r2, r3, #8 <== NOT EXECUTED
tty->ccount = 0;
2f10: 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)) {
2f14: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) {
2f18: e2133010 ands r3, r3, #16 <== NOT EXECUTED 2f1c: 1a00005c bne 3094 <erase+0x1ac> <== NOT EXECUTED
tty->ccount = 0;
2f20: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
2f24: e1a01004 mov r1, r4 <== NOT EXECUTED 2f28: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 2f2c: ebffffcd bl 2e68 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2f30: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2f34: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
2f38: 11a01004 movne r1, r4 <== NOT EXECUTED 2f3c: 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)
2f40: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2f44: ea00000c b 2f7c <erase+0x94> <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
2f48: e2411001 sub r1, r1, #1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2f4c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
2f50: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2f54: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2f58: e3130008 tst r3, #8 <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
2f5c: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2f60: 0a000048 beq 3088 <erase+0x1a0> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
2f64: e3570000 cmp r7, #0 <== NOT EXECUTED 2f68: 1a000005 bne 2f84 <erase+0x9c> <== NOT EXECUTED 2f6c: e3130010 tst r3, #16 <== NOT EXECUTED 2f70: 1a000003 bne 2f84 <erase+0x9c> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
2f74: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2f78: e1a01004 mov r1, r4 <== NOT EXECUTED
} } if (!lineFlag) break; } }
2f7c: 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);
2f80: eaffffb8 b 2e68 <echo> <== NOT EXECUTED
} else if (c == '\t') {
2f84: e3550009 cmp r5, #9 <== NOT EXECUTED 2f88: 1a000020 bne 3010 <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)
2f8c: 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;
2f90: 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)) {
2f94: e596c000 ldr ip, [r6] <== NOT EXECUTED 2f98: e3a02000 mov r2, #0 <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
2f9c: ea00000d b 2fd8 <erase+0xf0> <== NOT EXECUTED
c = tty->cbuf[i++];
2fa0: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 2fa4: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED
if (c == '\t') {
2fa8: e3500009 cmp r0, #9 <== NOT EXECUTED
col = (col | 7) + 1; } else if (iscntrl (c)) {
2fac: 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;
2fb0: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') {
2fb4: 0a000005 beq 2fd0 <erase+0xe8> <== NOT EXECUTED
col = (col | 7) + 1; } else if (iscntrl (c)) {
2fb8: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 2fbc: e3100020 tst r0, #32 <== NOT EXECUTED 2fc0: 0a000002 beq 2fd0 <erase+0xe8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
2fc4: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
2fc8: 12855002 addne r5, r5, #2 <== NOT EXECUTED 2fcc: ea000000 b 2fd4 <erase+0xec> <== NOT EXECUTED
} else { col++;
2fd0: e2855001 add r5, r5, #1 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++];
2fd4: e2822001 add r2, r2, #1 <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
2fd8: e1520001 cmp r2, r1 <== NOT EXECUTED 2fdc: 1affffef bne 2fa0 <erase+0xb8> <== NOT EXECUTED 2fe0: ea000006 b 3000 <erase+0x118> <== NOT EXECUTED
/* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty);
2fe4: e59f00bc ldr r0, [pc, #188] ; 30a8 <erase+0x1c0> <== NOT EXECUTED 2fe8: e3a01001 mov r1, #1 <== NOT EXECUTED 2fec: e1a02004 mov r2, r4 <== NOT EXECUTED 2ff0: ebffff02 bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
2ff4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2ff8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2ffc: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} /* * Back up over the tab */ while (tty->column > col) {
3000: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3004: e1530005 cmp r3, r5 <== NOT EXECUTED 3008: cafffff5 bgt 2fe4 <erase+0xfc> <== NOT EXECUTED 300c: ea00001d b 3088 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
3010: e5962000 ldr r2, [r6] <== NOT EXECUTED 3014: e2855001 add r5, r5, #1 <== NOT EXECUTED 3018: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 301c: e3120020 tst r2, #32 <== NOT EXECUTED 3020: 0a000009 beq 304c <erase+0x164> <== NOT EXECUTED 3024: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3028: 0a000007 beq 304c <erase+0x164> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
302c: e59f0078 ldr r0, [pc, #120] ; 30ac <erase+0x1c4> <== NOT EXECUTED 3030: e3a01003 mov r1, #3 <== NOT EXECUTED 3034: e1a02004 mov r2, r4 <== NOT EXECUTED 3038: ebfffef0 bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
303c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3040: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3044: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3048: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
304c: e5963000 ldr r3, [r6] <== NOT EXECUTED 3050: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3054: e3130020 tst r3, #32 <== NOT EXECUTED 3058: 0a000002 beq 3068 <erase+0x180> <== NOT EXECUTED 305c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3060: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3064: 0a000007 beq 3088 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
3068: e59f003c ldr r0, [pc, #60] ; 30ac <erase+0x1c4> <== NOT EXECUTED 306c: e3a01003 mov r1, #3 <== NOT EXECUTED 3070: e1a02004 mov r2, r4 <== NOT EXECUTED 3074: ebfffee1 bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3078: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 307c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3080: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3084: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} } } if (!lineFlag)
3088: e3570000 cmp r7, #0 <== NOT EXECUTED 308c: 1a000001 bne 3098 <erase+0x1b0> <== NOT EXECUTED 3090: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3094: e59f6014 ldr r6, [pc, #20] ; 30b0 <erase+0x1c8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) {
3098: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 309c: e3510000 cmp r1, #0 <== NOT EXECUTED 30a0: 1affffa8 bne 2f48 <erase+0x60> <== NOT EXECUTED 30a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000330e0 <fchdir>: #include <rtems/seterr.h> int fchdir( int fd ) {
330e0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd );
330e4: e59f315c ldr r3, [pc, #348] ; 33248 <fchdir+0x168> <== NOT EXECUTED 330e8: e5933000 ldr r3, [r3] <== NOT EXECUTED 330ec: e1500003 cmp r0, r3 <== NOT EXECUTED
#include <rtems/seterr.h> int fchdir( int fd ) {
330f0: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd );
330f4: 2a000005 bcs 33110 <fchdir+0x30> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
330f8: e59f314c ldr r3, [pc, #332] ; 3324c <fchdir+0x16c> <== NOT EXECUTED 330fc: e5934000 ldr r4, [r3] <== NOT EXECUTED 33100: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
33104: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 33108: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3310c: 1a000002 bne 3311c <fchdir+0x3c> <== NOT EXECUTED 33110: eb00146a bl 382c0 <__errno> <== NOT EXECUTED 33114: e3a03009 mov r3, #9 <== NOT EXECUTED 33118: ea000016 b 33178 <fchdir+0x98> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
3311c: e3130002 tst r3, #2 <== NOT EXECUTED 33120: 1a000002 bne 33130 <fchdir+0x50> <== NOT EXECUTED 33124: eb001465 bl 382c0 <__errno> <== NOT EXECUTED 33128: e3a03016 mov r3, #22 <== NOT EXECUTED 3312c: ea000011 b 33178 <fchdir+0x98> <== NOT EXECUTED
/* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) {
33130: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 33134: e3530000 cmp r3, #0 <== NOT EXECUTED 33138: 0a000002 beq 33148 <fchdir+0x68> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) {
3313c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 33140: e3530000 cmp r3, #0 <== NOT EXECUTED 33144: 1a000002 bne 33154 <fchdir+0x74> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
33148: eb00145c bl 382c0 <__errno> <== NOT EXECUTED 3314c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 33150: ea000008 b 33178 <fchdir+0x98> <== NOT EXECUTED
} if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
33154: e2844018 add r4, r4, #24 <== NOT EXECUTED 33158: e1a00004 mov r0, r4 <== NOT EXECUTED 3315c: e1a0e00f mov lr, pc <== NOT EXECUTED 33160: e12fff13 bx r3 <== NOT EXECUTED 33164: e3500001 cmp r0, #1 <== NOT EXECUTED 33168: e1a06000 mov r6, r0 <== NOT EXECUTED 3316c: 0a000003 beq 33180 <fchdir+0xa0> <== NOT EXECUTED
RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR );
33170: eb001452 bl 382c0 <__errno> <== NOT EXECUTED 33174: e3a03014 mov r3, #20 <== NOT EXECUTED 33178: e5803000 str r3, [r0] <== NOT EXECUTED 3317c: ea00001c b 331f4 <fchdir+0x114> <== NOT EXECUTED
* but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current;
33180: e59f50c8 ldr r5, [pc, #200] ; 33250 <fchdir+0x170> <== NOT EXECUTED 33184: e5957000 ldr r7, [r5] <== NOT EXECUTED 33188: e287c004 add ip, r7, #4 <== NOT EXECUTED 3318c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 33190: e28de004 add lr, sp, #4 <== NOT EXECUTED 33194: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 33198: e59c3000 ldr r3, [ip] <== NOT EXECUTED 3319c: e58e3000 str r3, [lr] <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
331a0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 331a4: e287e004 add lr, r7, #4 <== NOT EXECUTED 331a8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 331ac: e5943000 ldr r3, [r4] <== NOT EXECUTED
/* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
331b0: e3a0e000 mov lr, #0 <== NOT EXECUTED
* share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo;
331b4: e58c3000 str r3, [ip] <== NOT EXECUTED
/* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
331b8: e1a01006 mov r1, r6 <== NOT EXECUTED 331bc: e1a0200e mov r2, lr <== NOT EXECUTED 331c0: e59f008c ldr r0, [pc, #140] ; 33254 <fchdir+0x174> <== NOT EXECUTED 331c4: e28d3018 add r3, sp, #24 <== NOT EXECUTED 331c8: e58de000 str lr, [sp] <== NOT EXECUTED 331cc: ebff4568 bl 4774 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 331d0: e3500000 cmp r0, #0 <== NOT EXECUTED 331d4: 0a000008 beq 331fc <fchdir+0x11c> <== NOT EXECUTED
/* cloning failed; restore original and bail out */ rtems_filesystem_current = saved;
331d8: e595c000 ldr ip, [r5] <== NOT EXECUTED 331dc: e28d4004 add r4, sp, #4 <== NOT EXECUTED 331e0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 331e4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 331e8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 331ec: e5943000 ldr r3, [r4] <== NOT EXECUTED 331f0: e58c3000 str r3, [ip] <== NOT EXECUTED 331f4: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
331f8: ea000010 b 33240 <fchdir+0x160> <== NOT EXECUTED
} /* release the old one */ rtems_filesystem_freenode( &saved );
331fc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 33200: e3530000 cmp r3, #0 <== NOT EXECUTED 33204: 0a000004 beq 3321c <fchdir+0x13c> <== NOT EXECUTED 33208: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3320c: e3530000 cmp r3, #0 <== NOT EXECUTED 33210: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 33214: 11a0e00f movne lr, pc <== NOT EXECUTED 33218: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_current = loc;
3321c: e59f302c ldr r3, [pc, #44] ; 33250 <fchdir+0x170> <== NOT EXECUTED 33220: e28d4018 add r4, sp, #24 <== NOT EXECUTED 33224: e593c000 ldr ip, [r3] <== NOT EXECUTED 33228: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3322c: e28cc004 add ip, ip, #4 <== NOT EXECUTED 33230: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 33234: e5943000 ldr r3, [r4] <== NOT EXECUTED 33238: e58c3000 str r3, [ip] <== NOT EXECUTED 3323c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0; }
33240: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 33244: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00021dec <fchmod>: mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd );
21dec: e59f307c ldr r3, [pc, #124] ; 21e70 <fchmod+0x84> <== NOT EXECUTED 21df0: e5932000 ldr r2, [r3] <== NOT EXECUTED 21df4: e1500002 cmp r0, r2 <== NOT EXECUTED
int fchmod( int fd, mode_t mode ) {
21df8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
21dfc: 2a000005 bcs 21e18 <fchmod+0x2c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
21e00: e59f306c ldr r3, [pc, #108] ; 21e74 <fchmod+0x88> <== NOT EXECUTED 21e04: e5933000 ldr r3, [r3] <== NOT EXECUTED 21e08: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
21e0c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 21e10: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 21e14: 1a000002 bne 21e24 <fchmod+0x38> <== NOT EXECUTED 21e18: eb005928 bl 382c0 <__errno> <== NOT EXECUTED 21e1c: e3a03009 mov r3, #9 <== NOT EXECUTED 21e20: ea00000a b 21e50 <fchmod+0x64> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
21e24: e3120004 tst r2, #4 <== NOT EXECUTED 21e28: 1a000002 bne 21e38 <fchmod+0x4c> <== NOT EXECUTED 21e2c: eb005923 bl 382c0 <__errno> <== NOT EXECUTED 21e30: e3a03016 mov r3, #22 <== NOT EXECUTED 21e34: ea000005 b 21e50 <fchmod+0x64> <== NOT EXECUTED
if ( !iop->handlers->fchmod_h )
21e38: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 21e3c: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 21e40: e3520000 cmp r2, #0 <== NOT EXECUTED 21e44: 1a000004 bne 21e5c <fchmod+0x70> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
21e48: eb00591c bl 382c0 <__errno> <== NOT EXECUTED 21e4c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21e50: e5803000 str r3, [r0] <== NOT EXECUTED 21e54: e3e00000 mvn r0, #0 <== NOT EXECUTED 21e58: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
21e5c: e2830018 add r0, r3, #24 <== NOT EXECUTED 21e60: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 21e64: e1a0e00f mov lr, pc <== NOT EXECUTED 21e68: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED
}
21e6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00021e78 <fchown>: gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd );
21e78: e59f3088 ldr r3, [pc, #136] ; 21f08 <fchown+0x90> <== NOT EXECUTED 21e7c: e5933000 ldr r3, [r3] <== NOT EXECUTED
int fchown( int fd, uid_t owner, gid_t group ) {
21e80: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 21e84: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
21e88: e1500003 cmp r0, r3 <== NOT EXECUTED
int fchown( int fd, uid_t owner, gid_t group ) {
21e8c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 21e90: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 21e94: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
21e98: 2a000005 bcs 21eb4 <fchown+0x3c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
21e9c: e59f3068 ldr r3, [pc, #104] ; 21f0c <fchown+0x94> <== NOT EXECUTED 21ea0: e5933000 ldr r3, [r3] <== NOT EXECUTED 21ea4: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
21ea8: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 21eac: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 21eb0: 1a000002 bne 21ec0 <fchown+0x48> <== NOT EXECUTED 21eb4: eb005901 bl 382c0 <__errno> <== NOT EXECUTED 21eb8: e3a03009 mov r3, #9 <== NOT EXECUTED 21ebc: ea00000a b 21eec <fchown+0x74> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
21ec0: e3130004 tst r3, #4 <== NOT EXECUTED 21ec4: 1a000002 bne 21ed4 <fchown+0x5c> <== NOT EXECUTED 21ec8: eb0058fc bl 382c0 <__errno> <== NOT EXECUTED 21ecc: e3a03016 mov r3, #22 <== NOT EXECUTED 21ed0: ea000005 b 21eec <fchown+0x74> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
21ed4: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 21ed8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 21edc: e3530000 cmp r3, #0 <== NOT EXECUTED 21ee0: 1a000004 bne 21ef8 <fchown+0x80> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
21ee4: eb0058f5 bl 382c0 <__errno> <== NOT EXECUTED 21ee8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21eec: e5803000 str r3, [r0] <== NOT EXECUTED 21ef0: e3e00000 mvn r0, #0 <== NOT EXECUTED 21ef4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
21ef8: e2800018 add r0, r0, #24 <== NOT EXECUTED 21efc: e1a0e00f mov lr, pc <== NOT EXECUTED 21f00: e12fff13 bx r3 <== NOT EXECUTED
}
21f04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00033258 <fcntl>: int fcntl( int fd, int cmd, ... ) {
33258: e92d000e push {r1, r2, r3} 3325c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
33260: e59f31a4 ldr r3, [pc, #420] ; 3340c <fcntl+0x1b4> 33264: e5933000 ldr r3, [r3]
... ) { int ret; va_list ap; va_start( ap, cmd );
33268: e28d201c add r2, sp, #28
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
3326c: e1500003 cmp r0, r3
... ) { int ret; va_list ap; va_start( ap, cmd );
33270: e58d2000 str r2, [sp]
int fcntl( int fd, int cmd, ... ) {
33274: e59d7018 ldr r7, [sp, #24]
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33278: 2a000005 bcs 33294 <fcntl+0x3c> iop = rtems_libio_iop( fd );
3327c: e59f118c ldr r1, [pc, #396] ; 33410 <fcntl+0x1b8> 33280: e591c000 ldr ip, [r1] 33284: e08c4300 add r4, ip, r0, lsl #6
rtems_libio_check_is_open(iop);
33288: e5940014 ldr r0, [r4, #20] 3328c: e3100c01 tst r0, #256 ; 0x100
33290: 1a000002 bne 332a0 <fcntl+0x48>
33294: eb001409 bl 382c0 <__errno> <== NOT EXECUTED 33298: e3a03009 mov r3, #9 <== NOT EXECUTED 3329c: ea000045 b 333b8 <fcntl+0x160> <== NOT EXECUTED
/* * This switch should contain all the cases from POSIX. */ switch ( cmd ) {
332a0: e3570009 cmp r7, #9 332a4: 979ff107 ldrls pc, [pc, r7, lsl #2] 332a8: ea000040 b 333b0 <fcntl+0x158>
332ac: 000332d4 .word 0x000332d4 <== NOT EXECUTED 332b0: 00033340 .word 0x00033340 <== NOT EXECUTED 332b4: 0003334c .word 0x0003334c <== NOT EXECUTED 332b8: 0003336c .word 0x0003336c <== NOT EXECUTED 332bc: 00033378 .word 0x00033378 <== NOT EXECUTED 332c0: 000333a4 .word 0x000333a4 <== NOT EXECUTED 332c4: 000333a4 .word 0x000333a4 <== NOT EXECUTED 332c8: 000333a4 .word 0x000333a4 <== NOT EXECUTED 332cc: 000333a4 .word 0x000333a4 <== NOT EXECUTED 332d0: 000333a4 .word 0x000333a4 <== NOT EXECUTED
case F_DUPFD: /* dup */ fd2 = va_arg( ap, int );
332d4: e5922000 ldr r2, [r2]
if ( fd2 )
332d8: e3520000 cmp r2, #0
332dc: 0a000003 beq 332f0 <fcntl+0x98> diop = rtems_libio_iop( fd2 );
332e0: e1520003 cmp r2, r3 <== NOT EXECUTED 332e4: 23a0c000 movcs ip, #0 <== NOT EXECUTED 332e8: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 332ec: ea000002 b 332fc <fcntl+0xa4> <== NOT EXECUTED
else { /* allocate a file control block */ diop = rtems_libio_allocate();
332f0: ebff4638 bl 4bd8 <rtems_libio_allocate>
if ( diop == 0 ) {
332f4: e250c000 subs ip, r0, #0
332f8: 0a00003e beq 333f8 <fcntl+0x1a0> } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
332fc: e2846018 add r6, r4, #24 33300: e8b6000f ldm r6!, {r0, r1, r2, r3} 33304: e28c5018 add r5, ip, #24 33308: e8a5000f stmia r5!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
3330c: e59f30fc ldr r3, [pc, #252] ; 33410 <fcntl+0x1b8> 33310: e5933000 ldr r3, [r3]
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
33314: e5966000 ldr r6, [r6]
ret = -1; break; } } diop->handlers = iop->handlers;
33318: e594003c ldr r0, [r4, #60] ; 0x3c
diop->file_info = iop->file_info;
3331c: e5941038 ldr r1, [r4, #56] ; 0x38
diop->flags = iop->flags;
33320: e5942014 ldr r2, [r4, #20]
diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops);
33324: e063300c rsb r3, r3, ip
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
33328: e5856000 str r6, [r5]
ret = -1; break; } } diop->handlers = iop->handlers;
3332c: e58c003c str r0, [ip, #60] ; 0x3c
diop->file_info = iop->file_info;
33330: e58c1038 str r1, [ip, #56] ; 0x38
diop->flags = iop->flags;
33334: e58c2014 str r2, [ip, #20]
diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops);
33338: e1a05343 asr r5, r3, #6 3333c: ea00001f b 333c0 <fcntl+0x168>
break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
33340: e1a055a0 lsr r5, r0, #11 33344: e2055001 and r5, r5, #1 33348: ea00001e b 333c8 <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 ) )
3334c: e5925000 ldr r5, [r2] 33350: e3550000 cmp r5, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
33354: 13800b02 orrne r0, r0, #2048 ; 0x800
else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
33358: 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;
3335c: 15840014 strne r0, [r4, #20]
else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
33360: 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 ) ) 33364: 0a000017 beq 333c8 <fcntl+0x170>
33368: ea00000b b 3339c <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 );
3336c: ebff45b0 bl 4a34 <rtems_libio_to_fcntl_flags> 33370: e1a05000 mov r5, r0 33374: ea000011 b 333c0 <fcntl+0x168>
break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
33378: e5920000 ldr r0, [r2] 3337c: ebff4642 bl 4c8c <rtems_libio_fcntl_flags>
/* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask);
33380: e5943014 ldr r3, [r4, #20] 33384: e59f2088 ldr r2, [pc, #136] ; 33414 <fcntl+0x1bc> 33388: e3c33c02 bic r3, r3, #512 ; 0x200 3338c: e0002002 and r2, r0, r2 33390: e3c33001 bic r3, r3, #1 33394: e1823003 orr r3, r2, r3 33398: e5843014 str r3, [r4, #20] 3339c: e3a05000 mov r5, #0 333a0: ea000008 b 333c8 <fcntl+0x170>
errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP;
333a4: eb0013c5 bl 382c0 <__errno> 333a8: e3a03086 mov r3, #134 ; 0x86 333ac: ea000001 b 333b8 <fcntl+0x160>
ret = -1; break; default: errno = EINVAL;
333b0: eb0013c2 bl 382c0 <__errno> 333b4: e3a03016 mov r3, #22 333b8: e5803000 str r3, [r0] 333bc: ea00000d b 333f8 <fcntl+0x1a0>
/* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) {
333c0: e3550000 cmp r5, #0
333c4: ba00000c blt 333fc <fcntl+0x1a4> if (iop->handlers->fcntl_h) {
333c8: e594303c ldr r3, [r4, #60] ; 0x3c 333cc: e5933030 ldr r3, [r3, #48] ; 0x30 333d0: e3530000 cmp r3, #0
333d4: 0a000008 beq 333fc <fcntl+0x1a4> int err = (*iop->handlers->fcntl_h)( cmd, iop );
333d8: e1a01004 mov r1, r4 333dc: e1a00007 mov r0, r7 333e0: e1a0e00f mov lr, pc 333e4: e12fff13 bx r3
if (err) {
333e8: e2504000 subs r4, r0, #0
333ec: 0a000002 beq 333fc <fcntl+0x1a4> errno = err;
333f0: eb0013b2 bl 382c0 <__errno> <== NOT EXECUTED 333f4: e5804000 str r4, [r0] <== NOT EXECUTED
333f8: e3e05000 mvn r5, #0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
333fc: e1a00005 mov r0, r5 33400: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 33404: e28dd00c add sp, sp, #12 33408: e12fff1e bx lr
0000a9d8 <fifo_open>: ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
a9d8: e59f3324 ldr r3, [pc, #804] ; ad04 <fifo_open+0x32c>
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
a9dc: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} a9e0: e1a08001 mov r8, r1
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
a9e4: e3a01000 mov r1, #0
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
a9e8: e1a07000 mov r7, r0
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
a9ec: e1a02001 mov r2, r1 a9f0: e5930000 ldr r0, [r3] a9f4: ebffe81b bl 4a68 <rtems_semaphore_obtain> a9f8: e250a000 subs sl, r0, #0 a9fc: 13e06003 mvnne r6, #3
aa00: 1a0000bd bne acfc <fifo_open+0x324> RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep;
aa04: e5974000 ldr r4, [r7] <== NOT EXECUTED
if (pipe == NULL) {
aa08: e3540000 cmp r4, #0 <== NOT EXECUTED aa0c: 1a00003e bne ab0c <fifo_open+0x134> <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
aa10: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED aa14: ebffdc7d bl 1c10 <malloc> <== NOT EXECUTED
if (pipe == NULL)
aa18: e3500000 cmp r0, #0 <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
aa1c: e1a05000 mov r5, r0 <== NOT EXECUTED aa20: e1a04000 mov r4, r0 <== NOT EXECUTED
if (pipe == NULL)
aa24: 03e0600b mvneq r6, #11 <== NOT EXECUTED aa28: 0a000045 beq ab44 <fifo_open+0x16c> <== NOT EXECUTED
return err; memset(pipe, 0, sizeof(pipe_control_t));
aa2c: e1a0100a mov r1, sl <== NOT EXECUTED aa30: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED aa34: eb0006ac bl c4ec <memset> <== NOT EXECUTED
pipe->Size = PIPE_BUF;
aa38: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
aa3c: e1a00003 mov r0, r3 <== NOT EXECUTED
pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF;
aa40: e5853004 str r3, [r5, #4] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
aa44: ebffdc71 bl 1c10 <malloc> <== NOT EXECUTED
if (! pipe->Buffer)
aa48: 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);
aa4c: e5850000 str r0, [r5] <== NOT EXECUTED
if (! pipe->Buffer)
aa50: 03e0600b mvneq r6, #11 <== NOT EXECUTED aa54: 0a000029 beq ab00 <fifo_open+0x128> <== NOT EXECUTED
goto err_buf; err = -EINTR; if (rtems_barrier_create(
aa58: e59f62a8 ldr r6, [pc, #680] ; ad08 <fifo_open+0x330> <== NOT EXECUTED aa5c: e59f02a8 ldr r0, [pc, #680] ; ad0c <fifo_open+0x334> <== NOT EXECUTED aa60: e5d63000 ldrb r3, [r6] <== NOT EXECUTED aa64: e1a0100a mov r1, sl <== NOT EXECUTED aa68: e1830000 orr r0, r3, r0 <== NOT EXECUTED aa6c: e1a0200a mov r2, sl <== NOT EXECUTED aa70: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED aa74: eb000164 bl b00c <rtems_barrier_create> <== NOT EXECUTED aa78: e2501000 subs r1, r0, #0 <== NOT EXECUTED aa7c: 1a00001c bne aaf4 <fifo_open+0x11c> <== 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(
aa80: e5d63000 ldrb r3, [r6] <== NOT EXECUTED aa84: e59f0284 ldr r0, [pc, #644] ; ad10 <fifo_open+0x338> <== NOT EXECUTED aa88: e1a02001 mov r2, r1 <== NOT EXECUTED aa8c: e1830000 orr r0, r3, r0 <== NOT EXECUTED aa90: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED aa94: eb00015c bl b00c <rtems_barrier_create> <== NOT EXECUTED aa98: e2503000 subs r3, r0, #0 <== NOT EXECUTED aa9c: 1a000012 bne aaec <fifo_open+0x114> <== 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(
aaa0: e5d62000 ldrb r2, [r6] <== NOT EXECUTED aaa4: e59f0268 ldr r0, [pc, #616] ; ad14 <fifo_open+0x33c> <== NOT EXECUTED aaa8: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED aaac: e1820000 orr r0, r2, r0 <== NOT EXECUTED aab0: e3a01001 mov r1, #1 <== NOT EXECUTED aab4: e3a02010 mov r2, #16 <== NOT EXECUTED aab8: e58dc000 str ip, [sp] <== NOT EXECUTED aabc: ebffe757 bl 4820 <rtems_semaphore_create> <== NOT EXECUTED aac0: e3500000 cmp r0, #0 <== NOT EXECUTED aac4: 1a000006 bne aae4 <fifo_open+0x10c> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z')
aac8: e5d63000 ldrb r3, [r6] <== NOT EXECUTED aacc: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED aad0: e2833001 add r3, r3, #1 <== NOT EXECUTED aad4: e5c63000 strb r3, [r6] <== NOT EXECUTED
c = 'a';
aad8: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED aadc: 05c63000 strbeq r3, [r6] <== NOT EXECUTED aae0: ea000009 b ab0c <fifo_open+0x134> <== NOT EXECUTED
return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier);
aae4: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED aae8: eb000175 bl b0c4 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
aaec: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED aaf0: eb000173 bl b0c4 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
aaf4: e5950000 ldr r0, [r5] <== NOT EXECUTED aaf8: ebffdb92 bl 1948 <free> <== NOT EXECUTED aafc: e3e06003 mvn r6, #3 <== NOT EXECUTED
err_buf: free(pipe);
ab00: e1a00005 mov r0, r5 <== NOT EXECUTED ab04: ebffdb8f bl 1948 <free> <== NOT EXECUTED ab08: ea00000d b ab44 <fifo_open+0x16c> <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
ab0c: e3a01000 mov r1, #0 <== NOT EXECUTED ab10: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ab14: e1a02001 mov r2, r1 <== NOT EXECUTED ab18: ebffe7d2 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
ab1c: e5973000 ldr r3, [r7] <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
ab20: e3500000 cmp r0, #0 <== NOT EXECUTED ab24: 01a06000 moveq r6, r0 <== NOT EXECUTED ab28: 13e06003 mvnne r6, #3 <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
ab2c: e3530000 cmp r3, #0 <== NOT EXECUTED ab30: 1a000003 bne ab44 <fifo_open+0x16c> <== NOT EXECUTED
if (err)
ab34: e3560000 cmp r6, #0 <== NOT EXECUTED
pipe_free(pipe); else *pipep = pipe;
ab38: 05874000 streq r4, [r7] <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe);
ab3c: 11a00004 movne r0, r4 <== NOT EXECUTED ab40: 1bffff58 blne a8a8 <pipe_free> <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
ab44: e59f31b8 ldr r3, [pc, #440] ; ad04 <fifo_open+0x32c> <== NOT EXECUTED ab48: e5930000 ldr r0, [r3] <== NOT EXECUTED ab4c: ebffe80b bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err)
ab50: e3560000 cmp r6, #0 <== NOT EXECUTED ab54: 1a000068 bne acfc <fifo_open+0x324> <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) {
ab58: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED ab5c: e2023006 and r3, r2, #6 <== NOT EXECUTED ab60: e3530004 cmp r3, #4 <== NOT EXECUTED
int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep;
ab64: e5974000 ldr r4, [r7] <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
ab68: 0a000024 beq ac00 <fifo_open+0x228> <== NOT EXECUTED ab6c: e3530006 cmp r3, #6 <== NOT EXECUTED ab70: 0a000046 beq ac90 <fifo_open+0x2b8> <== NOT EXECUTED ab74: e3530002 cmp r3, #2 <== NOT EXECUTED ab78: 1a000058 bne ace0 <fifo_open+0x308> <== NOT EXECUTED
case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
ab7c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
ab80: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
ab84: e3530000 cmp r3, #0 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
ab88: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
ab8c: e2833001 add r3, r3, #1 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
ab90: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
ab94: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
ab98: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED ab9c: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED aba0: 0b00015f bleq b124 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Writers == 0) {
aba4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED aba8: e3530000 cmp r3, #0 <== NOT EXECUTED abac: 1a00004b bne ace0 <fifo_open+0x308> <== NOT EXECUTED
/* Not an error */ if (LIBIO_NODELAY(iop))
abb0: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED abb4: e3130001 tst r3, #1 <== NOT EXECUTED abb8: 1a000048 bne ace0 <fifo_open+0x308> <== NOT EXECUTED
break; prevCounter = pipe->writerCounter;
abbc: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED
err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe);
abc0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED abc4: ebffe7ed bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
abc8: e3a01000 mov r1, #0 <== NOT EXECUTED abcc: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED abd0: eb000169 bl b17c <rtems_barrier_wait> <== NOT EXECUTED abd4: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
abd8: 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))
abdc: 1a000042 bne acec <fifo_open+0x314> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
abe0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED abe4: ebffe79f bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED abe8: e3500000 cmp r0, #0 <== NOT EXECUTED abec: 1a00003e bne acec <fifo_open+0x314> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->writerCounter);
abf0: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED abf4: e1550003 cmp r5, r3 <== NOT EXECUTED abf8: 0afffff0 beq abc0 <fifo_open+0x1e8> <== NOT EXECUTED abfc: ea000037 b ace0 <fifo_open+0x308> <== NOT EXECUTED
} break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
ac00: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED ac04: e3530000 cmp r3, #0 <== NOT EXECUTED ac08: 1a000002 bne ac18 <fifo_open+0x240> <== NOT EXECUTED ac0c: e3120001 tst r2, #1 <== NOT EXECUTED ac10: 13e06005 mvnne r6, #5 <== NOT EXECUTED ac14: 1a000035 bne acf0 <fifo_open+0x318> <== NOT EXECUTED
err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0)
ac18: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
ac1c: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
ac20: e3530000 cmp r3, #0 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
ac24: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
ac28: e2833001 add r3, r3, #1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
ac2c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
ac30: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
ac34: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED ac38: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED ac3c: 0b000138 bleq b124 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Readers == 0) {
ac40: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED ac44: e3530000 cmp r3, #0 <== NOT EXECUTED ac48: 1a000024 bne ace0 <fifo_open+0x308> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
ac4c: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED
err = -EINTR; do { PIPE_UNLOCK(pipe);
ac50: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac54: ebffe7c9 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
ac58: e3a01000 mov r1, #0 <== NOT EXECUTED ac5c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED ac60: eb000145 bl b17c <rtems_barrier_wait> <== NOT EXECUTED ac64: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
ac68: e1a02001 mov r2, r1 <== NOT EXECUTED
if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe))
ac6c: 1a00001e bne acec <fifo_open+0x314> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
ac70: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac74: ebffe77b bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED ac78: e3500000 cmp r0, #0 <== NOT EXECUTED ac7c: 1a00001a bne acec <fifo_open+0x314> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->readerCounter);
ac80: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED ac84: e1550003 cmp r5, r3 <== NOT EXECUTED ac88: 0afffff0 beq ac50 <fifo_open+0x278> <== NOT EXECUTED ac8c: ea000013 b ace0 <fifo_open+0x308> <== NOT EXECUTED
} break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
ac90: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
ac94: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
ac98: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
ac9c: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
aca0: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
aca4: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
aca8: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
acac: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED acb0: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED acb4: 0b00011a bleq b124 <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++; if (pipe->Writers ++ == 0)
acb8: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
acbc: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
acc0: e3530000 cmp r3, #0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
acc4: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
acc8: e2833001 add r3, r3, #1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
accc: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
acd0: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
acd4: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED acd8: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED acdc: 0b000110 bleq b124 <rtems_barrier_release> <== NOT EXECUTED
break; } PIPE_UNLOCK(pipe);
ace0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ace4: ebffe7a5 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
ace8: ea000003 b acfc <fifo_open+0x324> <== NOT EXECUTED acec: e3e06003 mvn r6, #3 <== NOT EXECUTED
out_error: pipe_release(pipep, iop);
acf0: e1a00007 mov r0, r7 <== NOT EXECUTED acf4: e1a01008 mov r1, r8 <== NOT EXECUTED acf8: ebfffef7 bl a8dc <pipe_release> <== NOT EXECUTED
return err; }
acfc: e1a00006 mov r0, r6 ad00: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc}
00023a90 <file_systems_below_this_mountpoint>: /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
23a90: e59f3030 ldr r3, [pc, #48] ; 23ac8 <file_systems_below_this_mountpoint+0x38><== NOT EXECUTED 23a94: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 23a98: ea000006 b 23ab8 <file_systems_below_this_mountpoint+0x28> <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
23a9c: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 23aa0: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 23aa4: e15c0000 cmp ip, r0 <== NOT EXECUTED 23aa8: 1a000001 bne 23ab4 <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED 23aac: e3a00001 mov r0, #1 <== NOT EXECUTED 23ab0: e12fff1e bx lr <== NOT EXECUTED
* mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) {
23ab4: e5922000 ldr r2, [r2] <== NOT EXECUTED 23ab8: e1520003 cmp r2, r3 <== NOT EXECUTED 23abc: 1afffff6 bne 23a9c <file_systems_below_this_mountpoint+0xc><== NOT EXECUTED 23ac0: e3a00000 mov r0, #0 <== NOT EXECUTED
return true; } } return false; }
23ac4: e12fff1e bx lr <== NOT EXECUTED
00002a10 <fpathconf>: { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd);
2a10: e59f3100 ldr r3, [pc, #256] ; 2b18 <fpathconf+0x108> 2a14: e5933000 ldr r3, [r3] 2a18: e1500003 cmp r0, r3
long fpathconf( int fd, int name ) {
2a1c: 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); 2a20: 2a000005 bcs 2a3c <fpathconf+0x2c> iop = rtems_libio_iop(fd);
2a24: e59f30f0 ldr r3, [pc, #240] ; 2b1c <fpathconf+0x10c> 2a28: e5933000 ldr r3, [r3] 2a2c: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2a30: e5903014 ldr r3, [r0, #20] 2a34: e3130c01 tst r3, #256 ; 0x100
2a38: 1a000002 bne 2a48 <fpathconf+0x38>
2a3c: eb002de3 bl e1d0 <__errno> 2a40: e3a03009 mov r3, #9 2a44: ea000003 b 2a58 <fpathconf+0x48>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
2a48: e3130002 tst r3, #2
2a4c: 1a000004 bne 2a64 <fpathconf+0x54>
2a50: eb002dde bl e1d0 <__errno> <== NOT EXECUTED 2a54: e3a03016 mov r3, #22 <== NOT EXECUTED
2a58: e5803000 str r3, [r0] 2a5c: e3e00000 mvn r0, #0 2a60: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2a64: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
2a68: e351000b cmp r1, #11 2a6c: 979ff101 ldrls pc, [pc, r1, lsl #2] 2a70: ea000023 b 2b04 <fpathconf+0xf4>
2a74: 00002aa4 .word 0x00002aa4 <== NOT EXECUTED 2a78: 00002aac .word 0x00002aac <== NOT EXECUTED 2a7c: 00002ab4 .word 0x00002ab4 <== NOT EXECUTED 2a80: 00002abc .word 0x00002abc <== NOT EXECUTED 2a84: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED 2a88: 00002acc .word 0x00002acc <== NOT EXECUTED 2a8c: 00002ad4 .word 0x00002ad4 <== NOT EXECUTED 2a90: 00002adc .word 0x00002adc <== NOT EXECUTED 2a94: 00002ae4 .word 0x00002ae4 <== NOT EXECUTED 2a98: 00002aec .word 0x00002aec <== NOT EXECUTED 2a9c: 00002af4 .word 0x00002af4 <== NOT EXECUTED 2aa0: 00002afc .word 0x00002afc <== NOT EXECUTED
case _PC_LINK_MAX: return_value = the_limits->link_max;
2aa4: e5930038 ldr r0, [r3, #56] ; 0x38
break;
2aa8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON: return_value = the_limits->max_canon;
2aac: e593003c ldr r0, [r3, #60] ; 0x3c
break;
2ab0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT: return_value = the_limits->max_input;
2ab4: e5930040 ldr r0, [r3, #64] ; 0x40
break;
2ab8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX: return_value = the_limits->name_max;
2abc: e5930044 ldr r0, [r3, #68] ; 0x44
break;
2ac0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX: return_value = the_limits->path_max;
2ac4: e5930048 ldr r0, [r3, #72] ; 0x48
break;
2ac8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF: return_value = the_limits->pipe_buf;
2acc: e593004c ldr r0, [r3, #76] ; 0x4c
break;
2ad0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions;
2ad4: e5930054 ldr r0, [r3, #84] ; 0x54
break;
2ad8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc;
2adc: e5930058 ldr r0, [r3, #88] ; 0x58
break;
2ae0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE: return_value = the_limits->posix_vdisable;
2ae4: e5930064 ldr r0, [r3, #100] ; 0x64
break;
2ae8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO: return_value = the_limits->posix_async_io;
2aec: e5930050 ldr r0, [r3, #80] ; 0x50
break;
2af0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO: return_value = the_limits->posix_prio_io;
2af4: e593005c ldr r0, [r3, #92] ; 0x5c
break;
2af8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO: return_value = the_limits->posix_sync_io;
2afc: e5930060 ldr r0, [r3, #96] ; 0x60
break;
2b00: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default: rtems_set_errno_and_return_minus_one( EINVAL );
2b04: eb002db1 bl e1d0 <__errno> 2b08: e3a03016 mov r3, #22 2b0c: e5803000 str r3, [r0] 2b10: e3e00000 mvn r0, #0
break; } return return_value; }
2b14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001948 <free>: void free( void *ptr ) { MSBUMP(free_calls, 1);
1948: e59f3088 ldr r3, [pc, #136] ; 19d8 <free+0x90> 194c: e593200c ldr r2, [r3, #12] 1950: e92d4030 push {r4, r5, lr} 1954: e2822001 add r2, r2, #1
if ( !ptr )
1958: e2504000 subs r4, r0, #0
void free( void *ptr ) { MSBUMP(free_calls, 1);
195c: e583200c str r2, [r3, #12]
if ( !ptr )
1960: 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()) &&
1964: e59f3070 ldr r3, [pc, #112] ; 19dc <free+0x94> 1968: e5933000 ldr r3, [r3] 196c: e3530003 cmp r3, #3
1970: 1a000005 bne 198c <free+0x44>
1974: eb00004b bl 1aa8 <malloc_is_system_state_OK> 1978: e3500000 cmp r0, #0
197c: 1a000002 bne 198c <free+0x44> !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr);
1980: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
1984: 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);
1988: ea000059 b 1af4 <malloc_deferred_free> <== NOT EXECUTED
#endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
198c: e59f304c ldr r3, [pc, #76] ; 19e0 <free+0x98> 1990: e5933000 ldr r3, [r3] 1994: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1998: 11a00004 movne r0, r4 199c: 11a0e00f movne lr, pc 19a0: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
19a4: e59f5038 ldr r5, [pc, #56] ; 19e4 <free+0x9c> 19a8: e1a01004 mov r1, r4 19ac: e5950000 ldr r0, [r5] 19b0: eb00125a bl 6320 <_Protected_heap_Free> 19b4: e3500000 cmp r0, #0 19b8: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin,
19bc: 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",
19c0: e59f0020 ldr r0, [pc, #32] ; 19e8 <free+0xa0> <== NOT EXECUTED 19c4: e2822018 add r2, r2, #24 <== NOT EXECUTED 19c8: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 19cc: e1a01004 mov r1, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
19d0: 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",
19d4: ea000320 b 265c <printk> <== NOT EXECUTED
00023178 <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
23178: e59f3058 ldr r3, [pc, #88] ; 231d8 <free_user_env+0x60> <== NOT EXECUTED 2317c: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) {
23180: e92d4010 push {r4, lr} <== NOT EXECUTED 23184: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env
23188: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory);
2318c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 23190: e3530000 cmp r3, #0 <== NOT EXECUTED 23194: 0a000004 beq 231ac <free_user_env+0x34> <== NOT EXECUTED 23198: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2319c: e3530000 cmp r3, #0 <== NOT EXECUTED 231a0: 12800004 addne r0, r0, #4 <== NOT EXECUTED 231a4: 11a0e00f movne lr, pc <== NOT EXECUTED 231a8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
231ac: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 231b0: e3530000 cmp r3, #0 <== NOT EXECUTED 231b4: 0a000004 beq 231cc <free_user_env+0x54> <== NOT EXECUTED 231b8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 231bc: e3530000 cmp r3, #0 <== NOT EXECUTED 231c0: 12840018 addne r0, r4, #24 <== NOT EXECUTED 231c4: 11a0e00f movne lr, pc <== NOT EXECUTED 231c8: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
231cc: e1a00004 mov r0, r4 <== NOT EXECUTED
} }
231d0: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env);
231d4: eaff8599 b 4840 <free> <== NOT EXECUTED
00016b10 <fstat>: int fstat( int fd, struct stat *sbuf ) {
16b10: e92d4030 push {r4, r5, lr}
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf )
16b14: e2515000 subs r5, r1, #0
16b18: 1a000002 bne 16b28 <fstat+0x18> rtems_set_errno_and_return_minus_one( EFAULT );
16b1c: ebffd428 bl bbc4 <__errno> 16b20: e3a0300e mov r3, #14 16b24: ea000014 b 16b7c <fstat+0x6c>
/* * Now process the stat() request. */ iop = rtems_libio_iop( fd );
16b28: e59f3080 ldr r3, [pc, #128] ; 16bb0 <fstat+0xa0> 16b2c: e5933000 ldr r3, [r3] 16b30: e1500003 cmp r0, r3
16b34: 2a000008 bcs 16b5c <fstat+0x4c>
16b38: e59f3074 ldr r3, [pc, #116] ; 16bb4 <fstat+0xa4> 16b3c: e5934000 ldr r4, [r3] 16b40: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
16b44: e5943014 ldr r3, [r4, #20] 16b48: e3130c01 tst r3, #256 ; 0x100
16b4c: 0a000002 beq 16b5c <fstat+0x4c> if ( !iop->handlers )
16b50: e594303c ldr r3, [r4, #60] ; 0x3c 16b54: e3530000 cmp r3, #0
16b58: 1a000002 bne 16b68 <fstat+0x58> rtems_set_errno_and_return_minus_one( EBADF );
16b5c: ebffd418 bl bbc4 <__errno> 16b60: e3a03009 mov r3, #9 16b64: ea000004 b 16b7c <fstat+0x6c>
if ( !iop->handlers->fstat_h )
16b68: e5933018 ldr r3, [r3, #24] 16b6c: e3530000 cmp r3, #0
16b70: 1a000004 bne 16b88 <fstat+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
16b74: ebffd412 bl bbc4 <__errno> <== NOT EXECUTED 16b78: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
16b7c: e5803000 str r3, [r0] 16b80: e3e00000 mvn r0, #0 16b84: 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) );
16b88: e3a01000 mov r1, #0 16b8c: e3a02048 mov r2, #72 ; 0x48 16b90: e1a00005 mov r0, r5 16b94: ebffd654 bl c4ec <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
16b98: e2840018 add r0, r4, #24 16b9c: e1a01005 mov r1, r5 16ba0: e594303c ldr r3, [r4, #60] ; 0x3c 16ba4: e1a0e00f mov lr, pc 16ba8: e593f018 ldr pc, [r3, #24]
}
16bac: e8bd8030 pop {r4, r5, pc}
00021fc4 <fsync>: int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd );
21fc4: e59f307c ldr r3, [pc, #124] ; 22048 <fsync+0x84> 21fc8: e5933000 ldr r3, [r3] 21fcc: e1500003 cmp r0, r3
#include <rtems/seterr.h> int fsync( int fd ) {
21fd0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21fd4: 2a00000d bcs 22010 <fsync+0x4c> iop = rtems_libio_iop( fd );
21fd8: e59f306c ldr r3, [pc, #108] ; 2204c <fsync+0x88> 21fdc: e5933000 ldr r3, [r3] 21fe0: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
21fe4: e5903014 ldr r3, [r0, #20] 21fe8: e3130c01 tst r3, #256 ; 0x100
21fec: 0a000007 beq 22010 <fsync+0x4c> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
21ff0: e3130004 tst r3, #4
21ff4: 1a000002 bne 22004 <fsync+0x40>
21ff8: eb0058b0 bl 382c0 <__errno> 21ffc: e3a03016 mov r3, #22 22000: ea00000a b 22030 <fsync+0x6c>
/* * Now process the fsync(). */ if ( !iop->handlers )
22004: e590303c ldr r3, [r0, #60] ; 0x3c 22008: e3530000 cmp r3, #0
2200c: 1a000002 bne 2201c <fsync+0x58> rtems_set_errno_and_return_minus_one( EBADF );
22010: eb0058aa bl 382c0 <__errno> <== NOT EXECUTED 22014: e3a03009 mov r3, #9 <== NOT EXECUTED 22018: ea000004 b 22030 <fsync+0x6c> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
2201c: e5933028 ldr r3, [r3, #40] ; 0x28 22020: e3530000 cmp r3, #0
22024: 1a000004 bne 2203c <fsync+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
22028: eb0058a4 bl 382c0 <__errno> 2202c: e3a03086 mov r3, #134 ; 0x86 22030: e5803000 str r3, [r0] 22034: e3e00000 mvn r0, #0 22038: e49df004 pop {pc} ; (ldr pc, [sp], #4)
return (*iop->handlers->fsync_h)( iop );
2203c: e1a0e00f mov lr, pc 22040: e12fff13 bx r3
}
22044: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00008fa8 <ftruncate>: int ftruncate( int fd, off_t length ) {
8fa8: e92d4070 push {r4, r5, r6, lr}
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd );
8fac: e59f30d4 ldr r3, [pc, #212] ; 9088 <ftruncate+0xe0> 8fb0: e5933000 ldr r3, [r3] 8fb4: e1500003 cmp r0, r3
int ftruncate( int fd, off_t length ) {
8fb8: e24dd014 sub sp, sp, #20 8fbc: e1a05001 mov r5, r1 8fc0: e1a06002 mov r6, r2
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8fc4: 2a000005 bcs 8fe0 <ftruncate+0x38> iop = rtems_libio_iop( fd );
8fc8: e59f30bc ldr r3, [pc, #188] ; 908c <ftruncate+0xe4> 8fcc: e5934000 ldr r4, [r3] 8fd0: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
8fd4: e5943014 ldr r3, [r4, #20] 8fd8: e3130c01 tst r3, #256 ; 0x100
8fdc: 1a000002 bne 8fec <ftruncate+0x44>
8fe0: eb000af7 bl bbc4 <__errno> <== NOT EXECUTED 8fe4: e3a03009 mov r3, #9 <== NOT EXECUTED 8fe8: ea00001c b 9060 <ftruncate+0xb8> <== NOT EXECUTED
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
8fec: e284e018 add lr, r4, #24 8ff0: e8be000f ldm lr!, {r0, r1, r2, r3} 8ff4: e1a0c00d mov ip, sp 8ff8: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
8ffc: e5933010 ldr r3, [r3, #16]
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
9000: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
9004: e3530000 cmp r3, #0
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
9008: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h ) 900c: 0a000011 beq 9058 <ftruncate+0xb0> rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
9010: e1a0000d mov r0, sp 9014: e1a0e00f mov lr, pc 9018: e12fff13 bx r3 901c: e3500001 cmp r0, #1
9020: 1a000002 bne 9030 <ftruncate+0x88> rtems_set_errno_and_return_minus_one( EISDIR );
9024: eb000ae6 bl bbc4 <__errno> 9028: e3a03015 mov r3, #21 902c: ea00000b b 9060 <ftruncate+0xb8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
9030: e5943014 ldr r3, [r4, #20] 9034: e3130004 tst r3, #4
9038: 1a000002 bne 9048 <ftruncate+0xa0>
903c: eb000ae0 bl bbc4 <__errno> <== NOT EXECUTED 9040: e3a03016 mov r3, #22 <== NOT EXECUTED 9044: ea000005 b 9060 <ftruncate+0xb8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
9048: e594303c ldr r3, [r4, #60] ; 0x3c 904c: e5933020 ldr r3, [r3, #32] 9050: e3530000 cmp r3, #0
9054: 1a000004 bne 906c <ftruncate+0xc4> rtems_set_errno_and_return_minus_one( ENOTSUP );
9058: eb000ad9 bl bbc4 <__errno> <== NOT EXECUTED 905c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
9060: e5803000 str r3, [r0] 9064: e3e00000 mvn r0, #0 9068: ea000004 b 9080 <ftruncate+0xd8>
return (*iop->handlers->ftruncate_h)( iop, length );
906c: e1a00004 mov r0, r4 9070: e1a01005 mov r1, r5 9074: e1a02006 mov r2, r6 9078: e1a0e00f mov lr, pc 907c: e12fff13 bx r3
}
9080: e28dd014 add sp, sp, #20 9084: e8bd8070 pop {r4, r5, r6, pc}
00051e2c <getdents>: /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
51e2c: e59f30a8 ldr r3, [pc, #168] ; 51edc <getdents+0xb0> 51e30: e5933000 ldr r3, [r3] 51e34: e1500003 cmp r0, r3 51e38: 359f30a0 ldrcc r3, [pc, #160] ; 51ee0 <getdents+0xb4>
int getdents( int dd_fd, char *dd_buf, int dd_len ) {
51e3c: e92d4070 push {r4, r5, r6, lr}
/* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
51e40: 35934000 ldrcc r4, [r3] 51e44: 23a04000 movcs r4, #0 51e48: 30844300 addcc r4, r4, r0, lsl #6
/* * Make sure we are working on a directory */ loc = iop->pathinfo;
51e4c: e284e018 add lr, r4, #24
int getdents( int dd_fd, char *dd_buf, int dd_len ) {
51e50: e24dd014 sub sp, sp, #20 51e54: e1a06001 mov r6, r1 51e58: e1a05002 mov r5, r2
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
51e5c: e8be000f ldm lr!, {r0, r1, r2, r3} 51e60: e1a0c00d mov ip, sp 51e64: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
51e68: e5933010 ldr r3, [r3, #16]
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
51e6c: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
51e70: e3530000 cmp r3, #0
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
51e74: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h ) 51e78: 0a00000d beq 51eb4 <getdents+0x88> rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
51e7c: e1a0000d mov r0, sp 51e80: e1a0e00f mov lr, pc 51e84: e12fff13 bx r3 51e88: e3500001 cmp r0, #1
51e8c: 0a000004 beq 51ea4 <getdents+0x78> rtems_set_errno_and_return_minus_one( ENOTDIR );
51e90: ebff990a bl 382c0 <__errno> 51e94: e3a03014 mov r3, #20 51e98: e5803000 str r3, [r0] 51e9c: e3e00000 mvn r0, #0 51ea0: ea00000b b 51ed4 <getdents+0xa8>
/* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h )
51ea4: e594303c ldr r3, [r4, #60] ; 0x3c 51ea8: e5933008 ldr r3, [r3, #8] 51eac: e3530000 cmp r3, #0
51eb0: 1a000002 bne 51ec0 <getdents+0x94> rtems_set_errno_and_return_minus_one( ENOTSUP );
51eb4: ebff9901 bl 382c0 <__errno> <== NOT EXECUTED 51eb8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 51ebc: eafffff5 b 51e98 <getdents+0x6c> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
51ec0: e1a00004 mov r0, r4 51ec4: e1a01006 mov r1, r6 51ec8: e1a02005 mov r2, r5 51ecc: e1a0e00f mov lr, pc 51ed0: e12fff13 bx r3
}
51ed4: e28dd014 add sp, sp, #20 51ed8: e8bd8070 pop {r4, r5, r6, pc}
00022160 <getgid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) {
22160: e59f3008 ldr r3, [pc, #8] ; 22170 <getgid+0x10> <== NOT EXECUTED 22164: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Gid; }
22168: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 2216c: e12fff1e bx lr <== NOT EXECUTED
00022768 <getgr_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
22768: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2276c: e59da01c ldr sl, [sp, #28] 22770: e1a06000 mov r6, r0 22774: e1a07001 mov r7, r1 22778: e1a04002 mov r4, r2 2277c: e1a08003 mov r8, r3
FILE *fp; int match; init_etc_passwd_group();
22780: ebffffb7 bl 22664 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
22784: e59f00a4 ldr r0, [pc, #164] ; 22830 <getgr_r+0xc8> 22788: e59f10a4 ldr r1, [pc, #164] ; 22834 <getgr_r+0xcc> 2278c: eb00593b bl 38c80 <fopen> 22790: e2505000 subs r5, r0, #0
22794: 1a000003 bne 227a8 <getgr_r+0x40> errno = EINVAL;
22798: eb0056c8 bl 382c0 <__errno> <== NOT EXECUTED 2279c: e3a03016 mov r3, #22 <== NOT EXECUTED 227a0: e5803000 str r3, [r0] <== NOT EXECUTED 227a4: ea00000c b 227dc <getgr_r+0x74> <== NOT EXECUTED
return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) {
227a8: e1a01004 mov r1, r4 227ac: e1a02008 mov r2, r8 227b0: e1a0300a mov r3, sl 227b4: e1a00005 mov r0, r5 227b8: ebfffef2 bl 22388 <scangr> 227bc: e3500000 cmp r0, #0
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0);
227c0: e1a01006 mov r1, r6
if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 227c4: 1a000006 bne 227e4 <getgr_r+0x7c> errno = EINVAL;
227c8: eb0056bc bl 382c0 <__errno> <== NOT EXECUTED 227cc: e3a03016 mov r3, #22 <== NOT EXECUTED 227d0: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
227d4: e1a00005 mov r0, r5 <== NOT EXECUTED 227d8: eb005705 bl 383f4 <fclose> <== NOT EXECUTED 227dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
227e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
} if (name) {
227e4: e3560000 cmp r6, #0
227e8: 0a000004 beq 22800 <getgr_r+0x98> match = (strcmp(grp->gr_name, name) == 0);
227ec: e5940000 ldr r0, [r4] 227f0: eb006ec4 bl 3e308 <strcmp> 227f4: e2700001 rsbs r0, r0, #1 227f8: 33a00000 movcc r0, #0 227fc: ea000003 b 22810 <getgr_r+0xa8>
} else { match = (grp->gr_gid == gid);
22800: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 22804: e1500007 cmp r0, r7 <== NOT EXECUTED 22808: 13a00000 movne r0, #0 <== NOT EXECUTED 2280c: 03a00001 moveq r0, #1 <== NOT EXECUTED
} if (match) {
22810: e3500000 cmp r0, #0
22814: 0affffe3 beq 227a8 <getgr_r+0x40> fclose(fp);
22818: e1a00005 mov r0, r5 2281c: eb0056f4 bl 383f4 <fclose>
*result = grp;
22820: e59d3020 ldr r3, [sp, #32] 22824: e3a00000 mov r0, #0 22828: e5834000 str r4, [r3]
} } fclose(fp); errno = EINVAL; return -1; }
2282c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
000224c0 <getgrent>: return NULL; return p; } struct group *getgrent(void) {
224c0: e92d4010 push {r4, lr} <== NOT EXECUTED
if (group_fp == NULL)
224c4: e59f402c ldr r4, [pc, #44] ; 224f8 <getgrent+0x38> <== NOT EXECUTED 224c8: e5940000 ldr r0, [r4] <== NOT EXECUTED 224cc: e3500000 cmp r0, #0 <== NOT EXECUTED 224d0: 0a000006 beq 224f0 <getgrent+0x30> <== NOT EXECUTED
return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
224d4: e2841008 add r1, r4, #8 <== NOT EXECUTED 224d8: e2842018 add r2, r4, #24 <== NOT EXECUTED 224dc: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 224e0: ebffffa8 bl 22388 <scangr> <== NOT EXECUTED 224e4: e3500000 cmp r0, #0 <== NOT EXECUTED 224e8: 12840008 addne r0, r4, #8 <== NOT EXECUTED 224ec: 18bd8010 popne {r4, pc} <== NOT EXECUTED 224f0: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL; return &grent; }
224f4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0002286c <getgrgid>: struct group *getgrgid( gid_t gid ) {
2286c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
22870: e59f1028 ldr r1, [pc, #40] ; 228a0 <getgrgid+0x34> <== NOT EXECUTED
} struct group *getgrgid( gid_t gid ) {
22874: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
22878: e28dc004 add ip, sp, #4 <== NOT EXECUTED 2287c: e2812010 add r2, r1, #16 <== NOT EXECUTED 22880: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22884: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22888: e58dc000 str ip, [sp] <== NOT EXECUTED 2288c: ebffffe9 bl 22838 <getgrgid_r> <== NOT EXECUTED 22890: e3500000 cmp r0, #0 <== NOT EXECUTED 22894: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL; return p;
22898: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
2289c: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00022838 <getgrgid_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
22838: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 2283c: e1a0c002 mov ip, r2 <== NOT EXECUTED 22840: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
22844: e58d3000 str r3, [sp] <== NOT EXECUTED
struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
22848: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
2284c: e1a0300c mov r3, ip <== NOT EXECUTED 22850: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22854: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22858: e1a0200e mov r2, lr <== NOT EXECUTED 2285c: e3a00000 mov r0, #0 <== NOT EXECUTED 22860: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22864: ebffffbf bl 22768 <getgr_r> <== NOT EXECUTED
}
22868: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00020a3c <getpid>: */ pid_t getpid( void ) { return _Objects_Local_node; }
20a3c: e3a00001 mov r0, #1 <== NOT EXECUTED 20a40: e12fff1e bx lr <== NOT EXECUTED
00022938 <getpw_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
22938: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2293c: e59da01c ldr sl, [sp, #28] 22940: e1a06000 mov r6, r0 22944: e1a07001 mov r7, r1 22948: e1a04002 mov r4, r2 2294c: e1a08003 mov r8, r3
FILE *fp; int match; init_etc_passwd_group();
22950: ebffff43 bl 22664 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
22954: e59f00a4 ldr r0, [pc, #164] ; 22a00 <getpw_r+0xc8> 22958: e59f10a4 ldr r1, [pc, #164] ; 22a04 <getpw_r+0xcc> 2295c: eb0058c7 bl 38c80 <fopen> 22960: e2505000 subs r5, r0, #0
22964: 1a000003 bne 22978 <getpw_r+0x40> errno = EINVAL;
22968: eb005654 bl 382c0 <__errno> <== NOT EXECUTED 2296c: e3a03016 mov r3, #22 <== NOT EXECUTED 22970: e5803000 str r3, [r0] <== NOT EXECUTED 22974: ea00000c b 229ac <getpw_r+0x74> <== NOT EXECUTED
return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) {
22978: e1a01004 mov r1, r4 2297c: e1a02008 mov r2, r8 22980: e1a0300a mov r3, sl 22984: e1a00005 mov r0, r5 22988: ebfffedb bl 224fc <scanpw> 2298c: e3500000 cmp r0, #0
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0);
22990: e1a01006 mov r1, r6
if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22994: 1a000006 bne 229b4 <getpw_r+0x7c> errno = EINVAL;
22998: eb005648 bl 382c0 <__errno> <== NOT EXECUTED 2299c: e3a03016 mov r3, #22 <== NOT EXECUTED 229a0: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
229a4: e1a00005 mov r0, r5 <== NOT EXECUTED 229a8: eb005691 bl 383f4 <fclose> <== NOT EXECUTED 229ac: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
229b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
} if (name) {
229b4: e3560000 cmp r6, #0
229b8: 0a000004 beq 229d0 <getpw_r+0x98> match = (strcmp(pwd->pw_name, name) == 0);
229bc: e5940000 ldr r0, [r4] 229c0: eb006e50 bl 3e308 <strcmp> 229c4: e2700001 rsbs r0, r0, #1 229c8: 33a00000 movcc r0, #0 229cc: ea000003 b 229e0 <getpw_r+0xa8>
} else { match = (pwd->pw_uid == uid);
229d0: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 229d4: e1500007 cmp r0, r7 <== NOT EXECUTED 229d8: 13a00000 movne r0, #0 <== NOT EXECUTED 229dc: 03a00001 moveq r0, #1 <== NOT EXECUTED
} if (match) {
229e0: e3500000 cmp r0, #0
229e4: 0affffe3 beq 22978 <getpw_r+0x40> fclose(fp);
229e8: e1a00005 mov r0, r5 229ec: eb005680 bl 383f4 <fclose>
*result = pwd;
229f0: e59d3020 ldr r3, [sp, #32] 229f4: e3a00000 mov r0, #0 229f8: e5834000 str r4, [r3]
} } fclose(fp); errno = EINVAL; return -1; }
229fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00022628 <getpwent>: return NULL; return p; } struct passwd *getpwent(void) {
22628: e92d4010 push {r4, lr} <== NOT EXECUTED
if (passwd_fp == NULL)
2262c: e59f402c ldr r4, [pc, #44] ; 22660 <getpwent+0x38> <== NOT EXECUTED 22630: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 22634: e3500000 cmp r0, #0 <== NOT EXECUTED 22638: 0a000006 beq 22658 <getpwent+0x30> <== NOT EXECUTED
return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
2263c: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 22640: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 22644: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22648: ebffffab bl 224fc <scanpw> <== NOT EXECUTED 2264c: e3500000 cmp r0, #0 <== NOT EXECUTED 22650: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 22654: 18bd8010 popne {r4, pc} <== NOT EXECUTED 22658: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL; return &pwent; }
2265c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00022a3c <getpwuid>: struct passwd *getpwuid( uid_t uid ) {
22a3c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
22a40: e59f1028 ldr r1, [pc, #40] ; 22a70 <getpwuid+0x34> <== NOT EXECUTED
} struct passwd *getpwuid( uid_t uid ) {
22a44: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
22a48: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22a4c: e281201c add r2, r1, #28 <== NOT EXECUTED 22a50: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22a54: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22a58: e58dc000 str ip, [sp] <== NOT EXECUTED 22a5c: ebffffe9 bl 22a08 <getpwuid_r> <== NOT EXECUTED 22a60: e3500000 cmp r0, #0 <== NOT EXECUTED 22a64: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL; return p;
22a68: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
22a6c: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00022a08 <getpwuid_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
22a08: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22a0c: e1a0c002 mov ip, r2 <== NOT EXECUTED 22a10: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
22a14: e58d3000 str r3, [sp] <== NOT EXECUTED
struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
22a18: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
22a1c: e1a0300c mov r3, ip <== NOT EXECUTED 22a20: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22a24: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22a28: e1a0200e mov r2, lr <== NOT EXECUTED 22a2c: e3a00000 mov r0, #0 <== NOT EXECUTED 22a30: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22a34: ebffffbf bl 22938 <getpw_r> <== NOT EXECUTED
}
22a38: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00009090 <gettimeofday>: */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) {
9090: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) {
9094: e2504000 subs r4, r0, #0
9098: 1a000004 bne 90b0 <gettimeofday+0x20> errno = EFAULT;
909c: eb000ac8 bl bbc4 <__errno> <== NOT EXECUTED 90a0: e3a0300e mov r3, #14 <== NOT EXECUTED 90a4: e5803000 str r3, [r0] <== NOT EXECUTED 90a8: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
90ac: ea00000c b 90e4 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
90b0: e10f5000 mrs r5, CPSR 90b4: e3853080 orr r3, r5, #128 ; 0x80 90b8: e129f003 msr CPSR_fc, r3
ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now );
90bc: e1a0000d mov r0, sp 90c0: eb000264 bl 9a58 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
90c4: 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;
90c8: e59d3000 ldr r3, [sp]
_ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec;
90cc: e59d0004 ldr r0, [sp, #4]
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds;
90d0: 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;
90d4: e5843000 str r3, [r4]
time->tv_usec = useconds;
90d8: eb003080 bl 152e0 <__aeabi_idiv> 90dc: e5840004 str r0, [r4, #4] 90e0: 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; }
90e4: e8bd803c pop {r2, r3, r4, r5, pc}
0000494c <getuid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) {
494c: e59f3008 ldr r3, [pc, #8] ; 495c <getuid+0x10> <== NOT EXECUTED 4950: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Uid; }
4954: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 4958: e12fff1e bx lr <== NOT EXECUTED
000051e0 <ioctl>: int ioctl( int fd, ioctl_command_t command, ... ) {
51e0: e92d000e push {r1, r2, r3}
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd );
51e4: e59f3080 ldr r3, [pc, #128] ; 526c <ioctl+0x8c> 51e8: e5933000 ldr r3, [r3] 51ec: e1500003 cmp r0, r3
int ioctl( int fd, ioctl_command_t command, ... ) {
51f0: e92d4001 push {r0, lr}
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 51f4: 2a00000b bcs 5228 <ioctl+0x48> iop = rtems_libio_iop( fd );
51f8: e59f3070 ldr r3, [pc, #112] ; 5270 <ioctl+0x90> 51fc: e5933000 ldr r3, [r3] 5200: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
5204: e5903014 ldr r3, [r0, #20] 5208: e3130c01 tst r3, #256 ; 0x100
520c: 0a000005 beq 5228 <ioctl+0x48> /* * Now process the ioctl(). */ if ( !iop->handlers )
5210: 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 *);
5214: e28d2010 add r2, sp, #16
/* * Now process the ioctl(). */ if ( !iop->handlers )
5218: e3530000 cmp r3, #0
iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *);
521c: e58d2000 str r2, [sp] 5220: e59d200c ldr r2, [sp, #12]
/* * Now process the ioctl(). */ if ( !iop->handlers ) 5224: 1a000002 bne 5234 <ioctl+0x54> rtems_set_errno_and_return_minus_one( EBADF );
5228: eb002f74 bl 11000 <__errno> 522c: e3a03009 mov r3, #9 5230: ea000004 b 5248 <ioctl+0x68>
if ( !iop->handlers->ioctl_h )
5234: e5933010 ldr r3, [r3, #16] 5238: e3530000 cmp r3, #0
523c: 1a000004 bne 5254 <ioctl+0x74> rtems_set_errno_and_return_minus_one( ENOTSUP );
5240: eb002f6e bl 11000 <__errno> <== NOT EXECUTED 5244: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5248: e5803000 str r3, [r0] 524c: e3e00000 mvn r0, #0 5250: ea000002 b 5260 <ioctl+0x80>
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
5254: e59d1008 ldr r1, [sp, #8] 5258: e1a0e00f mov lr, pc 525c: e12fff13 bx r3
return rc; }
5260: e8bd4008 pop {r3, lr} 5264: e28dd00c add sp, sp, #12 5268: e12fff1e bx lr
000030b4 <iproc>: * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP)
30b4: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 30b8: e3130020 tst r3, #32 <== NOT EXECUTED
/* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) {
30bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 30c0: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f;
30c4: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
30c8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) {
30cc: e1a04001 mov r4, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC)
30d0: 0a000007 beq 30f4 <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
30d4: e59f2164 ldr r2, [pc, #356] ; 3240 <iproc+0x18c> <== NOT EXECUTED 30d8: e5922000 ldr r2, [r2] <== NOT EXECUTED 30dc: e0822005 add r2, r2, r5 <== NOT EXECUTED 30e0: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30e4: e2022003 and r2, r2, #3 <== NOT EXECUTED 30e8: e3520001 cmp r2, #1 <== NOT EXECUTED 30ec: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 30f0: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
30f4: e355000d cmp r5, #13 <== NOT EXECUTED 30f8: 1a000005 bne 3114 <iproc+0x60> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
30fc: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 3100: 1a00004c bne 3238 <iproc+0x184> <== NOT EXECUTED
return 0; if (tty->termios.c_iflag & ICRNL)
3104: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3108: 03a0500d moveq r5, #13 <== NOT EXECUTED 310c: 13a0500a movne r5, #10 <== NOT EXECUTED 3110: ea000007 b 3134 <iproc+0x80> <== NOT EXECUTED
c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
3114: e355000a cmp r5, #10 <== NOT EXECUTED 3118: 1a000003 bne 312c <iproc+0x78> <== NOT EXECUTED 311c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 3120: 03a0500a moveq r5, #10 <== NOT EXECUTED 3124: 13a0500d movne r5, #13 <== NOT EXECUTED 3128: ea000001 b 3134 <iproc+0x80> <== NOT EXECUTED
c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
312c: e3550000 cmp r5, #0 <== NOT EXECUTED 3130: 0a00002e beq 31f0 <iproc+0x13c> <== NOT EXECUTED 3134: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3138: e3130002 tst r3, #2 <== NOT EXECUTED 313c: 0a00002b beq 31f0 <iproc+0x13c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
3140: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 3144: e1520005 cmp r2, r5 <== NOT EXECUTED
erase (tty, 0);
3148: 01a00004 moveq r0, r4 <== NOT EXECUTED 314c: 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]) {
3150: 0a000004 beq 3168 <iproc+0xb4> <== NOT EXECUTED
erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) {
3154: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 3158: e1520005 cmp r2, r5 <== NOT EXECUTED 315c: 1a000003 bne 3170 <iproc+0xbc> <== NOT EXECUTED
erase (tty, 1);
3160: e1a00004 mov r0, r4 <== NOT EXECUTED 3164: e3a01001 mov r1, #1 <== NOT EXECUTED 3168: ebffff5e bl 2ee8 <erase> <== NOT EXECUTED 316c: ea00002f b 3230 <iproc+0x17c> <== NOT EXECUTED
return 0; } else if (c == tty->termios.c_cc[VEOF]) {
3170: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 3174: e1520005 cmp r2, r5 <== NOT EXECUTED 3178: 0a00001a beq 31e8 <iproc+0x134> <== NOT EXECUTED
return 1; } else if (c == '\n') {
317c: e355000a cmp r5, #10 <== NOT EXECUTED 3180: 1a000009 bne 31ac <iproc+0xf8> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
3184: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
3188: 11a00005 movne r0, r5 <== NOT EXECUTED 318c: 11a01004 movne r1, r4 <== NOT EXECUTED 3190: 1bffff34 blne 2e68 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3194: e284101c add r1, r4, #28 <== NOT EXECUTED 3198: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 319c: e3a0000a mov r0, #10 <== NOT EXECUTED 31a0: e2832001 add r2, r3, #1 <== NOT EXECUTED 31a4: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 31a8: ea00000d b 31e4 <iproc+0x130> <== NOT EXECUTED
return 1; } else if ((c == tty->termios.c_cc[VEOL])
31ac: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 31b0: e1520005 cmp r2, r5 <== NOT EXECUTED 31b4: 0a000002 beq 31c4 <iproc+0x110> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
31b8: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 31bc: e1520005 cmp r2, r5 <== NOT EXECUTED 31c0: 1a00000a bne 31f0 <iproc+0x13c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
31c4: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
31c8: 11a00005 movne r0, r5 <== NOT EXECUTED 31cc: 11a01004 movne r1, r4 <== NOT EXECUTED 31d0: 1bffff24 blne 2e68 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
31d4: e284101c add r1, r4, #28 <== NOT EXECUTED 31d8: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 31dc: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 31e0: e2832001 add r2, r3, #1 <== NOT EXECUTED 31e4: e5842020 str r2, [r4, #32] <== NOT EXECUTED 31e8: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
31ec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
} /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) {
31f0: e59f304c ldr r3, [pc, #76] ; 3244 <iproc+0x190> <== NOT EXECUTED 31f4: e5933000 ldr r3, [r3] <== NOT EXECUTED 31f8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 31fc: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3200: e1520003 cmp r2, r3 <== NOT EXECUTED 3204: aa00000b bge 3238 <iproc+0x184> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
3208: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 320c: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
3210: 11a00005 movne r0, r5 <== NOT EXECUTED 3214: 11a01004 movne r1, r4 <== NOT EXECUTED 3218: 1bffff12 blne 2e68 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
321c: e284101c add r1, r4, #28 <== NOT EXECUTED 3220: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 3224: e2832001 add r2, r3, #1 <== NOT EXECUTED 3228: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 322c: e5842020 str r2, [r4, #32] <== NOT EXECUTED 3230: e3a00000 mov r0, #0 <== NOT EXECUTED 3234: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3238: e3a00000 mov r0, #0 <== NOT EXECUTED
} return 0; }
323c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00020a54 <kill>: #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; }
20a54: e3a00000 mov r0, #0 <== NOT EXECUTED 20a58: e12fff1e bx lr <== NOT EXECUTED
00022b60 <link>: int link( const char *existing, const char *new ) {
22b60: e92d4030 push {r4, r5, lr} 22b64: e24dd030 sub sp, sp, #48 ; 0x30 22b68: e1a04001 mov r4, r1 22b6c: e1a05000 mov r5, r0
/* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
22b70: eb00704c bl 3eca8 <strlen> 22b74: e3a0c001 mov ip, #1 22b78: e1a01000 mov r1, r0 22b7c: e3a02000 mov r2, #0 22b80: e1a00005 mov r0, r5 22b84: e28d3018 add r3, sp, #24 22b88: e58dc000 str ip, [sp] 22b8c: ebff86f8 bl 4774 <rtems_filesystem_evaluate_path>
0, &existing_loc, true ); if ( result != 0 )
22b90: e3500000 cmp r0, #0
22b94: 1a00002a bne 22c44 <link+0xe4> /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc );
22b98: e5d43000 ldrb r3, [r4] 22b9c: e353002f cmp r3, #47 ; 0x2f 22ba0: 1353005c cmpne r3, #92 ; 0x5c 22ba4: 13a05000 movne r5, #0 22ba8: 03a05001 moveq r5, #1
22bac: 0a000001 beq 22bb8 <link+0x58>
22bb0: e3530000 cmp r3, #0
22bb4: 1a000009 bne 22be0 <link+0x80>
22bb8: e59f31ec ldr r3, [pc, #492] ; 22dac <link+0x24c> 22bbc: e593e000 ldr lr, [r3] 22bc0: e28ee018 add lr, lr, #24 22bc4: e8be000f ldm lr!, {r0, r1, r2, r3} 22bc8: e28dc004 add ip, sp, #4 22bcc: e8ac000f stmia ip!, {r0, r1, r2, r3} 22bd0: e59e3000 ldr r3, [lr] 22bd4: e3a00001 mov r0, #1 22bd8: e58c3000 str r3, [ip] 22bdc: ea000008 b 22c04 <link+0xa4> 22be0: e59f31c4 ldr r3, [pc, #452] ; 22dac <link+0x24c> 22be4: e593e000 ldr lr, [r3] 22be8: e28ee004 add lr, lr, #4 22bec: e8be000f ldm lr!, {r0, r1, r2, r3} 22bf0: e28dc004 add ip, sp, #4 22bf4: e8ac000f stmia ip!, {r0, r1, r2, r3} 22bf8: e59e3000 ldr r3, [lr] 22bfc: e58c3000 str r3, [ip] 22c00: e1a00005 mov r0, r5
if ( !parent_loc.ops->evalformake_h ) {
22c04: e59d3010 ldr r3, [sp, #16] 22c08: e5933004 ldr r3, [r3, #4] 22c0c: e3530000 cmp r3, #0
22c10: 1a00000d bne 22c4c <link+0xec> rtems_filesystem_freenode( &existing_loc );
22c14: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22c18: e3530000 cmp r3, #0 <== NOT EXECUTED 22c1c: 0a000005 beq 22c38 <link+0xd8> <== NOT EXECUTED 22c20: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22c24: e3530000 cmp r3, #0 <== NOT EXECUTED 22c28: 0a000002 beq 22c38 <link+0xd8> <== NOT EXECUTED 22c2c: e28d0018 add r0, sp, #24 <== NOT EXECUTED 22c30: e1a0e00f mov lr, pc <== NOT EXECUTED 22c34: e12fff13 bx r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
22c38: eb0055a0 bl 382c0 <__errno> <== NOT EXECUTED 22c3c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
22c40: e5803000 str r3, [r0] 22c44: e3e05000 mvn r5, #0 22c48: ea000054 b 22da0 <link+0x240>
} result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
22c4c: e28d5004 add r5, sp, #4 22c50: e0840000 add r0, r4, r0 22c54: e1a01005 mov r1, r5 22c58: e28d202c add r2, sp, #44 ; 0x2c 22c5c: e1a0e00f mov lr, pc 22c60: e12fff13 bx r3
if ( result != 0 ) {
22c64: e2504000 subs r4, r0, #0
22c68: 0a00000a beq 22c98 <link+0x138> rtems_filesystem_freenode( &existing_loc );
22c6c: e59d3024 ldr r3, [sp, #36] ; 0x24 22c70: e3530000 cmp r3, #0
22c74: 0a000004 beq 22c8c <link+0x12c>
22c78: e593301c ldr r3, [r3, #28] 22c7c: e3530000 cmp r3, #0 22c80: 128d0018 addne r0, sp, #24 22c84: 11a0e00f movne lr, pc 22c88: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
22c8c: eb00558b bl 382c0 <__errno> 22c90: e5804000 str r4, [r0] 22c94: eaffffea b 22c44 <link+0xe4>
/* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
22c98: e59d3028 ldr r3, [sp, #40] ; 0x28 22c9c: e59d2014 ldr r2, [sp, #20] 22ca0: e1520003 cmp r2, r3
22ca4: 0a000012 beq 22cf4 <link+0x194> rtems_filesystem_freenode( &existing_loc );
22ca8: e59d3024 ldr r3, [sp, #36] ; 0x24 22cac: e3530000 cmp r3, #0
22cb0: 0a000004 beq 22cc8 <link+0x168>
22cb4: e593301c ldr r3, [r3, #28] 22cb8: e3530000 cmp r3, #0 22cbc: 128d0018 addne r0, sp, #24 22cc0: 11a0e00f movne lr, pc 22cc4: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
22cc8: e59d3010 ldr r3, [sp, #16] 22ccc: e3530000 cmp r3, #0
22cd0: 0a000004 beq 22ce8 <link+0x188>
22cd4: e593301c ldr r3, [r3, #28] 22cd8: e3530000 cmp r3, #0 22cdc: 128d0004 addne r0, sp, #4 22ce0: 11a0e00f movne lr, pc 22ce4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
22ce8: eb005574 bl 382c0 <__errno> 22cec: e3a03012 mov r3, #18 22cf0: eaffffd2 b 22c40 <link+0xe0>
} if ( !parent_loc.ops->link_h ) {
22cf4: e59d3010 ldr r3, [sp, #16] 22cf8: e5933008 ldr r3, [r3, #8] 22cfc: e3530000 cmp r3, #0
22d00: 1a00000f bne 22d44 <link+0x1e4> rtems_filesystem_freenode( &existing_loc );
22d04: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22d08: e3530000 cmp r3, #0 <== NOT EXECUTED 22d0c: 0a000004 beq 22d24 <link+0x1c4> <== NOT EXECUTED 22d10: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22d14: e3530000 cmp r3, #0 <== NOT EXECUTED 22d18: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 22d1c: 11a0e00f movne lr, pc <== NOT EXECUTED 22d20: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
22d24: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22d28: e3530000 cmp r3, #0 <== NOT EXECUTED 22d2c: 0affffc1 beq 22c38 <link+0xd8> <== NOT EXECUTED 22d30: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22d34: e3530000 cmp r3, #0 <== NOT EXECUTED 22d38: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 22d3c: 1affffbb bne 22c30 <link+0xd0> <== NOT EXECUTED 22d40: eaffffbc b 22c38 <link+0xd8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
22d44: e28d4018 add r4, sp, #24 22d48: e1a01005 mov r1, r5 22d4c: e1a00004 mov r0, r4 22d50: e59d202c ldr r2, [sp, #44] ; 0x2c 22d54: e1a0e00f mov lr, pc 22d58: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
22d5c: e59d3024 ldr r3, [sp, #36] ; 0x24 22d60: 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 );
22d64: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc ); 22d68: 0a000004 beq 22d80 <link+0x220>
22d6c: e593301c ldr r3, [r3, #28] 22d70: e3530000 cmp r3, #0 22d74: 11a00004 movne r0, r4 22d78: 11a0e00f movne lr, pc 22d7c: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
22d80: e59d3010 ldr r3, [sp, #16] 22d84: e3530000 cmp r3, #0
22d88: 0a000004 beq 22da0 <link+0x240>
22d8c: e593301c ldr r3, [r3, #28] 22d90: e3530000 cmp r3, #0 22d94: 128d0004 addne r0, sp, #4 22d98: 11a0e00f movne lr, pc 22d9c: 112fff13 bxne r3
return result; }
22da0: e1a00005 mov r0, r5 22da4: e28dd030 add sp, sp, #48 ; 0x30 22da8: e8bd8030 pop {r4, r5, pc}
00016bcc <lseek>: { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd );
16bcc: e59fc0ec ldr ip, [pc, #236] ; 16cc0 <lseek+0xf4> 16bd0: e59cc000 ldr ip, [ip] 16bd4: e150000c cmp r0, ip
off_t lseek( int fd, off_t offset, int whence ) {
16bd8: e92d4870 push {r4, r5, r6, fp, lr}
rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 16bdc: 2a000005 bcs 16bf8 <lseek+0x2c> iop = rtems_libio_iop( fd );
16be0: e59fc0dc ldr ip, [pc, #220] ; 16cc4 <lseek+0xf8> 16be4: e59c4000 ldr r4, [ip] 16be8: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
16bec: e5940014 ldr r0, [r4, #20] 16bf0: e3100c01 tst r0, #256 ; 0x100
16bf4: 1a000002 bne 16c04 <lseek+0x38>
16bf8: ebffd3f1 bl bbc4 <__errno> <== NOT EXECUTED 16bfc: e3a03009 mov r3, #9 <== NOT EXECUTED 16c00: ea00001c b 16c78 <lseek+0xac> <== NOT EXECUTED
/* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h )
16c04: e594003c ldr r0, [r4, #60] ; 0x3c 16c08: e5900014 ldr r0, [r0, #20] 16c0c: e3500000 cmp r0, #0
16c10: 1a000002 bne 16c20 <lseek+0x54> rtems_set_errno_and_return_minus_one( ENOTSUP );
16c14: ebffd3ea bl bbc4 <__errno> <== NOT EXECUTED 16c18: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 16c1c: ea000015 b 16c78 <lseek+0xac> <== NOT EXECUTED
/* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) {
16c20: e3530001 cmp r3, #1
/* * Now process the lseek(). */ old_offset = iop->offset;
16c24: e284600c add r6, r4, #12 16c28: e8960060 ldm r6, {r5, r6}
switch ( whence ) { 16c2c: 0a000006 beq 16c4c <lseek+0x80>
16c30: e3530002 cmp r3, #2
16c34: 0a000007 beq 16c58 <lseek+0x8c>
16c38: e3530000 cmp r3, #0
16c3c: 1a00000b bne 16c70 <lseek+0xa4> case SEEK_SET: iop->offset = offset;
16c40: e584100c str r1, [r4, #12] 16c44: e5842010 str r2, [r4, #16]
break;
16c48: ea00000e b 16c88 <lseek+0xbc>
case SEEK_CUR: iop->offset += offset;
16c4c: e091b005 adds fp, r1, r5 16c50: e0a2c006 adc ip, r2, r6 16c54: ea000002 b 16c64 <lseek+0x98>
break; case SEEK_END: iop->offset = iop->size + offset;
16c58: e9941800 ldmib r4, {fp, ip} 16c5c: e09bb001 adds fp, fp, r1 16c60: e0acc002 adc ip, ip, r2 16c64: e584b00c str fp, [r4, #12] 16c68: e584c010 str ip, [r4, #16]
break;
16c6c: ea000005 b 16c88 <lseek+0xbc>
default: rtems_set_errno_and_return_minus_one( EINVAL );
16c70: ebffd3d3 bl bbc4 <__errno> 16c74: e3a03016 mov r3, #22 16c78: e5803000 str r3, [r0] 16c7c: e3e02000 mvn r2, #0 16c80: e3e03000 mvn r3, #0 16c84: ea00000a b 16cb4 <lseek+0xe8>
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
16c88: e594c03c ldr ip, [r4, #60] ; 0x3c 16c8c: e1a00004 mov r0, r4 16c90: e1a0e00f mov lr, pc 16c94: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
16c98: e3700001 cmn r0, #1
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
16c9c: e1a02000 mov r2, r0 16ca0: e1a03001 mov r3, r1
if ( status == (off_t) -1 ) 16ca4: 1a000002 bne 16cb4 <lseek+0xe8>
16ca8: e3710001 cmn r1, #1
iop->offset = old_offset;
16cac: 0584500c streq r5, [r4, #12] 16cb0: 05846010 streq r6, [r4, #16]
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
16cb4: e1a01003 mov r1, r3 16cb8: e1a00002 mov r0, r2 16cbc: e8bd8870 pop {r4, r5, r6, fp, pc}
00022ecc <lstat>: int _STAT_NAME( const char *path, struct stat *buf ) {
22ecc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
22ed0: e2515000 subs r5, r1, #0 <== NOT EXECUTED
int _STAT_NAME( const char *path, struct stat *buf ) {
22ed4: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 22ed8: e1a06000 mov r6, r0 <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
22edc: 1a000002 bne 22eec <lstat+0x20> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
22ee0: eb0054f6 bl 382c0 <__errno> <== NOT EXECUTED 22ee4: e3a0300e mov r3, #14 <== NOT EXECUTED 22ee8: ea000018 b 22f50 <lstat+0x84> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ),
22eec: eb006f6d bl 3eca8 <strlen> <== NOT EXECUTED 22ef0: e28d4004 add r4, sp, #4 <== NOT EXECUTED 22ef4: e3a0c000 mov ip, #0 <== NOT EXECUTED 22ef8: e1a01000 mov r1, r0 <== NOT EXECUTED 22efc: e1a0200c mov r2, ip <== NOT EXECUTED 22f00: e1a00006 mov r0, r6 <== NOT EXECUTED 22f04: e1a03004 mov r3, r4 <== NOT EXECUTED 22f08: e58dc000 str ip, [sp] <== NOT EXECUTED 22f0c: ebff8618 bl 4774 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
22f10: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22f14: 1a00000e bne 22f54 <lstat+0x88> <== NOT EXECUTED
return -1; if ( !loc.handlers->fstat_h ){
22f18: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22f1c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 22f20: e3530000 cmp r3, #0 <== NOT EXECUTED 22f24: 1a00000c bne 22f5c <lstat+0x90> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
22f28: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22f2c: e3530000 cmp r3, #0 <== NOT EXECUTED 22f30: 0a000004 beq 22f48 <lstat+0x7c> <== NOT EXECUTED 22f34: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22f38: e3530000 cmp r3, #0 <== NOT EXECUTED 22f3c: 11a00004 movne r0, r4 <== NOT EXECUTED 22f40: 11a0e00f movne lr, pc <== NOT EXECUTED 22f44: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
22f48: eb0054dc bl 382c0 <__errno> <== NOT EXECUTED 22f4c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22f50: e5803000 str r3, [r0] <== NOT EXECUTED 22f54: e3e05000 mvn r5, #0 <== NOT EXECUTED 22f58: ea000010 b 22fa0 <lstat+0xd4> <== NOT EXECUTED
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
22f5c: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 22f60: e1a00005 mov r0, r5 <== NOT EXECUTED 22f64: eb00618d bl 3b5a0 <memset> <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
22f68: e1a01005 mov r1, r5 <== NOT EXECUTED 22f6c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22f70: e1a00004 mov r0, r4 <== NOT EXECUTED 22f74: e1a0e00f mov lr, pc <== NOT EXECUTED 22f78: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
22f7c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22f80: e3530000 cmp r3, #0 <== NOT EXECUTED
* versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf );
22f84: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
22f88: 0a000004 beq 22fa0 <lstat+0xd4> <== NOT EXECUTED 22f8c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22f90: e3530000 cmp r3, #0 <== NOT EXECUTED 22f94: 11a00004 movne r0, r4 <== NOT EXECUTED 22f98: 11a0e00f movne lr, pc <== NOT EXECUTED 22f9c: 112fff13 bxne r3 <== NOT EXECUTED
return status; }
22fa0: e1a00005 mov r0, r5 <== NOT EXECUTED 22fa4: e28dd018 add sp, sp, #24 <== NOT EXECUTED 22fa8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00001c10 <malloc>: size_t size ) { void *return_this; MSBUMP(malloc_calls, 1);
1c10: e59f30d8 ldr r3, [pc, #216] ; 1cf0 <malloc+0xe0> 1c14: e5932004 ldr r2, [r3, #4] 1c18: e2822001 add r2, r2, #1 1c1c: e92d4070 push {r4, r5, r6, lr} 1c20: e5832004 str r2, [r3, #4] 1c24: e1a04000 mov r4, r0
/* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process();
1c28: ebffffb5 bl 1b04 <malloc_deferred_frees_process>
/* * Validate the parameters */ if ( !size )
1c2c: e3540000 cmp r4, #0
1c30: 0a00002b beq 1ce4 <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()) &&
1c34: e59f30b8 ldr r3, [pc, #184] ; 1cf4 <malloc+0xe4> 1c38: e5933000 ldr r3, [r3] 1c3c: e3530003 cmp r3, #3
1c40: 1a000002 bne 1c50 <malloc+0x40>
1c44: ebffff97 bl 1aa8 <malloc_is_system_state_OK> 1c48: e3500000 cmp r0, #0
1c4c: 0a000024 beq 1ce4 <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 );
1c50: e59f30a0 ldr r3, [pc, #160] ; 1cf8 <malloc+0xe8> 1c54: e3a02000 mov r2, #0 1c58: e5930000 ldr r0, [r3] 1c5c: e1a01004 mov r1, r4 1c60: e1a03002 mov r3, r2 1c64: eb00119a bl 62d4 <_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 ) {
1c68: 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;
1c6c: 11a05006 movne r5, r6
* If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1c70: 1a00000c bne 1ca8 <malloc+0x98> if (rtems_malloc_sbrk_helpers)
1c74: e59f3080 ldr r3, [pc, #128] ; 1cfc <malloc+0xec> 1c78: e5933000 ldr r3, [r3] 1c7c: e3530000 cmp r3, #0
1c80: 0a000004 beq 1c98 <malloc+0x88> return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
1c84: e1a00004 mov r0, r4 <== NOT EXECUTED 1c88: e1a0e00f mov lr, pc <== NOT EXECUTED 1c8c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
1c90: e2505000 subs r5, r0, #0 <== NOT EXECUTED 1c94: 1a000003 bne 1ca8 <malloc+0x98> <== NOT EXECUTED
errno = ENOMEM;
1c98: eb0027c9 bl bbc4 <__errno> 1c9c: e3a0300c mov r3, #12 1ca0: e5803000 str r3, [r0]
return (void *) 0;
1ca4: ea00000f b 1ce8 <malloc+0xd8>
} /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper )
1ca8: e59f3050 ldr r3, [pc, #80] ; 1d00 <malloc+0xf0> 1cac: e5933000 ldr r3, [r3] 1cb0: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
1cb4: 11a01004 movne r1, r4 1cb8: 11a00005 movne r0, r5 1cbc: 11a0e00f movne lr, pc 1cc0: 1593f000 ldrne pc, [r3]
/* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
1cc4: e59f3038 ldr r3, [pc, #56] ; 1d04 <malloc+0xf4> 1cc8: e5933000 ldr r3, [r3] 1ccc: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
1cd0: 11a00005 movne r0, r5 1cd4: 11a0e00f movne lr, pc 1cd8: 1593f004 ldrne pc, [r3, #4] 1cdc: e1a06005 mov r6, r5 1ce0: ea000000 b 1ce8 <malloc+0xd8>
1ce4: e3a06000 mov r6, #0 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
1ce8: e1a00006 mov r0, r6 1cec: e8bd8070 pop {r4, r5, r6, pc}
00001af4 <malloc_deferred_free>: } void malloc_deferred_free( void *pointer ) {
1af4: 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 );
1af8: e59f0000 ldr r0, [pc, #0] ; 1b00 <malloc_deferred_free+0xc><== NOT EXECUTED 1afc: ea000e14 b 5354 <_Chain_Append> <== NOT EXECUTED
00001b04 <malloc_deferred_frees_process>: { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) {
1b04: 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)
1b08: ea000000 b 1b10 <malloc_deferred_frees_process+0xc>
free(to_be_freed);
1b0c: ebffff8d bl 1948 <free> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain );
1b10: e59f000c ldr r0, [pc, #12] ; 1b24 <malloc_deferred_frees_process+0x20> 1b14: eb000e19 bl 5380 <_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)
1b18: e3500000 cmp r0, #0
1b1c: 1afffffa bne 1b0c <malloc_deferred_frees_process+0x8> free(to_be_freed); }
1b20: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000faec <memfile_ftruncate>: int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) {
faec: e92d4013 push {r0, r1, r4, lr}
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
faf0: 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 )
faf4: e5943054 ldr r3, [r4, #84] ; 0x54 faf8: e1530002 cmp r3, r2
fafc: ba000003 blt fb10 <memfile_ftruncate+0x24> fb00: 1a000005 bne fb1c <memfile_ftruncate+0x30>
fb04: e5943050 ldr r3, [r4, #80] ; 0x50 fb08: e1530001 cmp r3, r1
fb0c: 2a000002 bcs fb1c <memfile_ftruncate+0x30> return IMFS_memfile_extend( the_jnode, length );
fb10: e1a00004 mov r0, r4 <== NOT EXECUTED fb14: ebffff9a bl f984 <IMFS_memfile_extend> <== NOT EXECUTED fb18: ea000008 b fb40 <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;
fb1c: e5841050 str r1, [r4, #80] ; 0x50 fb20: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
fb24: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
fb28: e3a01000 mov r1, #0 fb2c: e1a0000d mov r0, sp fb30: ebffccb1 bl 2dfc <gettimeofday> fb34: e59d3000 ldr r3, [sp] fb38: e5843040 str r3, [r4, #64] ; 0x40 fb3c: e3a00000 mov r0, #0
return 0; }
fb40: e8bd801c pop {r2, r3, r4, pc}
0000fb44 <memfile_lseek>: rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
fb44: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
fb48: e5905038 ldr r5, [r0, #56] ; 0x38
if (the_jnode->type == IMFS_LINEAR_FILE) {
fb4c: e595304c ldr r3, [r5, #76] ; 0x4c fb50: e3530006 cmp r3, #6
rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
fb54: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { fb58: 1a00000b bne fb8c <memfile_lseek+0x48> if (iop->offset > the_jnode->info.linearfile.size)
fb5c: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED fb60: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED fb64: e1520003 cmp r2, r3 <== NOT EXECUTED fb68: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED fb6c: ca000003 bgt fb80 <memfile_lseek+0x3c> <== NOT EXECUTED fb70: 1a000014 bne fbc8 <memfile_lseek+0x84> <== NOT EXECUTED fb74: e590100c ldr r1, [r0, #12] <== NOT EXECUTED fb78: e1510002 cmp r1, r2 <== NOT EXECUTED fb7c: 9a000011 bls fbc8 <memfile_lseek+0x84> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
fb80: e584200c str r2, [r4, #12] <== NOT EXECUTED fb84: e5843010 str r3, [r4, #16] <== NOT EXECUTED fb88: ea00000e b fbc8 <memfile_lseek+0x84> <== NOT EXECUTED
} else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset ))
fb8c: e1a00005 mov r0, r5 fb90: e284200c add r2, r4, #12 fb94: e8920006 ldm r2, {r1, r2} fb98: ebffff79 bl f984 <IMFS_memfile_extend> fb9c: e3500000 cmp r0, #0
fba0: 0a000005 beq fbbc <memfile_lseek+0x78> rtems_set_errno_and_return_minus_one( ENOSPC );
fba4: eb00041c bl 10c1c <__errno> <== NOT EXECUTED fba8: e3a0301c mov r3, #28 <== NOT EXECUTED fbac: e5803000 str r3, [r0] <== NOT EXECUTED fbb0: e3e04000 mvn r4, #0 <== NOT EXECUTED fbb4: e3e03000 mvn r3, #0 <== NOT EXECUTED fbb8: ea000004 b fbd0 <memfile_lseek+0x8c> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
fbbc: e2853050 add r3, r5, #80 ; 0x50 fbc0: e893000c ldm r3, {r2, r3} fbc4: e984000c stmib r4, {r2, r3}
} return iop->offset;
fbc8: e284400c add r4, r4, #12 fbcc: e8940018 ldm r4, {r3, r4}
}
fbd0: e1a01004 mov r1, r4 fbd4: e1a00003 mov r0, r3 fbd8: e8bd8030 pop {r4, r5, pc}
0000fe68 <memfile_open>: the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
fe68: e5903014 ldr r3, [r0, #20] fe6c: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
fe70: e92d4031 push {r0, r4, r5, lr} fe74: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
fe78: e5904038 ldr r4, [r0, #56] ; 0x38
/* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) fe7c: 0a000017 beq fee0 <memfile_open+0x78> && (the_jnode->type == IMFS_LINEAR_FILE)) {
fe80: e594304c ldr r3, [r4, #76] ; 0x4c fe84: e3530006 cmp r3, #6
fe88: 1a000014 bne fee0 <memfile_open+0x78> uint32_t count = the_jnode->info.linearfile.size;
fe8c: 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;
fe90: 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;
fe94: e3a03005 mov r3, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
fe98: e3a00000 mov r0, #0 <== NOT EXECUTED fe9c: 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)
fea0: 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;
fea4: 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;
fea8: 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;
feac: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0;
feb0: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED feb4: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0;
feb8: 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;
febc: 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)
fec0: 0a000006 beq fee0 <memfile_open+0x78> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
fec4: e1a02001 mov r2, r1 <== NOT EXECUTED fec8: e1a01000 mov r1, r0 <== NOT EXECUTED fecc: e1a00004 mov r0, r4 <== NOT EXECUTED fed0: e58dc000 str ip, [sp] <== NOT EXECUTED fed4: ebffff40 bl fbdc <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)
fed8: e3700001 cmn r0, #1 <== NOT EXECUTED fedc: 0a000009 beq ff08 <memfile_open+0xa0> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND)
fee0: e5953014 ldr r3, [r5, #20] fee4: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
fee8: 12843050 addne r3, r4, #80 ; 0x50 feec: 1893000c ldmne r3, {r2, r3} fef0: 1585200c strne r2, [r5, #12] fef4: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
fef8: e2844050 add r4, r4, #80 ; 0x50 fefc: e8940018 ldm r4, {r3, r4} ff00: e9850018 stmib r5, {r3, r4} ff04: e3a00000 mov r0, #0
return 0; }
ff08: e8bd8038 pop {r3, r4, r5, pc}
00001d18 <mknod>: int mknod( const char *pathname, mode_t mode, dev_t dev ) {
1d18: 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) ) )
1d1c: e3110a0f tst r1, #61440 ; 0xf000
int mknod( const char *pathname, mode_t mode, dev_t dev ) {
1d20: e24dd01c sub sp, sp, #28 1d24: e1a05001 mov r5, r1 1d28: e1a06000 mov r6, r0 1d2c: e1a07002 mov r7, r2 1d30: 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) ) ) 1d34: 1a000002 bne 1d44 <mknod+0x2c> rtems_set_errno_and_return_minus_one( EINVAL );
1d38: eb0027a1 bl bbc4 <__errno> <== NOT EXECUTED 1d3c: e3a03016 mov r3, #22 <== NOT EXECUTED 1d40: ea000020 b 1dc8 <mknod+0xb0> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1d44: e5d03000 ldrb r3, [r0] 1d48: e353002f cmp r3, #47 ; 0x2f 1d4c: 1353005c cmpne r3, #92 ; 0x5c 1d50: 13a04000 movne r4, #0 1d54: 03a04001 moveq r4, #1
1d58: 0a000001 beq 1d64 <mknod+0x4c>
1d5c: e3530000 cmp r3, #0
1d60: 1a000009 bne 1d8c <mknod+0x74>
1d64: e59f3100 ldr r3, [pc, #256] ; 1e6c <mknod+0x154> 1d68: e593e000 ldr lr, [r3] 1d6c: e28ee018 add lr, lr, #24 1d70: e8be000f ldm lr!, {r0, r1, r2, r3} 1d74: e28dc004 add ip, sp, #4 1d78: e8ac000f stmia ip!, {r0, r1, r2, r3} 1d7c: e59e3000 ldr r3, [lr] 1d80: e3a00001 mov r0, #1 1d84: e58c3000 str r3, [ip] 1d88: ea000008 b 1db0 <mknod+0x98> 1d8c: e59f30d8 ldr r3, [pc, #216] ; 1e6c <mknod+0x154> 1d90: e593e000 ldr lr, [r3] 1d94: e28ee004 add lr, lr, #4 1d98: e8be000f ldm lr!, {r0, r1, r2, r3} 1d9c: e28dc004 add ip, sp, #4 1da0: e8ac000f stmia ip!, {r0, r1, r2, r3} 1da4: e59e3000 ldr r3, [lr] 1da8: e58c3000 str r3, [ip] 1dac: e1a00004 mov r0, r4
if ( !temp_loc.ops->evalformake_h ) {
1db0: e59d3010 ldr r3, [sp, #16] 1db4: e5933004 ldr r3, [r3, #4] 1db8: e3530000 cmp r3, #0
1dbc: 1a000004 bne 1dd4 <mknod+0xbc> rtems_set_errno_and_return_minus_one( ENOTSUP );
1dc0: eb00277f bl bbc4 <__errno> <== NOT EXECUTED 1dc4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1dc8: e5803000 str r3, [r0] <== NOT EXECUTED
1dcc: e3e05000 mvn r5, #0 1dd0: ea000022 b 1e60 <mknod+0x148>
} result = (*temp_loc.ops->evalformake_h)(
1dd4: e28d4004 add r4, sp, #4 1dd8: e0860000 add r0, r6, r0 1ddc: e1a01004 mov r1, r4 1de0: e28d2018 add r2, sp, #24 1de4: e1a0e00f mov lr, pc 1de8: e12fff13 bx r3
&pathname[i], &temp_loc, &name_start ); if ( result != 0 )
1dec: e3500000 cmp r0, #0
1df0: 1afffff5 bne 1dcc <mknod+0xb4> return -1; if ( !temp_loc.ops->mknod_h ) {
1df4: e59d3010 ldr r3, [sp, #16] 1df8: e593c014 ldr ip, [r3, #20] 1dfc: e35c0000 cmp ip, #0
1e00: 1a000006 bne 1e20 <mknod+0x108> rtems_filesystem_freenode( &temp_loc );
1e04: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1e08: e3530000 cmp r3, #0 <== NOT EXECUTED 1e0c: 0affffeb beq 1dc0 <mknod+0xa8> <== NOT EXECUTED 1e10: e1a00004 mov r0, r4 <== NOT EXECUTED 1e14: e1a0e00f mov lr, pc <== NOT EXECUTED 1e18: e12fff13 bx r3 <== NOT EXECUTED 1e1c: eaffffe7 b 1dc0 <mknod+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
1e20: e1a01005 mov r1, r5 1e24: e1a03008 mov r3, r8 1e28: e58d4000 str r4, [sp] 1e2c: e1a02007 mov r2, r7 1e30: e59d0018 ldr r0, [sp, #24] 1e34: e1a0e00f mov lr, pc 1e38: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
1e3c: e59d3010 ldr r3, [sp, #16] 1e40: 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 );
1e44: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc ); 1e48: 0a000004 beq 1e60 <mknod+0x148>
1e4c: e593301c ldr r3, [r3, #28] 1e50: e3530000 cmp r3, #0 1e54: 11a00004 movne r0, r4 1e58: 11a0e00f movne lr, pc 1e5c: 112fff13 bxne r3
return result; }
1e60: e1a00005 mov r0, r5 1e64: e28dd01c add sp, sp, #28 1e68: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00001e8c <mount>: const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) {
1e8c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Is there a file system operations table? */ if ( fs_ops == NULL ) {
1e90: e2517000 subs r7, r1, #0
const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) {
1e94: e24dd018 sub sp, sp, #24 1e98: e1a06000 mov r6, r0 1e9c: e1a09002 mov r9, r2 1ea0: e1a0b003 mov fp, r3 1ea4: e59da03c ldr sl, [sp, #60] ; 0x3c
/* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1ea8: 0a000001 beq 1eb4 <mount+0x28> /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
1eac: e3520001 cmp r2, #1
1eb0: 9a000002 bls 1ec0 <mount+0x34> options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL;
1eb4: eb002742 bl bbc4 <__errno> 1eb8: e3a03016 mov r3, #22 1ebc: ea000014 b 1f14 <mount+0x88>
return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) {
1ec0: e5975024 ldr r5, [r7, #36] ; 0x24 1ec4: e3550000 cmp r5, #0
1ec8: 1a000004 bne 1ee0 <mount+0x54> errno = ENOTSUP;
1ecc: eb00273c bl bbc4 <__errno> <== NOT EXECUTED 1ed0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1ed4: e5803000 str r3, [r0] <== NOT EXECUTED 1ed8: e1a08005 mov r8, r5 <== NOT EXECUTED
goto cleanup_and_bail;
1edc: ea00006d b 2098 <mount+0x20c> <== NOT EXECUTED
/* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device )
1ee0: e3530000 cmp r3, #0 1ee4: 03a0006c moveq r0, #108 ; 0x6c
1ee8: 0a000002 beq 1ef8 <mount+0x6c> size += strlen( device ) + 1;
1eec: e1a00003 mov r0, r3 <== NOT EXECUTED 1ef0: eb002b24 bl cb88 <strlen> <== NOT EXECUTED 1ef4: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED
temp_mt_entry = malloc( size );
1ef8: ebffff44 bl 1c10 <malloc>
if ( !temp_mt_entry ) {
1efc: e3500000 cmp r0, #0
*/ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size );
1f00: e1a04000 mov r4, r0 1f04: e1a08000 mov r8, r0
if ( !temp_mt_entry ) { 1f08: 1a000003 bne 1f1c <mount+0x90> errno = ENOMEM;
1f0c: eb00272c bl bbc4 <__errno> <== NOT EXECUTED 1f10: e3a0300c mov r3, #12 <== NOT EXECUTED
1f14: e5803000 str r3, [r0] 1f18: ea00006a b 20c8 <mount+0x23c>
return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) {
1f1c: e35b0000 cmp fp, #0
errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options;
1f20: e5809030 str r9, [r0, #48] ; 0x30
if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
1f24: e584002c str r0, [r4, #44] ; 0x2c
if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0;
1f28: 0580b068 streq fp, [r0, #104] ; 0x68
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
1f2c: 1280306c addne r3, r0, #108 ; 0x6c
strcpy( temp_mt_entry->dev, device );
1f30: 11a00003 movne r0, r3 1f34: 11a0100b movne r1, fp
} temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev =
1f38: 15843068 strne r3, [r4, #104] ; 0x68
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device );
1f3c: 1b002ad5 blne ca98 <strcpy>
/* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) {
1f40: e35a0000 cmp sl, #0
1f44: 0a000035 beq 2020 <mount+0x194> if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
1f48: e1a0000a mov r0, sl 1f4c: eb002b0d bl cb88 <strlen>
* permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path(
1f50: e28d5004 add r5, sp, #4
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
1f54: e1a01000 mov r1, r0
* permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path(
1f58: e3a0c001 mov ip, #1 1f5c: e1a0000a mov r0, sl 1f60: e3a02007 mov r2, #7 1f64: e1a03005 mov r3, r5 1f68: e58dc000 str ip, [sp] 1f6c: ebfffe42 bl 187c <rtems_filesystem_evaluate_path> 1f70: e3700001 cmn r0, #1
1f74: 0a000046 beq 2094 <mount+0x208> /* * Test for node_type_h */ if (!loc.ops->node_type_h) {
1f78: e59d3010 ldr r3, [sp, #16] 1f7c: e5933010 ldr r3, [r3, #16] 1f80: e3530000 cmp r3, #0
1f84: 1a000002 bne 1f94 <mount+0x108> errno = ENOTSUP;
1f88: eb00270d bl bbc4 <__errno> <== NOT EXECUTED 1f8c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1f90: ea000006 b 1fb0 <mount+0x124> <== NOT EXECUTED
/* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
1f94: e1a00005 mov r0, r5 1f98: e1a0e00f mov lr, pc 1f9c: e12fff13 bx r3 1fa0: e3500001 cmp r0, #1
1fa4: 0a000003 beq 1fb8 <mount+0x12c> errno = ENOTDIR;
1fa8: eb002705 bl bbc4 <__errno> 1fac: e3a03014 mov r3, #20 1fb0: e5803000 str r3, [r0]
goto cleanup_and_bail;
1fb4: ea000037 b 2098 <mount+0x20c>
/* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
1fb8: e59f2140 ldr r2, [pc, #320] ; 2100 <mount+0x274>
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
1fbc: e59d1004 ldr r1, [sp, #4]
/* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
1fc0: e4923004 ldr r3, [r2], #4 1fc4: ea000003 b 1fd8 <mount+0x14c>
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
1fc8: e593001c ldr r0, [r3, #28] 1fcc: e1500001 cmp r0, r1
1fd0: 0a000003 beq 1fe4 <mount+0x158> * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) {
1fd4: e5933000 ldr r3, [r3]
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
1fd8: e1530002 cmp r3, r2
1fdc: 1afffff9 bne 1fc8 <mount+0x13c>
1fe0: ea00003b b 20d4 <mount+0x248>
/* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY;
1fe4: eb0026f6 bl bbc4 <__errno> 1fe8: e3a03010 mov r3, #16 1fec: ea000001 b 1ff8 <mount+0x16c>
* This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP;
1ff0: eb0026f3 bl bbc4 <__errno> <== NOT EXECUTED 1ff4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1ff8: e5803000 str r3, [r0] 1ffc: e28d5004 add r5, sp, #4
goto cleanup_and_bail;
2000: ea000024 b 2098 <mount+0x20c>
} if ( loc.ops->mount_h( temp_mt_entry ) ) {
2004: e1a00004 mov r0, r4 2008: e1a0e00f mov lr, pc 200c: e12fff13 bx r3 2010: e3500000 cmp r0, #0 2014: e28d5004 add r5, sp, #4
2018: 0a000008 beq 2040 <mount+0x1b4>
201c: ea00001d b 2098 <mount+0x20c> <== NOT EXECUTED
* This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL;
2020: e584a01c str sl, [r4, #28]
temp_mt_entry->mt_fs_root.handlers = NULL;
2024: e584a024 str sl, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = NULL;
2028: e584a028 str sl, [r4, #40] ; 0x28
temp_mt_entry->mt_point_node.node_access = NULL;
202c: e584a008 str sl, [r4, #8]
temp_mt_entry->mt_point_node.handlers = NULL;
2030: e584a010 str sl, [r4, #16]
temp_mt_entry->mt_point_node.ops = NULL;
2034: e584a014 str sl, [r4, #20]
temp_mt_entry->mt_point_node.mt_entry = NULL;
2038: e584a018 str sl, [r4, #24] 203c: e1a0500a mov r5, sl
} if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
2040: e1a00004 mov r0, r4 2044: e1a0e00f mov lr, pc 2048: e597f024 ldr pc, [r7, #36] ; 0x24 204c: e2507000 subs r7, r0, #0
2050: 0a000007 beq 2074 <mount+0x1e8> /* try to undo the mount operation */ if ( loc.ops->unmount_h ) {
2054: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2058: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 205c: e3530000 cmp r3, #0 <== NOT EXECUTED 2060: 0a00000c beq 2098 <mount+0x20c> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
2064: e1a00004 mov r0, r4 <== NOT EXECUTED 2068: e1a0e00f mov lr, pc <== NOT EXECUTED 206c: e12fff13 bx r3 <== NOT EXECUTED 2070: ea000008 b 2098 <mount+0x20c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node );
2074: e59f0084 ldr r0, [pc, #132] ; 2100 <mount+0x274> 2078: e1a01004 mov r1, r4 207c: eb000cb4 bl 5354 <_Chain_Append>
*/ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry )
2080: e3560000 cmp r6, #0 2084: 01a00006 moveq r0, r6
*mt_entry = temp_mt_entry;
2088: 15864000 strne r4, [r6] 208c: 11a00007 movne r0, r7 2090: ea00000d b 20cc <mount+0x240>
2094: e3a05000 mov r5, #0 <== NOT EXECUTED
return 0; cleanup_and_bail: free( temp_mt_entry );
2098: e1a00008 mov r0, r8 209c: ebfffe29 bl 1948 <free>
if ( loc_to_free )
20a0: e3550000 cmp r5, #0
20a4: 0a000007 beq 20c8 <mount+0x23c> rtems_filesystem_freenode( loc_to_free );
20a8: e595300c ldr r3, [r5, #12] 20ac: e3530000 cmp r3, #0
20b0: 0a000004 beq 20c8 <mount+0x23c>
20b4: e593301c ldr r3, [r3, #28] 20b8: e3530000 cmp r3, #0 20bc: 11a00005 movne r0, r5 20c0: 11a0e00f movne lr, pc 20c4: 112fff13 bxne r3 20c8: e3e00000 mvn r0, #0
return -1; }
20cc: e28dd018 add sp, sp, #24 20d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops;
20d4: e59d2010 ldr r2, [sp, #16]
* may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access;
20d8: e5841008 str r1, [r4, #8]
temp_mt_entry->mt_point_node.handlers = loc.handlers;
20dc: e59d100c ldr r1, [sp, #12]
/* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){
20e0: e5923020 ldr r3, [r2, #32]
* until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers;
20e4: e5841010 str r1, [r4, #16]
temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
20e8: e59d1014 ldr r1, [sp, #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 ){
20ec: e3530000 cmp r3, #0
*/ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
20f0: e5841018 str r1, [r4, #24]
* traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops;
20f4: 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 ){ 20f8: 1affffc1 bne 2004 <mount+0x178>
20fc: eaffffbb b 1ff0 <mount+0x164> <== NOT EXECUTED
00002174 <newlib_free_buffers>: */ int newlib_free_buffers( FILE *fp ) {
2174: e92d4010 push {r4, lr} 2178: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
217c: eb00278f bl bfc0 <fileno> 2180: e3500002 cmp r0, #2
2184: 8a00000b bhi 21b8 <newlib_free_buffers+0x44> case 0: case 1: case 2: if (fp->_flags & __SMBF) {
2188: e1d430bc ldrh r3, [r4, #12] 218c: e3130080 tst r3, #128 ; 0x80
2190: 0a00000a beq 21c0 <newlib_free_buffers+0x4c> free( fp->_bf._base );
2194: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2198: ebfffdea bl 1948 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
219c: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
21a0: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF;
21a4: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
21a8: e5843010 str r3, [r4, #16] <== NOT EXECUTED
case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF;
21ac: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
21b0: e5843000 str r3, [r4] <== NOT EXECUTED 21b4: ea000001 b 21c0 <newlib_free_buffers+0x4c> <== NOT EXECUTED
} break; default: fclose(fp);
21b8: e1a00004 mov r0, r4 <== NOT EXECUTED 21bc: eb0026cd bl bcf8 <fclose> <== NOT EXECUTED
} return 0; }
21c0: e3a00000 mov r0, #0 21c4: e8bd8010 pop {r4, pc}
000023e8 <open>: int open( const char *pathname, int flags, ... ) {
23e8: e92d000e push {r1, r2, r3} 23ec: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 23f0: e24dd01c sub sp, sp, #28 23f4: e59d503c ldr r5, [sp, #60] ; 0x3c
/* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1;
23f8: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
23fc: e2138001 ands r8, r3, #1 2400: 13a08004 movne r8, #4
eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE )
2404: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int );
2408: 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;
240c: 13888002 orrne r8, r8, #2
int open( const char *pathname, int flags, ... ) {
2410: e1a06000 mov r6, r0
eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int );
2414: e58d3018 str r3, [sp, #24] 2418: 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();
241c: eb001b9e bl 929c <rtems_libio_allocate>
if ( iop == 0 ) {
2420: e2504000 subs r4, r0, #0 2424: 03a05017 moveq r5, #23
2428: 0a000077 beq 260c <open+0x224> /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true );
242c: e1a00006 mov r0, r6 2430: eb0029d4 bl cb88 <strlen>
/* * See if the file exists. */ status = rtems_filesystem_evaluate_path(
2434: e28d7004 add r7, sp, #4
pathname, strlen( pathname ), eval_flags, &loc, true );
2438: e1a01000 mov r1, r0
/* * See if the file exists. */ status = rtems_filesystem_evaluate_path(
243c: e1a02008 mov r2, r8 2440: e1a00006 mov r0, r6 2444: e3a08001 mov r8, #1 2448: e1a03007 mov r3, r7 244c: e58d8000 str r8, [sp] 2450: ebfffd09 bl 187c <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) {
2454: e3700001 cmn r0, #1
2458: 1a00001f bne 24dc <open+0xf4> if ( errno != ENOENT ) {
245c: eb0025d8 bl bbc4 <__errno> 2460: e5903000 ldr r3, [r0] 2464: e3530002 cmp r3, #2
2468: 1a00000a bne 2498 <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) ) {
246c: e215ac02 ands sl, r5, #512 ; 0x200 2470: 01a0700a moveq r7, sl 2474: 01a05003 moveq r5, r3
2478: 0a000056 beq 25d8 <open+0x1f0> rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL );
247c: e1a00006 mov r0, r6 2480: e3891902 orr r1, r9, #32768 ; 0x8000 2484: e3a02000 mov r2, #0 2488: e3a03000 mov r3, #0 248c: ebfffe21 bl 1d18 <mknod>
if ( rc ) {
2490: e250a000 subs sl, r0, #0
2494: 0a000003 beq 24a8 <open+0xc0> rc = errno;
2498: eb0025c9 bl bbc4 <__errno> 249c: e3a07000 mov r7, #0 24a0: e5905000 ldr r5, [r0]
goto done;
24a4: ea000049 b 25d0 <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 );
24a8: e1a00006 mov r0, r6 24ac: eb0029b5 bl cb88 <strlen> 24b0: e1a03007 mov r3, r7 24b4: e1a01000 mov r1, r0 24b8: e1a0200a mov r2, sl 24bc: e1a00006 mov r0, r6 24c0: e58d8000 str r8, [sp] 24c4: ebfffcec bl 187c <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
24c8: e3500000 cmp r0, #0 24cc: 11a0700a movne r7, sl 24d0: 13a0500d movne r5, #13
24d4: 1a00003f bne 25d8 <open+0x1f0>
24d8: ea000003 b 24ec <open+0x104>
rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
24dc: e2053c0a and r3, r5, #2560 ; 0xa00 24e0: e3530c0a cmp r3, #2560 ; 0xa00 24e4: 03a05011 moveq r5, #17
24e8: 0a00003a beq 25d8 <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;
24ec: e28d701c add r7, sp, #28 24f0: e5373018 ldr r3, [r7, #-24]! 24f4: 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;
24f8: e59d300c ldr r3, [sp, #12]
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
24fc: e1a00005 mov r0, r5
/* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers;
2500: e584303c str r3, [r4, #60] ; 0x3c
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
2504: e5948014 ldr r8, [r4, #20] 2508: eb001b90 bl 9350 <rtems_libio_fcntl_flags> 250c: e180e008 orr lr, r0, r8
iop->pathinfo = loc;
2510: e8b7000f ldm r7!, {r0, r1, r2, r3} 2514: e284c018 add ip, r4, #24 2518: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !iop->handlers || !iop->handlers->open_h ) {
251c: 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;
2520: e5972000 ldr r2, [r7]
if ( !iop->handlers || !iop->handlers->open_h ) {
2524: e3530000 cmp r3, #0
*/ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc;
2528: 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 );
252c: e584e014 str lr, [r4, #20]
iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 2530: 0a000041 beq 263c <open+0x254>
2534: e593c000 ldr ip, [r3] 2538: e35c0000 cmp ip, #0
253c: 0a00003e beq 263c <open+0x254> rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
2540: e1a01006 mov r1, r6 2544: e1a03009 mov r3, r9 2548: e1a00004 mov r0, r4 254c: e1a02005 mov r2, r5 2550: e1a0e00f mov lr, pc 2554: e12fff1c bx ip
if ( rc ) {
2558: e3500000 cmp r0, #0
255c: 0a000003 beq 2570 <open+0x188> rc = errno;
2560: eb002597 bl bbc4 <__errno> 2564: e28d7004 add r7, sp, #4 2568: e5905000 ldr r5, [r0]
goto done;
256c: ea000017 b 25d0 <open+0x1e8>
/* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) {
2570: e3150b01 tst r5, #1024 ; 0x400
2574: 0a000028 beq 261c <open+0x234> rc = ftruncate( iop - rtems_libio_iops, 0 );
2578: e59f30c8 ldr r3, [pc, #200] ; 2648 <open+0x260> 257c: e5930000 ldr r0, [r3] 2580: e0600004 rsb r0, r0, r4 2584: e1a00340 asr r0, r0, #6 2588: e3a01000 mov r1, #0 258c: e3a02000 mov r2, #0 2590: eb001a84 bl 8fa8 <ftruncate>
if ( rc ) {
2594: e2505000 subs r5, r0, #0
2598: 0a00001f beq 261c <open+0x234> if(errno) rc = errno;
259c: eb002588 bl bbc4 <__errno> <== NOT EXECUTED 25a0: e5903000 ldr r3, [r0] <== NOT EXECUTED 25a4: e3530000 cmp r3, #0 <== NOT EXECUTED 25a8: 0a000001 beq 25b4 <open+0x1cc> <== NOT EXECUTED 25ac: eb002584 bl bbc4 <__errno> <== NOT EXECUTED 25b0: e5905000 ldr r5, [r0] <== NOT EXECUTED
close( iop - rtems_libio_iops );
25b4: e59f308c ldr r3, [pc, #140] ; 2648 <open+0x260> <== NOT EXECUTED 25b8: e5933000 ldr r3, [r3] <== NOT EXECUTED 25bc: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 25c0: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 25c4: eb001a4e bl 8f04 <close> <== NOT EXECUTED 25c8: e3a04000 mov r4, #0 <== NOT EXECUTED 25cc: e1a07004 mov r7, r4 <== NOT EXECUTED
*/ done: va_end(ap); if ( rc ) {
25d0: e3550000 cmp r5, #0
25d4: 0a000010 beq 261c <open+0x234> if ( iop )
25d8: e3540000 cmp r4, #0
rtems_libio_free( iop );
25dc: 11a00004 movne r0, r4 25e0: 1b001b16 blne 9240 <rtems_libio_free>
if ( loc_to_free )
25e4: e3570000 cmp r7, #0
25e8: 0a000007 beq 260c <open+0x224> rtems_filesystem_freenode( loc_to_free );
25ec: e597300c ldr r3, [r7, #12] 25f0: e3530000 cmp r3, #0
25f4: 0a000004 beq 260c <open+0x224>
25f8: e593301c ldr r3, [r3, #28] 25fc: e3530000 cmp r3, #0 2600: 11a00007 movne r0, r7 2604: 11a0e00f movne lr, pc 2608: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
260c: eb00256c bl bbc4 <__errno> 2610: e5805000 str r5, [r0] 2614: e3e00000 mvn r0, #0 2618: ea000003 b 262c <open+0x244>
} return iop - rtems_libio_iops;
261c: e59f3024 ldr r3, [pc, #36] ; 2648 <open+0x260> 2620: e5930000 ldr r0, [r3] 2624: e0604004 rsb r4, r0, r4 2628: e1a00344 asr r0, r4, #6
}
262c: e28dd01c add sp, sp, #28 2630: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 2634: e28dd00c add sp, sp, #12 2638: 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;
263c: e28d7004 add r7, sp, #4 <== NOT EXECUTED 2640: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 2644: eaffffe3 b 25d8 <open+0x1f0> <== NOT EXECUTED
00002384 <open_dev_console>: int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
2384: e3a01000 mov r1, #0
/* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) {
2388: 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) {
238c: e59f0048 ldr r0, [pc, #72] ; 23dc <open_dev_console+0x58> 2390: e1a02001 mov r2, r1 2394: eb000013 bl 23e8 <open> 2398: e3700001 cmn r0, #1 239c: 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)
23a0: e59f0034 ldr r0, [pc, #52] ; 23dc <open_dev_console+0x58> 23a4: e3a01001 mov r1, #1 23a8: e3a02000 mov r2, #0 23ac: eb00000d bl 23e8 <open> 23b0: e3700001 cmn r0, #1
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
23b4: 059f0024 ldreq r0, [pc, #36] ; 23e0 <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) 23b8: 0a000006 beq 23d8 <open_dev_console+0x54> rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
23bc: e59f0018 ldr r0, [pc, #24] ; 23dc <open_dev_console+0x58> 23c0: e3a01001 mov r1, #1 23c4: e3a02000 mov r2, #0 23c8: eb000006 bl 23e8 <open> 23cc: e3700001 cmn r0, #1 23d0: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
23d4: e59f0008 ldr r0, [pc, #8] ; 23e4 <open_dev_console+0x60> <== NOT EXECUTED 23d8: eb000b35 bl 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00002d10 <oproc>: /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
2d10: e92d4011 push {r0, r4, lr}
int i; if (tty->termios.c_oflag & OPOST) {
2d14: e5913034 ldr r3, [r1, #52] ; 0x34 2d18: e3130001 tst r3, #1
/* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
2d1c: e1a04001 mov r4, r1 2d20: e5cd0000 strb r0, [sp]
int i; if (tty->termios.c_oflag & OPOST) { 2d24: 0a000047 beq 2e48 <oproc+0x138> switch (c) {
2d28: e5dd2000 ldrb r2, [sp] 2d2c: e2421008 sub r1, r2, #8 2d30: e3510005 cmp r1, #5 2d34: 979ff101 ldrls pc, [pc, r1, lsl #2] 2d38: ea00002e b 2df8 <oproc+0xe8>
2d3c: 00002de4 .word 0x00002de4 <== NOT EXECUTED 2d40: 00002db8 .word 0x00002db8 <== NOT EXECUTED 2d44: 00002d54 .word 0x00002d54 <== NOT EXECUTED 2d48: 00002df8 .word 0x00002df8 <== NOT EXECUTED 2d4c: 00002df8 .word 0x00002df8 <== NOT EXECUTED 2d50: 00002d80 .word 0x00002d80 <== NOT EXECUTED
case '\n': if (tty->termios.c_oflag & ONLRET)
2d54: e3130020 tst r3, #32
tty->column = 0;
2d58: 13a03000 movne r3, #0 2d5c: 15843028 strne r3, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
2d60: e5943034 ldr r3, [r4, #52] ; 0x34 2d64: e3130004 tst r3, #4
2d68: 0a000036 beq 2e48 <oproc+0x138> rtems_termios_puts ("\r", 1, tty);
2d6c: e59f00e8 ldr r0, [pc, #232] ; 2e5c <oproc+0x14c> 2d70: e3a01001 mov r1, #1 2d74: e1a02004 mov r2, r4 2d78: ebffffa0 bl 2c00 <rtems_termios_puts> 2d7c: ea00000b b 2db0 <oproc+0xa0>
tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
2d80: e3130010 tst r3, #16 <== NOT EXECUTED 2d84: 0a000002 beq 2d94 <oproc+0x84> <== NOT EXECUTED 2d88: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 2d8c: e3520000 cmp r2, #0 <== NOT EXECUTED 2d90: 0a000030 beq 2e58 <oproc+0x148> <== NOT EXECUTED
return; if (tty->termios.c_oflag & OCRNL) {
2d94: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0;
2d98: 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) {
2d9c: 0a000029 beq 2e48 <oproc+0x138> <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET)
2da0: 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';
2da4: e3a0300a mov r3, #10 <== NOT EXECUTED 2da8: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
2dac: 0a000025 beq 2e48 <oproc+0x138> <== NOT EXECUTED
tty->column = 0;
2db0: e3a03000 mov r3, #0 2db4: ea000022 b 2e44 <oproc+0x134>
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
2db8: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2dbc: e2033b06 and r3, r3, #6144 ; 0x1800
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
2dc0: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2dc4: e3530b06 cmp r3, #6144 ; 0x1800
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
2dc8: e2611008 rsb r1, r1, #8 2dcc: e0813002 add r3, r1, r2
if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2dd0: 1a00001b bne 2e44 <oproc+0x134> tty->column += i;
2dd4: e5843028 str r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
2dd8: e1a02004 mov r2, r4 2ddc: e59f007c ldr r0, [pc, #124] ; 2e60 <oproc+0x150> 2de0: ea00001b b 2e54 <oproc+0x144>
} tty->column += i; break; case '\b': if (tty->column > 0)
2de4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2de8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
2dec: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
} tty->column += i; break; case '\b': if (tty->column > 0)
2df0: ca000013 bgt 2e44 <oproc+0x134> <== NOT EXECUTED 2df4: ea000013 b 2e48 <oproc+0x138> <== NOT EXECUTED
tty->column--; break; default: if (tty->termios.c_oflag & OLCUC)
2df8: e3130002 tst r3, #2
2dfc: 0a000007 beq 2e20 <oproc+0x110> c = toupper(c);
2e00: e59f305c ldr r3, [pc, #92] ; 2e64 <oproc+0x154> <== NOT EXECUTED 2e04: e5933000 ldr r3, [r3] <== NOT EXECUTED 2e08: e0833002 add r3, r3, r2 <== NOT EXECUTED 2e0c: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 2e10: e2033003 and r3, r3, #3 <== NOT EXECUTED 2e14: e3530002 cmp r3, #2 <== NOT EXECUTED 2e18: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 2e1c: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
2e20: e59f303c ldr r3, [pc, #60] ; 2e64 <oproc+0x154> 2e24: e5932000 ldr r2, [r3] 2e28: e5dd3000 ldrb r3, [sp] 2e2c: e0823003 add r3, r2, r3 2e30: e5d33001 ldrb r3, [r3, #1] 2e34: e3130020 tst r3, #32
2e38: 1a000002 bne 2e48 <oproc+0x138> tty->column++;
2e3c: e5943028 ldr r3, [r4, #40] ; 0x28 2e40: e2833001 add r3, r3, #1 2e44: e5843028 str r3, [r4, #40] ; 0x28
break; } } rtems_termios_puts (&c, 1, tty);
2e48: e1a02004 mov r2, r4 2e4c: e1a0000d mov r0, sp 2e50: e3a01001 mov r1, #1 2e54: ebffff69 bl 2c00 <rtems_termios_puts>
}
2e58: e8bd8018 pop {r3, r4, pc}
0000b6e8 <pipe_create>: * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
b6e8: e92d4070 push {r4, r5, r6, lr} b6ec: 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)
b6f0: e28d5004 add r5, sp, #4 b6f4: e3a0c001 mov ip, #1
* Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
b6f8: 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)
b6fc: e3a01003 mov r1, #3 b700: e59f0140 ldr r0, [pc, #320] ; b848 <pipe_create+0x160> b704: e3a02007 mov r2, #7 b708: e1a03005 mov r3, r5 b70c: e58dc000 str ip, [sp] b710: ebffd859 bl 187c <rtems_filesystem_evaluate_path> b714: e3500000 cmp r0, #0
b718: 0a000009 beq b744 <pipe_create+0x5c> != 0) { if (errno != ENOENT)
b71c: eb000128 bl bbc4 <__errno> b720: e5903000 ldr r3, [r0] b724: e3530002 cmp r3, #2
b728: 1a000043 bne b83c <pipe_create+0x154> return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
b72c: e59f0114 ldr r0, [pc, #276] ; b848 <pipe_create+0x160> b730: e59f1114 ldr r1, [pc, #276] ; b84c <pipe_create+0x164> b734: ebffd973 bl 1d08 <mkdir> b738: e3500000 cmp r0, #0
b73c: 0a000008 beq b764 <pipe_create+0x7c>
b740: ea00003d b b83c <pipe_create+0x154> <== NOT EXECUTED
return -1; } else rtems_filesystem_freenode(&loc);
b744: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED b748: e3530000 cmp r3, #0 <== NOT EXECUTED b74c: 0a000004 beq b764 <pipe_create+0x7c> <== NOT EXECUTED b750: e593301c ldr r3, [r3, #28] <== NOT EXECUTED b754: e3530000 cmp r3, #0 <== NOT EXECUTED b758: 11a00005 movne r0, r5 <== NOT EXECUTED b75c: 11a0e00f movne lr, pc <== NOT EXECUTED b760: 112fff13 bxne r3 <== NOT EXECUTED
/* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
b764: e28d5018 add r5, sp, #24 b768: e59f10e0 ldr r1, [pc, #224] ; b850 <pipe_create+0x168> b76c: e3a0200a mov r2, #10 b770: e1a00005 mov r0, r5 b774: eb000320 bl c3fc <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
b778: e59f30d4 ldr r3, [pc, #212] ; b854 <pipe_create+0x16c> b77c: e1d3c0b0 ldrh ip, [r3] b780: e1a0200c mov r2, ip b784: e28cc001 add ip, ip, #1 b788: e59f10c8 ldr r1, [pc, #200] ; b858 <pipe_create+0x170> b78c: e1c3c0b0 strh ip, [r3] b790: e285000a add r0, r5, #10 b794: eb0003be bl c694 <sprintf>
/* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
b798: e1a00005 mov r0, r5 b79c: e3a01d06 mov r1, #384 ; 0x180 b7a0: eb00003f bl b8a4 <mkfifo> b7a4: e2506000 subs r6, r0, #0
b7a8: 0a000001 beq b7b4 <pipe_create+0xcc> if (errno != EEXIST){
b7ac: eb000104 bl bbc4 <__errno> <== NOT EXECUTED b7b0: ea000021 b b83c <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);
b7b4: e1a00005 mov r0, r5 b7b8: e3a01901 mov r1, #16384 ; 0x4000 b7bc: ebffdb09 bl 23e8 <open>
if (filsdes[0] < 0) {
b7c0: 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);
b7c4: e5840000 str r0, [r4]
if (filsdes[0] < 0) { b7c8: aa000003 bge b7dc <pipe_create+0xf4> err = errno;
b7cc: eb0000fc bl bbc4 <__errno> b7d0: 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);
b7d4: e1a00005 mov r0, r5 b7d8: ea000014 b b830 <pipe_create+0x148>
} else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]);
b7dc: e59f3078 ldr r3, [pc, #120] ; b85c <pipe_create+0x174> <== NOT EXECUTED b7e0: e5933000 ldr r3, [r3] <== NOT EXECUTED b7e4: e1500003 cmp r0, r3 <== NOT EXECUTED b7e8: 359f3070 ldrcc r3, [pc, #112] ; b860 <pipe_create+0x178> <== NOT EXECUTED b7ec: 35936000 ldrcc r6, [r3] <== NOT EXECUTED b7f0: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
b7f4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED b7f8: e3c33001 bic r3, r3, #1 <== NOT EXECUTED b7fc: e5863014 str r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
b800: e28d0018 add r0, sp, #24 <== NOT EXECUTED b804: e3a01001 mov r1, #1 <== NOT EXECUTED b808: ebffdaf6 bl 23e8 <open> <== NOT EXECUTED
if (filsdes[1] < 0) {
b80c: 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);
b810: e5840004 str r0, [r4, #4] <== NOT EXECUTED
if (filsdes[1] < 0) {
b814: a3a06000 movge r6, #0 <== NOT EXECUTED b818: aa000003 bge b82c <pipe_create+0x144> <== NOT EXECUTED
err = errno;
b81c: eb0000e8 bl bbc4 <__errno> <== NOT EXECUTED b820: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
b824: e5940000 ldr r0, [r4] <== NOT EXECUTED b828: ebfff5b5 bl 8f04 <close> <== NOT EXECUTED
} unlink(fifopath);
b82c: e28d0018 add r0, sp, #24 <== NOT EXECUTED
b830: eb00001f bl b8b4 <unlink>
} rtems_set_errno_and_return_minus_one(err);
b834: eb0000e2 bl bbc4 <__errno> b838: e5806000 str r6, [r0]
}
b83c: e3e00000 mvn r0, #0 b840: e28dd028 add sp, sp, #40 ; 0x28 b844: e8bd8070 pop {r4, r5, r6, pc}
0000a8a8 <pipe_free>: /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) {
a8a8: e92d4010 push {r4, lr} <== NOT EXECUTED a8ac: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
a8b0: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED a8b4: eb000202 bl b0c4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
a8b8: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a8bc: eb000200 bl b0c4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
a8c0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a8c4: ebffe840 bl 49cc <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
a8c8: e5940000 ldr r0, [r4] <== NOT EXECUTED a8cc: ebffdc1d bl 1948 <free> <== NOT EXECUTED
free(pipe);
a8d0: e1a00004 mov r0, r4 <== NOT EXECUTED
}
a8d4: 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);
a8d8: eaffdc1a b 1948 <free> <== NOT EXECUTED
0000a548 <pipe_ioctl>: uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) {
a548: e59f3054 ldr r3, [pc, #84] ; a5a4 <pipe_ioctl+0x5c> <== NOT EXECUTED a54c: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) {
a550: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED a554: e1a04000 mov r4, r0 <== NOT EXECUTED a558: e1a05002 mov r5, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
a55c: 13e00015 mvnne r0, #21 <== NOT EXECUTED a560: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
if (buffer == NULL)
a564: e3520000 cmp r2, #0 <== NOT EXECUTED a568: 03e0000d mvneq r0, #13 <== NOT EXECUTED a56c: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return -EFAULT; if (! PIPE_LOCK(pipe))
a570: e3a01000 mov r1, #0 <== NOT EXECUTED a574: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a578: e1a02001 mov r2, r1 <== NOT EXECUTED a57c: ebffe939 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED a580: e2506000 subs r6, r0, #0 <== NOT EXECUTED a584: 13e00003 mvnne r0, #3 <== NOT EXECUTED a588: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
a58c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a590: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
a594: e5853000 str r3, [r5] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a598: ebffe978 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED a59c: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0; } return -EINVAL; }
a5a0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000a4e0 <pipe_lseek>: rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; }
a4e0: e3e0001c mvn r0, #28 <== NOT EXECUTED a4e4: e12fff1e bx lr <== NOT EXECUTED
0000a738 <pipe_read>: pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
a738: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED a73c: e1a09001 mov r9, r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
a740: e3a01000 mov r1, #0 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
a744: e1a04000 mov r4, r0 <== NOT EXECUTED a748: e1a05002 mov r5, r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
a74c: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED a750: e1a02001 mov r2, r1 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
a754: e1a0a003 mov sl, r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
a758: ebffe8c2 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED a75c: e2506000 subs r6, r0, #0 <== NOT EXECUTED a760: 13e06003 mvnne r6, #3 <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe);
a764: 01a0b00d moveq fp, sp <== NOT EXECUTED
rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
a768: 0a000045 beq a884 <pipe_read+0x14c> <== NOT EXECUTED a76c: ea00004b b a8a0 <pipe_read+0x168> <== NOT EXECUTED
return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0)
a770: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a774: e3530000 cmp r3, #0 <== NOT EXECUTED a778: 0a000043 beq a88c <pipe_read+0x154> <== NOT EXECUTED
goto out_locked; if (LIBIO_NODELAY(iop)) {
a77c: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED a780: e2177001 ands r7, r7, #1 <== NOT EXECUTED a784: 13e0700a mvnne r7, #10 <== NOT EXECUTED a788: 1a000040 bne a890 <pipe_read+0x158> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++;
a78c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED a790: e2833001 add r3, r3, #1 <== NOT EXECUTED a794: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a798: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a79c: ebffe8f7 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
a7a0: e1a01007 mov r1, r7 <== NOT EXECUTED a7a4: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a7a8: eb000273 bl b17c <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
a7ac: e1a01007 mov r1, r7 <== NOT EXECUTED a7b0: 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))
a7b4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
a7b8: 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))
a7bc: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
a7c0: ebffe8a8 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED a7c4: e3500000 cmp r0, #0 <== NOT EXECUTED a7c8: 13e07003 mvnne r7, #3 <== NOT EXECUTED a7cc: 1a000031 bne a898 <pipe_read+0x160> <== NOT EXECUTED
/* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
a7d0: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
a7d4: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
a7d8: e2433001 sub r3, r3, #1 <== NOT EXECUTED a7dc: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
a7e0: 1a00002a bne a890 <pipe_read+0x158> <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) {
a7e4: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a7e8: e3520000 cmp r2, #0 <== NOT EXECUTED a7ec: 0affffdf beq a770 <pipe_read+0x38> <== NOT EXECUTED
goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start;
a7f0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a7f4: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED
if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length);
a7f8: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a7fc: e1520007 cmp r2, r7 <== NOT EXECUTED a800: 31a07002 movcc r7, r2 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
a804: e0638008 rsb r8, r3, r8 <== NOT EXECUTED a808: e5941000 ldr r1, [r4] <== NOT EXECUTED
if (chunk > chunk1) {
a80c: e1570008 cmp r7, r8 <== NOT EXECUTED a810: 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);
a814: d0811003 addle r1, r1, r3 <== NOT EXECUTED a818: d1a02007 movle r2, r7 <== NOT EXECUTED
} /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) {
a81c: da000006 ble a83c <pipe_read+0x104> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
a820: e0811003 add r1, r1, r3 <== NOT EXECUTED a824: e1a02008 mov r2, r8 <== NOT EXECUTED a828: eb0006f3 bl c3fc <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
a82c: e0860008 add r0, r6, r8 <== NOT EXECUTED a830: e5941000 ldr r1, [r4] <== NOT EXECUTED a834: e0890000 add r0, r9, r0 <== NOT EXECUTED a838: e0682007 rsb r2, r8, r7 <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
a83c: eb0006ee bl c3fc <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
a840: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED a844: e0870000 add r0, r7, r0 <== NOT EXECUTED a848: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
a84c: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED a850: eb002af2 bl 15420 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
a854: e594300c ldr r3, [r4, #12] <== NOT EXECUTED a858: e0673003 rsb r3, r7, r3 <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe))
a85c: e3530000 cmp r3, #0 <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size;
a860: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
a864: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0;
a868: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
if (pipe->waitingWriters > 0)
a86c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED a870: e3530000 cmp r3, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
a874: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED a878: 11a0100d movne r1, sp <== NOT EXECUTED a87c: 1b000228 blne b124 <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
a880: e0866007 add r6, r6, r7 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) {
a884: e1560005 cmp r6, r5 <== NOT EXECUTED a888: 3affffd5 bcc a7e4 <pipe_read+0xac> <== NOT EXECUTED a88c: e3a07000 mov r7, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
a890: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a894: ebffe8b9 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock: if (read > 0)
a898: e3560000 cmp r6, #0 <== NOT EXECUTED a89c: d1a06007 movle r6, r7 <== NOT EXECUTED
return read; return ret; }
a8a0: e1a00006 mov r0, r6 <== NOT EXECUTED a8a4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000a8dc <pipe_release>: */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
a8dc: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
a8e0: e5904000 ldr r4, [r0] <== NOT EXECUTED
*/ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
a8e4: e1a05001 mov r5, r1 <== NOT EXECUTED
pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore,
a8e8: e3a01000 mov r1, #0 <== NOT EXECUTED
*/ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
a8ec: e1a06000 mov r6, r0 <== NOT EXECUTED
pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore,
a8f0: e1a02001 mov r2, r1 <== NOT EXECUTED a8f4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a8f8: ebffe85a bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL)
a8fc: e3500000 cmp r0, #0 <== NOT EXECUTED a900: 1a000010 bne a948 <pipe_release+0x6c> <== NOT EXECUTED
rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop);
a904: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
a908: e3150002 tst r5, #2 <== NOT EXECUTED
pipe->Readers --;
a90c: 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);
a910: e2055006 and r5, r5, #6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ) pipe->Readers --;
a914: 12433001 subne r3, r3, #1 <== NOT EXECUTED a918: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
a91c: e3150004 tst r5, #4 <== NOT EXECUTED
pipe->Writers --;
a920: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED a924: 12433001 subne r3, r3, #1 <== NOT EXECUTED a928: 15843014 strne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
a92c: e59f30a0 ldr r3, [pc, #160] ; a9d4 <pipe_release+0xf8> <== NOT EXECUTED a930: e3a01000 mov r1, #0 <== NOT EXECUTED a934: e5930000 ldr r0, [r3] <== NOT EXECUTED a938: e1a02001 mov r2, r1 <== NOT EXECUTED a93c: ebffe849 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL)
a940: e3500000 cmp r0, #0 <== NOT EXECUTED a944: 0a000000 beq a94c <pipe_release+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
a948: ebffe9d9 bl 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a94c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a950: ebffe88a bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
a954: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a958: e3530000 cmp r3, #0 <== NOT EXECUTED a95c: 1a000006 bne a97c <pipe_release+0xa0> <== NOT EXECUTED a960: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED a964: e3570000 cmp r7, #0 <== NOT EXECUTED a968: 1a000003 bne a97c <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);
a96c: e1a00004 mov r0, r4 <== NOT EXECUTED a970: ebffffcc bl a8a8 <pipe_free> <== NOT EXECUTED
*pipep = NULL;
a974: 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) {
a978: ea000010 b a9c0 <pipe_release+0xe4> <== NOT EXECUTED
delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
a97c: e2552004 subs r2, r5, #4 <== NOT EXECUTED a980: 13a02001 movne r2, #1 <== NOT EXECUTED a984: e3530000 cmp r3, #0 <== NOT EXECUTED a988: 13a02000 movne r2, #0 <== NOT EXECUTED a98c: e3520000 cmp r2, #0 <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe);
a990: 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)
a994: 1a000007 bne a9b8 <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)
a998: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED a99c: e2553002 subs r3, r5, #2 <== NOT EXECUTED a9a0: 13a03001 movne r3, #1 <== NOT EXECUTED a9a4: e3520000 cmp r2, #0 <== NOT EXECUTED a9a8: 13a03000 movne r3, #0 <== NOT EXECUTED a9ac: e3530000 cmp r3, #0 <== NOT EXECUTED a9b0: 0a000002 beq a9c0 <pipe_release+0xe4> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
a9b4: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a9b8: e1a0100d mov r1, sp <== NOT EXECUTED a9bc: eb0001d8 bl b124 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
a9c0: e59f300c ldr r3, [pc, #12] ; a9d4 <pipe_release+0xf8> <== NOT EXECUTED a9c4: e5930000 ldr r0, [r3] <== NOT EXECUTED a9c8: ebffe86c bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; }
a9cc: e3a00000 mov r0, #0 <== NOT EXECUTED a9d0: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0000a5a8 <pipe_write>: pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
a5a8: 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)
a5ac: e2525000 subs r5, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
a5b0: e1a04000 mov r4, r0 <== NOT EXECUTED a5b4: e1a0b001 mov fp, r1 <== NOT EXECUTED a5b8: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0)
a5bc: 01a06005 moveq r6, r5 <== NOT EXECUTED a5c0: 0a00005a beq a730 <pipe_write+0x188> <== NOT EXECUTED
return 0; if (! PIPE_LOCK(pipe))
a5c4: e3a01000 mov r1, #0 <== NOT EXECUTED a5c8: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED a5cc: e1a02001 mov r2, r1 <== NOT EXECUTED a5d0: ebffe924 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED a5d4: e3500000 cmp r0, #0 <== NOT EXECUTED a5d8: 13e06003 mvnne r6, #3 <== NOT EXECUTED a5dc: 1a000053 bne a730 <pipe_write+0x188> <== NOT EXECUTED
return -EINTR; if (pipe->Readers == 0) {
a5e0: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED a5e4: e3560000 cmp r6, #0 <== NOT EXECUTED a5e8: 0a000022 beq a678 <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;
a5ec: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED a5f0: e1550009 cmp r5, r9 <== NOT EXECUTED a5f4: 91a09005 movls r9, r5 <== NOT EXECUTED a5f8: 83a09001 movhi r9, #1 <== NOT EXECUTED a5fc: e1a06000 mov r6, r0 <== NOT EXECUTED a600: ea000043 b a714 <pipe_write+0x16c> <== NOT EXECUTED
while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) {
a604: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED a608: e2177001 ands r7, r7, #1 <== NOT EXECUTED a60c: 13e0700a mvnne r7, #10 <== NOT EXECUTED a610: 1a000042 bne a720 <pipe_write+0x178> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++;
a614: e594301c ldr r3, [r4, #28] <== NOT EXECUTED a618: e2833001 add r3, r3, #1 <== NOT EXECUTED a61c: e584301c str r3, [r4, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a620: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a624: ebffe955 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
a628: e1a01007 mov r1, r7 <== NOT EXECUTED a62c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a630: eb0002d1 bl b17c <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
a634: e1a01007 mov r1, r7 <== NOT EXECUTED a638: 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))
a63c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
a640: 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))
a644: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
a648: ebffe906 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED a64c: e3500000 cmp r0, #0 <== NOT EXECUTED a650: 13e07003 mvnne r7, #3 <== NOT EXECUTED a654: 1a000033 bne a728 <pipe_write+0x180> <== NOT EXECUTED
/* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
a658: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
a65c: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
a660: e2433001 sub r3, r3, #1 <== NOT EXECUTED a664: e584301c str r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
a668: 1a00002c bne a720 <pipe_write+0x178> <== NOT EXECUTED
goto out_locked; if (pipe->Readers == 0) {
a66c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a670: e3530000 cmp r3, #0 <== NOT EXECUTED a674: 1a000001 bne a680 <pipe_write+0xd8> <== NOT EXECUTED a678: e3e0701f mvn r7, #31 <== NOT EXECUTED a67c: ea000027 b a720 <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) {
a680: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED a684: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a688: e062300a rsb r3, r2, sl <== NOT EXECUTED a68c: e1530009 cmp r3, r9 <== NOT EXECUTED a690: 3affffdb bcc a604 <pipe_write+0x5c> <== NOT EXECUTED
goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe);
a694: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED a698: e1a0100a mov r1, sl <== NOT EXECUTED a69c: e0820000 add r0, r2, r0 <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe));
a6a0: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a6a4: e1530007 cmp r3, r7 <== NOT EXECUTED a6a8: 31a07003 movcc r7, r3 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
a6ac: eb002b5b bl 15420 <__umodsi3> <== NOT EXECUTED a6b0: e5943000 ldr r3, [r4] <== NOT EXECUTED a6b4: e060a00a rsb sl, r0, sl <== NOT EXECUTED
if (chunk > chunk1) {
a6b8: e157000a cmp r7, sl <== NOT EXECUTED a6bc: 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);
a6c0: d0830000 addle r0, r3, r0 <== NOT EXECUTED a6c4: d1a02007 movle r2, r7 <== NOT EXECUTED
} } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) {
a6c8: da000006 ble a6e8 <pipe_write+0x140> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
a6cc: e1a0200a mov r2, sl <== NOT EXECUTED a6d0: e0830000 add r0, r3, r0 <== NOT EXECUTED a6d4: eb000748 bl c3fc <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
a6d8: e08a1006 add r1, sl, r6 <== NOT EXECUTED a6dc: e5940000 ldr r0, [r4] <== NOT EXECUTED a6e0: e08b1001 add r1, fp, r1 <== NOT EXECUTED a6e4: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED
} else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
a6e8: eb000743 bl c3fc <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
a6ec: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
a6f0: 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;
a6f4: e0833007 add r3, r3, r7 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
a6f8: 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;
a6fc: e584300c str r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe);
a700: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED a704: 11a0100d movne r1, sp <== NOT EXECUTED a708: 1b000285 blne b124 <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
a70c: e0866007 add r6, r6, r7 <== NOT EXECUTED a710: 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) {
a714: e1560005 cmp r6, r5 <== NOT EXECUTED a718: 3affffd8 bcc a680 <pipe_write+0xd8> <== NOT EXECUTED a71c: e3a07000 mov r7, #0 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
a720: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a724: ebffe915 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
/* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0)
a728: e3560000 cmp r6, #0 <== NOT EXECUTED a72c: d1a06007 movle r6, r7 <== NOT EXECUTED
return written; return ret; }
a730: e1a00006 mov r0, r6 <== NOT EXECUTED a734: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00016d6c <read>: ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
16d6c: e59f30b0 ldr r3, [pc, #176] ; 16e24 <read+0xb8> 16d70: e5933000 ldr r3, [r3] 16d74: e1500003 cmp r0, r3
ssize_t read( int fd, void *buffer, size_t count ) {
16d78: e92d4070 push {r4, r5, r6, lr} 16d7c: e1a05001 mov r5, r1
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 16d80: 2a000005 bcs 16d9c <read+0x30> iop = rtems_libio_iop( fd );
16d84: e59f309c ldr r3, [pc, #156] ; 16e28 <read+0xbc> 16d88: e5934000 ldr r4, [r3] 16d8c: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
16d90: e5943014 ldr r3, [r4, #20] 16d94: e3130c01 tst r3, #256 ; 0x100
16d98: 1a000002 bne 16da8 <read+0x3c>
16d9c: ebffd388 bl bbc4 <__errno> 16da0: e3a03009 mov r3, #9 16da4: ea00000f b 16de8 <read+0x7c>
rtems_libio_check_buffer( buffer );
16da8: e3510000 cmp r1, #0
16dac: 0a000004 beq 16dc4 <read+0x58> rtems_libio_check_count( count );
16db0: e3520000 cmp r2, #0 16db4: 01a00002 moveq r0, r2 16db8: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
16dbc: e3130002 tst r3, #2
16dc0: 1a000002 bne 16dd0 <read+0x64>
16dc4: ebffd37e bl bbc4 <__errno> <== NOT EXECUTED 16dc8: e3a03016 mov r3, #22 <== NOT EXECUTED 16dcc: ea000005 b 16de8 <read+0x7c> <== NOT EXECUTED
/* * Now process the read(). */ if ( !iop->handlers->read_h )
16dd0: e594303c ldr r3, [r4, #60] ; 0x3c 16dd4: e5933008 ldr r3, [r3, #8] 16dd8: e3530000 cmp r3, #0
16ddc: 1a000004 bne 16df4 <read+0x88> rtems_set_errno_and_return_minus_one( ENOTSUP );
16de0: ebffd377 bl bbc4 <__errno> <== NOT EXECUTED 16de4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
16de8: e5803000 str r3, [r0] 16dec: e3e00000 mvn r0, #0 16df0: e8bd8070 pop {r4, r5, r6, pc}
rc = (*iop->handlers->read_h)( iop, buffer, count );
16df4: e1a00004 mov r0, r4 16df8: e1a0e00f mov lr, pc 16dfc: e12fff13 bx r3
if ( rc > 0 )
16e00: e3500000 cmp r0, #0 16e04: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
16e08: e284600c add r6, r4, #12 16e0c: e8960060 ldm r6, {r5, r6} 16e10: e0952000 adds r2, r5, r0 16e14: e0a63fc0 adc r3, r6, r0, asr #31 16e18: e584200c str r2, [r4, #12] 16e1c: e5843010 str r3, [r4, #16]
return rc; }
16e20: e8bd8070 pop {r4, r5, r6, pc}
000233c0 <readlink>: ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
233c0: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc; int result; if (!buf)
233c4: e2516000 subs r6, r1, #0
ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
233c8: e24dd018 sub sp, sp, #24 233cc: e1a05002 mov r5, r2 233d0: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc; int result; if (!buf) 233d4: 1a000002 bne 233e4 <readlink+0x24> rtems_set_errno_and_return_minus_one( EFAULT );
233d8: eb0053b8 bl 382c0 <__errno> <== NOT EXECUTED 233dc: e3a0300e mov r3, #14 <== NOT EXECUTED 233e0: ea000028 b 23488 <readlink+0xc8> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
233e4: eb006e2f bl 3eca8 <strlen> 233e8: e28d4004 add r4, sp, #4 233ec: e3a0c000 mov ip, #0 233f0: e1a01000 mov r1, r0 233f4: e1a0200c mov r2, ip 233f8: e1a00007 mov r0, r7 233fc: e1a03004 mov r3, r4 23400: e58dc000 str ip, [sp] 23404: ebff84da bl 4774 <rtems_filesystem_evaluate_path>
0, &loc, false ); if ( result != 0 )
23408: e3500000 cmp r0, #0
2340c: 1a00001e bne 2348c <readlink+0xcc> return -1; if ( !loc.ops->node_type_h ){
23410: e59d2010 ldr r2, [sp, #16] 23414: e5923010 ldr r3, [r2, #16] 23418: e3530000 cmp r3, #0
2341c: 0a000012 beq 2346c <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 ){
23420: e1a00004 mov r0, r4 23424: e1a0e00f mov lr, pc 23428: e12fff13 bx r3 2342c: e3500004 cmp r0, #4 23430: e59d2010 ldr r2, [sp, #16]
23434: 0a000009 beq 23460 <readlink+0xa0> rtems_filesystem_freenode( &loc );
23438: e3520000 cmp r2, #0
2343c: 0a000004 beq 23454 <readlink+0x94>
23440: e592301c ldr r3, [r2, #28] 23444: e3530000 cmp r3, #0 23448: 11a00004 movne r0, r4 2344c: 11a0e00f movne lr, pc 23450: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
23454: eb005399 bl 382c0 <__errno> 23458: e3a03016 mov r3, #22 2345c: ea000009 b 23488 <readlink+0xc8>
} if ( !loc.ops->readlink_h ){
23460: e592303c ldr r3, [r2, #60] ; 0x3c 23464: e3530000 cmp r3, #0
23468: 1a000009 bne 23494 <readlink+0xd4> rtems_filesystem_freenode( &loc );
2346c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23470: e3530000 cmp r3, #0 <== NOT EXECUTED 23474: 11a00004 movne r0, r4 <== NOT EXECUTED 23478: 11a0e00f movne lr, pc <== NOT EXECUTED 2347c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
23480: eb00538e bl 382c0 <__errno> <== NOT EXECUTED 23484: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
23488: e5803000 str r3, [r0] 2348c: e3e05000 mvn r5, #0 23490: ea00000d b 234cc <readlink+0x10c>
} result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
23494: e1a02005 mov r2, r5 23498: e1a01006 mov r1, r6 2349c: e1a00004 mov r0, r4 234a0: e1a0e00f mov lr, pc 234a4: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
234a8: e59d3010 ldr r3, [sp, #16] 234ac: 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 );
234b0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 234b4: 0a000004 beq 234cc <readlink+0x10c>
234b8: e593301c ldr r3, [r3, #28] 234bc: e3530000 cmp r3, #0 234c0: 11a00004 movne r0, r4 234c4: 11a0e00f movne lr, pc 234c8: 112fff13 bxne r3
return result; }
234cc: e1a00005 mov r0, r5 234d0: e28dd018 add sp, sp, #24 234d4: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003924 <readv>: int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd );
3924: e59f3144 ldr r3, [pc, #324] ; 3a70 <readv+0x14c> 3928: e5933000 ldr r3, [r3] 392c: e1500003 cmp r0, r3
ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) {
3930: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3934: e1a08002 mov r8, r2
int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3938: 2a000005 bcs 3954 <readv+0x30> iop = rtems_libio_iop( fd );
393c: e59f3130 ldr r3, [pc, #304] ; 3a74 <readv+0x150> 3940: e5936000 ldr r6, [r3] 3944: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
3948: e5963014 ldr r3, [r6, #20] 394c: e3130c01 tst r3, #256 ; 0x100
3950: 1a000002 bne 3960 <readv+0x3c>
3954: eb0029b8 bl e03c <__errno> <== NOT EXECUTED 3958: e3a03009 mov r3, #9 <== NOT EXECUTED 395c: ea00001d b 39d8 <readv+0xb4> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
3960: e3130002 tst r3, #2
3964: 0a000019 beq 39d0 <readv+0xac> /* * Argument validation on IO vector */ if ( !iov )
3968: e3510000 cmp r1, #0
396c: 0a000017 beq 39d0 <readv+0xac> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
3970: e3520000 cmp r2, #0
3974: da000015 ble 39d0 <readv+0xac> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
3978: e3520b01 cmp r2, #1024 ; 0x400
397c: ca000013 bgt 39d0 <readv+0xac> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h )
3980: e596303c ldr r3, [r6, #60] ; 0x3c 3984: e5933008 ldr r3, [r3, #8] 3988: e3530000 cmp r3, #0
398c: 1a000002 bne 399c <readv+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
3990: eb0029a9 bl e03c <__errno> <== NOT EXECUTED 3994: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3998: ea00000e b 39d8 <readv+0xb4> <== NOT EXECUTED
399c: e3a03000 mov r3, #0 39a0: e1a05001 mov r5, r1 39a4: e1a02001 mov r2, r1 39a8: e3a07001 mov r7, #1 39ac: e1a01003 mov r1, r3
all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base )
39b0: e5920000 ldr r0, [r2] 39b4: 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++ ) {
39b8: e2833001 add r3, r3, #1
ssize_t old; if ( !iov[v].iov_base ) 39bc: 0a000003 beq 39d0 <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;
39c0: e592c004 ldr ip, [r2, #4] 39c4: e081000c add r0, r1, ip
if ( total < old )
39c8: e1500001 cmp r0, r1
39cc: aa000003 bge 39e0 <readv+0xbc> rtems_set_errno_and_return_minus_one( EINVAL );
39d0: eb002999 bl e03c <__errno> 39d4: e3a03016 mov r3, #22 39d8: e5803000 str r3, [r0] 39dc: ea000011 b 3a28 <readv+0x104>
if ( iov[v].iov_len )
39e0: e35c0000 cmp ip, #0 39e4: 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++ ) {
39e8: e1530008 cmp r3, r8 39ec: e2822008 add r2, r2, #8 39f0: b1a01000 movlt r1, r0
39f4: baffffed blt 39b0 <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 ) {
39f8: e3570000 cmp r7, #0 39fc: 13a04000 movne r4, #0
3a00: 1a000018 bne 3a68 <readv+0x144>
3a04: e1a04007 mov r4, r7
/* * 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 );
3a08: e8950006 ldm r5, {r1, r2} 3a0c: e596303c ldr r3, [r6, #60] ; 0x3c 3a10: e1a00006 mov r0, r6 3a14: e1a0e00f mov lr, pc 3a18: e593f008 ldr pc, [r3, #8]
if ( bytes < 0 )
3a1c: e3500000 cmp r0, #0
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3a20: e2877001 add r7, r7, #1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3a24: aa000001 bge 3a30 <readv+0x10c>
3a28: e3e04000 mvn r4, #0 3a2c: ea00000d b 3a68 <readv+0x144>
return -1; if ( bytes > 0 ) { 3a30: 0a000006 beq 3a50 <readv+0x12c> iop->offset += bytes;
3a34: e286c00c add ip, r6, #12 3a38: e89c1800 ldm ip, {fp, ip} 3a3c: e09b2000 adds r2, fp, r0 3a40: e0ac3fc0 adc r3, ip, r0, asr #31 3a44: e586200c str r2, [r6, #12] 3a48: e5863010 str r3, [r6, #16]
total += bytes;
3a4c: e0844000 add r4, r4, r0
} if (bytes != iov[ v ].iov_len)
3a50: e5953004 ldr r3, [r5, #4] 3a54: e1500003 cmp r0, r3
3a58: 1a000002 bne 3a68 <readv+0x144> } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3a5c: e1570008 cmp r7, r8 3a60: e2855008 add r5, r5, #8
3a64: baffffe7 blt 3a08 <readv+0xe4> if (bytes != iov[ v ].iov_len) break; } return total; }
3a68: e1a00004 mov r0, r4 3a6c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
00016e84 <realloc>: { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
16e84: e59f310c ldr r3, [pc, #268] ; 16f98 <realloc+0x114>
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
16e88: e59f210c ldr r2, [pc, #268] ; 16f9c <realloc+0x118> 16e8c: e592c000 ldr ip, [r2]
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
16e90: 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())) {
16e94: e35c0003 cmp ip, #3
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
16e98: e2822001 add r2, r2, #1 16e9c: e92d40f1 push {r0, r4, r5, r6, r7, lr} 16ea0: e5832010 str r2, [r3, #16] 16ea4: e1a04000 mov r4, r0 16ea8: 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())) { 16eac: 1a000007 bne 16ed0 <realloc+0x4c> if (_Thread_Dispatch_disable_level > 0)
16eb0: e59f30e8 ldr r3, [pc, #232] ; 16fa0 <realloc+0x11c> 16eb4: e5933000 ldr r3, [r3] 16eb8: e3530000 cmp r3, #0
16ebc: 1a000032 bne 16f8c <realloc+0x108> return (void *) 0; if (_ISR_Nest_level > 0)
16ec0: e59f30dc ldr r3, [pc, #220] ; 16fa4 <realloc+0x120> 16ec4: e5933000 ldr r3, [r3] 16ec8: e3530000 cmp r3, #0
16ecc: 1a00002e bne 16f8c <realloc+0x108> } /* * Continue with realloc(). */ if ( !ptr )
16ed0: e3540000 cmp r4, #0
16ed4: 1a000003 bne 16ee8 <realloc+0x64> return malloc( size );
16ed8: e1a00005 mov r0, r5 16edc: ebffab4b bl 1c10 <malloc> 16ee0: e1a04000 mov r4, r0 16ee4: ea000029 b 16f90 <realloc+0x10c>
if ( !size ) {
16ee8: e3550000 cmp r5, #0
16eec: 1a000003 bne 16f00 <realloc+0x7c> free( ptr );
16ef0: e1a00004 mov r0, r4 <== NOT EXECUTED 16ef4: ebffaa93 bl 1948 <free> <== NOT EXECUTED 16ef8: e1a04005 mov r4, r5 <== NOT EXECUTED
return (void *) 0;
16efc: ea000023 b 16f90 <realloc+0x10c> <== NOT EXECUTED
} if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
16f00: e59f60a0 ldr r6, [pc, #160] ; 16fa8 <realloc+0x124> 16f04: e1a01004 mov r1, r4 16f08: e5960000 ldr r0, [r6] 16f0c: e1a0200d mov r2, sp 16f10: eb000055 bl 1706c <_Protected_heap_Get_block_size> 16f14: e2507000 subs r7, r0, #0
16f18: 1a000004 bne 16f30 <realloc+0xac> errno = EINVAL;
16f1c: ebffd328 bl bbc4 <__errno> 16f20: e3a03016 mov r3, #22 16f24: e5803000 str r3, [r0] 16f28: e1a04007 mov r4, r7
return (void *) 0;
16f2c: ea000017 b 16f90 <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 ) ) {
16f30: e5960000 ldr r0, [r6] 16f34: e1a01004 mov r1, r4 16f38: e1a02005 mov r2, r5 16f3c: eb00005b bl 170b0 <_Protected_heap_Resize_block> 16f40: e3500000 cmp r0, #0
16f44: 1a000011 bne 16f90 <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 );
16f48: e1a00005 mov r0, r5 16f4c: ebffab2f bl 1c10 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
16f50: e59f3040 ldr r3, [pc, #64] ; 16f98 <realloc+0x114> 16f54: e5932004 ldr r2, [r3, #4]
if ( !new_area ) {
16f58: e2506000 subs r6, r0, #0
* and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
16f5c: e2422001 sub r2, r2, #1 16f60: e5832004 str r2, [r3, #4]
if ( !new_area ) { 16f64: 0a000008 beq 16f8c <realloc+0x108> return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size );
16f68: e59d2000 ldr r2, [sp] 16f6c: e1a01004 mov r1, r4 16f70: e1550002 cmp r5, r2 16f74: 31a02005 movcc r2, r5 16f78: ebffd51f bl c3fc <memcpy>
free( ptr );
16f7c: e1a00004 mov r0, r4 16f80: ebffaa70 bl 1948 <free> 16f84: e1a04006 mov r4, r6
return new_area;
16f88: ea000000 b 16f90 <realloc+0x10c> 16f8c: e3a04000 mov r4, #0
}
16f90: e1a00004 mov r0, r4 16f94: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
000234d8 <rmdir>: #include <rtems/seterr.h> int rmdir( const char *pathname ) {
234d8: e92d4070 push {r4, r5, r6, lr} 234dc: e24dd02c sub sp, sp, #44 ; 0x2c 234e0: e1a06000 mov r6, r0
/* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname );
234e4: ebff845a bl 4654 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
234e8: e2505000 subs r5, r0, #0
234ec: 1a000019 bne 23558 <rmdir+0x80> rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
234f0: e5d63000 ldrb r3, [r6] 234f4: e353002f cmp r3, #47 ; 0x2f 234f8: 1353005c cmpne r3, #92 ; 0x5c
234fc: 0a000001 beq 23508 <rmdir+0x30>
23500: e3530000 cmp r3, #0 <== NOT EXECUTED 23504: 1a000009 bne 23530 <rmdir+0x58> <== NOT EXECUTED
23508: e59f325c ldr r3, [pc, #604] ; 2376c <rmdir+0x294> 2350c: e593e000 ldr lr, [r3] 23510: e28ee018 add lr, lr, #24 23514: e8be000f ldm lr!, {r0, r1, r2, r3} 23518: e28dc018 add ip, sp, #24 2351c: e8ac000f stmia ip!, {r0, r1, r2, r3} 23520: e59e3000 ldr r3, [lr] 23524: e3a04000 mov r4, #0 23528: e58c3000 str r3, [ip] 2352c: ea000013 b 23580 <rmdir+0xa8>
23530: e59f3234 ldr r3, [pc, #564] ; 2376c <rmdir+0x294> <== NOT EXECUTED 23534: e593e000 ldr lr, [r3] <== NOT EXECUTED 23538: e28ee004 add lr, lr, #4 <== NOT EXECUTED 2353c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 23540: e28dc018 add ip, sp, #24 <== NOT EXECUTED 23544: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 23548: e59e3000 ldr r3, [lr] <== NOT EXECUTED 2354c: e1a04005 mov r4, r5 <== NOT EXECUTED 23550: e58c3000 str r3, [ip] <== NOT EXECUTED 23554: ea000009 b 23580 <rmdir+0xa8> <== NOT EXECUTED
else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
23558: e3a0c000 mov ip, #0 2355c: e1a00006 mov r0, r6 23560: e1a01005 mov r1, r5 23564: e3a02002 mov r2, #2 23568: e28d3018 add r3, sp, #24 2356c: e58dc000 str ip, [sp] 23570: ebff847f bl 4774 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
23574: e3500000 cmp r0, #0
23578: 1a000077 bne 2375c <rmdir+0x284>
2357c: e3a04001 mov r4, #1
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
23580: e28de018 add lr, sp, #24 23584: e8be000f ldm lr!, {r0, r1, r2, r3} 23588: e28dc004 add ip, sp, #4 2358c: e8ac000f stmia ip!, {r0, r1, r2, r3} 23590: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
23594: e0865005 add r5, r6, r5
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
23598: e58c3000 str r3, [ip]
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
2359c: e1a00005 mov r0, r5 235a0: eb006dc0 bl 3eca8 <strlen> 235a4: e1a01000 mov r1, r0 235a8: e1a00005 mov r0, r5 235ac: ebff841c bl 4624 <rtems_filesystem_prefix_separators> 235b0: e0856000 add r6, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
235b4: e1a00006 mov r0, r6 235b8: eb006dba bl 3eca8 <strlen> 235bc: e28d5004 add r5, sp, #4 235c0: e3a0c000 mov ip, #0 235c4: e1a01000 mov r1, r0 235c8: e1a0200c mov r2, ip 235cc: e1a00006 mov r0, r6 235d0: e1a03005 mov r3, r5 235d4: e58dc000 str ip, [sp] 235d8: ebff842d bl 4694 <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
235dc: e3500000 cmp r0, #0
235e0: 0a00000b beq 23614 <rmdir+0x13c> if ( free_parentloc )
235e4: e3540000 cmp r4, #0
235e8: 0a00005b beq 2375c <rmdir+0x284> rtems_filesystem_freenode( &parentloc );
235ec: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 235f0: e3530000 cmp r3, #0 <== NOT EXECUTED 235f4: 0a000058 beq 2375c <rmdir+0x284> <== NOT EXECUTED 235f8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 235fc: e3530000 cmp r3, #0 <== NOT EXECUTED 23600: 0a000055 beq 2375c <rmdir+0x284> <== NOT EXECUTED 23604: e28d0018 add r0, sp, #24 <== NOT EXECUTED 23608: e1a0e00f mov lr, pc <== NOT EXECUTED 2360c: e12fff13 bx r3 <== NOT EXECUTED 23610: ea000051 b 2375c <rmdir+0x284> <== NOT EXECUTED
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){
23614: e59d2010 ldr r2, [sp, #16] 23618: e5923010 ldr r3, [r2, #16] 2361c: e3530000 cmp r3, #0
rtems_filesystem_freenode( &loc );
23620: 0592301c ldreq r3, [r2, #28]
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 23624: 0a000021 beq 236b0 <rmdir+0x1d8> 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 ){
23628: e1a00005 mov r0, r5 2362c: e1a0e00f mov lr, pc 23630: e12fff13 bx r3 23634: e3500001 cmp r0, #1
23638: 0a000014 beq 23690 <rmdir+0x1b8> rtems_filesystem_freenode( &loc );
2363c: e59d3010 ldr r3, [sp, #16] 23640: e3530000 cmp r3, #0
23644: 0a000004 beq 2365c <rmdir+0x184>
23648: e593301c ldr r3, [r3, #28] 2364c: e3530000 cmp r3, #0 23650: 11a00005 movne r0, r5 23654: 11a0e00f movne lr, pc 23658: 112fff13 bxne r3
if ( free_parentloc )
2365c: e3540000 cmp r4, #0
23660: 0a000007 beq 23684 <rmdir+0x1ac> rtems_filesystem_freenode( &parentloc );
23664: e59d3024 ldr r3, [sp, #36] ; 0x24 23668: e3530000 cmp r3, #0
2366c: 0a000004 beq 23684 <rmdir+0x1ac>
23670: e593301c ldr r3, [r3, #28] 23674: e3530000 cmp r3, #0 23678: 128d0018 addne r0, sp, #24 2367c: 11a0e00f movne lr, pc 23680: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
23684: eb00530d bl 382c0 <__errno> 23688: e3a03014 mov r3, #20 2368c: ea000017 b 236f0 <rmdir+0x218>
/* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){
23690: e59d300c ldr r3, [sp, #12] 23694: e5933034 ldr r3, [r3, #52] ; 0x34 23698: e3530000 cmp r3, #0
2369c: 1a000015 bne 236f8 <rmdir+0x220> rtems_filesystem_freenode( &loc );
236a0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 236a4: e3530000 cmp r3, #0 <== NOT EXECUTED 236a8: 0a000004 beq 236c0 <rmdir+0x1e8> <== NOT EXECUTED 236ac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 236b0: e3530000 cmp r3, #0 <== NOT EXECUTED 236b4: 11a00005 movne r0, r5 <== NOT EXECUTED 236b8: 11a0e00f movne lr, pc <== NOT EXECUTED 236bc: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
236c0: e3540000 cmp r4, #0 <== NOT EXECUTED 236c4: 0a000007 beq 236e8 <rmdir+0x210> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
236c8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 236cc: e3530000 cmp r3, #0 <== NOT EXECUTED 236d0: 0a000004 beq 236e8 <rmdir+0x210> <== NOT EXECUTED 236d4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 236d8: e3530000 cmp r3, #0 <== NOT EXECUTED 236dc: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 236e0: 11a0e00f movne lr, pc <== NOT EXECUTED 236e4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
236e8: eb0052f4 bl 382c0 <__errno> <== NOT EXECUTED 236ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
236f0: e5803000 str r3, [r0] 236f4: ea000018 b 2375c <rmdir+0x284>
} result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
236f8: e28d0018 add r0, sp, #24 236fc: e1a01005 mov r1, r5 23700: e1a0e00f mov lr, pc 23704: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
23708: e59d3010 ldr r3, [sp, #16] 2370c: 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 );
23710: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc ); 23714: 0a000004 beq 2372c <rmdir+0x254>
23718: e593301c ldr r3, [r3, #28] 2371c: e3530000 cmp r3, #0 23720: 11a00005 movne r0, r5 23724: 11a0e00f movne lr, pc 23728: 112fff13 bxne r3
if ( free_parentloc )
2372c: e3540000 cmp r4, #0
23730: 0a00000a beq 23760 <rmdir+0x288> rtems_filesystem_freenode( &parentloc );
23734: e59d3024 ldr r3, [sp, #36] ; 0x24 23738: e3530000 cmp r3, #0
2373c: 0a000007 beq 23760 <rmdir+0x288>
23740: e593301c ldr r3, [r3, #28] 23744: e3530000 cmp r3, #0
23748: 0a000004 beq 23760 <rmdir+0x288>
2374c: e28d0018 add r0, sp, #24 23750: e1a0e00f mov lr, pc 23754: e12fff13 bx r3 23758: ea000000 b 23760 <rmdir+0x288> 2375c: e3e06000 mvn r6, #0
return result; }
23760: e1a00006 mov r0, r6 23764: e28dd02c add sp, sp, #44 ; 0x2c 23768: e8bd8070 pop {r4, r5, r6, pc}
00011dd0 <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; }
11dd0: e59f0000 ldr r0, [pc, #0] ; 11dd8 <rtems_assoc_name_bad+0x8><== NOT EXECUTED 11dd4: e12fff1e bx lr <== NOT EXECUTED
0000f058 <rtems_assoc_name_by_local>: const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
f058: e92d4010 push {r4, lr} f05c: e1a04001 mov r4, r1
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
f060: eb000006 bl f080 <rtems_assoc_ptr_by_local>
if (nap)
f064: e3500000 cmp r0, #0
f068: 0a000001 beq f074 <rtems_assoc_name_by_local+0x1c> return nap->name; return rtems_assoc_name_bad(local_value); }
f06c: e5900000 ldr r0, [r0] f070: 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);
f074: e1a00004 mov r0, r4 <== NOT EXECUTED
}
f078: e8bd4010 pop {r4, lr} <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value);
f07c: ea000b53 b 11dd0 <rtems_assoc_name_bad> <== NOT EXECUTED
0000b890 <rtems_assoc_remote_by_local>: uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
b890: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
b894: eb0000ad bl bb50 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
b898: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
b89c: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0; }
b8a0: 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}
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: eb001326 bl 70d4 <_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: eb001c0b bl 9478 <_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: eb000e90 bl 5ee4 <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: eb001be2 bl 9478 <_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: eb001ba4 bl 938c <_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: eb001bb4 bl 93e0 <_Timespec_Divide>
/* * Print the information */ (*print)( context,
250c: e3a01ffa mov r1, #1000 ; 0x3e8 2510: e59d0024 ldr r0, [sp, #36] ; 0x24 2514: eb005fa9 bl 1a3c0 <__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: eb005f91 bl 1a3c0 <__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}
0000b864 <rtems_deviceio_errno>: { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) {
b864: e92d4010 push {r4, lr} <== NOT EXECUTED b868: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
b86c: e59f0018 ldr r0, [pc, #24] ; b88c <rtems_deviceio_errno+0x28><== NOT EXECUTED b870: eb000006 bl b890 <rtems_assoc_remote_by_local> <== NOT EXECUTED b874: e2504000 subs r4, r0, #0 <== NOT EXECUTED b878: 0a000001 beq b884 <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{ errno = rc;
b87c: eb0000d0 bl bbc4 <__errno> <== NOT EXECUTED b880: e5804000 str r4, [r0] <== NOT EXECUTED
return -1; } return -1; }
b884: e3e00000 mvn r0, #0 <== NOT EXECUTED b888: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00006548 <rtems_error>: int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) {
6548: e92d000e push {r1, r2, r3} <== NOT EXECUTED 654c: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist; int chars_written; va_start(arglist, printf_format);
6550: e28d300c add r3, sp, #12 <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6554: e1a02003 mov r2, r3 <== NOT EXECUTED 6558: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
) { va_list arglist; int chars_written; va_start(arglist, printf_format);
655c: e58d3000 str r3, [sp] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6560: ebffff84 bl 6378 <rtems_verror> <== NOT EXECUTED
va_end(arglist); return chars_written; }
6564: e8bd4008 pop {r3, lr} <== NOT EXECUTED 6568: e28dd00c add sp, sp, #12 <== NOT EXECUTED 656c: e12fff1e bx lr <== NOT EXECUTED
0000187c <rtems_filesystem_evaluate_path>: int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
187c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/* * Verify Input parameters. */ if ( !pathname )
1880: e2505000 subs r5, r0, #0
int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
1884: e1a07001 mov r7, r1 1888: e1a06002 mov r6, r2 188c: e1a0c003 mov ip, r3 1890: e59da020 ldr sl, [sp, #32]
/* * Verify Input parameters. */ if ( !pathname ) 1894: 1a000002 bne 18a4 <rtems_filesystem_evaluate_path+0x28> rtems_set_errno_and_return_minus_one( EFAULT );
1898: eb0028c9 bl bbc4 <__errno> <== NOT EXECUTED 189c: e3a0300e mov r3, #14 <== NOT EXECUTED 18a0: ea000003 b 18b4 <rtems_filesystem_evaluate_path+0x38> <== NOT EXECUTED
if ( !pathloc )
18a4: e3530000 cmp r3, #0
18a8: 1a000004 bne 18c0 <rtems_filesystem_evaluate_path+0x44> rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
18ac: eb0028c4 bl bbc4 <__errno> <== NOT EXECUTED 18b0: e3a03005 mov r3, #5 <== NOT EXECUTED 18b4: e5803000 str r3, [r0] <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); }
18b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 18bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
/* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc );
18c0: e5d53000 ldrb r3, [r5] 18c4: e353002f cmp r3, #47 ; 0x2f 18c8: 1353005c cmpne r3, #92 ; 0x5c 18cc: 13a08000 movne r8, #0 18d0: 03a08001 moveq r8, #1
18d4: 0a000001 beq 18e0 <rtems_filesystem_evaluate_path+0x64>
18d8: e3530000 cmp r3, #0
18dc: 1a000009 bne 1908 <rtems_filesystem_evaluate_path+0x8c>
18e0: e59f305c ldr r3, [pc, #92] ; 1944 <rtems_filesystem_evaluate_path+0xc8> 18e4: e5934000 ldr r4, [r3] 18e8: e2844018 add r4, r4, #24 18ec: e8b4000f ldm r4!, {r0, r1, r2, r3} 18f0: e1a0800c mov r8, ip 18f4: e8a8000f stmia r8!, {r0, r1, r2, r3} 18f8: e5942000 ldr r2, [r4] 18fc: e5882000 str r2, [r8] 1900: e3a08001 mov r8, #1 1904: ea000007 b 1928 <rtems_filesystem_evaluate_path+0xac> 1908: e59f3034 ldr r3, [pc, #52] ; 1944 <rtems_filesystem_evaluate_path+0xc8> 190c: e5934000 ldr r4, [r3] 1910: e2844004 add r4, r4, #4 1914: e8b4000f ldm r4!, {r0, r1, r2, r3} 1918: e1a0900c mov r9, ip 191c: e8a9000f stmia r9!, {r0, r1, r2, r3} 1920: e5942000 ldr r2, [r4] 1924: e5892000 str r2, [r9]
/* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i],
1928: e0681007 rsb r1, r8, r7 192c: e0850008 add r0, r5, r8 1930: e1a02006 mov r2, r6 1934: e1a0300c mov r3, ip 1938: e58da020 str sl, [sp, #32]
pathnamelen - i, flags, pathloc, follow_link ); }
193c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i],
1940: eaffff95 b 179c <rtems_filesystem_evaluate_relative_path>
0000179c <rtems_filesystem_evaluate_relative_path>: /* * Verify Input parameters. */ if ( !pathname )
179c: e3500000 cmp r0, #0
int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
17a0: e92d4030 push {r4, r5, lr} 17a4: e1a05002 mov r5, r2 17a8: e1a04003 mov r4, r3
/* * Verify Input parameters. */ if ( !pathname ) 17ac: 1a000002 bne 17bc <rtems_filesystem_evaluate_relative_path+0x20> rtems_set_errno_and_return_minus_one( EFAULT );
17b0: eb002903 bl bbc4 <__errno> <== NOT EXECUTED 17b4: e3a0300e mov r3, #14 <== NOT EXECUTED 17b8: ea000027 b 185c <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc )
17bc: e3530000 cmp r3, #0
17c0: 1a000002 bne 17d0 <rtems_filesystem_evaluate_relative_path+0x34> rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
17c4: eb0028fe bl bbc4 <__errno> <== NOT EXECUTED 17c8: e3a03005 mov r3, #5 <== NOT EXECUTED 17cc: ea000022 b 185c <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
17d0: e593c00c ldr ip, [r3, #12] 17d4: e59cc000 ldr ip, [ip] 17d8: e35c0000 cmp ip, #0
17dc: 0a00001c beq 1854 <rtems_filesystem_evaluate_relative_path+0xb8> rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
17e0: e1a0e00f mov lr, pc 17e4: e12fff1c bx ip
/* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) {
17e8: e59d200c ldr r2, [sp, #12] 17ec: e2703001 rsbs r3, r0, #1 17f0: 33a03000 movcc r3, #0 17f4: e3520000 cmp r2, #0 17f8: 03a03000 moveq r3, #0 17fc: e3530000 cmp r3, #0 1800: 08bd8030 popeq {r4, r5, pc}
if ( !pathloc->ops->node_type_h ){
1804: e594200c ldr r2, [r4, #12] 1808: e5923010 ldr r3, [r2, #16] 180c: e3530000 cmp r3, #0
1810: 0a00000a beq 1840 <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 );
1814: e1a00004 mov r0, r4 1818: e1a0e00f mov lr, pc 181c: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1820: e2400003 sub r0, r0, #3 1824: e3500001 cmp r0, #1 1828: 83a00000 movhi r0, #0 182c: 88bd8030 pophi {r4, r5, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){
1830: e594200c ldr r2, [r4, #12] 1834: e5923034 ldr r3, [r2, #52] ; 0x34 1838: e3530000 cmp r3, #0
183c: 1a000009 bne 1868 <rtems_filesystem_evaluate_relative_path+0xcc> rtems_filesystem_freenode( pathloc );
1840: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1844: e3530000 cmp r3, #0 <== NOT EXECUTED 1848: 11a00004 movne r0, r4 <== NOT EXECUTED 184c: 11a0e00f movne lr, pc <== NOT EXECUTED 1850: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1854: eb0028da bl bbc4 <__errno> <== NOT EXECUTED 1858: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 185c: e5803000 str r3, [r0] <== NOT EXECUTED 1860: e3e00000 mvn r0, #0 <== NOT EXECUTED 1864: 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 );
1868: e1a00004 mov r0, r4 186c: e1a01005 mov r1, r5 1870: e1a0e00f mov lr, pc 1874: e12fff13 bx r3
} } return result; }
1878: e8bd8030 pop {r4, r5, pc}
000015fc <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 ) {
15fc: e92d40f0 push {r4, r5, r6, r7, lr}
/* * Set the default umask to "022". */ rtems_filesystem_umask = 022;
1600: e59f6100 ldr r6, [pc, #256] ; 1708 <rtems_filesystem_initialize+0x10c> 1604: e5963000 ldr r3, [r6] 1608: e3a02012 mov r2, #18 160c: e583202c str r2, [r3, #44] ; 0x2c
* configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) {
1610: e24dd01c sub sp, sp, #28
*/ rtems_filesystem_umask = 022; init_fs_mount_table();
1614: eb000215 bl 1e70 <init_fs_mount_table>
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 )
1618: e59f30ec ldr r3, [pc, #236] ; 170c <rtems_filesystem_initialize+0x110> 161c: e5933000 ldr r3, [r3] 1620: e3530000 cmp r3, #0
rtems_fatal_error_occurred( 0xABCD0001 );
1624: 059f00e4 ldreq r0, [pc, #228] ; 1710 <rtems_filesystem_initialize+0x114>
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1628: 0a000009 beq 1654 <rtems_filesystem_initialize+0x58> rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0];
162c: e59f30e0 ldr r3, [pc, #224] ; 1714 <rtems_filesystem_initialize+0x118> 1630: e5932000 ldr r2, [r3]
status = mount(
1634: e592300c ldr r3, [r2, #12] 1638: e58d3000 str r3, [sp] 163c: e28d0018 add r0, sp, #24 1640: e892000e ldm r2, {r1, r2, r3} 1644: eb000210 bl 1e8c <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 )
1648: e3700001 cmn r0, #1
164c: 1a000001 bne 1658 <rtems_filesystem_initialize+0x5c> rtems_fatal_error_occurred( 0xABCD0002 );
1650: e59f00c0 ldr r0, [pc, #192] ; 1718 <rtems_filesystem_initialize+0x11c><== NOT EXECUTED 1654: eb000e96 bl 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
1658: e59de018 ldr lr, [sp, #24]
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0;
165c: e5967000 ldr r7, [r6]
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
1660: e28ee01c add lr, lr, #28 1664: e8be000f ldm lr!, {r0, r1, r2, r3} 1668: e287c018 add ip, r7, #24 166c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1670: e59e3000 ldr r3, [lr]
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0;
1674: e3a05000 mov r5, #0
* * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1678: e28d4004 add r4, sp, #4
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
167c: e58c3000 str r3, [ip]
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0;
1680: e1c753b0 strh r5, [r7, #48] ; 0x30
* * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1684: e1a03004 mov r3, r4 1688: e3a01001 mov r1, #1 168c: e1a02005 mov r2, r5 1690: e59f0084 ldr r0, [pc, #132] ; 171c <rtems_filesystem_initialize+0x120>
rtems_filesystem_root = loc;
1694: e1a07004 mov r7, r4
* * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1698: e58d5000 str r5, [sp] 169c: eb000076 bl 187c <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
16a0: e596c000 ldr ip, [r6] 16a4: e8b7000f ldm r7!, {r0, r1, r2, r3} 16a8: e28cc018 add ip, ip, #24 16ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 16b0: e5973000 ldr r3, [r7]
/* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
16b4: e1a02005 mov r2, r5
* Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc;
16b8: e58c3000 str r3, [ip]
/* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
16bc: e3a01001 mov r1, #1 16c0: e1a03004 mov r3, r4 16c4: e59f0050 ldr r0, [pc, #80] ; 171c <rtems_filesystem_initialize+0x120> 16c8: e58d5000 str r5, [sp] 16cc: eb00006a bl 187c <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
16d0: e596c000 ldr ip, [r6] 16d4: e8b4000f ldm r4!, {r0, r1, r2, r3} 16d8: e28cc004 add ip, ip, #4 16dc: e8ac000f stmia ip!, {r0, r1, r2, r3} 16e0: 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);
16e4: e59f0034 ldr r0, [pc, #52] ; 1720 <rtems_filesystem_initialize+0x124>
/* 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;
16e8: 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);
16ec: e59f1030 ldr r1, [pc, #48] ; 1724 <rtems_filesystem_initialize+0x128> 16f0: eb000184 bl 1d08 <mkdir>
if ( status != 0 )
16f4: e1500005 cmp r0, r5
rtems_fatal_error_occurred( 0xABCD0003 );
16f8: 159f0028 ldrne r0, [pc, #40] ; 1728 <rtems_filesystem_initialize+0x12c>
* 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 ) 16fc: 1affffd4 bne 1654 <rtems_filesystem_initialize+0x58> * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ }
1700: e28dd01c add sp, sp, #28 1704: e8bd80f0 pop {r4, r5, r6, r7, pc}
00023a78 <rtems_filesystem_nodes_equal>: ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){
23a78: e5903000 ldr r3, [r0] <== NOT EXECUTED 23a7c: e5910000 ldr r0, [r1] <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
23a80: e1530000 cmp r3, r0 <== NOT EXECUTED 23a84: 13a00000 movne r0, #0 <== NOT EXECUTED 23a88: 03a00001 moveq r0, #1 <== NOT EXECUTED 23a8c: e12fff1e bx lr <== NOT EXECUTED
000014bc <rtems_io_lookup_name>: rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) {
14bc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 14c0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 14c4: e1a05001 mov r5, r1 <== NOT EXECUTED 14c8: 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 );
14cc: eb002dad bl cb88 <strlen> <== NOT EXECUTED 14d0: e28d4004 add r4, sp, #4 <== NOT EXECUTED 14d4: e1a01000 mov r1, r0 <== NOT EXECUTED 14d8: e3a02000 mov r2, #0 <== NOT EXECUTED 14dc: e1a03004 mov r3, r4 <== NOT EXECUTED 14e0: e3a0c001 mov ip, #1 <== NOT EXECUTED 14e4: e1a00006 mov r0, r6 <== NOT EXECUTED 14e8: e58dc000 str ip, [sp] <== NOT EXECUTED 14ec: eb0000e2 bl 187c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) {
14f0: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 14f4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 14f8: 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 );
14fc: e1a07000 mov r7, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
1500: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
1504: 1a000009 bne 1530 <rtems_io_lookup_name+0x74> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1508: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 150c: e3530000 cmp r3, #0 <== NOT EXECUTED 1510: 11a00004 movne r0, r4 <== NOT EXECUTED 1514: 11a0e00f movne lr, pc <== NOT EXECUTED 1518: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
151c: eb0029a8 bl bbc4 <__errno> <== NOT EXECUTED 1520: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1524: e5803000 str r3, [r0] <== NOT EXECUTED 1528: e3e00000 mvn r0, #0 <== NOT EXECUTED 152c: ea000026 b 15cc <rtems_io_lookup_name+0x110> <== NOT EXECUTED
} node_type = (*loc.ops->node_type_h)( &loc );
1530: e1a00004 mov r0, r4 <== NOT EXECUTED 1534: e1a0e00f mov lr, pc <== NOT EXECUTED 1538: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
153c: e3570000 cmp r7, #0 <== NOT EXECUTED 1540: 03500002 cmpeq r0, #2 <== NOT EXECUTED 1544: 03a0a000 moveq sl, #0 <== NOT EXECUTED 1548: 13a0a001 movne sl, #1 <== NOT EXECUTED 154c: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED 1550: 0a000008 beq 1578 <rtems_io_lookup_name+0xbc> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1554: e3570000 cmp r7, #0 <== NOT EXECUTED 1558: 0a000018 beq 15c0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED 155c: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 1560: e3530000 cmp r3, #0 <== NOT EXECUTED 1564: 0a000015 beq 15c0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED 1568: e1a00004 mov r0, r4 <== NOT EXECUTED 156c: e1a0e00f mov lr, pc <== NOT EXECUTED 1570: e12fff13 bx r3 <== NOT EXECUTED 1574: ea000011 b 15c0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name;
1578: e5856000 str r6, [r5] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
157c: e1a00006 mov r0, r6 <== NOT EXECUTED 1580: eb002d80 bl cb88 <strlen> <== NOT EXECUTED 1584: e5850004 str r0, [r5, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
1588: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED 158c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
1590: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1594: 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;
1598: e585300c str r3, [r5, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
159c: 0a000009 beq 15c8 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED 15a0: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 15a4: e3530000 cmp r3, #0 <== NOT EXECUTED 15a8: 0a000006 beq 15c8 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED 15ac: e1a00004 mov r0, r4 <== NOT EXECUTED 15b0: e1a0e00f mov lr, pc <== NOT EXECUTED 15b4: e12fff13 bx r3 <== NOT EXECUTED 15b8: e1a0000a mov r0, sl <== NOT EXECUTED 15bc: ea000002 b 15cc <rtems_io_lookup_name+0x110> <== NOT EXECUTED 15c0: e3a0000d mov r0, #13 <== NOT EXECUTED 15c4: ea000000 b 15cc <rtems_io_lookup_name+0x110> <== NOT EXECUTED 15c8: e3a00000 mov r0, #0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
15cc: e28dd018 add sp, sp, #24 <== NOT EXECUTED 15d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
000019ec <rtems_libio_init>: * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) {
19ec: e92d4011 push {r0, r4, lr}
rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0)
19f0: e59f4098 ldr r4, [pc, #152] ; 1a90 <rtems_libio_init+0xa4> 19f4: e5940000 ldr r0, [r4] 19f8: e3500000 cmp r0, #0
19fc: 0a000013 beq 1a50 <rtems_libio_init+0x64> { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1a00: e3a01040 mov r1, #64 ; 0x40 1a04: eb001d2b bl 8eb8 <calloc> 1a08: e59f3084 ldr r3, [pc, #132] ; 1a94 <rtems_libio_init+0xa8>
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL)
1a0c: 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,
1a10: e5830000 str r0, [r3]
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
1a14: 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) 1a18: 0a000015 beq 1a74 <rtems_libio_init+0x88> rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops;
1a1c: e59f3074 ldr r3, [pc, #116] ; 1a98 <rtems_libio_init+0xac>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1a20: 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;
1a24: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1a28: e3a03000 mov r3, #0 1a2c: ea000000 b 1a34 <rtems_libio_init+0x48>
iop->data1 = iop + 1;
1a30: 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++)
1a34: e2833001 add r3, r3, #1 1a38: e1530001 cmp r3, r1
iop->data1 = iop + 1;
1a3c: 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++)
1a40: e2800040 add r0, r0, #64 ; 0x40
1a44: 3afffff9 bcc 1a30 <rtems_libio_init+0x44> iop->data1 = iop + 1; iop->data1 = NULL;
1a48: e3a03000 mov r3, #0 1a4c: e5823034 str r3, [r2, #52] ; 0x34
/* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create(
1a50: e59fc044 ldr ip, [pc, #68] ; 1a9c <rtems_libio_init+0xb0> 1a54: e59f0044 ldr r0, [pc, #68] ; 1aa0 <rtems_libio_init+0xb4> 1a58: e3a01001 mov r1, #1 1a5c: e3a02054 mov r2, #84 ; 0x54 1a60: e3a03000 mov r3, #0 1a64: e58dc000 str ip, [sp] 1a68: eb000b6c bl 4820 <rtems_semaphore_create>
1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL )
1a6c: e3500000 cmp r0, #0
1a70: 0a000000 beq 1a78 <rtems_libio_init+0x8c> rtems_fatal_error_occurred( rc );
1a74: eb000d8e bl 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper)
1a78: e59f3024 ldr r3, [pc, #36] ; 1aa4 <rtems_libio_init+0xb8> 1a7c: e5933000 ldr r3, [r3] 1a80: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
1a84: 11a0e00f movne lr, pc 1a88: 112fff13 bxne r3
}
1a8c: e8bd8018 pop {r3, r4, pc}
00023280 <rtems_libio_set_private_env>: rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
23280: 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);
23284: e3a00000 mov r0, #0
rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
23288: 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);
2328c: e1a01000 mov r1, r0 23290: e28d2018 add r2, sp, #24 23294: eb00054e bl 247d4 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
23298: e2508000 subs r8, r0, #0
2329c: 1a00003f bne 233a0 <rtems_libio_set_private_env+0x120> /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) {
232a0: e59f4104 ldr r4, [pc, #260] ; 233ac <rtems_libio_set_private_env+0x12c> 232a4: e59f3104 ldr r3, [pc, #260] ; 233b0 <rtems_libio_set_private_env+0x130> 232a8: e5942000 ldr r2, [r4] 232ac: e1520003 cmp r2, r3
232b0: 1a00000f bne 232f4 <rtems_libio_set_private_env+0x74> rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
232b4: e2800048 add r0, r0, #72 ; 0x48 232b8: ebff86e2 bl 4e48 <malloc>
if (!tmp)
232bc: e2505000 subs r5, r0, #0 232c0: 03a0801a moveq r8, #26
232c4: 0a000035 beq 233a0 <rtems_libio_set_private_env+0x120> #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);
232c8: e1a00008 mov r0, r8 232cc: e1a01004 mov r1, r4 232d0: e59f20dc ldr r2, [pc, #220] ; 233b4 <rtems_libio_set_private_env+0x134> 232d4: eb000635 bl 24bb0 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
232d8: e2506000 subs r6, r0, #0
* not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp;
232dc: 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) { 232e0: 0a000003 beq 232f4 <rtems_libio_set_private_env+0x74> /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp);
232e4: e1a00005 mov r0, r5 <== NOT EXECUTED 232e8: ebff8554 bl 4840 <free> <== NOT EXECUTED 232ec: e1a08006 mov r8, r6 <== NOT EXECUTED
return sc;
232f0: ea00002a b 233a0 <rtems_libio_set_private_env+0x120> <== NOT EXECUTED
} rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
232f4: e59f60b0 ldr r6, [pc, #176] ; 233ac <rtems_libio_set_private_env+0x12c> 232f8: e5964000 ldr r4, [r6] 232fc: e59f10ac ldr r1, [pc, #172] ; 233b0 <rtems_libio_set_private_env+0x130> 23300: e3a02048 mov r2, #72 ; 0x48 23304: e1a00004 mov r0, r4 23308: eb00601d bl 3b384 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
2330c: e59f30a4 ldr r3, [pc, #164] ; 233b8 <rtems_libio_set_private_env+0x138> 23310: e593e000 ldr lr, [r3]
} 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*/
23314: e59d3018 ldr r3, [sp, #24] 23318: e1a0c004 mov ip, r4
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
2331c: e28ee01c add lr, lr, #28
} 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*/
23320: e48c3018 str r3, [ip], #24
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
23324: e8be000f ldm lr!, {r0, r1, r2, r3} 23328: e8ac000f stmia ip!, {r0, r1, r2, r3} 2332c: e59e3000 ldr r3, [lr]
* code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
23330: e28d4004 add r4, sp, #4 23334: e3a05000 mov r5, #0
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
23338: e58c3000 str r3, [ip]
* code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2333c: e3a01001 mov r1, #1 23340: e1a03004 mov r3, r4 23344: e1a02005 mov r2, r5 23348: e59f006c ldr r0, [pc, #108] ; 233bc <rtems_libio_set_private_env+0x13c>
rtems_filesystem_root = loc;
2334c: e1a07004 mov r7, r4
* code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
23350: e58d5000 str r5, [sp] 23354: ebff8506 bl 4774 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
23358: e596c000 ldr ip, [r6] 2335c: e8b7000f ldm r7!, {r0, r1, r2, r3} 23360: e28cc018 add ip, ip, #24 23364: e8ac000f stmia ip!, {r0, r1, r2, r3} 23368: e5973000 ldr r3, [r7]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2336c: e1a02005 mov r2, r5
* what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc;
23370: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
23374: e3a01001 mov r1, #1 23378: e1a03004 mov r3, r4 2337c: e59f0038 ldr r0, [pc, #56] ; 233bc <rtems_libio_set_private_env+0x13c> 23380: e58d5000 str r5, [sp] 23384: ebff84fa bl 4774 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
23388: e596c000 ldr ip, [r6] 2338c: e8b4000f ldm r4!, {r0, r1, r2, r3} 23390: e28cc004 add ip, ip, #4 23394: e8ac000f stmia ip!, {r0, r1, r2, r3} 23398: e5973000 ldr r3, [r7] 2339c: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL; }
233a0: e1a00008 mov r0, r8 233a4: e28dd01c add sp, sp, #28 233a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000231dc <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) {
231dc: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 231e0: 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);
231e4: e3a00000 mov r0, #0 <== NOT EXECUTED 231e8: e1a01000 mov r1, r0 <== NOT EXECUTED 231ec: e1a0200d mov r2, sp <== NOT EXECUTED 231f0: eb000577 bl 247d4 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
231f4: e2503000 subs r3, r0, #0 <== NOT EXECUTED 231f8: 1a00001b bne 2326c <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
231fc: e59f1070 ldr r1, [pc, #112] ; 23274 <rtems_libio_share_private_env+0x98><== NOT EXECUTED 23200: e5914000 ldr r4, [r1] <== NOT EXECUTED 23204: e59d3000 ldr r3, [sp] <== NOT EXECUTED 23208: e5942000 ldr r2, [r4] <== NOT EXECUTED 2320c: e1520003 cmp r2, r3 <== NOT EXECUTED 23210: 1a000004 bne 23228 <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);
23214: eb00068e bl 24c54 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
23218: e2503000 subs r3, r0, #0 <== NOT EXECUTED 2321c: 1a000012 bne 2326c <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
free_user_env(tmp);
23220: e1a00004 mov r0, r4 <== NOT EXECUTED 23224: ebffffd3 bl 23178 <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,
23228: e59f4044 ldr r4, [pc, #68] ; 23274 <rtems_libio_share_private_env+0x98><== NOT EXECUTED 2322c: e1a00005 mov r0, r5 <== NOT EXECUTED 23230: e1a01004 mov r1, r4 <== NOT EXECUTED 23234: e28d2004 add r2, sp, #4 <== NOT EXECUTED 23238: eb0006a2 bl 24cc8 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
2323c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23240: 1a000006 bne 23260 <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);
23244: e59f202c ldr r2, [pc, #44] ; 23278 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED 23248: e1a01004 mov r1, r4 <== NOT EXECUTED 2324c: eb000657 bl 24bb0 <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
23250: 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;
23254: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 23258: 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)
2325c: 0a000002 beq 2326c <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;
23260: e59f1014 ldr r1, [pc, #20] ; 2327c <rtems_libio_share_private_env+0xa0><== NOT EXECUTED 23264: e59f2008 ldr r2, [pc, #8] ; 23274 <rtems_libio_share_private_env+0x98><== NOT EXECUTED 23268: e5821000 str r1, [r2] <== NOT EXECUTED
return sc; }
2326c: e1a00003 mov r0, r3 <== NOT EXECUTED 23270: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00004f40 <rtems_malloc_statistics_at_free>: * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) {
4f40: e92d4801 push {r0, fp, lr} <== NOT EXECUTED
uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
4f44: e59f3038 ldr r3, [pc, #56] ; 4f84 <rtems_malloc_statistics_at_free+0x44><== NOT EXECUTED
* size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) {
4f48: e1a01000 mov r1, r0 <== NOT EXECUTED
uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
4f4c: e1a0200d mov r2, sp <== NOT EXECUTED 4f50: e5930000 ldr r0, [r3] <== NOT EXECUTED 4f54: eb00140f bl 9f98 <_Protected_heap_Get_block_size> <== NOT EXECUTED 4f58: e3500000 cmp r0, #0 <== NOT EXECUTED 4f5c: 0a000007 beq 4f80 <rtems_malloc_statistics_at_free+0x40> <== NOT EXECUTED
MSBUMP(lifetime_freed, size);
4f60: e59f3020 ldr r3, [pc, #32] ; 4f88 <rtems_malloc_statistics_at_free+0x48><== NOT EXECUTED 4f64: e59d0000 ldr r0, [sp] <== NOT EXECUTED 4f68: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 4f6c: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 4f70: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 4f74: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 4f78: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 4f7c: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED
} }
4f80: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED
00004f8c <rtems_malloc_statistics_at_malloc>: { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer )
4f8c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
} static void rtems_malloc_statistics_at_malloc( void *pointer ) {
4f90: e92d4811 push {r0, r4, fp, lr} <== NOT EXECUTED
uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer )
4f94: 0a000013 beq 4fe8 <rtems_malloc_statistics_at_malloc+0x5c> <== NOT EXECUTED
static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0;
4f98: e28d2004 add r2, sp, #4 <== NOT EXECUTED 4f9c: e3a03000 mov r3, #0 <== NOT EXECUTED 4fa0: e5223004 str r3, [r2, #-4]! <== NOT EXECUTED
rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
4fa4: e59f3040 ldr r3, [pc, #64] ; 4fec <rtems_malloc_statistics_at_malloc+0x60><== NOT EXECUTED 4fa8: e1a0200d mov r2, sp <== NOT EXECUTED 4fac: e5930000 ldr r0, [r3] <== NOT EXECUTED 4fb0: eb0013f8 bl 9f98 <_Protected_heap_Get_block_size> <== NOT EXECUTED
MSBUMP(lifetime_allocated, actual_size);
4fb4: e59f3034 ldr r3, [pc, #52] ; 4ff0 <rtems_malloc_statistics_at_malloc+0x64><== NOT EXECUTED 4fb8: e59d4000 ldr r4, [sp] <== NOT EXECUTED 4fbc: e283c01c add ip, r3, #28 <== NOT EXECUTED 4fc0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
4fc4: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED
if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size);
4fc8: e09b0004 adds r0, fp, r4 <== NOT EXECUTED 4fcc: e2ac1000 adc r1, ip, #0 <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth)
4fd0: e593c018 ldr ip, [r3, #24] <== NOT EXECUTED
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
4fd4: e0622000 rsb r2, r2, r0 <== NOT EXECUTED
if (current_depth > s->max_depth)
4fd8: e152000c cmp r2, ip <== NOT EXECUTED
if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size);
4fdc: e583001c str r0, [r3, #28] <== NOT EXECUTED 4fe0: e5831020 str r1, [r3, #32] <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) s->max_depth = current_depth;
4fe4: 85832018 strhi r2, [r3, #24] <== NOT EXECUTED
}
4fe8: e8bd8818 pop {r3, r4, fp, pc} <== NOT EXECUTED
00004ff4 <rtems_malloc_statistics_initialize>: static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics));
4ff4: e59f0008 ldr r0, [pc, #8] ; 5004 <rtems_malloc_statistics_initialize+0x10><== NOT EXECUTED 4ff8: e3a01000 mov r1, #0 <== NOT EXECUTED 4ffc: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 5000: ea00d966 b 3b5a0 <memset> <== NOT EXECUTED
0000651c <rtems_panic>: void rtems_panic( const char *printf_format, ... ) {
651c: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 6520: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist; va_start(arglist, printf_format);
6524: e28d300c add r3, sp, #12 <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6528: e1a02003 mov r2, r3 <== NOT EXECUTED 652c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 6530: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
... ) { va_list arglist; va_start(arglist, printf_format);
6534: e58d3000 str r3, [sp] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6538: ebffff8e bl 6378 <rtems_verror> <== NOT EXECUTED
va_end(arglist); }
653c: e8bd4008 pop {r3, lr} <== NOT EXECUTED 6540: e28dd010 add sp, sp, #16 <== NOT EXECUTED 6544: e12fff1e bx lr <== NOT EXECUTED
0000a4e8 <rtems_pipe_initialize>: /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured)
a4e8: e59f3048 ldr r3, [pc, #72] ; a538 <rtems_pipe_initialize+0x50> a4ec: e5d33000 ldrb r3, [r3] a4f0: e3530000 cmp r3, #0
/* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) {
a4f4: e92d4001 push {r0, lr}
if (!rtems_pipe_configured) a4f8: 0a00000d beq a534 <rtems_pipe_initialize+0x4c> return; if (rtems_pipe_semaphore)
a4fc: e59fc038 ldr ip, [pc, #56] ; a53c <rtems_pipe_initialize+0x54><== NOT EXECUTED a500: e59c3000 ldr r3, [ip] <== NOT EXECUTED a504: e3530000 cmp r3, #0 <== NOT EXECUTED a508: 1a000009 bne a534 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
return; rtems_status_code sc; sc = rtems_semaphore_create(
a50c: e59f002c ldr r0, [pc, #44] ; a540 <rtems_pipe_initialize+0x58><== NOT EXECUTED a510: e3a01001 mov r1, #1 <== NOT EXECUTED a514: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED a518: e58dc000 str ip, [sp] <== NOT EXECUTED a51c: ebffe8bf bl 4820 <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)
a520: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
a524: 1bffeae2 blne 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interval now; now = rtems_clock_get_ticks_since_boot();
a528: ebffe7c1 bl 4434 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
rtems_pipe_no = now;
a52c: e59f3010 ldr r3, [pc, #16] ; a544 <rtems_pipe_initialize+0x5c><== NOT EXECUTED a530: e1c300b0 strh r0, [r3] <== NOT EXECUTED
}
a534: e8bd8008 pop {r3, pc}
00003014 <rtems_stack_checker_is_blown>: /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
3014: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
3018: e59f307c ldr r3, [pc, #124] ; 309c <rtems_stack_checker_is_blown+0x88> 301c: e5933000 ldr r3, [r3]
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
3020: e59300c4 ldr r0, [r3, #196] ; 0xc4
/* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
3024: e28db008 add fp, sp, #8
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
3028: e15b0000 cmp fp, r0 302c: 33a04000 movcc r4, #0
3030: 3a000004 bcc 3048 <rtems_stack_checker_is_blown+0x34> } /* * Check if blown */ bool rtems_stack_checker_is_blown( void )
3034: e59340c0 ldr r4, [r3, #192] ; 0xc0 3038: e0804004 add r4, r0, r4 303c: e15b0004 cmp fp, r4 3040: 83a04000 movhi r4, #0 3044: 93a04001 movls r4, #1
/* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) {
3048: e59f3050 ldr r3, [pc, #80] ; 30a0 <rtems_stack_checker_is_blown+0x8c> 304c: e5933000 ldr r3, [r3] 3050: e3530000 cmp r3, #0 3054: 03a01001 moveq r1, #1
3058: 0a000005 beq 3074 <rtems_stack_checker_is_blown+0x60> pattern_ok = (!memcmp(
305c: e59f1040 ldr r1, [pc, #64] ; 30a4 <rtems_stack_checker_is_blown+0x90> 3060: e2800008 add r0, r0, #8 3064: e3a02010 mov r2, #16 3068: eb00e09b bl 3b2dc <memcmp> 306c: e2701001 rsbs r1, r0, #1 3070: 33a01000 movcc r1, #0
} /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok )
3074: e3540000 cmp r4, #0
3078: 0a000002 beq 3088 <rtems_stack_checker_is_blown+0x74>
307c: e3510000 cmp r1, #0 3080: 13a00000 movne r0, #0 3084: 18bd8810 popne {r4, fp, pc}
return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
3088: e59f300c ldr r3, [pc, #12] ; 309c <rtems_stack_checker_is_blown+0x88><== NOT EXECUTED 308c: e5930000 ldr r0, [r3] <== NOT EXECUTED 3090: ebffffb4 bl 2f68 <Stack_check_report_blown_task> <== NOT EXECUTED 3094: e3a00001 mov r0, #1 <== NOT EXECUTED
return true; }
3098: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
00002f58 <rtems_stack_checker_report_usage>: void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
2f58: e59f1004 ldr r1, [pc, #4] ; 2f64 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED 2f5c: e3a00000 mov r0, #0 <== NOT EXECUTED 2f60: eaffffe3 b 2ef4 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
00002ef4 <rtems_stack_checker_report_usage_with_plugin>: void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) {
2ef4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
print_context = context;
2ef8: e59f4048 ldr r4, [pc, #72] ; 2f48 <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 ) {
2efc: e1a05001 mov r5, r1 <== NOT EXECUTED 2f00: e1a06000 mov r6, r0 <== NOT EXECUTED
print_context = context; print_handler = print;
2f04: 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;
2f08: e5840008 str r0, [r4, #8] <== NOT EXECUTED
print_handler = print; (*print)( context, "Stack usage by thread\n");
2f0c: e59f1038 ldr r1, [pc, #56] ; 2f4c <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED 2f10: e1a0e00f mov lr, pc <== NOT EXECUTED 2f14: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
2f18: e59f1030 ldr r1, [pc, #48] ; 2f50 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED 2f1c: e1a00006 mov r0, r6 <== NOT EXECUTED 2f20: e1a0e00f mov lr, pc <== NOT EXECUTED 2f24: 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 );
2f28: e59f0024 ldr r0, [pc, #36] ; 2f54 <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED 2f2c: eb001a12 bl 977c <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1);
2f30: e3e00000 mvn r0, #0 <== NOT EXECUTED 2f34: ebffff9f bl 2db8 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
2f38: e3a03000 mov r3, #0 <== NOT EXECUTED
print_handler = NULL;
2f3c: 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;
2f40: e5843008 str r3, [r4, #8] <== NOT EXECUTED
print_handler = NULL; }
2f44: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00018e24 <rtems_string_to_pointer>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
18e24: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
18e28: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
18e2c: e1a05000 mov r5, r0 18e30: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
18e34: 03a00009 moveq r0, #9
18e38: 0a000018 beq 18ea0 <rtems_string_to_pointer+0x7c> return RTEMS_INVALID_ADDRESS; errno = 0;
18e3c: eb007d1f bl 382c0 <__errno> 18e40: e3a03000 mov r3, #0 18e44: e5803000 str r3, [r0]
*n = 0;
18e48: e5843000 str r3, [r4]
#ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 );
18e4c: e1a00005 mov r0, r5 18e50: e1a0100d mov r1, sp 18e54: e3a02010 mov r2, #16 18e58: eb009cae bl 40118 <strtoul>
#elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
18e5c: e3560000 cmp r6, #0
*endptr = end;
18e60: 159d3000 ldrne r3, [sp] 18e64: 15863000 strne r3, [r6]
/* nothing was converted */ if ( end == s )
18e68: e59d3000 ldr r3, [sp] 18e6c: e1530005 cmp r3, r5
*n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 );
18e70: e1a07000 mov r7, r0
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
18e74: 03a0000b moveq r0, #11
18e78: 0a000008 beq 18ea0 <rtems_string_to_pointer+0x7c> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
18e7c: e3770001 cmn r7, #1
18e80: 1a000004 bne 18e98 <rtems_string_to_pointer+0x74>
18e84: eb007d0d bl 382c0 <__errno> <== NOT EXECUTED 18e88: e5903000 ldr r3, [r0] <== NOT EXECUTED 18e8c: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 18e90: 03a0000a moveq r0, #10 <== NOT EXECUTED 18e94: 0a000001 beq 18ea0 <rtems_string_to_pointer+0x7c> <== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result;
18e98: e5847000 str r7, [r4] 18e9c: e3a00000 mov r0, #0
#else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
18ea0: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
00003ba0 <rtems_termios_baud_to_index>: rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3ba0: e3500009 cmp r0, #9 3ba4: 012fff1e bxeq lr
3ba8: ca000016 bgt 3c08 <rtems_termios_baud_to_index+0x68>
3bac: e3500004 cmp r0, #4 3bb0: 012fff1e bxeq lr
3bb4: ca00000a bgt 3be4 <rtems_termios_baud_to_index+0x44>
3bb8: e3500001 cmp r0, #1 3bbc: 012fff1e bxeq lr
3bc0: ca000002 bgt 3bd0 <rtems_termios_baud_to_index+0x30>
3bc4: e3500000 cmp r0, #0 3bc8: 012fff1e bxeq lr 3bcc: ea000030 b 3c94 <rtems_termios_baud_to_index+0xf4>
3bd0: e3500002 cmp r0, #2 <== NOT EXECUTED 3bd4: 012fff1e bxeq lr <== NOT EXECUTED 3bd8: e3500003 cmp r0, #3 <== NOT EXECUTED 3bdc: 1a00002c bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3be0: e12fff1e bx lr <== NOT EXECUTED 3be4: e3500006 cmp r0, #6 <== NOT EXECUTED 3be8: 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;
3bec: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3bf0: b12fff1e bxlt lr <== NOT EXECUTED 3bf4: e3500007 cmp r0, #7 <== NOT EXECUTED 3bf8: 012fff1e bxeq lr <== NOT EXECUTED 3bfc: e3500008 cmp r0, #8 <== NOT EXECUTED 3c00: 1a000023 bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c04: e12fff1e bx lr <== NOT EXECUTED 3c08: e350000e cmp r0, #14 <== NOT EXECUTED 3c0c: 012fff1e bxeq lr <== NOT EXECUTED 3c10: ca000008 bgt 3c38 <rtems_termios_baud_to_index+0x98> <== NOT EXECUTED 3c14: e350000b cmp r0, #11 <== NOT EXECUTED 3c18: 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;
3c1c: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3c20: b12fff1e bxlt lr <== NOT EXECUTED 3c24: e350000c cmp r0, #12 <== NOT EXECUTED 3c28: 012fff1e bxeq lr <== NOT EXECUTED 3c2c: e350000d cmp r0, #13 <== NOT EXECUTED 3c30: 1a000017 bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c34: e12fff1e bx lr <== NOT EXECUTED 3c38: e59f305c ldr r3, [pc, #92] ; 3c9c <rtems_termios_baud_to_index+0xfc><== NOT EXECUTED 3c3c: 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;
3c40: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3c44: 012fff1e bxeq lr <== NOT EXECUTED 3c48: ca000005 bgt 3c64 <rtems_termios_baud_to_index+0xc4> <== NOT EXECUTED 3c4c: e350000f cmp r0, #15 <== NOT EXECUTED 3c50: 012fff1e bxeq lr <== NOT EXECUTED 3c54: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3c58: e1500003 cmp r0, r3 <== NOT EXECUTED 3c5c: 1a00000c bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c60: ea000007 b 3c84 <rtems_termios_baud_to_index+0xe4> <== NOT EXECUTED 3c64: e59f3034 ldr r3, [pc, #52] ; 3ca0 <rtems_termios_baud_to_index+0x100><== NOT EXECUTED 3c68: 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;
3c6c: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3c70: 012fff1e bxeq lr <== NOT EXECUTED 3c74: e2833001 add r3, r3, #1 <== NOT EXECUTED 3c78: e1500003 cmp r0, r3 <== NOT EXECUTED 3c7c: 1a000004 bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c80: ea000001 b 3c8c <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;
3c84: e3a00010 mov r0, #16 <== NOT EXECUTED
case B57600: baud_index = 16; break;
3c88: e12fff1e bx lr <== NOT EXECUTED
case B115200: baud_index = 17; break; case B230400: baud_index = 18; break;
3c8c: e3a00013 mov r0, #19 <== NOT EXECUTED
case B460800: baud_index = 19; break;
3c90: e12fff1e bx lr <== NOT EXECUTED
3c94: e3e00000 mvn r0, #0
default: baud_index = -1; break; } return baud_index; }
3c98: e12fff1e bx lr
000026c0 <rtems_termios_bufsize>: int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize;
26c0: e59f3008 ldr r3, [pc, #8] ; 26d0 <rtems_termios_bufsize+0x10><== NOT EXECUTED 26c4: 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; }
26c8: e3a00000 mov r0, #0 <== NOT EXECUTED 26cc: e12fff1e bx lr <== NOT EXECUTED
00003acc <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);
3acc: e59f2180 ldr r2, [pc, #384] ; 3c54 <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;
3ad0: e5903000 ldr r3, [r0]
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ad4: e3a01000 mov r1, #0
} } rtems_status_code rtems_termios_close (void *arg) {
3ad8: e92d4030 push {r4, r5, lr} 3adc: 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);
3ae0: e5920000 ldr r0, [r2] 3ae4: 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;
3ae8: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3aec: eb0003dd bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3af0: e3500000 cmp r0, #0
3af4: 1a000022 bne 3b84 <rtems_termios_close+0xb8> rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) {
3af8: e5943008 ldr r3, [r4, #8] 3afc: e2433001 sub r3, r3, #1 3b00: e3530000 cmp r3, #0 3b04: e5843008 str r3, [r4, #8]
3b08: 1a00004c bne 3c40 <rtems_termios_close+0x174> if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3b0c: e59420cc ldr r2, [r4, #204] ; 0xcc 3b10: e59f3140 ldr r3, [pc, #320] ; 3c58 <rtems_termios_close+0x18c> 3b14: e0833282 add r3, r3, r2, lsl #5 3b18: e5931004 ldr r1, [r3, #4] 3b1c: e3510000 cmp r1, #0
3b20: 0a000003 beq 3b34 <rtems_termios_close+0x68> /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3b24: e1a00004 mov r0, r4 <== NOT EXECUTED 3b28: e1a0e00f mov lr, pc <== NOT EXECUTED 3b2c: e12fff11 bx r1 <== NOT EXECUTED 3b30: ea000006 b 3b50 <rtems_termios_close+0x84> <== NOT EXECUTED
} else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3b34: e5940018 ldr r0, [r4, #24] 3b38: e1a02001 mov r2, r1 3b3c: eb0003c9 bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3b40: e3500000 cmp r0, #0
3b44: 1a00000e bne 3b84 <rtems_termios_close+0xb8> rtems_fatal_error_occurred (sc); } drainOutput (tty);
3b48: e1a00004 mov r0, r4 3b4c: ebfffe05 bl 3368 <drainOutput>
} if (tty->device.outputUsesInterrupts
3b50: e59430b4 ldr r3, [r4, #180] ; 0xb4 3b54: e3530002 cmp r3, #2
3b58: 1a00000a bne 3b88 <rtems_termios_close+0xbc> == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send(
3b5c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 3b60: e3a01001 mov r1, #1 <== NOT EXECUTED 3b64: eb0002ab bl 4618 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
3b68: e3500000 cmp r0, #0 <== NOT EXECUTED 3b6c: 1a000004 bne 3b84 <rtems_termios_close+0xb8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
3b70: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3b74: e3a01001 mov r1, #1 <== NOT EXECUTED 3b78: eb0002a6 bl 4618 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
3b7c: e3500000 cmp r0, #0 <== NOT EXECUTED 3b80: 0a000000 beq 3b88 <rtems_termios_close+0xbc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3b84: eb00054a bl 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
} if (tty->device.lastClose)
3b88: e594309c ldr r3, [r4, #156] ; 0x9c 3b8c: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
3b90: 11a02005 movne r2, r5 3b94: 1284000c addne r0, r4, #12 3b98: 18900003 ldmne r0, {r0, r1} 3b9c: 11a0e00f movne lr, pc 3ba0: 112fff13 bxne r3
if (tty->forw == NULL) {
3ba4: e894000c ldm r4, {r2, r3} 3ba8: e3520000 cmp r2, #0
if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back;
3bac: 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) { 3bb0: 1a000003 bne 3bc4 <rtems_termios_close+0xf8> rtems_termios_ttyTail = tty->back;
3bb4: e59f10a0 ldr r1, [pc, #160] ; 3c5c <rtems_termios_close+0x190>
if ( rtems_termios_ttyTail != NULL ) {
3bb8: 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;
3bbc: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL;
3bc0: 15832000 strne r2, [r3]
} } else { tty->forw->back = tty->back; } if (tty->back == NULL) {
3bc4: e5942004 ldr r2, [r4, #4] 3bc8: e5943000 ldr r3, [r4] 3bcc: e3520000 cmp r2, #0
if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw;
3bd0: 15823000 strne r3, [r2]
} } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3bd4: 1a000003 bne 3be8 <rtems_termios_close+0x11c> rtems_termios_ttyHead = tty->forw;
3bd8: e59f1080 ldr r1, [pc, #128] ; 3c60 <rtems_termios_close+0x194>
if ( rtems_termios_ttyHead != NULL ) {
3bdc: e3530000 cmp r3, #0
} else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw;
3be0: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL;
3be4: 15832004 strne r2, [r3, #4]
} } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem);
3be8: e5940014 ldr r0, [r4, #20] 3bec: eb000376 bl 49cc <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
3bf0: e5940018 ldr r0, [r4, #24] 3bf4: eb000374 bl 49cc <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
3bf8: e594008c ldr r0, [r4, #140] ; 0x8c 3bfc: eb000372 bl 49cc <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
3c00: e59430a0 ldr r3, [r4, #160] ; 0xa0 3c04: e3530000 cmp r3, #0
3c08: 0a000002 beq 3c18 <rtems_termios_close+0x14c> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
3c0c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3c10: e3530002 cmp r3, #2
3c14: 1a000001 bne 3c20 <rtems_termios_close+0x154> rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3c18: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 3c1c: eb00036a bl 49cc <rtems_semaphore_delete> <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
3c20: e5940058 ldr r0, [r4, #88] ; 0x58 3c24: ebfff747 bl 1948 <free>
free (tty->rawOutBuf.theBuf);
3c28: e594007c ldr r0, [r4, #124] ; 0x7c 3c2c: ebfff745 bl 1948 <free>
free (tty->cbuf);
3c30: e594001c ldr r0, [r4, #28] 3c34: ebfff743 bl 1948 <free>
free (tty);
3c38: e1a00004 mov r0, r4 3c3c: ebfff741 bl 1948 <free>
} rtems_semaphore_release (rtems_termios_ttyMutex);
3c40: e59f300c ldr r3, [pc, #12] ; 3c54 <rtems_termios_close+0x188> 3c44: e5930000 ldr r0, [r3] 3c48: eb0003cc bl 4b80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
3c4c: e3a00000 mov r0, #0 3c50: e8bd8030 pop {r4, r5, pc}
000028c4 <rtems_termios_dequeue_characters>: rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
28c4: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
28c8: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
28cc: e08c1001 add r1, ip, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
28d0: 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) {
28d4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
28d8: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
28dc: 1a000005 bne 28f8 <rtems_termios_dequeue_characters+0x34> <== NOT EXECUTED
/* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId,
28e0: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 28e4: e1a01002 mov r1, r2 <== NOT EXECUTED 28e8: eb00074a bl 4618 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
28ec: e3500000 cmp r0, #0 <== NOT EXECUTED 28f0: 0a00000c beq 2928 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
28f4: eb0009ee bl 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) {
28f8: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 28fc: e3530005 cmp r3, #5 <== NOT EXECUTED 2900: 1a000006 bne 2920 <rtems_termios_dequeue_characters+0x5c> <== NOT EXECUTED
/* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2904: e59f3024 ldr r3, [pc, #36] ; 2930 <rtems_termios_dequeue_characters+0x6c><== NOT EXECUTED 2908: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 290c: e3530000 cmp r3, #0 <== NOT EXECUTED 2910: 0a000004 beq 2928 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2914: e1a0e00f mov lr, pc <== NOT EXECUTED 2918: e12fff13 bx r3 <== NOT EXECUTED 291c: ea000001 b 2928 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } }
2920: 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);
2924: eaffff6d b 26e0 <rtems_termios_refill_transmitter> <== NOT EXECUTED
} }
2928: e3a00000 mov r0, #0 <== NOT EXECUTED 292c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00002934 <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) {
2934: 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) {
2938: e59f32b8 ldr r3, [pc, #696] ; 2bf8 <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) {
293c: 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) {
2940: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED 2944: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 2948: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 294c: 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) {
2950: 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);
2954: 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);
2958: 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);
295c: 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) {
2960: 1a00000e bne 29a0 <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);
2964: e1a08002 mov r8, r2 <== NOT EXECUTED 2968: 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,
296c: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 2970: 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);
2974: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2978: e1a09006 mov r9, r6 <== NOT EXECUTED 297c: e1a05006 mov r5, r6 <== NOT EXECUTED 2980: ea000091 b 2bcc <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);
2984: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2988: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 298c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 2990: e1a0e00f mov lr, pc <== NOT EXECUTED 2994: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 2998: e2866001 add r6, r6, #1 <== NOT EXECUTED 299c: 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--) {
29a0: e3550000 cmp r5, #0 <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
29a4: 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--) {
29a8: 1afffff5 bne 2984 <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 )) {
29ac: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 29b0: e3530000 cmp r3, #0 <== NOT EXECUTED 29b4: 1a00008c bne 2bec <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED 29b8: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 29bc: e3530000 cmp r3, #0 <== NOT EXECUTED 29c0: 0a000089 beq 2bec <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
29c4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 29c8: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 29cc: e1a0e00f mov lr, pc <== NOT EXECUTED 29d0: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
29d4: e3a03001 mov r3, #1 <== NOT EXECUTED 29d8: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 29dc: ea000083 b 2bf0 <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) {
29e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 29e4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
} return 0; } while (len--) { c = *buf++;
29e8: 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) {
29ec: 0a00000f beq 2a30 <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]) {
29f0: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 29f4: e152000a cmp r2, sl <== NOT EXECUTED 29f8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 29fc: 1a000007 bne 2a20 <rtems_termios_enqueue_raw_characters+0xec><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
2a00: e1530002 cmp r3, r2 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2a04: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
2a08: 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;
2a0c: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
2a10: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 2a14: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
2a18: e3a09001 mov r9, #1 <== NOT EXECUTED 2a1c: ea000005 b 2a38 <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]) {
2a20: e153000a cmp r3, sl <== NOT EXECUTED
/* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF;
2a24: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2a28: 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]) {
2a2c: 0afffff8 beq 2a14 <rtems_termios_enqueue_raw_characters+0xe0><== NOT EXECUTED
/* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) {
2a30: e3590000 cmp r9, #0 <== NOT EXECUTED 2a34: 0a000015 beq 2a90 <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) {
2a38: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2a3c: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 2a40: e3530020 cmp r3, #32 <== NOT EXECUTED 2a44: 1a00005e bne 2bc4 <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 (
2a48: e10f7000 mrs r7, CPSR <== NOT EXECUTED 2a4c: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 2a50: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
2a54: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2a58: 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;
2a5c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2a60: 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;
2a64: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2a68: 0a000006 beq 2a88 <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);
2a6c: 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,
2a70: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2a74: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2a78: e0811003 add r1, r1, r3 <== NOT EXECUTED 2a7c: e3a02001 mov r2, #1 <== NOT EXECUTED 2a80: e1a0e00f mov lr, pc <== NOT EXECUTED 2a84: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2a88: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 2a8c: ea00004c b 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
/* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
2a90: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2a94: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2a98: e2800001 add r0, r0, #1 <== NOT EXECUTED 2a9c: eb004a5f bl 15420 <__umodsi3> <== NOT EXECUTED 2aa0: e1a07000 mov r7, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2aa4: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2aa8: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 2aac: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2ab0: e58d2000 str r2, [sp] <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2ab4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2ab8: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 2abc: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 2ac0: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2ac4: e0800007 add r0, r0, r7 <== NOT EXECUTED 2ac8: eb004a54 bl 15420 <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
2acc: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 2ad0: e1500003 cmp r0, r3 <== NOT EXECUTED 2ad4: 9a000025 bls 2b70 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
2ad8: 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)
2adc: e3130001 tst r3, #1 <== NOT EXECUTED 2ae0: 1a000022 bne 2b70 <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;
2ae4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ae8: e3833001 orr r3, r3, #1 <== NOT EXECUTED 2aec: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2af0: e59f3104 ldr r3, [pc, #260] ; 2bfc <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED 2af4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2af8: e0023003 and r3, r2, r3 <== NOT EXECUTED 2afc: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 2b00: 1a00000e bne 2b40 <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
== (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) ||
2b04: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b08: e3130020 tst r3, #32 <== NOT EXECUTED 2b0c: 1a000002 bne 2b1c <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
2b10: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2b14: e3530000 cmp r3, #0 <== NOT EXECUTED 2b18: 1a000014 bne 2b70 <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;
2b1c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b20: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2b24: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2b28: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2b2c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2b30: e3a02001 mov r2, #1 <== NOT EXECUTED 2b34: e1a0e00f mov lr, pc <== NOT EXECUTED 2b38: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2b3c: ea00000b b 2b70 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
2b40: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b44: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2b48: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2b4c: 1a000007 bne 2b70 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
== (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
2b50: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
2b54: 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;
2b58: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
2b5c: e3530000 cmp r3, #0 <== NOT EXECUTED
1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
2b60: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor);
2b64: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2b68: 11a0e00f movne lr, pc <== NOT EXECUTED 2b6c: 112fff13 bxne r3 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2b70: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2b74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
} } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) {
2b78: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2b7c: e1570003 cmp r7, r3 <== NOT EXECUTED
dropped++;
2b80: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
} } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) {
2b84: 0a00000e beq 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
dropped++; } else { tty->rawInBuf.theBuf[newTail] = c;
2b88: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2b8c: 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 )) {
2b90: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2b94: e3530000 cmp r3, #0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail;
2b98: 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 )) {
2b9c: 1a000008 bne 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED 2ba0: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2ba4: e3530000 cmp r3, #0 <== NOT EXECUTED 2ba8: 0a000005 beq 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2bac: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 2bb0: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2bb4: e1a0e00f mov lr, pc <== NOT EXECUTED 2bb8: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2bbc: e3a02001 mov r2, #1 <== NOT EXECUTED 2bc0: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 2bc4: e2866001 add r6, r6, #1 <== NOT EXECUTED 2bc8: e2488001 sub r8, r8, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } return 0; } while (len--) {
2bcc: e3580000 cmp r8, #0 <== NOT EXECUTED 2bd0: 1affff82 bne 29e0 <rtems_termios_enqueue_raw_characters+0xac><== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
2bd4: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 2bd8: e0833005 add r3, r3, r5 <== NOT EXECUTED 2bdc: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2be0: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 2be4: eb0007e5 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
2be8: ea000000 b 2bf0 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED 2bec: e3a05000 mov r5, #0 <== NOT EXECUTED
}
2bf0: e1a00005 mov r0, r5 <== NOT EXECUTED 2bf4: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
00003724 <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;
3724: e5903000 ldr r3, [r0]
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0;
3728: e3a01000 mov r1, #0
} } rtems_status_code rtems_termios_ioctl (void *arg) {
372c: 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;
3730: 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;
3734: e5934034 ldr r4, [r3, #52] ; 0x34
} } rtems_status_code rtems_termios_ioctl (void *arg) {
3738: 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);
373c: e1a02001 mov r2, r1 3740: 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;
3744: e5957008 ldr r7, [r5, #8]
rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3748: eb0004c6 bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
374c: e2506000 subs r6, r0, #0
3750: 1a0000d7 bne 3ab4 <rtems_termios_ioctl+0x390> args->ioctl_return = sc; return sc; } switch (args->command) {
3754: e5953004 ldr r3, [r5, #4] 3758: e3530004 cmp r3, #4
375c: 0a0000ab beq 3a10 <rtems_termios_ioctl+0x2ec> 3760: 8a000005 bhi 377c <rtems_termios_ioctl+0x58>
3764: e3530002 cmp r3, #2
3768: 0a000029 beq 3814 <rtems_termios_ioctl+0xf0> 376c: 8a0000a0 bhi 39f4 <rtems_termios_ioctl+0x2d0>
3770: e3530001 cmp r3, #1
3774: 1a000010 bne 37bc <rtems_termios_ioctl+0x98>
3778: ea00001b b 37ec <rtems_termios_ioctl+0xc8>
377c: e59f233c ldr r2, [pc, #828] ; 3ac0 <rtems_termios_ioctl+0x39c><== NOT EXECUTED 3780: e1530002 cmp r3, r2 <== NOT EXECUTED 3784: 0a0000bd beq 3a80 <rtems_termios_ioctl+0x35c> <== NOT EXECUTED 3788: 8a000002 bhi 3798 <rtems_termios_ioctl+0x74> <== NOT EXECUTED 378c: e3530005 cmp r3, #5 <== NOT EXECUTED 3790: 1a000009 bne 37bc <rtems_termios_ioctl+0x98> <== NOT EXECUTED 3794: ea000099 b 3a00 <rtems_termios_ioctl+0x2dc> <== NOT EXECUTED 3798: e59f2324 ldr r2, [pc, #804] ; 3ac4 <rtems_termios_ioctl+0x3a0><== NOT EXECUTED 379c: 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;
37a0: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 37a4: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 37a8: 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) {
37ac: 0a0000be beq 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED 37b0: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 37b4: e1530002 cmp r3, r2 <== NOT EXECUTED 37b8: 0a000098 beq 3a20 <rtems_termios_ioctl+0x2fc> <== NOT EXECUTED
default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
37bc: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 37c0: e59f3300 ldr r3, [pc, #768] ; 3ac8 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED 37c4: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 37c8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 37cc: e3530000 cmp r3, #0 <== NOT EXECUTED 37d0: 03a0600a moveq r6, #10 <== NOT EXECUTED 37d4: 0a0000b4 beq 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
37d8: e1a00004 mov r0, r4 <== NOT EXECUTED 37dc: e1a01005 mov r1, r5 <== NOT EXECUTED 37e0: e1a0e00f mov lr, pc <== NOT EXECUTED 37e4: e12fff13 bx r3 <== NOT EXECUTED 37e8: ea0000a2 b 3a78 <rtems_termios_ioctl+0x354> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios;
37ec: e5957008 ldr r7, [r5, #8] 37f0: e284c030 add ip, r4, #48 ; 0x30 37f4: e8bc000f ldm ip!, {r0, r1, r2, r3} 37f8: e1a0e007 mov lr, r7 37fc: e8ae000f stmia lr!, {r0, r1, r2, r3} 3800: e8bc000f ldm ip!, {r0, r1, r2, r3} 3804: e8ae000f stmia lr!, {r0, r1, r2, r3} 3808: e59c3000 ldr r3, [ip] 380c: e58e3000 str r3, [lr]
break;
3810: ea0000a5 b 3aac <rtems_termios_ioctl+0x388>
case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer;
3814: e595e008 ldr lr, [r5, #8] 3818: e8be000f ldm lr!, {r0, r1, r2, r3} 381c: e284c030 add ip, r4, #48 ; 0x30 3820: e8ac000f stmia ip!, {r0, r1, r2, r3} 3824: e8be000f ldm lr!, {r0, r1, r2, r3} 3828: 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) &&
382c: 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;
3830: 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) &&
3834: 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;
3838: 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) && 383c: 0a000019 beq 38a8 <rtems_termios_ioctl+0x184>
3840: e5943030 ldr r3, [r4, #48] ; 0x30 3844: e3130b01 tst r3, #1024 ; 0x400
3848: 1a000016 bne 38a8 <rtems_termios_ioctl+0x184> !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
384c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3850: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3854: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) {
3858: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 385c: e3130020 tst r3, #32 <== NOT EXECUTED 3860: 0a000010 beq 38a8 <rtems_termios_ioctl+0x184> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
3864: e10f7000 mrs r7, CPSR <== NOT EXECUTED 3868: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 386c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
3870: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
3874: 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;
3878: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
387c: 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;
3880: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
3884: 0a000006 beq 38a4 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3888: 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,
388c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3890: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3894: e0811003 add r1, r1, r3 <== NOT EXECUTED 3898: e3a02001 mov r2, #1 <== NOT EXECUTED 389c: e1a0e00f mov lr, pc <== NOT EXECUTED 38a0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
38a4: 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) &&
38a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 38ac: e3130b01 tst r3, #1024 ; 0x400
38b0: 0a000008 beq 38d8 <rtems_termios_ioctl+0x1b4>
38b4: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 38b8: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 38bc: 1a000005 bne 38d8 <rtems_termios_ioctl+0x1b4> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF);
38c0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38c4: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 38c8: 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);
38cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38d0: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 38d4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) &&
38d8: e59430b8 ldr r3, [r4, #184] ; 0xb8 38dc: e3130c01 tst r3, #256 ; 0x100
38e0: 0a000010 beq 3928 <rtems_termios_ioctl+0x204>
38e4: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 38e8: e3530000 cmp r3, #0 <== NOT EXECUTED 38ec: ba00000d blt 3928 <rtems_termios_ioctl+0x204> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS);
38f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38f4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 38f8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) &&
38fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3900: e3130004 tst r3, #4 <== NOT EXECUTED 3904: 0a000004 beq 391c <rtems_termios_ioctl+0x1f8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
3908: 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) &&
390c: e3530000 cmp r3, #0 <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor);
3910: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3914: 11a0e00f movne lr, pc <== NOT EXECUTED 3918: 112fff13 bxne r3 <== NOT EXECUTED
} tty->flow_ctrl &= ~(FL_IRTSOFF);
391c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3920: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3924: 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) {
3928: e5943038 ldr r3, [r4, #56] ; 0x38 392c: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
3930: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3934: b3833c01 orrlt r3, r3, #256 ; 0x100 3938: b58430b8 strlt r3, [r4, #184] ; 0xb8
} /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) {
393c: e5943030 ldr r3, [r4, #48] ; 0x30 3940: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
3944: 159430b8 ldrne r3, [r4, #184] ; 0xb8 3948: 13833b01 orrne r3, r3, #1024 ; 0x400 394c: 158430b8 strne r3, [r4, #184] ; 0xb8
} /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) {
3950: e5943030 ldr r3, [r4, #48] ; 0x30 3954: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
3958: 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) {
395c: 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;
3960: 13833c02 orrne r3, r3, #512 ; 0x200 3964: 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) {
3968: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
396c: 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) { 3970: 1a000014 bne 39c8 <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;
3974: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 3978: eb0002a5 bl 4414 <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] *
397c: e3a0100a mov r1, #10 <== NOT EXECUTED 3980: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3984: eb004611 bl 151d0 <__aeabi_uidiv> <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
3988: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 398c: 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] *
3990: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 3994: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
3998: 0a000006 beq 39b8 <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;
399c: e3520000 cmp r2, #0 <== NOT EXECUTED 39a0: 01a02000 moveq r2, r0 <== NOT EXECUTED 39a4: 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;
39a8: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
39ac: 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;
39b0: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 39b4: ea000006 b 39d4 <rtems_termios_ioctl+0x2b0> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) {
39b8: 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;
39bc: 03a03001 moveq r3, #1 <== NOT EXECUTED 39c0: 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]) {
39c4: 0a000002 beq 39d4 <rtems_termios_ioctl+0x2b0> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
39c8: e5843074 str r3, [r4, #116] ; 0x74
else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
39cc: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
39d0: e5843070 str r3, [r4, #112] ; 0x70
else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes)
39d4: e59430a8 ldr r3, [r4, #168] ; 0xa8 39d8: e3530000 cmp r3, #0
39dc: 0a000032 beq 3aac <rtems_termios_ioctl+0x388> (*tty->device.setAttributes)(tty->minor, &tty->termios);
39e0: e5940010 ldr r0, [r4, #16] 39e4: e2841030 add r1, r4, #48 ; 0x30 39e8: e1a0e00f mov lr, pc 39ec: e12fff13 bx r3 39f0: ea00002d b 3aac <rtems_termios_ioctl+0x388>
break; case RTEMS_IO_TCDRAIN: drainOutput (tty);
39f4: e1a00004 mov r0, r4 39f8: ebfffe5a bl 3368 <drainOutput>
break;
39fc: ea00002a b 3aac <rtems_termios_ioctl+0x388>
case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup;
3a00: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3a04: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 3a08: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED
break;
3a0c: ea000026 b 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup;
3a10: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3a14: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3a18: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED
break;
3a1c: ea000022 b 3aac <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) {
3a20: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3a24: e59f309c ldr r3, [pc, #156] ; 3ac8 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED 3a28: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3a2c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3a30: e3530000 cmp r3, #0 <== NOT EXECUTED 3a34: 0a000003 beq 3a48 <rtems_termios_ioctl+0x324> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3a38: e1a00004 mov r0, r4 <== NOT EXECUTED 3a3c: e1a0e00f mov lr, pc <== NOT EXECUTED 3a40: e12fff13 bx r3 <== NOT EXECUTED 3a44: e1a06000 mov r6, r0 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
3a48: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 3a4c: 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) {
3a50: e59f3070 ldr r3, [pc, #112] ; 3ac8 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED 3a54: 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 */
3a58: e3a01000 mov r1, #0 <== NOT EXECUTED
/* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
3a5c: 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 */
3a60: 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);
3a64: 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) {
3a68: 0a00000f beq 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
3a6c: e1a00004 mov r0, r4 <== NOT EXECUTED 3a70: e1a0e00f mov lr, pc <== NOT EXECUTED 3a74: e12fff13 bx r3 <== NOT EXECUTED 3a78: e1a06000 mov r6, r0 <== NOT EXECUTED 3a7c: ea00000a b 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
3a80: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3a84: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
3a88: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
3a8c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED 3a90: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3a94: e2842020 add r2, r4, #32 <== NOT EXECUTED 3a98: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED 3a9c: e0411002 sub r1, r1, r2 <== NOT EXECUTED 3aa0: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3aa4: e0813003 add r3, r1, r3 <== NOT EXECUTED 3aa8: e5823000 str r3, [r2] <== NOT EXECUTED
} break; } rtems_semaphore_release (tty->osem);
3aac: e5940018 ldr r0, [r4, #24] 3ab0: eb000432 bl 4b80 <rtems_semaphore_release>
args->ioctl_return = sc;
3ab4: e585600c str r6, [r5, #12]
return sc; }
3ab8: e1a00006 mov r0, r6 3abc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00003c64 <rtems_termios_open>: rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c64: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3c68: e1a08002 mov r8, r2
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c6c: e59f23e0 ldr r2, [pc, #992] ; 4054 <rtems_termios_open+0x3f0>
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c70: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c74: e3a01000 mov r1, #0
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c78: e1a09000 mov r9, r0
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c7c: e5920000 ldr r0, [r2] 3c80: e1a02001 mov r2, r1
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c84: e1a0b003 mov fp, r3
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c88: eb000376 bl 4a68 <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
3c8c: e2506000 subs r6, r0, #0
return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
3c90: 059f33c0 ldreq r3, [pc, #960] ; 4058 <rtems_termios_open+0x3f4> 3c94: 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) 3c98: 0a000007 beq 3cbc <rtems_termios_open+0x58>
3c9c: ea0000e2 b 402c <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))
3ca0: e595300c ldr r3, [r5, #12] 3ca4: e1530009 cmp r3, r9
3ca8: 1a000002 bne 3cb8 <rtems_termios_open+0x54>
3cac: e5953010 ldr r3, [r5, #16] 3cb0: e153000a cmp r3, sl
3cb4: 0a0000bb beq 3fa8 <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) {
3cb8: e5955000 ldr r5, [r5] 3cbc: e3550000 cmp r5, #0
3cc0: 1afffff6 bne 3ca0 <rtems_termios_open+0x3c>
3cc4: ea0000da b 4034 <rtems_termios_open+0x3d0>
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
3cc8: e59f738c ldr r7, [pc, #908] ; 405c <rtems_termios_open+0x3f8> 3ccc: e5973004 ldr r3, [r7, #4] 3cd0: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3cd4: e5950064 ldr r0, [r5, #100] ; 0x64 3cd8: ebfff7cc bl 1c10 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
3cdc: e3500000 cmp r0, #0
} /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3ce0: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) { 3ce4: 1a000006 bne 3d04 <rtems_termios_open+0xa0> free(tty);
3ce8: e1a00005 mov r0, r5 <== NOT EXECUTED 3cec: ebfff715 bl 1948 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
3cf0: e59f335c ldr r3, [pc, #860] ; 4054 <rtems_termios_open+0x3f0><== NOT EXECUTED 3cf4: e5930000 ldr r0, [r3] <== NOT EXECUTED 3cf8: eb0003a0 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED 3cfc: e3a0601a mov r6, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
3d00: ea0000c9 b 402c <rtems_termios_open+0x3c8> <== NOT EXECUTED
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
3d04: e5973008 ldr r3, [r7, #8] 3d08: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3d0c: e5950088 ldr r0, [r5, #136] ; 0x88 3d10: ebfff7be bl 1c10 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
3d14: e3500000 cmp r0, #0
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3d18: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) { 3d1c: 0a000006 beq 3d3c <rtems_termios_open+0xd8> return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
3d20: e5970000 ldr r0, [r7] 3d24: ebfff7b9 bl 1c10 <malloc>
if (tty->cbuf == NULL) {
3d28: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
3d2c: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) { 3d30: 1a000004 bne 3d48 <rtems_termios_open+0xe4> free((void *)(tty->rawOutBuf.theBuf));
3d34: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 3d38: ebfff702 bl 1948 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
3d3c: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 3d40: ebfff700 bl 1948 <free> <== NOT EXECUTED 3d44: eaffffe7 b 3ce8 <rtems_termios_open+0x84> <== NOT EXECUTED
tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead;
3d48: e59f3308 ldr r3, [pc, #776] ; 4058 <rtems_termios_open+0x3f4> 3d4c: e5932000 ldr r2, [r3]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
3d50: e3a03000 mov r3, #0
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL)
3d54: e3520000 cmp r2, #0
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL;
3d58: e885000c stm r5, {r2, r3}
if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty;
3d5c: 15825004 strne r5, [r2, #4]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
3d60: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
3d64: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
3d68: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
3d6c: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
3d70: 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)
3d74: e59f32e4 ldr r3, [pc, #740] ; 4060 <rtems_termios_open+0x3fc> 3d78: e5932000 ldr r2, [r3]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3d7c: e59f72d8 ldr r7, [pc, #728] ; 405c <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)
3d80: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
3d84: 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;
3d88: e59f22c8 ldr r2, [pc, #712] ; 4058 <rtems_termios_open+0x3f4>
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3d8c: e5d7300c ldrb r3, [r7, #12] 3d90: e59f02cc ldr r0, [pc, #716] ; 4064 <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;
3d94: e5824000 str r4, [r2]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3d98: 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;
3d9c: e584a010 str sl, [r4, #16]
tty->major = major;
3da0: e584900c str r9, [r4, #12]
/* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3da4: e284c014 add ip, r4, #20 3da8: e3a03000 mov r3, #0 3dac: e3a01001 mov r1, #1 3db0: e3a02054 mov r2, #84 ; 0x54 3db4: e58dc000 str ip, [sp] 3db8: eb000298 bl 4820 <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)
3dbc: e2503000 subs r3, r0, #0
3dc0: 1a000095 bne 401c <rtems_termios_open+0x3b8> rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
3dc4: e5d7200c ldrb r2, [r7, #12] 3dc8: e59f0298 ldr r0, [pc, #664] ; 4068 <rtems_termios_open+0x404> 3dcc: e284c018 add ip, r4, #24 3dd0: e1820000 orr r0, r2, r0 3dd4: e3a01001 mov r1, #1 3dd8: e3a02054 mov r2, #84 ; 0x54 3ddc: e58dc000 str ip, [sp] 3de0: eb00028e bl 4820 <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)
3de4: e2501000 subs r1, r0, #0
3de8: 1a00008b bne 401c <rtems_termios_open+0x3b8> rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
3dec: e5d7300c ldrb r3, [r7, #12] 3df0: e59f0274 ldr r0, [pc, #628] ; 406c <rtems_termios_open+0x408> 3df4: e284c08c add ip, r4, #140 ; 0x8c 3df8: e1830000 orr r0, r3, r0 3dfc: e3a02020 mov r2, #32 3e00: e1a03001 mov r3, r1 3e04: e58dc000 str ip, [sp] 3e08: eb000284 bl 4820 <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)
3e0c: e250e000 subs lr, r0, #0
3e10: 1a000081 bne 401c <rtems_termios_open+0x3b8> tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks;
3e14: e8bb000f ldm fp!, {r0, r1, r2, r3} 3e18: e284c098 add ip, r4, #152 ; 0x98 3e1c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3e20: e89b000f ldm fp, {r0, r1, r2, r3} 3e24: e88c000f stm ip, {r0, r1, r2, r3}
/* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3e28: e59430b4 ldr r3, [r4, #180] ; 0xb4 3e2c: 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;
3e30: e584e094 str lr, [r4, #148] ; 0x94
tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3e34: 1a000017 bne 3e98 <rtems_termios_open+0x234> sc = rtems_task_create (
3e38: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3e3c: e59f022c ldr r0, [pc, #556] ; 4070 <rtems_termios_open+0x40c><== NOT EXECUTED 3e40: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 3e44: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3e48: e3a0100a mov r1, #10 <== NOT EXECUTED 3e4c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3e50: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3e54: e58de000 str lr, [sp] <== NOT EXECUTED 3e58: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3e5c: eb00036e bl 4c1c <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)
3e60: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3e64: 1a00006c bne 401c <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
3e68: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3e6c: e59f0200 ldr r0, [pc, #512] ; 4074 <rtems_termios_open+0x410><== NOT EXECUTED 3e70: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3e74: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3e78: e3a01009 mov r1, #9 <== NOT EXECUTED 3e7c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3e80: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3e84: e58de000 str lr, [sp] <== NOT EXECUTED 3e88: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3e8c: eb000362 bl 4c1c <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)
3e90: e3500000 cmp r0, #0 <== NOT EXECUTED 3e94: 1a000060 bne 401c <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) ||
3e98: e59430a0 ldr r3, [r4, #160] ; 0xa0 3e9c: e3530000 cmp r3, #0
3ea0: 0a000002 beq 3eb0 <rtems_termios_open+0x24c> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
3ea4: e59430b4 ldr r3, [r4, #180] ; 0xb4 3ea8: e3530002 cmp r3, #2
3eac: 1a00000b bne 3ee0 <rtems_termios_open+0x27c> sc = rtems_semaphore_create (
3eb0: e59f31a4 ldr r3, [pc, #420] ; 405c <rtems_termios_open+0x3f8><== NOT EXECUTED 3eb4: e59f01bc ldr r0, [pc, #444] ; 4078 <rtems_termios_open+0x414><== NOT EXECUTED 3eb8: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 3ebc: e3a01000 mov r1, #0 <== NOT EXECUTED 3ec0: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3ec4: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 3ec8: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 3ecc: e1a03001 mov r3, r1 <== NOT EXECUTED 3ed0: e58dc000 str ip, [sp] <== NOT EXECUTED 3ed4: eb000251 bl 4820 <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)
3ed8: e3500000 cmp r0, #0 <== NOT EXECUTED 3edc: 1a00004e bne 401c <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';
3ee0: 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;
3ee4: e58430b8 str r3, [r4, #184] ; 0xb8
/* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
3ee8: e5941064 ldr r1, [r4, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
3eec: 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';
3ef0: 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;
3ef4: 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';
3ef8: e3a0c01c mov ip, #28 3efc: e5c4c042 strb ip, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
3f00: e28cc063 add ip, ip, #99 ; 0x63 3f04: e5c4c043 strb ip, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
3f08: e3a0c015 mov ip, #21 3f0c: e5c4c044 strb ip, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
3f10: e3a0c004 mov ip, #4 3f14: e5c4c045 strb ip, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
3f18: e28cc00d add ip, ip, #13 3f1c: e5c4c049 strb ip, [r4, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
3f20: e28cc002 add ip, ip, #2 3f24: e5c4c04a strb ip, [r4, #74] ; 0x4a
tty->termios.c_cc[VSUSP] = '\032';
3f28: e28cc007 add ip, ip, #7 3f2c: e5c4c04b strb ip, [r4, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
3f30: e3a0c012 mov ip, #18 3f34: e5c4c04d strb ip, [r4, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
3f38: e3a0c00f mov ip, #15 3f3c: e5c4c04e strb ip, [r4, #78] ; 0x4e
tty->termios.c_cc[VWERASE] = '\027';
3f40: e28cc008 add ip, ip, #8 3f44: e5c4c04f strb ip, [r4, #79] ; 0x4f
tty->termios.c_cc[VLNEXT] = '\026';
3f48: 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';
3f4c: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
3f50: 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';
3f54: 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';
3f58: 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')
3f5c: e59f30f8 ldr r3, [pc, #248] ; 405c <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;
3f60: e1a00120 lsr r0, r0, #2
/* * Bump name characer */ if (c++ == 'z')
3f64: 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;
3f68: e58400c0 str r0, [r4, #192] ; 0xc0
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
3f6c: e59f0108 ldr r0, [pc, #264] ; 407c <rtems_termios_open+0x418> 3f70: e5840030 str r0, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
3f74: e59f0104 ldr r0, [pc, #260] ; 4080 <rtems_termios_open+0x41c> 3f78: e5840034 str r0, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
3f7c: e59f0100 ldr r0, [pc, #256] ; 4084 <rtems_termios_open+0x420> 3f80: e5840038 str r0, [r4, #56] ; 0x38
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
3f84: e59f00fc ldr r0, [pc, #252] ; 4088 <rtems_termios_open+0x424>
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
3f88: 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;
3f8c: e1a010a1 lsr r1, r1, #1
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
3f90: 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;
3f94: 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;
3f98: e58410bc str r1, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
3f9c: e5c3200c strb r2, [r3, #12]
c = 'a';
3fa0: 03a02061 moveq r2, #97 ; 0x61 3fa4: 05c3200c strbeq r2, [r3, #12]
} args->iop->data1 = tty; if (!tty->refcount++) {
3fa8: e5953008 ldr r3, [r5, #8]
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
3fac: e5982000 ldr r2, [r8]
if (!tty->refcount++) {
3fb0: e3530000 cmp r3, #0 3fb4: e2833001 add r3, r3, #1
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
3fb8: e5825034 str r5, [r2, #52] ; 0x34
if (!tty->refcount++) {
3fbc: e5853008 str r3, [r5, #8]
3fc0: 1a000016 bne 4020 <rtems_termios_open+0x3bc> if (tty->device.firstOpen)
3fc4: e5953098 ldr r3, [r5, #152] ; 0x98 3fc8: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
3fcc: 11a00009 movne r0, r9 3fd0: 11a0100a movne r1, sl 3fd4: 11a02008 movne r2, r8 3fd8: 11a0e00f movne lr, pc 3fdc: 112fff13 bxne r3
/* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3fe0: e59530b4 ldr r3, [r5, #180] ; 0xb4 3fe4: e3530002 cmp r3, #2
3fe8: 1a00000c bne 4020 <rtems_termios_open+0x3bc> sc = rtems_task_start(tty->rxTaskId,
3fec: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 3ff0: e59f1094 ldr r1, [pc, #148] ; 408c <rtems_termios_open+0x428><== NOT EXECUTED 3ff4: e1a02005 mov r2, r5 <== NOT EXECUTED 3ff8: eb0003ac bl 4eb0 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
3ffc: e3500000 cmp r0, #0 <== NOT EXECUTED 4000: 1a000005 bne 401c <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId,
4004: e1a02005 mov r2, r5 <== NOT EXECUTED 4008: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 400c: e59f107c ldr r1, [pc, #124] ; 4090 <rtems_termios_open+0x42c><== NOT EXECUTED 4010: eb0003a6 bl 4eb0 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
4014: e3500000 cmp r0, #0 <== NOT EXECUTED 4018: 0a000000 beq 4020 <rtems_termios_open+0x3bc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
401c: eb000424 bl 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
} } rtems_semaphore_release (rtems_termios_ttyMutex);
4020: e59f302c ldr r3, [pc, #44] ; 4054 <rtems_termios_open+0x3f0> 4024: e5930000 ldr r0, [r3] 4028: eb0002d4 bl 4b80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
402c: e1a00006 mov r0, r6 4030: 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));
4034: e3a00001 mov r0, #1 4038: e3a010e8 mov r1, #232 ; 0xe8 403c: eb00139d bl 8eb8 <calloc>
if (tty == NULL) {
4040: e3500000 cmp r0, #0
static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty));
4044: e1a05000 mov r5, r0 4048: e1a04000 mov r4, r0
if (tty == NULL) { 404c: 1affff1d bne 3cc8 <rtems_termios_open+0x64>
4050: eaffff26 b 3cf0 <rtems_termios_open+0x8c> <== NOT EXECUTED
00002c00 <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) {
2c00: e59230b4 ldr r3, [r2, #180] ; 0xb4 2c04: e3530000 cmp r3, #0
* Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) {
2c08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2c0c: e1a04002 mov r4, r2 2c10: e1a0a000 mov sl, r0 2c14: 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) { 2c18: 1a000005 bne 2c34 <rtems_termios_puts+0x34> (*tty->device.write)(tty->minor, (void *)buf, len);
2c1c: e1a01000 mov r1, r0 2c20: e1a02006 mov r2, r6 2c24: e5940010 ldr r0, [r4, #16] 2c28: e1a0e00f mov lr, pc 2c2c: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
2c30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
} newHead = tty->rawOutBuf.Head;
2c34: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 2c38: 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;
2c3c: 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;
2c40: 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) {
2c44: ea00002e b 2d04 <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;
2c48: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2c4c: e2850001 add r0, r5, #1 <== NOT EXECUTED 2c50: eb0049f2 bl 15420 <__umodsi3> <== NOT EXECUTED 2c54: e1a05000 mov r5, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2c58: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2c5c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2c60: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) {
2c64: ea00000a b 2c94 <rtems_termios_puts+0x94> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
2c68: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2c6c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2c70: e3a01000 mov r1, #0 <== NOT EXECUTED 2c74: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2c78: e1a02001 mov r2, r1 <== NOT EXECUTED 2c7c: eb000779 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
2c80: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2c84: 1b00090a blne 50b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2c88: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2c8c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2c90: 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) {
2c94: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2c98: e1550003 cmp r5, r3 <== NOT EXECUTED 2c9c: 0afffff1 beq 2c68 <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++;
2ca0: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2ca4: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 2ca8: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2cac: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) {
2cb0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2cb4: 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;
2cb8: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
2cbc: 1a00000d bne 2cf8 <rtems_termios_puts+0xf8> <== NOT EXECUTED
/* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2cc0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2cc4: 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;
2cc8: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ccc: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 2cd0: 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)) {
2cd4: 1a000006 bne 2cf4 <rtems_termios_puts+0xf4> <== NOT EXECUTED
(*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2cd8: 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,
2cdc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2ce0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2ce4: e0811003 add r1, r1, r3 <== NOT EXECUTED 2ce8: e3a02001 mov r2, #1 <== NOT EXECUTED 2cec: e1a0e00f mov lr, pc <== NOT EXECUTED 2cf0: 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;
2cf4: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2cf8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
} rtems_interrupt_enable (level); len--;
2cfc: e2466001 sub r6, r6, #1 <== NOT EXECUTED 2d00: 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) {
2d04: e3560000 cmp r6, #0 <== NOT EXECUTED 2d08: 1affffce bne 2c48 <rtems_termios_puts+0x48> <== NOT EXECUTED 2d0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000033d4 <rtems_termios_read>: return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
33d4: 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;
33d8: e5903000 ldr r3, [r0] <== NOT EXECUTED
return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
33dc: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
33e0: 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);
33e4: 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;
33e8: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
33ec: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 33f0: 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;
33f4: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED
char *buffer = args->buffer;
33f8: e58d3000 str r3, [sp] <== NOT EXECUTED
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
33fc: eb000599 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
3400: e2506000 subs r6, r0, #0 <== NOT EXECUTED 3404: 1a0000c1 bne 3710 <rtems_termios_read+0x33c> <== NOT EXECUTED
return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
3408: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 340c: e59f3304 ldr r3, [pc, #772] ; 3718 <rtems_termios_read+0x344><== NOT EXECUTED 3410: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3414: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3418: e3530000 cmp r3, #0 <== NOT EXECUTED 341c: 0a000005 beq 3438 <rtems_termios_read+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3420: e1a01005 mov r1, r5 <== NOT EXECUTED 3424: e1a00004 mov r0, r4 <== NOT EXECUTED 3428: e1a0e00f mov lr, pc <== NOT EXECUTED 342c: e12fff13 bx r3 <== NOT EXECUTED 3430: e1a06000 mov r6, r0 <== NOT EXECUTED 3434: ea0000b1 b 3700 <rtems_termios_read+0x32c> <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) {
3438: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 343c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3440: e1520003 cmp r2, r3 <== NOT EXECUTED 3444: 1a00009a bne 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
3448: 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;
344c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
if (tty->device.pollRead != NULL
3450: 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;
3454: 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;
3458: e5846020 str r6, [r4, #32] <== NOT EXECUTED 345c: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
3460: 0a00003b beq 3554 <rtems_termios_read+0x180> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
3464: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 3468: e3530000 cmp r3, #0 <== NOT EXECUTED 346c: 1a000038 bne 3554 <rtems_termios_read+0x180> <== NOT EXECUTED
static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) {
3470: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3474: e3130002 tst r3, #2 <== NOT EXECUTED 3478: 0a00000d beq 34b4 <rtems_termios_read+0xe0> <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
347c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3480: e1a0e00f mov lr, pc <== NOT EXECUTED 3484: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
3488: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_task_wake_after (1); } else { if (siproc (n, tty))
348c: e1a01004 mov r1, r4 <== NOT EXECUTED 3490: 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) {
3494: aa000002 bge 34a4 <rtems_termios_read+0xd0> <== NOT EXECUTED
rtems_task_wake_after (1);
3498: e3a00001 mov r0, #1 <== NOT EXECUTED 349c: eb00069b bl 4f10 <rtems_task_wake_after> <== NOT EXECUTED 34a0: eafffff5 b 347c <rtems_termios_read+0xa8> <== NOT EXECUTED
} else { if (siproc (n, tty))
34a4: ebffff67 bl 3248 <siproc> <== NOT EXECUTED 34a8: e3500000 cmp r0, #0 <== NOT EXECUTED 34ac: 0afffff2 beq 347c <rtems_termios_read+0xa8> <== NOT EXECUTED 34b0: ea00007f b 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
} } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot();
34b4: eb0003de bl 4434 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED 34b8: e1a08000 mov r8, r0 <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
34bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 34c0: e1a0e00f mov lr, pc <== NOT EXECUTED 34c4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
34c8: e3500000 cmp r0, #0 <== NOT EXECUTED 34cc: aa000013 bge 3520 <rtems_termios_read+0x14c> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
34d0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 34d4: e3530000 cmp r3, #0 <== NOT EXECUTED 34d8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 34dc: 0a000005 beq 34f8 <rtems_termios_read+0x124> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
34e0: e3530000 cmp r3, #0 <== NOT EXECUTED 34e4: 0a00000a beq 3514 <rtems_termios_read+0x140> <== NOT EXECUTED 34e8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 34ec: e3530000 cmp r3, #0 <== NOT EXECUTED 34f0: 0a000007 beq 3514 <rtems_termios_read+0x140> <== NOT EXECUTED 34f4: ea000001 b 3500 <rtems_termios_read+0x12c> <== NOT EXECUTED
break; } } } else { if (!tty->termios.c_cc[VTIME])
34f8: e3530000 cmp r3, #0 <== NOT EXECUTED 34fc: 0a00006c beq 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
3500: eb0003cb bl 4434 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
3504: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 3508: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 350c: e1500003 cmp r0, r3 <== NOT EXECUTED 3510: 8a000067 bhi 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; } } rtems_task_wake_after (1);
3514: e3a00001 mov r0, #1 <== NOT EXECUTED 3518: eb00067c bl 4f10 <rtems_task_wake_after> <== NOT EXECUTED 351c: eaffffe6 b 34bc <rtems_termios_read+0xe8> <== NOT EXECUTED
} else { siproc (n, tty);
3520: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 3524: e1a01004 mov r1, r4 <== NOT EXECUTED 3528: ebffff46 bl 3248 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
352c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3530: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3534: e1520003 cmp r2, r3 <== NOT EXECUTED 3538: aa00005d bge 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
353c: e3530000 cmp r3, #0 <== NOT EXECUTED 3540: 0affffdd beq 34bc <rtems_termios_read+0xe8> <== NOT EXECUTED 3544: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3548: e3530000 cmp r3, #0 <== NOT EXECUTED 354c: 0affffda beq 34bc <rtems_termios_read+0xe8> <== NOT EXECUTED 3550: eaffffd7 b 34b4 <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;
3554: 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,
3558: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 355c: e3a0a001 mov sl, #1 <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3560: e59f91b4 ldr r9, [pc, #436] ; 371c <rtems_termios_read+0x348><== NOT EXECUTED 3564: ea000041 b 3670 <rtems_termios_read+0x29c> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
3568: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 356c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3570: e2800001 add r0, r0, #1 <== NOT EXECUTED 3574: eb0047a9 bl 15420 <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
3578: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 357c: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
3580: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
3584: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3588: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 358c: e0823003 add r3, r2, r3 <== NOT EXECUTED 3590: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 3594: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3598: eb0047a0 bl 15420 <__umodsi3> <== NOT EXECUTED 359c: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 35a0: e1500003 cmp r0, r3 <== NOT EXECUTED 35a4: 2a00001f bcs 3628 <rtems_termios_read+0x254> <== NOT EXECUTED
% tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF;
35a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 35ac: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 35b0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
35b4: e59f3164 ldr r3, [pc, #356] ; 3720 <rtems_termios_read+0x34c><== NOT EXECUTED 35b8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 35bc: e59f015c ldr r0, [pc, #348] ; 3720 <rtems_termios_read+0x34c><== NOT EXECUTED 35c0: e0023003 and r3, r2, r3 <== NOT EXECUTED 35c4: e1530000 cmp r3, r0 <== NOT EXECUTED 35c8: 1a00000b bne 35fc <rtems_termios_read+0x228> <== NOT EXECUTED 35cc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 35d0: e3530000 cmp r3, #0 <== NOT EXECUTED 35d4: 0a000002 beq 35e4 <rtems_termios_read+0x210> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) {
35d8: 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))
35dc: e3130020 tst r3, #32 <== NOT EXECUTED 35e0: 0a000005 beq 35fc <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,
35e4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 35e8: e1a0100b mov r1, fp <== NOT EXECUTED 35ec: e3a02001 mov r2, #1 <== NOT EXECUTED 35f0: e1a0e00f mov lr, pc <== NOT EXECUTED 35f4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 35f8: ea00000a b 3628 <rtems_termios_read+0x254> <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) {
35fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3600: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3604: 0a000007 beq 3628 <rtems_termios_read+0x254> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
3608: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
360c: 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;
3610: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
3614: 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;
3618: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor);
361c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3620: 11a0e00f movne lr, pc <== NOT EXECUTED 3624: 112fff13 bxne r3 <== NOT EXECUTED
} } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) {
3628: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 362c: e3130002 tst r3, #2 <== NOT EXECUTED 3630: 0a000005 beq 364c <rtems_termios_read+0x278> <== NOT EXECUTED
if (siproc (c, tty))
3634: e1a00008 mov r0, r8 <== NOT EXECUTED 3638: e1a01004 mov r1, r4 <== NOT EXECUTED 363c: ebffff01 bl 3248 <siproc> <== NOT EXECUTED 3640: e3500000 cmp r0, #0 <== NOT EXECUTED 3644: 1a000007 bne 3668 <rtems_termios_read+0x294> <== NOT EXECUTED 3648: ea000007 b 366c <rtems_termios_read+0x298> <== NOT EXECUTED
wait = 0; } else { siproc (c, tty);
364c: e1a00008 mov r0, r8 <== NOT EXECUTED 3650: e1a01004 mov r1, r4 <== NOT EXECUTED 3654: ebfffefb bl 3248 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3658: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 365c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3660: e1520003 cmp r2, r3 <== NOT EXECUTED 3664: ba000000 blt 366c <rtems_termios_read+0x298> <== NOT EXECUTED 3668: e3a0a000 mov sl, #0 <== NOT EXECUTED
wait = 0; } timeout = tty->rawInBufSemaphoreTimeout;
366c: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3670: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 3674: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3678: e1520003 cmp r2, r3 <== NOT EXECUTED 367c: 0a000004 beq 3694 <rtems_termios_read+0x2c0> <== NOT EXECUTED 3680: e5993000 ldr r3, [r9] <== NOT EXECUTED 3684: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3688: e2433001 sub r3, r3, #1 <== NOT EXECUTED 368c: e1520003 cmp r2, r3 <== NOT EXECUTED 3690: baffffb4 blt 3568 <rtems_termios_read+0x194> <== NOT EXECUTED
} /* * Wait for characters */ if ( wait ) {
3694: e35a0000 cmp sl, #0 <== NOT EXECUTED 3698: 0a000005 beq 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
369c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 36a0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 36a4: e1a02008 mov r2, r8 <== NOT EXECUTED 36a8: eb0004ee bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
36ac: e3500000 cmp r0, #0 <== NOT EXECUTED 36b0: 0affffee beq 3670 <rtems_termios_read+0x29c> <== NOT EXECUTED
{ rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) {
36b4: e3a03000 mov r3, #0 <== NOT EXECUTED 36b8: ea000007 b 36dc <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++];
36bc: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 36c0: e59d0000 ldr r0, [sp] <== NOT EXECUTED 36c4: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED 36c8: e2822001 add r2, r2, #1 <== NOT EXECUTED 36cc: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED 36d0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
count--;
36d4: e2477001 sub r7, r7, #1 <== NOT EXECUTED 36d8: 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)) {
36dc: e3570000 cmp r7, #0 <== NOT EXECUTED 36e0: 0a000003 beq 36f4 <rtems_termios_read+0x320> <== NOT EXECUTED 36e4: e2841020 add r1, r4, #32 <== NOT EXECUTED 36e8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 36ec: e1520001 cmp r2, r1 <== NOT EXECUTED 36f0: bafffff1 blt 36bc <rtems_termios_read+0x2e8> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
36f4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 36f8: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 36fc: e5857018 str r7, [r5, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3700: e3a03000 mov r3, #0 <== NOT EXECUTED 3704: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3708: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 370c: eb00051b bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
return sc; }
3710: e1a00006 mov r0, r6 <== NOT EXECUTED 3714: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000026e0 <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))
26e0: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 26e4: e59f31d0 ldr r3, [pc, #464] ; 28bc <rtems_termios_refill_transmitter+0x1dc><== NOT EXECUTED 26e8: e0023003 and r3, r2, r3 <== NOT EXECUTED 26ec: e59f21cc ldr r2, [pc, #460] ; 28c0 <rtems_termios_refill_transmitter+0x1e0><== NOT EXECUTED 26f0: 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) {
26f4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 26f8: 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))
26fc: 1a00000e bne 273c <rtems_termios_refill_transmitter+0x5c> <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor,
2700: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 2704: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 2708: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 270c: e1a0e00f mov lr, pc <== NOT EXECUTED 2710: 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 (
2714: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2718: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 271c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--;
2720: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2724: 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--;
2728: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
272c: e3811002 orr r1, r1, #2 <== NOT EXECUTED 2730: 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--;
2734: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level);
2738: ea000011 b 2784 <rtems_termios_refill_transmitter+0xa4> <== NOT EXECUTED
nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
273c: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2740: e2033003 and r3, r3, #3 <== NOT EXECUTED 2744: e3530002 cmp r3, #2 <== NOT EXECUTED 2748: 1a000010 bne 2790 <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,
274c: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 2750: e3a02001 mov r2, #1 <== NOT EXECUTED 2754: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2758: e1a0e00f mov lr, pc <== NOT EXECUTED 275c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2760: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2764: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2768: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--;
276c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2770: 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--;
2774: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2778: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 277c: 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--;
2780: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2784: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2788: e3a05001 mov r5, #1 <== NOT EXECUTED 278c: ea000048 b 28b4 <rtems_termios_refill_transmitter+0x1d4> <== NOT EXECUTED
rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2790: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 2794: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 2798: e1520003 cmp r2, r3 <== NOT EXECUTED 279c: 1a000005 bne 27b8 <rtems_termios_refill_transmitter+0xd8> <== NOT EXECUTED
/* * buffer was empty */ if (tty->rawOutBufState == rob_wait) {
27a0: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 27a4: e3530002 cmp r3, #2 <== NOT EXECUTED
/* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
27a8: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 27ac: 0b0008f3 bleq 4b80 <rtems_semaphore_release> <== NOT EXECUTED 27b0: e3a05000 mov r5, #0 <== NOT EXECUTED 27b4: ea00003e b 28b4 <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 (
27b8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 27bc: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 27c0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0;
27c4: e3a02000 mov r2, #0 <== NOT EXECUTED
} return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen;
27c8: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
27cc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
27d0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
27d4: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 27d8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 27dc: e0800003 add r0, r0, r3 <== NOT EXECUTED 27e0: eb004b0e bl 15420 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) {
27e4: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 27e8: 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;
27ec: e1a06000 mov r6, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
27f0: 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);
27f4: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 27f8: 0b0008e0 bleq 4b80 <rtems_semaphore_release> <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) {
27fc: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2800: e1560003 cmp r6, r3 <== NOT EXECUTED 2804: 1a00000a bne 2834 <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) {
2808: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle;
280c: e3a05000 mov r5, #0 <== NOT EXECUTED
nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) {
2810: e3530000 cmp r3, #0 <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle;
2814: 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) {
2818: 01a05003 moveq r5, r3 <== NOT EXECUTED 281c: 0a000023 beq 28b0 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2820: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2824: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2828: e1a0e00f mov lr, pc <== NOT EXECUTED 282c: e12fff13 bx r3 <== NOT EXECUTED 2830: ea00001e b 28b0 <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))
2834: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2838: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 283c: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 2840: 1a00000a bne 2870 <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 (
2844: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2848: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 284c: 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;
2850: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2854: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2858: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
285c: e3a02001 mov r2, #1 <== NOT EXECUTED 2860: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2864: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2868: e3a05000 mov r5, #0 <== NOT EXECUTED 286c: ea00000f b 28b0 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
} else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head)
2870: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2874: e1560003 cmp r6, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
2878: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
287c: 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)) {
2880: 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;
2884: 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)) {
2888: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor,
288c: 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)) {
2890: 13a05001 movne r5, #1 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
2894: e3a03001 mov r3, #1 <== NOT EXECUTED 2898: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
289c: e0811006 add r1, r1, r6 <== NOT EXECUTED 28a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 28a4: e1a02005 mov r2, r5 <== NOT EXECUTED 28a8: e1a0e00f mov lr, pc <== NOT EXECUTED 28ac: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
28b0: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED
} return nToSend; }
28b4: e1a00005 mov r0, r5 <== NOT EXECUTED 28b8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00004100 <rtems_termios_rxdaemon>: /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) {
4100: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 4104: e1a04000 mov r4, r0 <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4108: e3a05000 mov r5, #0 <== NOT EXECUTED
if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
410c: e28d6007 add r6, sp, #7 <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4110: e1a0300d mov r3, sp <== NOT EXECUTED 4114: e3a01002 mov r1, #2 <== NOT EXECUTED 4118: e3a02000 mov r2, #0 <== NOT EXECUTED 411c: e3a00003 mov r0, #3 <== NOT EXECUTED 4120: eb0000e0 bl 44a8 <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) {
4124: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4128: e3130001 tst r3, #1 <== NOT EXECUTED 412c: 0a000003 beq 4140 <rtems_termios_rxdaemon+0x40> <== NOT EXECUTED
tty->rxTaskId = 0;
4130: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
4134: e1a00005 mov r0, r5 <== NOT EXECUTED 4138: eb000309 bl 4d64 <rtems_task_delete> <== NOT EXECUTED 413c: eafffff3 b 4110 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
} else { /* * do something */ c = tty->device.pollRead(tty->minor);
4140: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4144: e1a0e00f mov lr, pc <== NOT EXECUTED 4148: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
414c: e3700001 cmn r0, #1 <== NOT EXECUTED
} else { /* * do something */ c = tty->device.pollRead(tty->minor);
4150: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
4154: 0affffed beq 4110 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
4158: e1a00004 mov r0, r4 <== NOT EXECUTED 415c: e1a01006 mov r1, r6 <== NOT EXECUTED 4160: 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;
4164: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
4168: ebfff9f1 bl 2934 <rtems_termios_enqueue_raw_characters> <== NOT EXECUTED 416c: eaffffe7 b 4110 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
000026d4 <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);
26d4: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 26d8: e3a01002 mov r1, #2 <== NOT EXECUTED 26dc: ea0007cd b 4618 <rtems_event_send> <== NOT EXECUTED
00004094 <rtems_termios_txdaemon>: /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) {
4094: 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) {
4098: e59f705c ldr r7, [pc, #92] ; 40fc <rtems_termios_txdaemon+0x68><== NOT EXECUTED
/* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) {
409c: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT |
40a0: e3a05000 mov r5, #0 <== NOT EXECUTED 40a4: e1a0300d mov r3, sp <== NOT EXECUTED 40a8: e3a01002 mov r1, #2 <== NOT EXECUTED 40ac: e3a02000 mov r2, #0 <== NOT EXECUTED 40b0: e3a00003 mov r0, #3 <== NOT EXECUTED 40b4: eb0000fb bl 44a8 <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) {
40b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 40bc: 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);
40c0: 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) {
40c4: 0a000003 beq 40d8 <rtems_termios_txdaemon+0x44> <== NOT EXECUTED
tty->txTaskId = 0;
40c8: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
40cc: e1a00005 mov r0, r5 <== NOT EXECUTED 40d0: eb000323 bl 4d64 <rtems_task_delete> <== NOT EXECUTED 40d4: eafffff2 b 40a4 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
} else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
40d8: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 40dc: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 40e0: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 40e4: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
40e8: 11a0e00f movne lr, pc <== NOT EXECUTED 40ec: 112fff13 bxne r3 <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
40f0: e1a00004 mov r0, r4 <== NOT EXECUTED 40f4: ebfff979 bl 26e0 <rtems_termios_refill_transmitter> <== NOT EXECUTED 40f8: eaffffe9 b 40a4 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
000032a8 <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;
32a8: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) {
32ac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
32b0: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
32b4: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) {
32b8: 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);
32bc: e1a02001 mov r2, r1 32c0: e5950018 ldr r0, [r5, #24] 32c4: eb0005e7 bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
32c8: e2506000 subs r6, r0, #0
32cc: 1a000022 bne 335c <rtems_termios_write+0xb4> return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
32d0: e59520cc ldr r2, [r5, #204] ; 0xcc 32d4: e59f3088 ldr r3, [pc, #136] ; 3364 <rtems_termios_write+0xbc> 32d8: e0833282 add r3, r3, r2, lsl #5 32dc: e593300c ldr r3, [r3, #12] 32e0: e3530000 cmp r3, #0
32e4: 0a000005 beq 3300 <rtems_termios_write+0x58> sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
32e8: e1a01004 mov r1, r4 <== NOT EXECUTED 32ec: e1a00005 mov r0, r5 <== NOT EXECUTED 32f0: e1a0e00f mov lr, pc <== NOT EXECUTED 32f4: e12fff13 bx r3 <== NOT EXECUTED 32f8: e1a06000 mov r6, r0 <== NOT EXECUTED 32fc: ea000014 b 3354 <rtems_termios_write+0xac> <== NOT EXECUTED
rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) {
3300: e5953034 ldr r3, [r5, #52] ; 0x34 3304: e3130001 tst r3, #1
uint32_t count = args->count;
3308: 15948010 ldrne r8, [r4, #16]
char *buffer = args->buffer;
330c: 1594a00c ldrne sl, [r4, #12] 3310: 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) { 3314: 1a000004 bne 332c <rtems_termios_write+0x84>
3318: ea000007 b 333c <rtems_termios_write+0x94> <== NOT EXECUTED
uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty);
331c: e7da0007 ldrb r0, [sl, r7] 3320: ebfffe7a bl 2d10 <oproc> 3324: e2877001 add r7, r7, #1 3328: e2488001 sub r8, r8, #1
return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--)
332c: e3580000 cmp r8, #0
oproc (*buffer++, tty);
3330: e1a01005 mov r1, r5
return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 3334: 1afffff8 bne 331c <rtems_termios_write+0x74>
3338: ea000003 b 334c <rtems_termios_write+0xa4>
oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty);
333c: e284000c add r0, r4, #12 <== NOT EXECUTED 3340: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3344: e1a02005 mov r2, r5 <== NOT EXECUTED 3348: ebfffe2c bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
334c: e5943010 ldr r3, [r4, #16] 3350: e5843018 str r3, [r4, #24]
} rtems_semaphore_release (tty->osem);
3354: e5950018 ldr r0, [r5, #24] 3358: eb000608 bl 4b80 <rtems_semaphore_release>
return sc; }
335c: e1a00006 mov r0, r6 3360: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00006378 <rtems_verror>: static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) {
6378: 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)
637c: 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 ) {
6380: e1a06000 mov r6, r0 <== NOT EXECUTED 6384: e1a09001 mov r9, r1 <== NOT EXECUTED 6388: e1a04002 mov r4, r2 <== NOT EXECUTED
int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC)
638c: 0a00000d beq 63c8 <rtems_verror+0x50> <== NOT EXECUTED
{ if (rtems_panic_in_progress++)
6390: e59f3160 ldr r3, [pc, #352] ; 64f8 <rtems_verror+0x180> <== NOT EXECUTED 6394: e5932000 ldr r2, [r3] <== NOT EXECUTED 6398: e3520000 cmp r2, #0 <== NOT EXECUTED 639c: e2822001 add r2, r2, #1 <== NOT EXECUTED 63a0: e5832000 str r2, [r3] <== NOT EXECUTED 63a4: 0a000003 beq 63b8 <rtems_verror+0x40> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
63a8: e59f314c ldr r3, [pc, #332] ; 64fc <rtems_verror+0x184> <== NOT EXECUTED 63ac: e5932000 ldr r2, [r3] <== NOT EXECUTED 63b0: e2822001 add r2, r2, #1 <== NOT EXECUTED 63b4: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2)
63b8: e59f3138 ldr r3, [pc, #312] ; 64f8 <rtems_verror+0x180> <== NOT EXECUTED 63bc: e5933000 ldr r3, [r3] <== NOT EXECUTED 63c0: e3530002 cmp r3, #2 <== NOT EXECUTED 63c4: ca000049 bgt 64f0 <rtems_verror+0x178> <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */
63c8: e59f3130 ldr r3, [pc, #304] ; 6500 <rtems_verror+0x188> <== NOT EXECUTED 63cc: e5933000 ldr r3, [r3] <== NOT EXECUTED 63d0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 63d4: eb00304f bl 12518 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
63d8: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK;
63dc: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
63e0: 0a000001 beq 63ec <rtems_verror+0x74> <== NOT EXECUTED
local_errno = errno;
63e4: eb002f58 bl 1214c <__errno> <== NOT EXECUTED 63e8: 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);
63ec: e59fa10c ldr sl, [pc, #268] ; 6500 <rtems_verror+0x188> <== NOT EXECUTED 63f0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 63f4: e1a02004 mov r2, r4 <== NOT EXECUTED 63f8: e1a01009 mov r1, r9 <== NOT EXECUTED 63fc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6400: eb004885 bl 1861c <vfprintf> <== NOT EXECUTED
if (status)
6404: 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);
6408: e1a04000 mov r4, r0 <== NOT EXECUTED
if (status)
640c: 0a000008 beq 6434 <rtems_verror+0xbc> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
6410: e59a3000 ldr r3, [sl] <== NOT EXECUTED 6414: e1a00008 mov r0, r8 <== NOT EXECUTED 6418: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 641c: ebffffd1 bl 6368 <rtems_status_text> <== NOT EXECUTED 6420: e59f10dc ldr r1, [pc, #220] ; 6504 <rtems_verror+0x18c> <== NOT EXECUTED 6424: e1a02000 mov r2, r0 <== NOT EXECUTED 6428: e1a00008 mov r0, r8 <== NOT EXECUTED 642c: eb0030f7 bl 12810 <fprintf> <== NOT EXECUTED 6430: e0844000 add r4, r4, r0 <== NOT EXECUTED
if (local_errno)
6434: e3550000 cmp r5, #0 <== NOT EXECUTED 6438: 0a000015 beq 6494 <rtems_verror+0x11c> <== NOT EXECUTED
{ if ((local_errno > 0) && *strerror(local_errno))
643c: da00000d ble 6478 <rtems_verror+0x100> <== NOT EXECUTED 6440: e1a00005 mov r0, r5 <== NOT EXECUTED 6444: eb003404 bl 1345c <strerror> <== NOT EXECUTED 6448: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 644c: e3530000 cmp r3, #0 <== NOT EXECUTED 6450: 0a000008 beq 6478 <rtems_verror+0x100> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
6454: e59f30a4 ldr r3, [pc, #164] ; 6500 <rtems_verror+0x188> <== NOT EXECUTED 6458: e5933000 ldr r3, [r3] <== NOT EXECUTED 645c: e1a00005 mov r0, r5 <== NOT EXECUTED 6460: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 6464: eb0033fc bl 1345c <strerror> <== NOT EXECUTED 6468: e59f1098 ldr r1, [pc, #152] ; 6508 <rtems_verror+0x190> <== NOT EXECUTED 646c: e1a02000 mov r2, r0 <== NOT EXECUTED 6470: e1a00008 mov r0, r8 <== NOT EXECUTED 6474: ea000004 b 648c <rtems_verror+0x114> <== NOT EXECUTED
else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
6478: e59f3080 ldr r3, [pc, #128] ; 6500 <rtems_verror+0x188> <== NOT EXECUTED 647c: e5933000 ldr r3, [r3] <== NOT EXECUTED 6480: e59f1084 ldr r1, [pc, #132] ; 650c <rtems_verror+0x194> <== NOT EXECUTED 6484: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6488: e1a02005 mov r2, r5 <== NOT EXECUTED 648c: eb0030df bl 12810 <fprintf> <== NOT EXECUTED 6490: e0844000 add r4, r4, r0 <== NOT EXECUTED
} chars_written += fprintf(stderr, "\n");
6494: e59f8064 ldr r8, [pc, #100] ; 6500 <rtems_verror+0x188> <== NOT EXECUTED 6498: e5983000 ldr r3, [r8] <== NOT EXECUTED 649c: e59f106c ldr r1, [pc, #108] ; 6510 <rtems_verror+0x198> <== NOT EXECUTED 64a0: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64a4: eb0030d9 bl 12810 <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
64a8: 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");
64ac: e1a0a000 mov sl, r0 <== NOT EXECUTED
(void) fflush(stderr);
64b0: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64b4: eb003017 bl 12518 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
64b8: 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");
64bc: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED
(void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
64c0: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{ if (error_flag & RTEMS_ERROR_PANIC)
64c4: e3570000 cmp r7, #0 <== NOT EXECUTED 64c8: 0a000004 beq 64e0 <rtems_verror+0x168> <== NOT EXECUTED
{ rtems_error(0, "fatal error, exiting");
64cc: e3a00000 mov r0, #0 <== NOT EXECUTED 64d0: e59f103c ldr r1, [pc, #60] ; 6514 <rtems_verror+0x19c> <== NOT EXECUTED 64d4: eb00001b bl 6548 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
64d8: e1a00005 mov r0, r5 <== NOT EXECUTED 64dc: eb0002cf bl 7020 <_exit> <== NOT EXECUTED
} else { rtems_error(0, "fatal error, aborting");
64e0: e59f1030 ldr r1, [pc, #48] ; 6518 <rtems_verror+0x1a0> <== NOT EXECUTED 64e4: e1a00007 mov r0, r7 <== NOT EXECUTED 64e8: eb000016 bl 6548 <rtems_error> <== NOT EXECUTED
abort();
64ec: eb002f0d bl 12128 <abort> <== NOT EXECUTED 64f0: e3a00000 mov r0, #0 <== NOT EXECUTED
} } return chars_written; }
64f4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
000221bc <scanInt>: /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
221bc: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 221c0: e3a04000 mov r4, #0
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
221c4: e59fb0d4 ldr fp, [pc, #212] ; 222a0 <scanInt+0xe4>
limit++; continue; } sign = 1; } if (!isdigit(c))
221c8: e59f90d4 ldr r9, [pc, #212] ; 222a4 <scanInt+0xe8>
/* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
221cc: e58d1000 str r1, [sp] 221d0: e1a05000 mov r5, r0 221d4: e3e08102 mvn r8, #-2147483648 ; 0x80000000 221d8: e1a07004 mov r7, r4
sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10))
221dc: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
221e0: e5953004 ldr r3, [r5, #4] 221e4: e2433001 sub r3, r3, #1 221e8: e3530000 cmp r3, #0 221ec: e5853004 str r3, [r5, #4] 221f0: a5953000 ldrge r3, [r5] 221f4: a4d36001 ldrbge r6, [r3], #1 221f8: a5853000 strge r3, [r5]
221fc: aa000003 bge 22210 <scanInt+0x54>
22200: e59b0000 ldr r0, [fp] <== NOT EXECUTED 22204: e1a01005 mov r1, r5 <== NOT EXECUTED 22208: eb006d2b bl 3d6bc <__srget_r> <== NOT EXECUTED 2220c: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
22210: e356003a cmp r6, #58 ; 0x3a
22214: 0a000019 beq 22280 <scanInt+0xc4> break; if (sign == 0) {
22218: e3540000 cmp r4, #0
2221c: 1a000004 bne 22234 <scanInt+0x78> if (c == '-') {
22220: e356002d cmp r6, #45 ; 0x2d
sign = -1; limit++;
22224: 02888001 addeq r8, r8, #1 22228: 03e04000 mvneq r4, #0
for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 2222c: 0affffeb beq 221e0 <scanInt+0x24> sign = -1; limit++; continue;
22230: e3a04001 mov r4, #1
} sign = 1; } if (!isdigit(c))
22234: e5993000 ldr r3, [r9] 22238: e0833006 add r3, r3, r6 2223c: e5d33001 ldrb r3, [r3, #1] 22240: e3130004 tst r3, #4
22244: 0a000013 beq 22298 <scanInt+0xdc> return 0; d = c - '0'; if ((i > (limit / 10))
22248: e1a00008 mov r0, r8 2224c: e3a0100a mov r1, #10 22250: eb00b7cc bl 50188 <__aeabi_uidiv> 22254: e1570000 cmp r7, r0
22258: 8a00000e bhi 22298 <scanInt+0xdc> } sign = 1; } if (!isdigit(c)) return 0; d = c - '0';
2225c: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10)) 22260: 1a000004 bne 22278 <scanInt+0xbc>
22264: e1a00008 mov r0, r8 <== NOT EXECUTED 22268: e3a0100a mov r1, #10 <== NOT EXECUTED 2226c: eb00b859 bl 503d8 <__umodsi3> <== NOT EXECUTED 22270: e1560000 cmp r6, r0 <== NOT EXECUTED 22274: 8a000007 bhi 22298 <scanInt+0xdc> <== NOT EXECUTED
|| ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d;
22278: e027679a mla r7, sl, r7, r6 2227c: eaffffd7 b 221e0 <scanInt+0x24>
} if (sign == 0)
22280: e3540000 cmp r4, #0
return 0; *val = i * sign;
22284: 10030497 mulne r3, r7, r4 22288: 159d2000 ldrne r2, [sp] 2228c: 13a00001 movne r0, #1 22290: 15823000 strne r3, [r2]
return 1; 22294: 1a000000 bne 2229c <scanInt+0xe0>
22298: e3a00000 mov r0, #0 <== NOT EXECUTED
}
2229c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000222a8 <scanString>: /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
222a8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 222ac: e1a04002 mov r4, r2
int c; *name = *bufp;
222b0: 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) {
222b4: e59d6018 ldr r6, [sp, #24]
int c; *name = *bufp;
222b8: e5812000 str r2, [r1]
for (;;) { c = getc(fp);
222bc: e59f70c0 ldr r7, [pc, #192] ; 22384 <scanString+0xdc>
/* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
222c0: e1a05000 mov r5, r0 222c4: e1a08003 mov r8, r3
int c; *name = *bufp; for (;;) { c = getc(fp);
222c8: e5953004 ldr r3, [r5, #4] 222cc: e2433001 sub r3, r3, #1 222d0: e3530000 cmp r3, #0 222d4: e5853004 str r3, [r5, #4] 222d8: a5953000 ldrge r3, [r5] 222dc: a4d30001 ldrbge r0, [r3], #1 222e0: a5853000 strge r3, [r5] 222e4: b5970000 ldrlt r0, [r7] 222e8: b1a01005 movlt r1, r5 222ec: bb006cf2 bllt 3d6bc <__srget_r>
if (c == ':') {
222f0: e350003a cmp r0, #58 ; 0x3a
222f4: 1a000002 bne 22304 <scanString+0x5c> if (nlFlag)
222f8: e3560000 cmp r6, #0
222fc: 0a000013 beq 22350 <scanString+0xa8>
22300: ea00001d b 2237c <scanString+0xd4> <== NOT EXECUTED
return 0; break; } if (c == '\n') {
22304: e350000a cmp r0, #10
22308: 1a000002 bne 22318 <scanString+0x70> if (!nlFlag)
2230c: e3560000 cmp r6, #0
22310: 1a00000e bne 22350 <scanString+0xa8>
22314: ea000018 b 2237c <scanString+0xd4> <== NOT EXECUTED
return 0; break; } if (c == EOF)
22318: e3700001 cmn r0, #1
2231c: 0a000016 beq 2237c <scanString+0xd4> return 0; if (*nleft < 2)
22320: e5983000 ldr r3, [r8] 22324: e3530001 cmp r3, #1
22328: 9a000013 bls 2237c <scanString+0xd4> return 0; **bufp = c;
2232c: e5943000 ldr r3, [r4] 22330: e5c30000 strb r0, [r3]
++(*bufp);
22334: e5942000 ldr r2, [r4]
--(*nleft);
22338: e5983000 ldr r3, [r8]
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
2233c: e2822001 add r2, r2, #1
--(*nleft);
22340: e2433001 sub r3, r3, #1
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
22344: e5842000 str r2, [r4]
--(*nleft);
22348: e5883000 str r3, [r8]
}
2234c: eaffffdd b 222c8 <scanString+0x20>
**bufp = '\0';
22350: e5943000 ldr r3, [r4] 22354: e3a02000 mov r2, #0 22358: e5c32000 strb r2, [r3]
++(*bufp);
2235c: e5942000 ldr r2, [r4]
--(*nleft);
22360: e5983000 ldr r3, [r8]
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
22364: e2822001 add r2, r2, #1
--(*nleft);
22368: e2433001 sub r3, r3, #1
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
2236c: e5842000 str r2, [r4]
--(*nleft);
22370: e5883000 str r3, [r8] 22374: e3a00001 mov r0, #1
return 1;
22378: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
2237c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
22380: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00022388 <scangr>: FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
22388: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2238c: e24dd014 sub sp, sp, #20
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
22390: e28d6008 add r6, sp, #8 22394: e28d5004 add r5, sp, #4
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
22398: e58d2008 str r2, [sp, #8] 2239c: e58d3004 str r3, [sp, #4]
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
223a0: e3a08000 mov r8, #0 223a4: e1a02006 mov r2, r6 223a8: e1a03005 mov r3, r5 223ac: e58d8000 str r8, [sp]
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
223b0: e1a07000 mov r7, r0 223b4: e1a04001 mov r4, r1
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
223b8: ebffffba bl 222a8 <scanString> 223bc: e1500008 cmp r0, r8
223c0: 0a00003b beq 224b4 <scangr+0x12c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
223c4: e1a00007 mov r0, r7 223c8: e2841004 add r1, r4, #4 223cc: e1a02006 mov r2, r6 223d0: e1a03005 mov r3, r5 223d4: e58d8000 str r8, [sp] 223d8: ebffffb2 bl 222a8 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
223dc: e1500008 cmp r0, r8
223e0: 0a000033 beq 224b4 <scangr+0x12c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
223e4: e1a00007 mov r0, r7 223e8: e28d1010 add r1, sp, #16 223ec: ebffff72 bl 221bc <scanInt>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
223f0: e1500008 cmp r0, r8
223f4: 0a00002e beq 224b4 <scangr+0x12c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
223f8: e1a03005 mov r3, r5 223fc: e28d100c add r1, sp, #12 22400: e1a00007 mov r0, r7 22404: e1a02006 mov r2, r6 22408: e3a05001 mov r5, #1 2240c: e58d5000 str r5, [sp] 22410: ebffffa4 bl 222a8 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
22414: 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;
22418: 11dd31b0 ldrhne r3, [sp, #16]
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2241c: 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;
22420: 11c430b8 strhne r3, [r4, #8]
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22424: 1a000003 bne 22438 <scangr+0xb0>
22428: ea000021 b 224b4 <scangr+0x12c> <== NOT EXECUTED
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',')
2242c: e352002c cmp r2, #44 ; 0x2c
memcount++;
22430: 02855001 addeq r5, r5, #1 22434: e2888001 add r8, r8, #1
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
22438: e7d12008 ldrb r2, [r1, r8] 2243c: e3520000 cmp r2, #0
22440: 1afffff9 bne 2242c <scangr+0xa4> } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
22444: e1a05105 lsl r5, r5, #2 22448: e59d3004 ldr r3, [sp, #4] 2244c: e2855013 add r5, r5, #19 22450: e1530005 cmp r3, r5
22454: 3a000016 bcc 224b4 <scangr+0x12c> return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
22458: e59d3008 ldr r3, [sp, #8] 2245c: e283300f add r3, r3, #15 22460: e3c3300f bic r3, r3, #15
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
22464: 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);
22468: e584300c str r3, [r4, #12]
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
2246c: e59d300c ldr r3, [sp, #12]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0';
22470: e1a00002 mov r0, r2
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem;
22474: e2833001 add r3, r3, #1 22478: e2822001 add r2, r2, #1
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2247c: ea000005 b 22498 <scangr+0x110>
if(*cp == ',') {
22480: e351002c cmp r1, #44 ; 0x2c
*cp = '\0';
22484: 05430001 strbeq r0, [r3, #-1]
grp->gr_mem[memcount++] = cp + 1;
22488: 0594100c ldreq r1, [r4, #12] 2248c: 07813102 streq r3, [r1, r2, lsl #2] 22490: 02822001 addeq r2, r2, #1 22494: e2833001 add r3, r3, #1
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
22498: e5531001 ldrb r1, [r3, #-1] 2249c: e3510000 cmp r1, #0
224a0: 1afffff6 bne 22480 <scangr+0xf8> if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
224a4: e594300c ldr r3, [r4, #12] 224a8: e3a00001 mov r0, #1 224ac: e7831102 str r1, [r3, r2, lsl #2]
return 1;
224b0: ea000000 b 224b8 <scangr+0x130>
224b4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
224b8: e28dd014 add sp, sp, #20 224bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000224fc <scanpw>: FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
224fc: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22500: e24dd014 sub sp, sp, #20
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
22504: e28d7008 add r7, sp, #8 22508: e28d6004 add r6, sp, #4
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
2250c: e58d2008 str r2, [sp, #8] 22510: e58d3004 str r3, [sp, #4]
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
22514: e3a08000 mov r8, #0 22518: e1a02007 mov r2, r7 2251c: e1a03006 mov r3, r6 22520: e58d8000 str r8, [sp]
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
22524: e1a05000 mov r5, r0 22528: e1a04001 mov r4, r1
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2252c: ebffff5d bl 222a8 <scanString> 22530: e1500008 cmp r0, r8
22534: 0a000038 beq 2261c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
22538: e1a00005 mov r0, r5 2253c: e2841004 add r1, r4, #4 22540: e1a02007 mov r2, r7 22544: e1a03006 mov r3, r6 22548: e58d8000 str r8, [sp] 2254c: ebffff55 bl 222a8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
22550: e1500008 cmp r0, r8
22554: 0a000030 beq 2261c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
22558: e1a00005 mov r0, r5 2255c: e28d1010 add r1, sp, #16 22560: ebffff15 bl 221bc <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
22564: e1500008 cmp r0, r8
22568: 0a00002b beq 2261c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
2256c: e1a00005 mov r0, r5 22570: e28d100c add r1, sp, #12 22574: ebffff10 bl 221bc <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
22578: e1500008 cmp r0, r8
2257c: 0a000026 beq 2261c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
22580: e1a00005 mov r0, r5 22584: e284100c add r1, r4, #12 22588: e1a02007 mov r2, r7 2258c: e1a03006 mov r3, r6 22590: e58d8000 str r8, [sp] 22594: ebffff43 bl 222a8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
22598: e1500008 cmp r0, r8
2259c: 0a00001e beq 2261c <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)
225a0: e1a00005 mov r0, r5 225a4: e2841010 add r1, r4, #16 225a8: e1a02007 mov r2, r7 225ac: e1a03006 mov r3, r6 225b0: e58d8000 str r8, [sp] 225b4: ebffff3b bl 222a8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
225b8: e1500008 cmp r0, r8
225bc: 0a000016 beq 2261c <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)
225c0: e1a00005 mov r0, r5 225c4: e2841014 add r1, r4, #20 225c8: e1a02007 mov r2, r7 225cc: e1a03006 mov r3, r6 225d0: e58d8000 str r8, [sp] 225d4: ebffff33 bl 222a8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
225d8: e1500008 cmp r0, r8
225dc: 0a00000e beq 2261c <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))
225e0: e1a00005 mov r0, r5 225e4: e1a02007 mov r2, r7 225e8: e1a03006 mov r3, r6 225ec: e3a05001 mov r5, #1 225f0: e2841018 add r1, r4, #24 225f4: e58d5000 str r5, [sp] 225f8: ebffff2a bl 222a8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
225fc: e1500008 cmp r0, r8
22600: 0a000005 beq 2261c <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;
22604: e1dd30bc ldrh r3, [sp, #12] 22608: 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;
2260c: e1dd31b0 ldrh r3, [sp, #16]
pwd->pw_gid = pwgid;
22610: 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;
22614: e1c430b8 strh r3, [r4, #8]
pwd->pw_gid = pwgid; return 1;
22618: ea000000 b 22620 <scanpw+0x124>
2261c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
22620: e28dd014 add sp, sp, #20 22624: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00022174 <setgid>: int setgid( gid_t gid ) { _POSIX_types_Gid = gid;
22174: e59f300c ldr r3, [pc, #12] ; 22188 <setgid+0x14> <== NOT EXECUTED 22178: e5933000 ldr r3, [r3] <== NOT EXECUTED 2217c: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED
return 0; }
22180: e3a00000 mov r0, #0 <== NOT EXECUTED 22184: e12fff1e bx lr <== NOT EXECUTED
0002272c <setgrent>: return NULL; return &grent; } void setgrent(void) {
2272c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
22730: ebffffcb bl 22664 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
22734: e59f3020 ldr r3, [pc, #32] ; 2275c <setgrent+0x30> <== NOT EXECUTED 22738: e5930000 ldr r0, [r3] <== NOT EXECUTED 2273c: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(group_fp);
22740: 1b00572b blne 383f4 <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
22744: e59f0014 ldr r0, [pc, #20] ; 22760 <setgrent+0x34> <== NOT EXECUTED 22748: e59f1014 ldr r1, [pc, #20] ; 22764 <setgrent+0x38> <== NOT EXECUTED 2274c: eb00594b bl 38c80 <fopen> <== NOT EXECUTED 22750: e59f3004 ldr r3, [pc, #4] ; 2275c <setgrent+0x30> <== NOT EXECUTED 22754: e5830000 str r0, [r3] <== NOT EXECUTED
}
22758: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000228fc <setpwent>: return NULL; return &pwent; } void setpwent(void) {
228fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
22900: ebffff57 bl 22664 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
22904: e59f3020 ldr r3, [pc, #32] ; 2292c <setpwent+0x30> <== NOT EXECUTED 22908: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 2290c: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(passwd_fp);
22910: 1b0056b7 blne 383f4 <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
22914: e59f0014 ldr r0, [pc, #20] ; 22930 <setpwent+0x34> <== NOT EXECUTED 22918: e59f1014 ldr r1, [pc, #20] ; 22934 <setpwent+0x38> <== NOT EXECUTED 2291c: eb0058d7 bl 38c80 <fopen> <== NOT EXECUTED 22920: e59f3004 ldr r3, [pc, #4] ; 2292c <setpwent+0x30> <== NOT EXECUTED 22924: e5830004 str r0, [r3, #4] <== NOT EXECUTED
}
22928: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00004960 <setuid>: int setuid( uid_t uid ) { _POSIX_types_Uid = uid;
4960: e59f300c ldr r3, [pc, #12] ; 4974 <setuid+0x14> <== NOT EXECUTED 4964: e5933000 ldr r3, [r3] <== NOT EXECUTED 4968: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED
return 0; }
496c: e3a00000 mov r0, #0 <== NOT EXECUTED 4970: e12fff1e bx lr <== NOT EXECUTED
00003248 <siproc>: int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
3248: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 324c: e59f3050 ldr r3, [pc, #80] ; 32a4 <siproc+0x5c> <== NOT EXECUTED 3250: e0023003 and r3, r2, r3 <== NOT EXECUTED 3254: e3530000 cmp r3, #0 <== NOT EXECUTED
/* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) {
3258: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 325c: e1a04001 mov r4, r1 <== NOT EXECUTED 3260: 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)) {
3264: 0a00000b beq 3298 <siproc+0x50> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3268: e3a01000 mov r1, #0 <== NOT EXECUTED 326c: e1a02001 mov r2, r1 <== NOT EXECUTED 3270: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 3274: eb0005fb bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
3278: e1a01004 mov r1, r4 <== NOT EXECUTED 327c: e1a00005 mov r0, r5 <== NOT EXECUTED 3280: ebffff8b bl 30b4 <iproc> <== NOT EXECUTED 3284: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
3288: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 328c: eb00063b bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
} else { i = iproc (c, tty); } return i; }
3290: e1a00005 mov r0, r5 <== NOT EXECUTED 3294: 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);
3298: e1a00005 mov r0, r5 <== NOT EXECUTED
} return i; }
329c: 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);
32a0: eaffff83 b 30b4 <iproc> <== NOT EXECUTED
00005ba8 <stat>: int _STAT_NAME( const char *path, struct stat *buf ) {
5ba8: e92d4070 push {r4, r5, r6, lr}
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
5bac: e2515000 subs r5, r1, #0
int _STAT_NAME( const char *path, struct stat *buf ) {
5bb0: e24dd018 sub sp, sp, #24 5bb4: e1a06000 mov r6, r0
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) 5bb8: 1a000002 bne 5bc8 <stat+0x20> rtems_set_errno_and_return_minus_one( EFAULT );
5bbc: eb00c9bf bl 382c0 <__errno> 5bc0: e3a0300e mov r3, #14 5bc4: ea000018 b 5c2c <stat+0x84>
status = rtems_filesystem_evaluate_path( path, strlen( path ),
5bc8: eb00e436 bl 3eca8 <strlen> 5bcc: e28d4004 add r4, sp, #4 5bd0: e1a01000 mov r1, r0 5bd4: e3a0c001 mov ip, #1 5bd8: e1a00006 mov r0, r6 5bdc: e3a02000 mov r2, #0 5be0: e1a03004 mov r3, r4 5be4: e58dc000 str ip, [sp] 5be8: ebfffae1 bl 4774 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
5bec: e2501000 subs r1, r0, #0
5bf0: 1a00000e bne 5c30 <stat+0x88> return -1; if ( !loc.handlers->fstat_h ){
5bf4: e59d300c ldr r3, [sp, #12] 5bf8: e5933018 ldr r3, [r3, #24] 5bfc: e3530000 cmp r3, #0
5c00: 1a00000c bne 5c38 <stat+0x90> rtems_filesystem_freenode( &loc );
5c04: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 5c08: e3530000 cmp r3, #0 <== NOT EXECUTED 5c0c: 0a000004 beq 5c24 <stat+0x7c> <== NOT EXECUTED 5c10: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5c14: e3530000 cmp r3, #0 <== NOT EXECUTED 5c18: 11a00004 movne r0, r4 <== NOT EXECUTED 5c1c: 11a0e00f movne lr, pc <== NOT EXECUTED 5c20: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
5c24: eb00c9a5 bl 382c0 <__errno> <== NOT EXECUTED 5c28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5c2c: e5803000 str r3, [r0] 5c30: e3e05000 mvn r5, #0 5c34: ea000010 b 5c7c <stat+0xd4>
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
5c38: e3a02048 mov r2, #72 ; 0x48 5c3c: e1a00005 mov r0, r5 5c40: eb00d656 bl 3b5a0 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
5c44: e1a01005 mov r1, r5 5c48: e59d300c ldr r3, [sp, #12] 5c4c: e1a00004 mov r0, r4 5c50: e1a0e00f mov lr, pc 5c54: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
5c58: e59d3010 ldr r3, [sp, #16] 5c5c: e3530000 cmp r3, #0
* versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf );
5c60: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 5c64: 0a000004 beq 5c7c <stat+0xd4>
5c68: e593301c ldr r3, [r3, #28] 5c6c: e3530000 cmp r3, #0 5c70: 11a00004 movne r0, r4 5c74: 11a0e00f movne lr, pc 5c78: 112fff13 bxne r3
return status; }
5c7c: e1a00005 mov r0, r5 5c80: e28dd018 add sp, sp, #24 5c84: e8bd8070 pop {r4, r5, r6, pc}
00023808 <statvfs>: */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) {
23808: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 2380c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 23810: e1a05001 mov r5, r1 <== NOT EXECUTED 23814: e1a06000 mov r6, r0 <== NOT EXECUTED
* 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 ) )
23818: eb006d22 bl 3eca8 <strlen> <== NOT EXECUTED 2381c: e28d4004 add r4, sp, #4 <== NOT EXECUTED 23820: e1a01000 mov r1, r0 <== NOT EXECUTED 23824: e3a0c001 mov ip, #1 <== NOT EXECUTED 23828: e1a00006 mov r0, r6 <== NOT EXECUTED 2382c: e3a02000 mov r2, #0 <== NOT EXECUTED 23830: e1a03004 mov r3, r4 <== NOT EXECUTED 23834: e58dc000 str ip, [sp] <== NOT EXECUTED 23838: ebff83cd bl 4774 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 2383c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 23840: 1a000007 bne 23864 <statvfs+0x5c> <== NOT EXECUTED
return -1; mt_entry = loc.mt_entry;
23844: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
23848: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 2384c: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED 23850: e3530000 cmp r3, #0 <== NOT EXECUTED 23854: 1a000004 bne 2386c <statvfs+0x64> <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
23858: eb005298 bl 382c0 <__errno> <== NOT EXECUTED 2385c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23860: e5803000 str r3, [r0] <== NOT EXECUTED 23864: e3e05000 mvn r5, #0 <== NOT EXECUTED 23868: ea000010 b 238b0 <statvfs+0xa8> <== NOT EXECUTED
memset (sb, 0, sizeof (struct statvfs));
2386c: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 23870: e1a00005 mov r0, r5 <== NOT EXECUTED 23874: eb005f49 bl 3b5a0 <memset> <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
23878: e1a01005 mov r1, r5 <== NOT EXECUTED 2387c: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 23880: e286001c add r0, r6, #28 <== NOT EXECUTED 23884: e1a0e00f mov lr, pc <== NOT EXECUTED 23888: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2388c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23890: e3530000 cmp r3, #0 <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
23894: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
23898: 0a000004 beq 238b0 <statvfs+0xa8> <== NOT EXECUTED 2389c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 238a0: e3530000 cmp r3, #0 <== NOT EXECUTED 238a4: 11a00004 movne r0, r4 <== NOT EXECUTED 238a8: 11a0e00f movne lr, pc <== NOT EXECUTED 238ac: 112fff13 bxne r3 <== NOT EXECUTED
return result; }
238b0: e1a00005 mov r0, r5 <== NOT EXECUTED 238b4: e28dd018 add sp, sp, #24 <== NOT EXECUTED 238b8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000238bc <symlink>: int symlink( const char *actualpath, const char *sympath ) {
238bc: e92d4070 push {r4, r5, r6, lr}
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
238c0: e5d13000 ldrb r3, [r1] 238c4: e353002f cmp r3, #47 ; 0x2f 238c8: 1353005c cmpne r3, #92 ; 0x5c
int symlink( const char *actualpath, const char *sympath ) {
238cc: e24dd018 sub sp, sp, #24 238d0: e1a05001 mov r5, r1
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
238d4: 13a06000 movne r6, #0 238d8: 03a06001 moveq r6, #1
int symlink( const char *actualpath, const char *sympath ) {
238dc: e1a04000 mov r4, r0
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 238e0: 0a000001 beq 238ec <symlink+0x30>
238e4: e3530000 cmp r3, #0
238e8: 1a000009 bne 23914 <symlink+0x58>
238ec: e59f30f0 ldr r3, [pc, #240] ; 239e4 <symlink+0x128> 238f0: e593e000 ldr lr, [r3] 238f4: e28ee018 add lr, lr, #24 238f8: e8be000f ldm lr!, {r0, r1, r2, r3} 238fc: e1a0c00d mov ip, sp 23900: e8ac000f stmia ip!, {r0, r1, r2, r3} 23904: e59e3000 ldr r3, [lr] 23908: e3a00001 mov r0, #1 2390c: e58c3000 str r3, [ip] 23910: ea000008 b 23938 <symlink+0x7c> 23914: e59f30c8 ldr r3, [pc, #200] ; 239e4 <symlink+0x128> 23918: e593e000 ldr lr, [r3] 2391c: e28ee004 add lr, lr, #4 23920: e8be000f ldm lr!, {r0, r1, r2, r3} 23924: e1a0c00d mov ip, sp 23928: e8ac000f stmia ip!, {r0, r1, r2, r3} 2392c: e59e3000 ldr r3, [lr] 23930: e58c3000 str r3, [ip] 23934: e1a00006 mov r0, r6
if ( !loc.ops->evalformake_h ) {
23938: e59d300c ldr r3, [sp, #12] 2393c: e5933004 ldr r3, [r3, #4] 23940: e3530000 cmp r3, #0
23944: 0a000010 beq 2398c <symlink+0xd0> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
23948: e0850000 add r0, r5, r0 2394c: e1a0100d mov r1, sp 23950: e28d2014 add r2, sp, #20 23954: e1a0e00f mov lr, pc 23958: e12fff13 bx r3
if ( result != 0 )
2395c: e3500000 cmp r0, #0
if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
23960: e1a0600d mov r6, sp
if ( result != 0 ) 23964: 1a00000b bne 23998 <symlink+0xdc> return -1; if ( !loc.ops->symlink_h ) {
23968: e59d200c ldr r2, [sp, #12] 2396c: e5923038 ldr r3, [r2, #56] ; 0x38 23970: e3530000 cmp r3, #0
23974: 1a000009 bne 239a0 <symlink+0xe4> rtems_filesystem_freenode( &loc );
23978: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2397c: e3530000 cmp r3, #0 <== NOT EXECUTED 23980: 11a0000d movne r0, sp <== NOT EXECUTED 23984: 11a0e00f movne lr, pc <== NOT EXECUTED 23988: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2398c: eb00524b bl 382c0 <__errno> <== NOT EXECUTED 23990: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23994: e5803000 str r3, [r0] <== NOT EXECUTED
23998: e3e04000 mvn r4, #0 2399c: ea00000d b 239d8 <symlink+0x11c>
} result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
239a0: e1a01004 mov r1, r4 239a4: e1a0000d mov r0, sp 239a8: e59d2014 ldr r2, [sp, #20] 239ac: e1a0e00f mov lr, pc 239b0: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
239b4: e59d300c ldr r3, [sp, #12] 239b8: 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);
239bc: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc ); 239c0: 0a000004 beq 239d8 <symlink+0x11c>
239c4: e593301c ldr r3, [r3, #28] 239c8: e3530000 cmp r3, #0 239cc: 11a0000d movne r0, sp 239d0: 11a0e00f movne lr, pc 239d4: 112fff13 bxne r3
return result; }
239d8: e1a00004 mov r0, r4 239dc: e28dd018 add sp, sp, #24 239e0: e8bd8070 pop {r4, r5, r6, pc}
0000fb70 <tcsetattr>: int fd, int opt, struct termios *tp ) { switch (opt) {
fb70: e3510000 cmp r1, #0
int tcsetattr( int fd, int opt, struct termios *tp ) {
fb74: e92d4030 push {r4, r5, lr} fb78: e1a04002 mov r4, r2 fb7c: e1a05000 mov r5, r0
switch (opt) { fb80: 0a00000a beq fbb0 <tcsetattr+0x40>
fb84: e3510001 cmp r1, #1 <== NOT EXECUTED fb88: 0a000003 beq fb9c <tcsetattr+0x2c> <== NOT EXECUTED
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
fb8c: eb000ec7 bl 136b0 <__errno> <== NOT EXECUTED fb90: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED fb94: e5803000 str r3, [r0] <== NOT EXECUTED fb98: ea000009 b fbc4 <tcsetattr+0x54> <== NOT EXECUTED
case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
fb9c: e3a01003 mov r1, #3 <== NOT EXECUTED fba0: e3a02000 mov r2, #0 <== NOT EXECUTED fba4: eb000b7d bl 129a0 <ioctl> <== NOT EXECUTED fba8: e3500000 cmp r0, #0 <== NOT EXECUTED fbac: ba000004 blt fbc4 <tcsetattr+0x54> <== NOT EXECUTED
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
fbb0: e1a00005 mov r0, r5 fbb4: e1a02004 mov r2, r4 fbb8: e3a01002 mov r1, #2
} }
fbbc: e8bd4030 pop {r4, r5, lr}
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
fbc0: ea000b76 b 129a0 <ioctl>
} }
fbc4: e3e00000 mvn r0, #0 <== NOT EXECUTED fbc8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000b8b4 <unlink>: #include <rtems/seterr.h> int unlink( const char *path ) {
b8b4: e92d4070 push {r4, r5, r6, lr} b8b8: e24dd02c sub sp, sp, #44 ; 0x2c b8bc: e1a06000 mov r6, r0
/* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path );
b8c0: ebffd7a5 bl 175c <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
b8c4: e2505000 subs r5, r0, #0
b8c8: 1a000019 bne b934 <unlink+0x80> rtems_filesystem_get_start_loc( path, &i, &parentloc );
b8cc: e5d63000 ldrb r3, [r6] b8d0: e353002f cmp r3, #47 ; 0x2f b8d4: 1353005c cmpne r3, #92 ; 0x5c
b8d8: 0a000001 beq b8e4 <unlink+0x30>
b8dc: e3530000 cmp r3, #0
b8e0: 1a000009 bne b90c <unlink+0x58>
b8e4: e59f3248 ldr r3, [pc, #584] ; bb34 <unlink+0x280> b8e8: e593e000 ldr lr, [r3] b8ec: e28ee018 add lr, lr, #24 b8f0: e8be000f ldm lr!, {r0, r1, r2, r3} b8f4: e28dc018 add ip, sp, #24 b8f8: e8ac000f stmia ip!, {r0, r1, r2, r3} b8fc: e59e3000 ldr r3, [lr] b900: e3a04000 mov r4, #0 b904: e58c3000 str r3, [ip] b908: ea000013 b b95c <unlink+0xa8> b90c: e59f3220 ldr r3, [pc, #544] ; bb34 <unlink+0x280> b910: e593e000 ldr lr, [r3] b914: e28ee004 add lr, lr, #4 b918: e8be000f ldm lr!, {r0, r1, r2, r3} b91c: e28dc018 add ip, sp, #24 b920: e8ac000f stmia ip!, {r0, r1, r2, r3} b924: e59e3000 ldr r3, [lr] b928: e1a04005 mov r4, r5 b92c: e58c3000 str r3, [ip] b930: ea000009 b b95c <unlink+0xa8>
else { result = rtems_filesystem_evaluate_path( path, parentpathlen,
b934: e3a0c000 mov ip, #0 b938: e1a00006 mov r0, r6 b93c: e1a01005 mov r1, r5 b940: e3a02002 mov r2, #2 b944: e28d3018 add r3, sp, #24 b948: e58dc000 str ip, [sp] b94c: ebffd7ca bl 187c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
b950: e3500000 cmp r0, #0
b954: 1a000072 bne bb24 <unlink+0x270>
b958: e3a04001 mov r4, #1
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
b95c: e28de018 add lr, sp, #24 b960: e8be000f ldm lr!, {r0, r1, r2, r3} b964: e28dc004 add ip, sp, #4 b968: e8ac000f stmia ip!, {r0, r1, r2, r3} b96c: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
b970: e0865005 add r5, r6, r5
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
b974: e58c3000 str r3, [ip]
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
b978: e1a00005 mov r0, r5 b97c: eb000481 bl cb88 <strlen> b980: e1a01000 mov r1, r0 b984: e1a00005 mov r0, r5 b988: ebffd767 bl 172c <rtems_filesystem_prefix_separators> b98c: e0856000 add r6, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
b990: e1a00006 mov r0, r6 b994: eb00047b bl cb88 <strlen> b998: e28d5004 add r5, sp, #4 b99c: e3a0c000 mov ip, #0 b9a0: e1a01000 mov r1, r0 b9a4: e1a0200c mov r2, ip b9a8: e1a00006 mov r0, r6 b9ac: e1a03005 mov r3, r5 b9b0: e58dc000 str ip, [sp] b9b4: ebffd778 bl 179c <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
b9b8: e3500000 cmp r0, #0
b9bc: 0a00000b beq b9f0 <unlink+0x13c> if ( free_parentloc )
b9c0: e3540000 cmp r4, #0
b9c4: 0a000056 beq bb24 <unlink+0x270> rtems_filesystem_freenode( &parentloc );
b9c8: e59d3024 ldr r3, [sp, #36] ; 0x24 b9cc: e3530000 cmp r3, #0
b9d0: 0a000053 beq bb24 <unlink+0x270>
b9d4: e593301c ldr r3, [r3, #28] b9d8: e3530000 cmp r3, #0
b9dc: 0a000050 beq bb24 <unlink+0x270>
b9e0: e28d0018 add r0, sp, #24 b9e4: e1a0e00f mov lr, pc b9e8: e12fff13 bx r3 b9ec: ea00004c b bb24 <unlink+0x270>
return -1; } if ( !loc.ops->node_type_h ) {
b9f0: e59d2010 ldr r2, [sp, #16] b9f4: e5923010 ldr r3, [r2, #16] b9f8: e3530000 cmp r3, #0
b9fc: 0a00001c beq ba74 <unlink+0x1c0> 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 ) {
ba00: e1a00005 mov r0, r5 ba04: e1a0e00f mov lr, pc ba08: e12fff13 bx r3 ba0c: e3500001 cmp r0, #1 ba10: e59d2010 ldr r2, [sp, #16]
ba14: 1a000013 bne ba68 <unlink+0x1b4> rtems_filesystem_freenode( &loc );
ba18: e3520000 cmp r2, #0
ba1c: 0a000004 beq ba34 <unlink+0x180>
ba20: e592301c ldr r3, [r2, #28] ba24: e3530000 cmp r3, #0 ba28: 11a00005 movne r0, r5 ba2c: 11a0e00f movne lr, pc ba30: 112fff13 bxne r3
if ( free_parentloc )
ba34: e3540000 cmp r4, #0
ba38: 0a000007 beq ba5c <unlink+0x1a8> rtems_filesystem_freenode( &parentloc );
ba3c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED ba40: e3530000 cmp r3, #0 <== NOT EXECUTED ba44: 0a000004 beq ba5c <unlink+0x1a8> <== NOT EXECUTED ba48: e593301c ldr r3, [r3, #28] <== NOT EXECUTED ba4c: e3530000 cmp r3, #0 <== NOT EXECUTED ba50: 128d0018 addne r0, sp, #24 <== NOT EXECUTED ba54: 11a0e00f movne lr, pc <== NOT EXECUTED ba58: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
ba5c: eb000058 bl bbc4 <__errno> ba60: e3a03015 mov r3, #21 ba64: ea000013 b bab8 <unlink+0x204>
} if ( !loc.ops->unlink_h ) {
ba68: e592300c ldr r3, [r2, #12] ba6c: e3530000 cmp r3, #0
ba70: 1a000012 bne bac0 <unlink+0x20c> rtems_filesystem_freenode( &loc );
ba74: e592301c ldr r3, [r2, #28] <== NOT EXECUTED ba78: e3530000 cmp r3, #0 <== NOT EXECUTED ba7c: 11a00005 movne r0, r5 <== NOT EXECUTED ba80: 11a0e00f movne lr, pc <== NOT EXECUTED ba84: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
ba88: e3540000 cmp r4, #0 <== NOT EXECUTED ba8c: 0a000007 beq bab0 <unlink+0x1fc> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
ba90: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED ba94: e3530000 cmp r3, #0 <== NOT EXECUTED ba98: 0a000004 beq bab0 <unlink+0x1fc> <== NOT EXECUTED ba9c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED baa0: e3530000 cmp r3, #0 <== NOT EXECUTED baa4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED baa8: 11a0e00f movne lr, pc <== NOT EXECUTED baac: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
bab0: eb000043 bl bbc4 <__errno> <== NOT EXECUTED bab4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
bab8: e5803000 str r3, [r0] babc: ea000018 b bb24 <unlink+0x270>
} result = (*loc.ops->unlink_h)( &parentloc, &loc );
bac0: e28d0018 add r0, sp, #24 bac4: e1a01005 mov r1, r5 bac8: e1a0e00f mov lr, pc bacc: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
bad0: e59d3010 ldr r3, [sp, #16] bad4: 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 );
bad8: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc ); badc: 0a000004 beq baf4 <unlink+0x240>
bae0: e593301c ldr r3, [r3, #28] bae4: e3530000 cmp r3, #0 bae8: 11a00005 movne r0, r5 baec: 11a0e00f movne lr, pc baf0: 112fff13 bxne r3
if ( free_parentloc )
baf4: e3540000 cmp r4, #0
baf8: 0a00000a beq bb28 <unlink+0x274> rtems_filesystem_freenode( &parentloc );
bafc: e59d3024 ldr r3, [sp, #36] ; 0x24 bb00: e3530000 cmp r3, #0
bb04: 0a000007 beq bb28 <unlink+0x274>
bb08: e593301c ldr r3, [r3, #28] bb0c: e3530000 cmp r3, #0
bb10: 0a000004 beq bb28 <unlink+0x274>
bb14: e28d0018 add r0, sp, #24 bb18: e1a0e00f mov lr, pc bb1c: e12fff13 bx r3 bb20: ea000000 b bb28 <unlink+0x274> bb24: e3e06000 mvn r6, #0
return result; }
bb28: e1a00006 mov r0, r6 bb2c: e28dd02c add sp, sp, #44 ; 0x2c bb30: e8bd8070 pop {r4, r5, r6, pc}
00023acc <unmount>: */ int unmount( const char *path ) {
23acc: e92d4030 push {r4, r5, lr} 23ad0: e24dd018 sub sp, sp, #24 23ad4: 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 ) )
23ad8: eb006c72 bl 3eca8 <strlen> 23adc: e28d4004 add r4, sp, #4 23ae0: e1a01000 mov r1, r0 23ae4: e3a0c001 mov ip, #1 23ae8: e1a00005 mov r0, r5 23aec: e3a02000 mov r2, #0 23af0: e1a03004 mov r3, r4 23af4: e58dc000 str ip, [sp] 23af8: ebff831d bl 4774 <rtems_filesystem_evaluate_path> 23afc: e3500000 cmp r0, #0
23b00: 1a000057 bne 23c64 <unmount+0x198> return -1; mt_entry = loc.mt_entry;
23b04: e59d5014 ldr r5, [sp, #20]
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
23b08: e59d3004 ldr r3, [sp, #4] 23b0c: e595201c ldr r2, [r5, #28] 23b10: e1520003 cmp r2, r3 23b14: e59d3010 ldr r3, [sp, #16]
23b18: 0a000009 beq 23b44 <unmount+0x78> /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc );
23b1c: e3530000 cmp r3, #0
23b20: 0a000004 beq 23b38 <unmount+0x6c>
23b24: e593301c ldr r3, [r3, #28] 23b28: e3530000 cmp r3, #0 23b2c: 11a00004 movne r0, r4 23b30: 11a0e00f movne lr, pc 23b34: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
23b38: eb0051e0 bl 382c0 <__errno> 23b3c: e3a0300d mov r3, #13 23b40: ea000023 b 23bd4 <unmount+0x108>
/* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc );
23b44: e3530000 cmp r3, #0
23b48: 0a000004 beq 23b60 <unmount+0x94>
23b4c: e593301c ldr r3, [r3, #28] 23b50: e3530000 cmp r3, #0 23b54: 11a00004 movne r0, r4 23b58: 11a0e00f movne lr, pc 23b5c: 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;
23b60: e5953014 ldr r3, [r5, #20] 23b64: e5933028 ldr r3, [r3, #40] ; 0x28 23b68: e3530000 cmp r3, #0
23b6c: 0a000003 beq 23b80 <unmount+0xb4> fs_root_loc = &mt_entry->mt_fs_root;
23b70: e5953028 ldr r3, [r5, #40] ; 0x28 23b74: e593302c ldr r3, [r3, #44] ; 0x2c 23b78: e3530000 cmp r3, #0
23b7c: 1a000002 bne 23b8c <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 );
23b80: eb0051ce bl 382c0 <__errno> <== NOT EXECUTED 23b84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23b88: ea000011 b 23bd4 <unmount+0x108> <== NOT EXECUTED
* that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry )
23b8c: e59f30f0 ldr r3, [pc, #240] ; 23c84 <unmount+0x1b8> 23b90: e5933000 ldr r3, [r3] 23b94: e5933014 ldr r3, [r3, #20] 23b98: e1530005 cmp r3, r5
/* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
23b9c: 159f20e4 ldrne r2, [pc, #228] ; 23c88 <unmount+0x1bc> 23ba0: 14923004 ldrne r3, [r2], #4
* 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 ) 23ba4: 1a000005 bne 23bc0 <unmount+0xf4>
23ba8: ea000007 b 23bcc <unmount+0x100>
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; fs_root_loc = &mt_entry->mt_fs_root;
23bac: e5930018 ldr r0, [r3, #24] 23bb0: e595102c ldr r1, [r5, #44] ; 0x2c 23bb4: e1500001 cmp r0, r1
23bb8: 0a000003 beq 23bcc <unmount+0x100> * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) {
23bbc: e5933000 ldr r3, [r3] 23bc0: e1530002 cmp r3, r2
23bc4: 1afffff8 bne 23bac <unmount+0xe0>
23bc8: ea000028 b 23c70 <unmount+0x1a4>
* descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY );
23bcc: eb0051bb bl 382c0 <__errno> 23bd0: e3a03010 mov r3, #16 23bd4: e5803000 str r3, [r0] 23bd8: ea000021 b 23c64 <unmount+0x198>
* 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 )
23bdc: e5953014 ldr r3, [r5, #20] 23be0: e1a00005 mov r0, r5 23be4: e1a0e00f mov lr, pc 23be8: e593f028 ldr pc, [r3, #40] ; 0x28 23bec: e2504000 subs r4, r0, #0
23bf0: 1a00001b bne 23c64 <unmount+0x198> * 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){
23bf4: e5953028 ldr r3, [r5, #40] ; 0x28 23bf8: e1a00005 mov r0, r5 23bfc: e1a0e00f mov lr, pc 23c00: e593f02c ldr pc, [r3, #44] ; 0x2c 23c04: e3500000 cmp r0, #0
23c08: 0a000007 beq 23c2c <unmount+0x160> if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
23c0c: e1a00005 mov r0, r5 <== NOT EXECUTED 23c10: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 23c14: e1a0e00f mov lr, pc <== NOT EXECUTED 23c18: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 23c1c: e3500000 cmp r0, #0 <== NOT EXECUTED 23c20: 0a00000f beq 23c64 <unmount+0x198> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
23c24: e1a00004 mov r0, r4 <== NOT EXECUTED 23c28: ebff93da bl 8b98 <rtems_fatal_error_occurred> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
23c2c: e1a00005 mov r0, r5 23c30: ebff948b bl 8e64 <_Chain_Extract>
/* * 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 );
23c34: e5953014 ldr r3, [r5, #20] 23c38: e3530000 cmp r3, #0
23c3c: 0a000004 beq 23c54 <unmount+0x188>
23c40: e593301c ldr r3, [r3, #28] 23c44: e3530000 cmp r3, #0 23c48: 12850008 addne r0, r5, #8 23c4c: 11a0e00f movne lr, pc 23c50: 112fff13 bxne r3
free( mt_entry );
23c54: e1a00005 mov r0, r5 23c58: ebff82f8 bl 4840 <free> 23c5c: e3a00000 mov r0, #0
return 0;
23c60: ea000000 b 23c68 <unmount+0x19c> 23c64: e3e00000 mvn r0, #0
}
23c68: e28dd018 add sp, sp, #24 23c6c: e8bd8030 pop {r4, r5, pc}
* 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 )
23c70: e1a00005 mov r0, r5 23c74: ebff839f bl 4af8 <rtems_libio_is_open_files_in_fs> 23c78: e3500001 cmp r0, #1
23c7c: 1affffd6 bne 23bdc <unmount+0x110>
23c80: eaffffd1 b 23bcc <unmount+0x100>
00023c8c <utime>: int utime( const char *path, const struct utimbuf *times ) {
23c8c: e92d4070 push {r4, r5, r6, lr} 23c90: e24dd018 sub sp, sp, #24 23c94: e1a05001 mov r5, r1 23c98: 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 ) )
23c9c: eb006c01 bl 3eca8 <strlen> 23ca0: e28d4004 add r4, sp, #4 23ca4: e1a01000 mov r1, r0 23ca8: e3a0c001 mov ip, #1 23cac: e1a00006 mov r0, r6 23cb0: e3a02000 mov r2, #0 23cb4: e1a03004 mov r3, r4 23cb8: e58dc000 str ip, [sp] 23cbc: ebff82ac bl 4774 <rtems_filesystem_evaluate_path> 23cc0: e3500000 cmp r0, #0
23cc4: 1a00000b bne 23cf8 <utime+0x6c> return -1; if ( !temp_loc.ops->utime_h ){
23cc8: e59d2010 ldr r2, [sp, #16] 23ccc: e5923030 ldr r3, [r2, #48] ; 0x30 23cd0: e3530000 cmp r3, #0
23cd4: 1a000009 bne 23d00 <utime+0x74> rtems_filesystem_freenode( &temp_loc );
23cd8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23cdc: e3530000 cmp r3, #0 <== NOT EXECUTED 23ce0: 11a00004 movne r0, r4 <== NOT EXECUTED 23ce4: 11a0e00f movne lr, pc <== NOT EXECUTED 23ce8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
23cec: eb005173 bl 382c0 <__errno> <== NOT EXECUTED 23cf0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23cf4: e5803000 str r3, [r0] <== NOT EXECUTED
23cf8: e3e05000 mvn r5, #0 23cfc: ea00000c b 23d34 <utime+0xa8>
} result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
23d00: e8950006 ldm r5, {r1, r2} 23d04: e1a00004 mov r0, r4 23d08: e1a0e00f mov lr, pc 23d0c: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
23d10: e59d3010 ldr r3, [sp, #16] 23d14: 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 );
23d18: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc ); 23d1c: 0a000004 beq 23d34 <utime+0xa8>
23d20: e593301c ldr r3, [r3, #28] 23d24: e3530000 cmp r3, #0 23d28: 11a00004 movne r0, r4 23d2c: 11a0e00f movne lr, pc 23d30: 112fff13 bxne r3
return result; }
23d34: e1a00005 mov r0, r5 23d38: e28dd018 add sp, sp, #24 23d3c: e8bd8070 pop {r4, r5, r6, pc}
00016fac <write>: ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
16fac: e59f30b0 ldr r3, [pc, #176] ; 17064 <write+0xb8> 16fb0: e5933000 ldr r3, [r3] 16fb4: e1500003 cmp r0, r3
ssize_t write( int fd, const void *buffer, size_t count ) {
16fb8: e92d4070 push {r4, r5, r6, lr} 16fbc: e1a05001 mov r5, r1
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 16fc0: 2a000005 bcs 16fdc <write+0x30> iop = rtems_libio_iop( fd );
16fc4: e59f309c ldr r3, [pc, #156] ; 17068 <write+0xbc> 16fc8: e5934000 ldr r4, [r3] 16fcc: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
16fd0: e5943014 ldr r3, [r4, #20] 16fd4: e3130c01 tst r3, #256 ; 0x100
16fd8: 1a000002 bne 16fe8 <write+0x3c>
16fdc: ebffd2f8 bl bbc4 <__errno> <== NOT EXECUTED 16fe0: e3a03009 mov r3, #9 <== NOT EXECUTED 16fe4: ea00000f b 17028 <write+0x7c> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
16fe8: e3510000 cmp r1, #0
16fec: 0a000004 beq 17004 <write+0x58> rtems_libio_check_count( count );
16ff0: e3520000 cmp r2, #0 16ff4: 01a00002 moveq r0, r2 16ff8: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
16ffc: e3130004 tst r3, #4
17000: 1a000002 bne 17010 <write+0x64>
17004: ebffd2ee bl bbc4 <__errno> <== NOT EXECUTED 17008: e3a03016 mov r3, #22 <== NOT EXECUTED 1700c: ea000005 b 17028 <write+0x7c> <== NOT EXECUTED
/* * Now process the write() request. */ if ( !iop->handlers->write_h )
17010: e594303c ldr r3, [r4, #60] ; 0x3c 17014: e593300c ldr r3, [r3, #12] 17018: e3530000 cmp r3, #0
1701c: 1a000004 bne 17034 <write+0x88> rtems_set_errno_and_return_minus_one( ENOTSUP );
17020: ebffd2e7 bl bbc4 <__errno> <== NOT EXECUTED 17024: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17028: e5803000 str r3, [r0] <== NOT EXECUTED 1702c: e3e00000 mvn r0, #0 <== NOT EXECUTED 17030: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
17034: e1a00004 mov r0, r4 17038: e1a0e00f mov lr, pc 1703c: e12fff13 bx r3
if ( rc > 0 )
17040: e3500000 cmp r0, #0 17044: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
17048: e284600c add r6, r4, #12 1704c: e8960060 ldm r6, {r5, r6} 17050: e0952000 adds r2, r5, r0 17054: e0a63fc0 adc r3, r6, r0, asr #31 17058: e584200c str r2, [r4, #12] 1705c: e5843010 str r3, [r4, #16]
return rc; }
17060: e8bd8070 pop {r4, r5, r6, pc}
00005a94 <writev>: int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd );
5a94: e59f3164 ldr r3, [pc, #356] ; 5c00 <writev+0x16c> 5a98: e5933000 ldr r3, [r3] 5a9c: e1500003 cmp r0, r3
ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) {
5aa0: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5aa4: e1a08002 mov r8, r2
int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5aa8: 2a000005 bcs 5ac4 <writev+0x30> iop = rtems_libio_iop( fd );
5aac: e59f3150 ldr r3, [pc, #336] ; 5c04 <writev+0x170> 5ab0: e5936000 ldr r6, [r3] 5ab4: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
5ab8: e5963014 ldr r3, [r6, #20] 5abc: e3130c01 tst r3, #256 ; 0x100
5ac0: 1a000002 bne 5ad0 <writev+0x3c>
5ac4: eb00215c bl e03c <__errno> 5ac8: e3a03009 mov r3, #9 5acc: ea000025 b 5b68 <writev+0xd4>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5ad0: e3130004 tst r3, #4
5ad4: 0a000021 beq 5b60 <writev+0xcc> /* * Argument validation on IO vector */ if ( !iov )
5ad8: e3510000 cmp r1, #0
5adc: 0a00001f beq 5b60 <writev+0xcc> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
5ae0: e3520000 cmp r2, #0
5ae4: da00001d ble 5b60 <writev+0xcc> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
5ae8: e3520b01 cmp r2, #1024 ; 0x400
5aec: ca00001b bgt 5b60 <writev+0xcc> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h )
5af0: e596303c ldr r3, [r6, #60] ; 0x3c 5af4: e593300c ldr r3, [r3, #12] 5af8: e3530000 cmp r3, #0
5afc: 1a000002 bne 5b0c <writev+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
5b00: eb00214d bl e03c <__errno> <== NOT EXECUTED 5b04: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5b08: ea000016 b 5b68 <writev+0xd4> <== NOT EXECUTED
5b0c: e3a03000 mov r3, #0
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
5b10: e59fc0f0 ldr ip, [pc, #240] ; 5c08 <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 );
5b14: e1a05001 mov r5, r1 5b18: e1a02001 mov r2, r1 5b1c: e3a07001 mov r7, #1 5b20: e1a04003 mov r4, r3
* entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base )
5b24: e5921000 ldr r1, [r2] 5b28: 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++ ) {
5b2c: e2833001 add r3, r3, #1
if ( !iov[v].iov_base ) 5b30: 0a00000a beq 5b60 <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 )
5b34: e5920004 ldr r0, [r2, #4]
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len;
5b38: e0841000 add r1, r4, r0
if ( total < old || total > SSIZE_MAX )
5b3c: e1510004 cmp r1, r4 5b40: a3a04000 movge r4, #0 5b44: b3a04001 movlt r4, #1 5b48: e151000c cmp r1, ip 5b4c: 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 )
5b50: e3500000 cmp r0, #0 5b54: 13a07000 movne r7, #0
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
5b58: e3540000 cmp r4, #0
5b5c: 0a000003 beq 5b70 <writev+0xdc> rtems_set_errno_and_return_minus_one( EINVAL );
5b60: eb002135 bl e03c <__errno> 5b64: e3a03016 mov r3, #22 5b68: e5803000 str r3, [r0] 5b6c: ea000011 b 5bb8 <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++ ) {
5b70: e1530008 cmp r3, r8 5b74: e2822008 add r2, r2, #8 5b78: b1a04001 movlt r4, r1
5b7c: baffffe8 blt 5b24 <writev+0x90> } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) {
5b80: e3570000 cmp r7, #0
5b84: 1a00001b bne 5bf8 <writev+0x164>
5b88: 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 )
5b8c: e5952004 ldr r2, [r5, #4] 5b90: e3520000 cmp r2, #0
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5b94: e2877001 add r7, r7, #1
/* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5b98: 0a000013 beq 5bec <writev+0x158> continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
5b9c: e5951000 ldr r1, [r5] 5ba0: e596303c ldr r3, [r6, #60] ; 0x3c 5ba4: e1a00006 mov r0, r6 5ba8: e1a0e00f mov lr, pc 5bac: e593f00c ldr pc, [r3, #12]
if ( bytes < 0 )
5bb0: e3500000 cmp r0, #0
5bb4: aa000001 bge 5bc0 <writev+0x12c>
5bb8: e3e04000 mvn r4, #0 5bbc: ea00000d b 5bf8 <writev+0x164>
return -1; if ( bytes > 0 ) { 5bc0: 0a000006 beq 5be0 <writev+0x14c> iop->offset += bytes;
5bc4: e286c00c add ip, r6, #12 5bc8: e89c1800 ldm ip, {fp, ip} 5bcc: e09b2000 adds r2, fp, r0 5bd0: e0ac3fc0 adc r3, ip, r0, asr #31 5bd4: e586200c str r2, [r6, #12] 5bd8: e5863010 str r3, [r6, #16]
total += bytes;
5bdc: e0844000 add r4, r4, r0
} if (bytes != iov[ v ].iov_len)
5be0: e5953004 ldr r3, [r5, #4] 5be4: e1500003 cmp r0, r3
5be8: 1a000002 bne 5bf8 <writev+0x164> } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5bec: e1570008 cmp r7, r8 5bf0: e2855008 add r5, r5, #8
5bf4: baffffe4 blt 5b8c <writev+0xf8> if (bytes != iov[ v ].iov_len) break; } return total; }
5bf8: e1a00004 mov r0, r4 5bfc: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}