000089ac <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 ) {
89ac: e5903000 ldr r3, [r0] 89b0: e593304c ldr r3, [r3, #76] ; 0x4c
) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info;
89b4: e5902010 ldr r2, [r0, #16]
switch( node->type ) {
89b8: e2433001 sub r3, r3, #1
) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info;
89bc: e5922034 ldr r2, [r2, #52] ; 0x34
switch( node->type ) {
89c0: e3530006 cmp r3, #6 89c4: 979ff103 ldrls pc, [pc, r3, lsl #2]
89c8: ea000008 b 89f0 <IMFS_Set_handlers+0x44> <== NOT EXECUTED 89cc: 00008a18 .word 0x00008a18 <== NOT EXECUTED 89d0: 00008a28 .word 0x00008a28 <== NOT EXECUTED 89d4: 00008a08 .word 0x00008a08 <== NOT EXECUTED 89d8: 00008a08 .word 0x00008a08 <== NOT EXECUTED 89dc: 000089f8 .word 0x000089f8 <== NOT EXECUTED 89e0: 000089f8 .word 0x000089f8 <== NOT EXECUTED 89e4: 000089e8 .word 0x000089e8 <== NOT EXECUTED
break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers;
89e8: e59f3048 ldr r3, [pc, #72] ; 8a38 <IMFS_Set_handlers+0x8c> 89ec: e5803008 str r3, [r0, #8]
break; } return 0; }
89f0: e3a00000 mov r0, #0 89f4: e12fff1e bx lr
break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers;
89f8: e5923004 ldr r3, [r2, #4] 89fc: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
8a00: e3a00000 mov r0, #0 8a04: e12fff1e bx lr
case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers;
8a08: e59f302c ldr r3, [pc, #44] ; 8a3c <IMFS_Set_handlers+0x90> 8a0c: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
8a10: e3a00000 mov r0, #0 8a14: e12fff1e bx lr
IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers;
8a18: e5923008 ldr r3, [r2, #8] 8a1c: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
8a20: e3a00000 mov r0, #0 8a24: e12fff1e bx lr
switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers;
8a28: e59f3010 ldr r3, [pc, #16] ; 8a40 <IMFS_Set_handlers+0x94> 8a2c: e5803008 str r3, [r0, #8]
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
8a30: e3a00000 mov r0, #0 8a34: e12fff1e bx lr 8a38: 00019dfc .word 0x00019dfc 8a3c: 00019e8c .word 0x00019e8c 8a40: 00019e54 .word 0x00019e54
0000d8c0 <IMFS_chown>: int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) {
d8c0: e92d40f0 push {r4, r5, r6, r7, lr} d8c4: e1a01801 lsl r1, r1, #16 d8c8: e1a02802 lsl r2, r2, #16 d8cc: e24dd008 sub sp, sp, #8
IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access;
d8d0: e5904000 ldr r4, [r0]
int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) {
d8d4: e1a07821 lsr r7, r1, #16 d8d8: e1a06822 lsr r6, r2, #16
/* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid();
d8dc: eb0004a9 bl eb88 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
d8e0: e1d453bc ldrh r5, [r4, #60] ; 0x3c d8e4: e3500000 cmp r0, #0 d8e8: 11550000 cmpne r5, r0 d8ec: 03a05000 moveq r5, #0 d8f0: 13a05001 movne r5, #1
d8f4: 1a000009 bne d920 <IMFS_chown+0x60> rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner;
d8f8: e1c473bc strh r7, [r4, #60] ; 0x3c
jnode->st_gid = group;
d8fc: e1c463be strh r6, [r4, #62] ; 0x3e
IMFS_update_ctime( jnode );
d900: e1a0000d mov r0, sp d904: e1a01005 mov r1, r5 d908: ebffd60d bl 3144 <gettimeofday> d90c: e59d3000 ldr r3, [sp] d910: e5843048 str r3, [r4, #72] ; 0x48 d914: e1a00005 mov r0, r5
return 0; }
d918: e28dd008 add sp, sp, #8 d91c: e8bd80f0 pop {r4, r5, r6, r7, pc}
#if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM );
d920: eb00163e bl 13220 <__errno> <== NOT EXECUTED d924: e3a03001 mov r3, #1 <== NOT EXECUTED d928: e5803000 str r3, [r0] <== NOT EXECUTED d92c: e3e00000 mvn r0, #0 <== NOT EXECUTED d930: eafffff8 b d918 <IMFS_chown+0x58> <== NOT EXECUTED
0000c354 <IMFS_create_node>: IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
c354: 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 )
c358: e2504000 subs r4, r0, #0
IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
c35c: e1a05001 mov r5, r1 c360: e59d6014 ldr r6, [sp, #20] c364: e1a01002 mov r1, r2
IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL )
c368: 01a07004 moveq r7, r4
c36c: 1a000001 bne c378 <IMFS_create_node+0x24> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; }
c370: e1a00007 mov r0, r7 <== NOT EXECUTED c374: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
c378: e59f210c ldr r2, [pc, #268] ; c48c <IMFS_create_node+0x138> c37c: e5922000 ldr r2, [r2] c380: e592202c ldr r2, [r2, #44] ; 0x2c c384: e1a00005 mov r0, r5 c388: e1c32002 bic r2, r3, r2 c38c: ebffffc0 bl c294 <IMFS_allocate_node>
if ( !node )
c390: e2507000 subs r7, r0, #0
c394: 0afffff5 beq c370 <IMFS_create_node+0x1c> return NULL; /* * Set the type specific information */ switch (type) {
c398: e2455001 sub r5, r5, #1 c39c: e3550006 cmp r5, #6 c3a0: 979ff105 ldrls pc, [pc, r5, lsl #2]
c3a4: ea000033 b c478 <IMFS_create_node+0x124> <== NOT EXECUTED c3a8: 0000c45c .word 0x0000c45c <== NOT EXECUTED c3ac: 0000c448 .word 0x0000c448 <== NOT EXECUTED c3b0: 0000c3c4 .word 0x0000c3c4 <== NOT EXECUTED c3b4: 0000c3c4 .word 0x0000c3c4 <== NOT EXECUTED c3b8: 0000c418 .word 0x0000c418 <== NOT EXECUTED c3bc: 0000c400 .word 0x0000c400 <== NOT EXECUTED c3c0: 0000c43c .word 0x0000c43c <== NOT EXECUTED
case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name;
c3c4: e5963000 ldr r3, [r6] c3c8: e5873050 str r3, [r7, #80] ; 0x50
/* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info;
c3cc: e5943010 ldr r3, [r4, #16] c3d0: e5932034 ldr r2, [r3, #52] ; 0x34
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
c3d4: e5923000 ldr r3, [r2]
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
c3d8: e5940000 ldr r0, [r4]
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
c3dc: e2833001 add r3, r3, #1 c3e0: e5823000 str r3, [r2]
* 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;
c3e4: e5870008 str r0, [r7, #8]
node->st_ino = ++fs_info->ino_count;
c3e8: 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 );
c3ec: e2800050 add r0, r0, #80 ; 0x50 c3f0: e1a01007 mov r1, r7 c3f4: ebffe572 bl 59c4 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; }
c3f8: e1a00007 mov r0, r7 c3fc: e8bd80f0 pop {r4, r5, r6, r7, pc}
node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0;
c400: e3a03000 mov r3, #0 <== NOT EXECUTED c404: e3a02000 mov r2, #0 <== NOT EXECUTED c408: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED c40c: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED
node->info.linearfile.direct = 0;
c410: e3a03000 mov r3, #0 <== NOT EXECUTED c414: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED
case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0;
c418: 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;
c41c: e3a01000 mov r1, #0 c420: e3a02000 mov r2, #0 c424: e5871050 str r1, [r7, #80] ; 0x50 c428: e5872054 str r2, [r7, #84] ; 0x54
node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0;
c42c: 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;
c430: e5873058 str r3, [r7, #88] ; 0x58
node->info.file.doubly_indirect = 0;
c434: e587305c str r3, [r7, #92] ; 0x5c
node->info.file.triply_indirect = 0; break;
c438: eaffffe3 b c3cc <IMFS_create_node+0x78>
case IMFS_FIFO: node->info.fifo.pipe = NULL;
c43c: e3a03000 mov r3, #0 c440: e5873050 str r3, [r7, #80] ; 0x50
break;
c444: eaffffe0 b c3cc <IMFS_create_node+0x78>
node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor;
c448: 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;
c44c: e5963000 ldr r3, [r6]
node->info.device.minor = info->device.minor;
c450: e5872054 str r2, [r7, #84] ; 0x54
case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major;
c454: e5873050 str r3, [r7, #80] ; 0x50
node->info.device.minor = info->device.minor; break;
c458: eaffffdb b c3cc <IMFS_create_node+0x78>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
c45c: e2872054 add r2, r7, #84 ; 0x54
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
c460: e2873050 add r3, r7, #80 ; 0x50
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
c464: e5872050 str r2, [r7, #80] ; 0x50
the_chain->permanent_null = NULL;
c468: e3a02000 mov r2, #0 c46c: e5872054 str r2, [r7, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
c470: e5873058 str r3, [r7, #88] ; 0x58 c474: eaffffd4 b c3cc <IMFS_create_node+0x78>
case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0);
c478: e59f0010 ldr r0, [pc, #16] ; c490 <IMFS_create_node+0x13c> <== NOT EXECUTED c47c: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED c480: e59f200c ldr r2, [pc, #12] ; c494 <IMFS_create_node+0x140> <== NOT EXECUTED c484: e59f300c ldr r3, [pc, #12] ; c498 <IMFS_create_node+0x144> <== NOT EXECUTED c488: ebfff516 bl 98e8 <__assert_func> <== NOT EXECUTED
c48c: 00019658 .word 0x00019658 c490: 0001a870 .word 0x0001a870 c494: 0001a158 .word 0x0001a158 c498: 0001a608 .word 0x0001a608
00003524 <IMFS_dump_directory>: rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory );
3524: e3500000 cmp r0, #0
void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) {
3528: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 352c: e1a05001 mov r5, r1
rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3530: 0a000021 beq 35bc <IMFS_dump_directory+0x98> assert( level >= 0 );
3534: e3510000 cmp r1, #0
3538: ba000029 blt 35e4 <IMFS_dump_directory+0xc0> assert( the_directory->type == IMFS_DIRECTORY );
353c: e590304c ldr r3, [r0, #76] ; 0x4c 3540: e3530001 cmp r3, #1
3544: 1a000021 bne 35d0 <IMFS_dump_directory+0xac> the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
3548: e5907050 ldr r7, [r0, #80] ; 0x50
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
354c: e2808054 add r8, r0, #84 ; 0x54 3550: e1570008 cmp r7, r8 3554: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} 3558: e59f6098 ldr r6, [pc, #152] ; 35f8 <IMFS_dump_directory+0xd4>
for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 );
355c: e281a001 add sl, r1, #1
for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node;
3560: e3a04000 mov r4, #0
for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." );
3564: e5963000 ldr r3, [r6]
!rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ )
3568: e2844001 add r4, r4, #1
fprintf(stdout, "...." );
356c: e5933008 ldr r3, [r3, #8] 3570: e59f0084 ldr r0, [pc, #132] ; 35fc <IMFS_dump_directory+0xd8> 3574: e3a01001 mov r1, #1 3578: e3a02004 mov r2, #4 357c: eb00407d bl 13778 <fwrite>
!rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ )
3580: e1550004 cmp r5, r4
3584: aafffff6 bge 3564 <IMFS_dump_directory+0x40> fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode );
3588: e1a00007 mov r0, r7 358c: ebffff7a bl 337c <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
3590: e597304c ldr r3, [r7, #76] ; 0x4c 3594: e3530001 cmp r3, #1
3598: 0a000003 beq 35ac <IMFS_dump_directory+0x88> the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) {
359c: e5977000 ldr r7, [r7]
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
35a0: e1570008 cmp r7, r8
35a4: 1affffed bne 3560 <IMFS_dump_directory+0x3c>
35a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 );
35ac: e1a00007 mov r0, r7 35b0: e1a0100a mov r1, sl 35b4: ebffffda bl 3524 <IMFS_dump_directory> 35b8: eafffff7 b 359c <IMFS_dump_directory+0x78>
rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory );
35bc: e59f003c ldr r0, [pc, #60] ; 3600 <IMFS_dump_directory+0xdc><== NOT EXECUTED 35c0: e3a01084 mov r1, #132 ; 0x84 <== NOT EXECUTED 35c4: e59f2038 ldr r2, [pc, #56] ; 3604 <IMFS_dump_directory+0xe0><== NOT EXECUTED 35c8: e59f3038 ldr r3, [pc, #56] ; 3608 <IMFS_dump_directory+0xe4><== NOT EXECUTED 35cc: eb0001e5 bl 3d68 <__assert_func> <== NOT EXECUTED
assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY );
35d0: e59f0028 ldr r0, [pc, #40] ; 3600 <IMFS_dump_directory+0xdc><== NOT EXECUTED 35d4: e3a01088 mov r1, #136 ; 0x88 <== NOT EXECUTED 35d8: e59f2024 ldr r2, [pc, #36] ; 3604 <IMFS_dump_directory+0xe0><== NOT EXECUTED 35dc: e59f3028 ldr r3, [pc, #40] ; 360c <IMFS_dump_directory+0xe8><== NOT EXECUTED 35e0: eb0001e0 bl 3d68 <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 );
35e4: e59f0014 ldr r0, [pc, #20] ; 3600 <IMFS_dump_directory+0xdc><== NOT EXECUTED 35e8: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 35ec: e59f2010 ldr r2, [pc, #16] ; 3604 <IMFS_dump_directory+0xe0><== NOT EXECUTED 35f0: e59f3018 ldr r3, [pc, #24] ; 3610 <IMFS_dump_directory+0xec><== NOT EXECUTED 35f4: eb0001db bl 3d68 <__assert_func> <== NOT EXECUTED
35f8: 00022664 .word 0x00022664 35fc: 0002425c .word 0x0002425c 3600: 00024158 .word 0x00024158 3604: 00022bd0 .word 0x00022bd0 3608: 00024218 .word 0x00024218 360c: 00024234 .word 0x00024234 3610: 00024228 .word 0x00024228
00008be4 <IMFS_eval_path>: const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
8be4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8be8: e24dd040 sub sp, sp, #64 ; 0x40
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
8bec: e5936000 ldr r6, [r3]
const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
8bf0: e58d2000 str r2, [sp] 8bf4: e1a07003 mov r7, r3 8bf8: e1a0a000 mov sl, r0 8bfc: e1a04001 mov r4, r1
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
8c00: e3a05000 mov r5, #0 8c04: e28d8004 add r8, sp, #4 8c08: e28d903c add r9, sp, #60 ; 0x3c
* Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
8c0c: e1a02008 mov r2, r8 8c10: e1a03009 mov r3, r9 8c14: e08a0005 add r0, sl, r5 8c18: e1a01004 mov r1, r4 8c1c: eb000227 bl 94c0 <IMFS_get_token>
pathnamelen -= len; i += len; if ( !pathloc->node_access )
8c20: e5973000 ldr r3, [r7] 8c24: 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 );
8c28: e1a0b000 mov fp, r0
pathnamelen -= len;
8c2c: e59d203c ldr r2, [sp, #60] ; 0x3c
i += len; if ( !pathloc->node_access ) 8c30: 0a00004e beq 8d70 <IMFS_eval_path+0x18c> rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH )
8c34: e3500000 cmp r0, #0
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len;
8c38: e0855002 add r5, r5, r2
*/ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len;
8c3c: e0624004 rsb r4, r2, r4
rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8c40: 1a00000f bne 8c84 <IMFS_eval_path+0xa0> * 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 ) {
8c44: e593204c ldr r2, [r3, #76] ; 0x4c 8c48: e3520001 cmp r2, #1
8c4c: 0a000054 beq 8da4 <IMFS_eval_path+0x1c0> flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
8c50: e1a00007 mov r0, r7 8c54: ebffff54 bl 89ac <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) )
8c58: e59d1000 ldr r1, [sp]
flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
8c5c: e1a0b000 mov fp, r0
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) )
8c60: e1a00007 mov r0, r7 8c64: ebffff76 bl 8a44 <IMFS_evaluate_permission> 8c68: e3500000 cmp r0, #0
8c6c: 1a000036 bne 8d4c <IMFS_eval_path+0x168> rtems_set_errno_and_return_minus_one( EACCES );
8c70: eb0013e7 bl dc14 <__errno> 8c74: e3a0300d mov r3, #13 8c78: e5803000 str r3, [r0] 8c7c: e3e0b000 mvn fp, #0 8c80: ea000031 b 8d4c <IMFS_eval_path+0x168>
/* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY )
8c84: e596104c ldr r1, [r6, #76] ; 0x4c 8c88: e3510001 cmp r1, #1
8c8c: 0a000031 beq 8d58 <IMFS_eval_path+0x174> if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) {
8c90: e35b0003 cmp fp, #3
if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access;
8c94: e1a06003 mov r6, r3
switch( type ) { 8c98: 0a000006 beq 8cb8 <IMFS_eval_path+0xd4>
8c9c: e35b0004 cmp fp, #4
8ca0: 0a000025 beq 8d3c <IMFS_eval_path+0x158>
8ca4: e35b0002 cmp fp, #2
8ca8: 0a000013 beq 8cfc <IMFS_eval_path+0x118> /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
8cac: e35b0004 cmp fp, #4
8cb0: 1affffd5 bne 8c0c <IMFS_eval_path+0x28>
8cb4: eaffffe2 b 8c44 <IMFS_eval_path+0x60> <== NOT EXECUTED
case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) {
8cb8: e593304c ldr r3, [r3, #76] ; 0x4c 8cbc: e3530003 cmp r3, #3
8cc0: 0a00002f beq 8d84 <IMFS_eval_path+0x1a0> node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) {
8cc4: e3530004 cmp r3, #4
8cc8: 0a000055 beq 8e24 <IMFS_eval_path+0x240> /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
8ccc: e3530001 cmp r3, #1
8cd0: 1a00004c bne 8e08 <IMFS_eval_path+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 ) {
8cd4: e596305c ldr r3, [r6, #92] ; 0x5c 8cd8: e3530000 cmp r3, #0
8cdc: 1a00004e bne 8e1c <IMFS_eval_path+0x238> /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
8ce0: e1a00006 mov r0, r6 8ce4: e1a01008 mov r1, r8 8ce8: eb0001c5 bl 9404 <IMFS_find_match_in_dir>
if ( !node )
8cec: e2506000 subs r6, r0, #0
8cf0: 0a00001e beq 8d70 <IMFS_eval_path+0x18c> /* * Set the node access to the point we have found. */ pathloc->node_access = node;
8cf4: e5876000 str r6, [r7]
break;
8cf8: eaffffc3 b 8c0c <IMFS_eval_path+0x28>
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
8cfc: e59f114c ldr r1, [pc, #332] ; 8e50 <IMFS_eval_path+0x26c> 8d00: e5912000 ldr r2, [r1] 8d04: e5922018 ldr r2, [r2, #24] 8d08: e1520003 cmp r2, r3
8d0c: 0affffbe beq 8c0c <IMFS_eval_path+0x28> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) {
8d10: e5976010 ldr r6, [r7, #16]
/* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access ==
8d14: e596201c ldr r2, [r6, #28] 8d18: e1520003 cmp r2, r3
8d1c: 0a000049 beq 8e48 <IMFS_eval_path+0x264> pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent )
8d20: e5936008 ldr r6, [r3, #8] 8d24: e3560000 cmp r6, #0
8d28: 1afffff1 bne 8cf4 <IMFS_eval_path+0x110> rtems_set_errno_and_return_minus_one( ENOENT );
8d2c: eb0013b8 bl dc14 <__errno> 8d30: e580b000 str fp, [r0] 8d34: e3e0b000 mvn fp, #0 8d38: ea000003 b 8d4c <IMFS_eval_path+0x168>
case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
8d3c: eb0013b4 bl dc14 <__errno> 8d40: e3a0305b mov r3, #91 ; 0x5b 8d44: e5803000 str r3, [r0] 8d48: e3e0b000 mvn fp, #0
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
8d4c: e1a0000b mov r0, fp 8d50: e28dd040 add sp, sp, #64 ; 0x40 8d54: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8d58: e1a00007 mov r0, r7 8d5c: ebffff38 bl 8a44 <IMFS_evaluate_permission> 8d60: e3500000 cmp r0, #0
8d64: 0affffc1 beq 8c70 <IMFS_eval_path+0x8c>
8d68: e5973000 ldr r3, [r7] 8d6c: eaffffc7 b 8c90 <IMFS_eval_path+0xac>
* Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT );
8d70: eb0013a7 bl dc14 <__errno> 8d74: e3a03002 mov r3, #2 8d78: e5803000 str r3, [r0] 8d7c: e3e0b000 mvn fp, #0 8d80: eafffff1 b 8d4c <IMFS_eval_path+0x168>
* If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 );
8d84: e1a00007 mov r0, r7 8d88: e3a01000 mov r1, #0 8d8c: ebffff3f bl 8a90 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
8d90: e5976000 ldr r6, [r7]
if ( !node )
8d94: e3560000 cmp r6, #0
8d98: 0a00001a beq 8e08 <IMFS_eval_path+0x224> } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access;
8d9c: e596304c ldr r3, [r6, #76] ; 0x4c 8da0: eaffffc9 b 8ccc <IMFS_eval_path+0xe8>
* * 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 ) {
8da4: e593605c ldr r6, [r3, #92] ; 0x5c 8da8: e3560000 cmp r6, #0
8dac: 0affffa7 beq 8c50 <IMFS_eval_path+0x6c> newloc = node->info.directory.mt_fs->mt_fs_root;
8db0: e286601c add r6, r6, #28 8db4: e8b6000f ldm r6!, {r0, r1, r2, r3} 8db8: e28de028 add lr, sp, #40 ; 0x28 8dbc: e8ae000f stmia lr!, {r0, r1, r2, r3}
*pathloc = newloc;
8dc0: e28dc028 add ip, sp, #40 ; 0x28 8dc4: e8bc000f ldm ip!, {r0, r1, r2, r3}
* 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;
8dc8: e596c000 ldr ip, [r6]
*pathloc = newloc;
8dcc: e1a06007 mov r6, r7 8dd0: e8a6000f stmia r6!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8dd4: e59d103c ldr r1, [sp, #60] ; 0x3c
*/ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc;
8dd8: e586c000 str ip, [r6]
* 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;
8ddc: e58ec000 str ip, [lr]
*pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8de0: e0610005 rsb r0, r1, r5 8de4: e08a0000 add r0, sl, r0 8de8: e0841001 add r1, r4, r1 8dec: e59d2000 ldr r2, [sp] 8df0: e1a03007 mov r3, r7 8df4: e597c00c ldr ip, [r7, #12] 8df8: e1a0e00f mov lr, pc 8dfc: e59cf000 ldr pc, [ip] 8e00: e1a0b000 mov fp, r0 8e04: eaffffd0 b 8d4c <IMFS_eval_path+0x168>
/* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
8e08: eb001381 bl dc14 <__errno> 8e0c: e3a03014 mov r3, #20 8e10: e5803000 str r3, [r0] 8e14: e3e0b000 mvn fp, #0 8e18: eaffffcb b 8d4c <IMFS_eval_path+0x168>
* 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;
8e1c: e283601c add r6, r3, #28 8e20: eaffffe3 b 8db4 <IMFS_eval_path+0x1d0>
if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 );
8e24: e1a00007 mov r0, r7 8e28: e3a01000 mov r1, #0 8e2c: ebffff2f bl 8af0 <IMFS_evaluate_sym_link>
node = pathloc->node_access; if ( result == -1 )
8e30: e3700001 cmn r0, #1
if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 );
8e34: e1a0b000 mov fp, r0
node = pathloc->node_access;
8e38: e5976000 ldr r6, [r7]
if ( result == -1 ) 8e3c: 0affffc2 beq 8d4c <IMFS_eval_path+0x168> } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access;
8e40: e596304c ldr r3, [r6, #76] ; 0x4c 8e44: eaffffa0 b 8ccc <IMFS_eval_path+0xe8>
*/ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node;
8e48: e2866008 add r6, r6, #8 8e4c: eaffffd8 b 8db4 <IMFS_eval_path+0x1d0> 8e50: 00019658 .word 0x00019658
00008f28 <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 */ ) {
8f28: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8f2c: e24dd040 sub sp, sp, #64 ; 0x40 8f30: e1a06001 mov r6, r1
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
8f34: e5915000 ldr r5, [r1]
int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) {
8f38: e58d2000 str r2, [sp] 8f3c: e1a0a000 mov sl, r0
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
8f40: eb001724 bl ebd8 <strlen> 8f44: e3a07000 mov r7, #0 8f48: e28d8004 add r8, sp, #4 8f4c: e1a04000 mov r4, r0
* Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len );
8f50: e1a01004 mov r1, r4 8f54: e28d303c add r3, sp, #60 ; 0x3c 8f58: e08a0007 add r0, sl, r7 8f5c: e1a02008 mov r2, r8 8f60: eb000156 bl 94c0 <IMFS_get_token>
pathlen -= len; i += len; if ( !pathloc->node_access )
8f64: e5963000 ldr r3, [r6]
*/ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len;
8f68: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len; if ( !pathloc->node_access )
8f6c: e3530000 cmp r3, #0
* Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len );
8f70: e1a09000 mov r9, r0
pathlen -= len;
8f74: e06b4004 rsb r4, fp, r4
i += len; if ( !pathloc->node_access ) 8f78: 0a00003a beq 9068 <IMFS_evaluate_for_make+0x140> /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH )
8f7c: e3500000 cmp r0, #0
8f80: 1a000006 bne 8fa0 <IMFS_evaluate_for_make+0x78> pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST );
8f84: eb001322 bl dc14 <__errno> 8f88: e3a03011 mov r3, #17 8f8c: e5803000 str r3, [r0] 8f90: e3e05000 mvn r5, #0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
8f94: e1a00005 mov r0, r5 8f98: e28dd040 add sp, sp, #64 ; 0x40 8f9c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY )
8fa0: e595104c ldr r1, [r5, #76] ; 0x4c 8fa4: e3510001 cmp r1, #1
8fa8: 0a00004b beq 90dc <IMFS_evaluate_for_make+0x1b4> while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len;
8fac: e087700b add r7, r7, fp
if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access;
8fb0: e1a05003 mov r5, r3
switch( type ) {
8fb4: e3590004 cmp r9, #4 8fb8: 979ff109 ldrls pc, [pc, r9, lsl #2]
8fbc: eaffffe3 b 8f50 <IMFS_evaluate_for_make+0x28> <== NOT EXECUTED 8fc0: 00008f84 .word 0x00008f84 <== NOT EXECUTED 8fc4: 00008f50 .word 0x00008f50 <== NOT EXECUTED 8fc8: 00009038 .word 0x00009038 <== NOT EXECUTED 8fcc: 00008fe8 .word 0x00008fe8 <== NOT EXECUTED 8fd0: 00008fd4 .word 0x00008fd4 <== NOT EXECUTED
case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
8fd4: eb00130e bl dc14 <__errno> 8fd8: e3a0305b mov r3, #91 ; 0x5b 8fdc: e5803000 str r3, [r0] 8fe0: e3e05000 mvn r5, #0 8fe4: eaffffea b 8f94 <IMFS_evaluate_for_make+0x6c>
pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) {
8fe8: e593304c ldr r3, [r3, #76] ; 0x4c 8fec: e3530003 cmp r3, #3
8ff0: 0a00006a beq 91a0 <IMFS_evaluate_for_make+0x278> result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) {
8ff4: e3530004 cmp r3, #4
8ff8: 0a000068 beq 91a0 <IMFS_evaluate_for_make+0x278> if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node )
8ffc: e3550000 cmp r5, #0
9000: 0a00004c beq 9138 <IMFS_evaluate_for_make+0x210> /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
9004: e595304c ldr r3, [r5, #76] ; 0x4c 9008: e3530001 cmp r3, #1
900c: 1a000049 bne 9138 <IMFS_evaluate_for_make+0x210> /* * 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 ) {
9010: e595305c ldr r3, [r5, #92] ; 0x5c 9014: e3530000 cmp r3, #0
9018: 1a00004b bne 914c <IMFS_evaluate_for_make+0x224> /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
901c: e1a00005 mov r0, r5 9020: e1a01008 mov r1, r8 9024: eb0000f6 bl 9404 <IMFS_find_match_in_dir>
/* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node )
9028: e2505000 subs r5, r0, #0
902c: 0a000012 beq 907c <IMFS_evaluate_for_make+0x154> done = true; else pathloc->node_access = node;
9030: e5865000 str r5, [r6] 9034: eaffffc5 b 8f50 <IMFS_evaluate_for_make+0x28>
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
9038: e59f1188 ldr r1, [pc, #392] ; 91c8 <IMFS_evaluate_for_make+0x2a0> 903c: e5912000 ldr r2, [r1] 9040: e5922018 ldr r2, [r2, #24] 9044: e1520003 cmp r2, r3
9048: 0affffc0 beq 8f50 <IMFS_evaluate_for_make+0x28> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
904c: e5962010 ldr r2, [r6, #16] 9050: e592101c ldr r1, [r2, #28] 9054: e1510003 cmp r1, r3
9058: 0a000058 beq 91c0 <IMFS_evaluate_for_make+0x298> *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent )
905c: e5935008 ldr r5, [r3, #8] 9060: e3550000 cmp r5, #0
9064: 1afffff1 bne 9030 <IMFS_evaluate_for_make+0x108> * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT );
9068: eb0012e9 bl dc14 <__errno> 906c: e3a03002 mov r3, #2 9070: e5803000 str r3, [r0] 9074: e3e05000 mvn r5, #0 9078: eaffffc5 b 8f94 <IMFS_evaluate_for_make+0x6c>
case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ];
907c: e59d303c ldr r3, [sp, #60] ; 0x3c 9080: e59d1000 ldr r1, [sp] 9084: e0633007 rsb r3, r3, r7 9088: e08a3003 add r3, sl, r3 908c: e5813000 str r3, [r1]
/* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) {
9090: e7da3007 ldrb r3, [sl, r7] 9094: e3530000 cmp r3, #0
9098: 0a000015 beq 90f4 <IMFS_evaluate_for_make+0x1cc> if ( !IMFS_is_separator( path[ i ] ) )
909c: e353002f cmp r3, #47 ; 0x2f 90a0: 1353005c cmpne r3, #92 ; 0x5c
90a4: 1affffef bne 9068 <IMFS_evaluate_for_make+0x140> rtems_set_errno_and_return_minus_one( ENOENT );
90a8: e08a7007 add r7, sl, r7
/* * 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++) {
90ac: e5d73001 ldrb r3, [r7, #1] 90b0: e3530000 cmp r3, #0
90b4: 0a00000e beq 90f4 <IMFS_evaluate_for_make+0x1cc> if ( !IMFS_is_separator( path[ i ] ) )
90b8: e353005c cmp r3, #92 ; 0x5c 90bc: 1353002f cmpne r3, #47 ; 0x2f 90c0: e2877001 add r7, r7, #1
90c4: 0afffff8 beq 90ac <IMFS_evaluate_for_make+0x184> rtems_set_errno_and_return_minus_one( ENOENT );
90c8: eb0012d1 bl dc14 <__errno> 90cc: e3a03002 mov r3, #2 90d0: e5803000 str r3, [r0] 90d4: e3e05000 mvn r5, #0 90d8: eaffffad b 8f94 <IMFS_evaluate_for_make+0x6c>
* I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
90dc: e1a00006 mov r0, r6 90e0: ebfffe57 bl 8a44 <IMFS_evaluate_permission> 90e4: e3500000 cmp r0, #0
90e8: 0a00000d beq 9124 <IMFS_evaluate_for_make+0x1fc>
90ec: e5963000 ldr r3, [r6] 90f0: eaffffad b 8fac <IMFS_evaluate_for_make+0x84>
/* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc );
90f4: e1a00006 mov r0, r6 90f8: ebfffe2b bl 89ac <IMFS_Set_handlers>
/* * The returned node must be a directory */ node = pathloc->node_access;
90fc: e5963000 ldr r3, [r6] 9100: e593304c ldr r3, [r3, #76] ; 0x4c 9104: e3530001 cmp r3, #1
/* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc );
9108: e1a05000 mov r5, r0
/* * The returned node must be a directory */ node = pathloc->node_access; 910c: 1a000009 bne 9138 <IMFS_evaluate_for_make+0x210> /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
9110: e1a00006 mov r0, r6 9114: e3a01003 mov r1, #3 9118: ebfffe49 bl 8a44 <IMFS_evaluate_permission> 911c: e3500000 cmp r0, #0
9120: 1affff9b bne 8f94 <IMFS_evaluate_for_make+0x6c> rtems_set_errno_and_return_minus_one( EACCES );
9124: eb0012ba bl dc14 <__errno> 9128: e3a0300d mov r3, #13 912c: e5803000 str r3, [r0] 9130: e3e05000 mvn r5, #0 9134: eaffff96 b 8f94 <IMFS_evaluate_for_make+0x6c>
/* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
9138: eb0012b5 bl dc14 <__errno> 913c: e3a03014 mov r3, #20 9140: e5803000 str r3, [r0] 9144: e3e05000 mvn r5, #0 9148: eaffff91 b 8f94 <IMFS_evaluate_for_make+0x6c>
* If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root;
914c: e283401c add r4, r3, #28 9150: e8b4000f ldm r4!, {r0, r1, r2, r3} 9154: e28dc028 add ip, sp, #40 ; 0x28 9158: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
915c: e28de028 add lr, sp, #40 ; 0x28 9160: e8be000f ldm lr!, {r0, r1, r2, r3}
* 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;
9164: e594e000 ldr lr, [r4]
*pathloc = newloc;
9168: e1a04006 mov r4, r6 916c: e8a4000f stmia r4!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
9170: e59d003c ldr r0, [sp, #60] ; 0x3c
* new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc;
9174: e584e000 str lr, [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;
9178: e58ce000 str lr, [ip]
*pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
917c: e0600007 rsb r0, r0, r7 9180: e08a0000 add r0, sl, r0 9184: e1a01006 mov r1, r6 9188: e59d2000 ldr r2, [sp] 918c: e596300c ldr r3, [r6, #12] 9190: e1a0e00f mov lr, pc 9194: e593f004 ldr pc, [r3, #4] 9198: e1a05000 mov r5, r0 919c: eaffff7c b 8f94 <IMFS_evaluate_for_make+0x6c>
if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 );
91a0: e1a00006 mov r0, r6 91a4: e3a01000 mov r1, #0 91a8: ebffff29 bl 8e54 <IMFS_evaluate_link>
if ( result == -1 )
91ac: e3700001 cmn r0, #1
if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 );
91b0: e1a05000 mov r5, r0
if ( result == -1 ) 91b4: 0affff76 beq 8f94 <IMFS_evaluate_for_make+0x6c>
91b8: e5965000 ldr r5, [r6] 91bc: eaffff8e b 8ffc <IMFS_evaluate_for_make+0xd4>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node;
91c0: e2824008 add r4, r2, #8 91c4: eaffffe1 b 9150 <IMFS_evaluate_for_make+0x228> 91c8: 00019658 .word 0x00019658
00008a90 <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;
8a90: e5903000 ldr r3, [r0]
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK )
8a94: e593204c ldr r2, [r3, #76] ; 0x4c 8a98: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8a9c: e92d4030 push {r4, r5, lr} 8aa0: e1a04000 mov r4, r0 8aa4: e1a05001 mov r5, r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8aa8: 1a00000d bne 8ae4 <IMFS_evaluate_hard_link+0x54> /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node;
8aac: e5933050 ldr r3, [r3, #80] ; 0x50 8ab0: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
8ab4: ebffffbc bl 89ac <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
8ab8: e1a00004 mov r0, r4 8abc: e1a01005 mov r1, r5 8ac0: ebffffdf bl 8a44 <IMFS_evaluate_permission> 8ac4: e3500000 cmp r0, #0 8ac8: 13a00000 movne r0, #0 8acc: 18bd8030 popne {r4, r5, pc}
rtems_set_errno_and_return_minus_one( EACCES );
8ad0: eb00144f bl dc14 <__errno> <== NOT EXECUTED 8ad4: e3a0300d mov r3, #13 <== NOT EXECUTED 8ad8: e5803000 str r3, [r0] <== NOT EXECUTED 8adc: e3e00000 mvn r0, #0 <== NOT EXECUTED
return result; }
8ae0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000);
8ae4: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 8ae8: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 8aec: ebfff2eb bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
00008af0 <IMFS_evaluate_sym_link>: int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8af0: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
8af4: e590e000 ldr lr, [r0]
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK )
8af8: e59e304c ldr r3, [lr, #76] ; 0x4c 8afc: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8b00: e1a04000 mov r4, r0 8b04: e1a05001 mov r5, r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8b08: 1a000031 bne 8bd4 <IMFS_evaluate_sym_link+0xe4> rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent )
8b0c: e59e3008 ldr r3, [lr, #8] 8b10: e3530000 cmp r3, #0
8b14: 0a00002b beq 8bc8 <IMFS_evaluate_sym_link+0xd8> /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent;
8b18: e5803000 str r3, [r0]
rtems_filesystem_get_sym_start_loc(
8b1c: e59e2050 ldr r2, [lr, #80] ; 0x50 8b20: e5d23000 ldrb r3, [r2] 8b24: e353002f cmp r3, #47 ; 0x2f 8b28: 1353005c cmpne r3, #92 ; 0x5c 8b2c: 13a06000 movne r6, #0 8b30: 03a06001 moveq r6, #1
8b34: 1a00001b bne 8ba8 <IMFS_evaluate_sym_link+0xb8>
8b38: e59f30a0 ldr r3, [pc, #160] ; 8be0 <IMFS_evaluate_sym_link+0xf0> 8b3c: e593c000 ldr ip, [r3] 8b40: e28cc018 add ip, ip, #24 8b44: e8bc000f ldm ip!, {r0, r1, r2, r3} 8b48: e1a06004 mov r6, r4 8b4c: e8a6000f stmia r6!, {r0, r1, r2, r3} 8b50: e59c2000 ldr r2, [ip] 8b54: e5862000 str r2, [r6] 8b58: e59e2050 ldr r2, [lr, #80] ; 0x50 8b5c: 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] ),
8b60: e0826006 add r6, r2, r6 8b64: e1a00006 mov r0, r6 8b68: eb00181a bl ebd8 <strlen>
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
8b6c: e1a02005 mov r2, r5
&jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ),
8b70: e1a01000 mov r1, r0
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
8b74: e1a03004 mov r3, r4 8b78: e1a00006 mov r0, r6 8b7c: eb000018 bl 8be4 <IMFS_eval_path> 8b80: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node );
8b84: e1a00004 mov r0, r4 8b88: ebffff87 bl 89ac <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
8b8c: e1a00004 mov r0, r4 8b90: e1a01005 mov r1, r5 8b94: ebffffaa bl 8a44 <IMFS_evaluate_permission> 8b98: e3500000 cmp r0, #0
8b9c: 0a000004 beq 8bb4 <IMFS_evaluate_sym_link+0xc4> rtems_set_errno_and_return_minus_one( EACCES ); return result; }
8ba0: e1a00006 mov r0, r6 8ba4: e8bd8070 pop {r4, r5, r6, pc}
* root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc(
8ba8: e3530000 cmp r3, #0
8bac: 1affffeb bne 8b60 <IMFS_evaluate_sym_link+0x70>
8bb0: eaffffe0 b 8b38 <IMFS_evaluate_sym_link+0x48> <== NOT EXECUTED
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES );
8bb4: eb001416 bl dc14 <__errno> <== NOT EXECUTED 8bb8: e3a0300d mov r3, #13 <== NOT EXECUTED 8bbc: e5803000 str r3, [r0] <== NOT EXECUTED 8bc0: e3e06000 mvn r6, #0 <== NOT EXECUTED 8bc4: eafffff5 b 8ba0 <IMFS_evaluate_sym_link+0xb0> <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 );
8bc8: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED 8bcc: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED 8bd0: ebfff2b2 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000);
8bd4: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 8bd8: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 8bdc: ebfff2af bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
8be0: 00019658 .word 0x00019658
0000c49c <IMFS_fchmod>: int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
c49c: e92d4070 push {r4, r5, r6, lr} c4a0: e24dd008 sub sp, sp, #8
IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access;
c4a4: e5904000 ldr r4, [r0]
int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
c4a8: e1a06001 mov r6, r1
/* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid();
c4ac: ebfff5a2 bl 9b3c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
c4b0: e1d453bc ldrh r5, [r4, #60] ; 0x3c c4b4: e3500000 cmp r0, #0 c4b8: 11550000 cmpne r5, r0 c4bc: 03a05000 moveq r5, #0 c4c0: 13a05001 movne r5, #1
c4c4: 1a00000e bne c504 <IMFS_fchmod+0x68> /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
c4c8: e5943030 ldr r3, [r4, #48] ; 0x30 c4cc: e1a06a06 lsl r6, r6, #20 c4d0: e3c33eff bic r3, r3, #4080 ; 0xff0 c4d4: e3c3300f bic r3, r3, #15 c4d8: e1a06a26 lsr r6, r6, #20 c4dc: e1866003 orr r6, r6, r3 c4e0: e5846030 str r6, [r4, #48] ; 0x30
IMFS_update_ctime( jnode );
c4e4: e1a0000d mov r0, sp c4e8: e1a01005 mov r1, r5 c4ec: ebfff597 bl 9b50 <gettimeofday> c4f0: e59d3000 ldr r3, [sp] c4f4: e5843048 str r3, [r4, #72] ; 0x48 c4f8: e1a00005 mov r0, r5
return 0; }
c4fc: e28dd008 add sp, sp, #8 c500: e8bd8070 pop {r4, r5, r6, pc}
*/ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM );
c504: eb0005c2 bl dc14 <__errno> <== NOT EXECUTED c508: e3a03001 mov r3, #1 <== NOT EXECUTED c50c: e5803000 str r3, [r0] <== NOT EXECUTED c510: e3e00000 mvn r0, #0 <== NOT EXECUTED c514: eafffff8 b c4fc <IMFS_fchmod+0x60> <== NOT EXECUTED
00009358 <IMFS_fifo_close>: } int IMFS_fifo_close( rtems_libio_t *iop ) {
9358: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
935c: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
9360: e1a01000 mov r1, r0 <== NOT EXECUTED
} int IMFS_fifo_close( rtems_libio_t *iop ) {
9364: e1a04000 mov r4, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop);
9368: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED 936c: eb000a7a bl bd5c <pipe_release> <== NOT EXECUTED
if (! err) {
9370: e2506000 subs r6, r0, #0 <== NOT EXECUTED 9374: 0a000002 beq 9384 <IMFS_fifo_close+0x2c> <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err);
9378: ba00000e blt 93b8 <IMFS_fifo_close+0x60> <== NOT EXECUTED
}
937c: e1a00006 mov r0, r6 <== NOT EXECUTED 9380: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN;
9384: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 9388: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 938c: e5843014 str r3, [r4, #20] <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
9390: e1a00005 mov r0, r5 <== NOT EXECUTED 9394: eb000292 bl 9de4 <rtems_libio_is_file_open> <== NOT EXECUTED 9398: e3500000 cmp r0, #0 <== NOT EXECUTED 939c: 1afffff6 bne 937c <IMFS_fifo_close+0x24> <== NOT EXECUTED 93a0: e1d533b4 ldrh r3, [r5, #52] ; 0x34 <== NOT EXECUTED 93a4: e3530000 cmp r3, #0 <== NOT EXECUTED 93a8: 1afffff3 bne 937c <IMFS_fifo_close+0x24> <== NOT EXECUTED
free(jnode);
93ac: e1a00005 mov r0, r5 <== NOT EXECUTED 93b0: ebffe1ca bl 1ae0 <free> <== NOT EXECUTED 93b4: eafffff0 b 937c <IMFS_fifo_close+0x24> <== NOT EXECUTED
} IMFS_FIFO_RETURN(err);
93b8: eb001215 bl dc14 <__errno> <== NOT EXECUTED 93bc: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 93c0: e5806000 str r6, [r0] <== NOT EXECUTED 93c4: e3e06000 mvn r6, #0 <== NOT EXECUTED 93c8: eaffffeb b 937c <IMFS_fifo_close+0x24> <== NOT EXECUTED
00009224 <IMFS_fifo_ioctl>: void *buffer ) { int err; if (command == FIONBIO) {
9224: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED 9228: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED 922c: e283313a add r3, r3, #-2147483634 ; 0x8000000e <== NOT EXECUTED 9230: e1510003 cmp r1, r3 <== NOT EXECUTED
int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
9234: e92d4010 push {r4, lr} <== NOT EXECUTED 9238: e1a03002 mov r3, r2 <== NOT EXECUTED
int err; if (command == FIONBIO) {
923c: 0a00000a beq 926c <IMFS_fifo_ioctl+0x48> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
9240: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED 9244: e1a03000 mov r3, r0 <== NOT EXECUTED 9248: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED 924c: eb0009b5 bl b928 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9250: e3500000 cmp r0, #0 <== NOT EXECUTED 9254: a8bd8010 popge {r4, pc} <== NOT EXECUTED 9258: e2604000 rsb r4, r0, #0 <== NOT EXECUTED 925c: eb00126c bl dc14 <__errno> <== NOT EXECUTED 9260: e5804000 str r4, [r0] <== NOT EXECUTED 9264: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
9268: e8bd8010 pop {r4, pc} <== NOT EXECUTED
) { int err; if (command == FIONBIO) { if (buffer == NULL)
926c: e3520000 cmp r2, #0 <== NOT EXECUTED 9270: 03a0400e moveq r4, #14 <== NOT EXECUTED 9274: 0afffff8 beq 925c <IMFS_fifo_ioctl+0x38> <== NOT EXECUTED
err = -EFAULT; else { if (*(int *)buffer)
9278: e5924000 ldr r4, [r2] <== NOT EXECUTED 927c: e3540000 cmp r4, #0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
9280: 15903014 ldrne r3, [r0, #20] <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
9284: 05903014 ldreq r3, [r0, #20] <== NOT EXECUTED
if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY;
9288: 13833001 orrne r3, r3, #1 <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
928c: 03c33001 biceq r3, r3, #1 <== NOT EXECUTED
if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY;
9290: 15803014 strne r3, [r0, #20] <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
9294: 05803014 streq r3, [r0, #20] <== NOT EXECUTED
if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY;
9298: 13a00000 movne r0, #0 <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
929c: 01a00004 moveq r0, r4 <== NOT EXECUTED 92a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000091cc <IMFS_fifo_lseek>: rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
91cc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 91d0: e1a0c000 mov ip, r0 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
91d4: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED
rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
91d8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
91dc: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 91e0: e58dc000 str ip, [sp] <== NOT EXECUTED 91e4: eb0009b1 bl b8b0 <pipe_lseek> <== NOT EXECUTED 91e8: e1a03000 mov r3, r0 <== NOT EXECUTED 91ec: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
91f0: 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);
91f4: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
91f8: ba000003 blt 920c <IMFS_fifo_lseek+0x40> <== NOT EXECUTED
}
91fc: e1a01004 mov r1, r4 <== NOT EXECUTED 9200: e1a00003 mov r0, r3 <== NOT EXECUTED 9204: e28dd004 add sp, sp, #4 <== NOT EXECUTED 9208: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err);
920c: eb001280 bl dc14 <__errno> <== NOT EXECUTED 9210: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9214: e5805000 str r5, [r0] <== NOT EXECUTED 9218: e3e03000 mvn r3, #0 <== NOT EXECUTED 921c: e3e04000 mvn r4, #0 <== NOT EXECUTED 9220: eafffff5 b 91fc <IMFS_fifo_lseek+0x30> <== NOT EXECUTED
00009300 <IMFS_fifo_read>: ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
9300: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
9304: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
9308: e1a03000 mov r3, r0 <== NOT EXECUTED 930c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
9310: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 9314: eb00099c bl b98c <pipe_read> <== NOT EXECUTED
if (err > 0)
9318: e2505000 subs r5, r0, #0 <== NOT EXECUTED 931c: da000007 ble 9340 <IMFS_fifo_read+0x40> <== NOT EXECUTED
IMFS_update_atime(jnode);
9320: e1a0000d mov r0, sp <== NOT EXECUTED 9324: e3a01000 mov r1, #0 <== NOT EXECUTED 9328: eb000208 bl 9b50 <gettimeofday> <== NOT EXECUTED 932c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 9330: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
IMFS_FIFO_RETURN(err); }
9334: e1a00005 mov r0, r5 <== NOT EXECUTED 9338: e28dd008 add sp, sp, #8 <== NOT EXECUTED 933c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err);
9340: 0afffffb beq 9334 <IMFS_fifo_read+0x34> <== NOT EXECUTED 9344: eb001232 bl dc14 <__errno> <== NOT EXECUTED 9348: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 934c: e5805000 str r5, [r0] <== NOT EXECUTED 9350: e3e05000 mvn r5, #0 <== NOT EXECUTED 9354: eafffff6 b 9334 <IMFS_fifo_read+0x34> <== NOT EXECUTED
000092a4 <IMFS_fifo_write>: ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
92a4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
92a8: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
92ac: e1a03000 mov r3, r0 <== NOT EXECUTED 92b0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
92b4: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 92b8: eb000a21 bl bb44 <pipe_write> <== NOT EXECUTED
if (err > 0) {
92bc: e2505000 subs r5, r0, #0 <== NOT EXECUTED 92c0: da000008 ble 92e8 <IMFS_fifo_write+0x44> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
92c4: e1a0000d mov r0, sp <== NOT EXECUTED 92c8: e3a01000 mov r1, #0 <== NOT EXECUTED 92cc: eb00021f bl 9b50 <gettimeofday> <== NOT EXECUTED 92d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 92d4: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 92d8: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
} IMFS_FIFO_RETURN(err); }
92dc: e1a00005 mov r0, r5 <== NOT EXECUTED 92e0: e28dd008 add sp, sp, #8 <== NOT EXECUTED 92e4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err);
92e8: 0afffffb beq 92dc <IMFS_fifo_write+0x38> <== NOT EXECUTED 92ec: eb001248 bl dc14 <__errno> <== NOT EXECUTED 92f0: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 92f4: e5805000 str r5, [r0] <== NOT EXECUTED 92f8: e3e05000 mvn r5, #0 <== NOT EXECUTED 92fc: eafffff6 b 92dc <IMFS_fifo_write+0x38> <== NOT EXECUTED
00009404 <IMFS_find_match_in_dir>: IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) {
9404: e92d4070 push {r4, r5, r6, lr}
/* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory );
9408: e2505000 subs r5, r0, #0
IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) {
940c: e1a04001 mov r4, r1
/* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 9410: 0a000020 beq 9498 <IMFS_find_match_in_dir+0x94> if ( !name )
9414: e3510000 cmp r1, #0
9418: 0a00000c beq 9450 <IMFS_find_match_in_dir+0x4c> /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) )
941c: e1a00001 mov r0, r1 9420: e59f1084 ldr r1, [pc, #132] ; 94ac <IMFS_find_match_in_dir+0xa8> 9424: eb001523 bl e8b8 <strcmp> 9428: e3500000 cmp r0, #0
942c: 0a000005 beq 9448 <IMFS_find_match_in_dir+0x44> return directory; if ( !strcmp( name, dotdotname ) )
9430: e1a00004 mov r0, r4 9434: e59f1074 ldr r1, [pc, #116] ; 94b0 <IMFS_find_match_in_dir+0xac> 9438: eb00151e bl e8b8 <strcmp> 943c: e3500000 cmp r0, #0
return directory->Parent;
9440: 05955008 ldreq r5, [r5, #8]
*/ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 9444: 1a000004 bne 945c <IMFS_find_match_in_dir+0x58> if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; }
9448: e1a00005 mov r0, r5 944c: e8bd8070 pop {r4, r5, r6, pc}
if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first;
9450: e3a05000 mov r5, #0
if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; }
9454: e1a00005 mov r0, r5 9458: e8bd8070 pop {r4, r5, r6, pc}
if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first;
945c: e5956050 ldr r6, [r5, #80] ; 0x50
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
9460: e2855054 add r5, r5, #84 ; 0x54 9464: e1560005 cmp r6, r5
9468: 1a000003 bne 947c <IMFS_find_match_in_dir+0x78>
946c: eafffff7 b 9450 <IMFS_find_match_in_dir+0x4c>
!rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) {
9470: e5966000 ldr r6, [r6]
if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first;
9474: e1560005 cmp r6, r5
9478: 0afffff4 beq 9450 <IMFS_find_match_in_dir+0x4c> !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) )
947c: e1a00004 mov r0, r4 9480: e286100c add r1, r6, #12 9484: eb00150b bl e8b8 <strcmp> 9488: e3500000 cmp r0, #0
948c: 1afffff7 bne 9470 <IMFS_find_match_in_dir+0x6c>
9490: e1a05006 mov r5, r6 9494: eaffffeb b 9448 <IMFS_find_match_in_dir+0x44>
/* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory );
9498: e59f0014 ldr r0, [pc, #20] ; 94b4 <IMFS_find_match_in_dir+0xb0><== NOT EXECUTED 949c: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED 94a0: e59f2010 ldr r2, [pc, #16] ; 94b8 <IMFS_find_match_in_dir+0xb4><== NOT EXECUTED 94a4: e59f3010 ldr r3, [pc, #16] ; 94bc <IMFS_find_match_in_dir+0xb8><== NOT EXECUTED 94a8: eb00010e bl 98e8 <__assert_func> <== NOT EXECUTED
94ac: 00019e4c .word 0x00019e4c 94b0: 00019e50 .word 0x00019e50 94b4: 0001a798 .word 0x0001a798 94b8: 00019e34 .word 0x00019e34 94bc: 0001a7e4 .word 0x0001a7e4
0000e59c <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 ) {
e59c: 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;
e5a0: e1a0c000 mov ip, r0 e5a4: 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 ) {
e5a8: e24dd014 sub sp, sp, #20 e5ac: e1a0e000 mov lr, r0
* Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root;
e5b0: e8bc000f ldm ip!, {r0, r1, r2, r3} e5b4: e1a0600d mov r6, sp e5b8: e8a6000f stmia r6!, {r0, r1, r2, r3} e5bc: e59c2000 ldr r2, [ip]
/* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL;
e5c0: e3a03000 mov r3, #0
* Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root;
e5c4: e5862000 str r2, [r6]
/* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL;
e5c8: e58e301c str r3, [lr, #28]
* 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;
e5cc: e1a0500d mov r5, sp
temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
e5d0: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode;
e5d4: e58d4000 str r4, [sp]
*/ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent;
e5d8: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
e5dc: ebfffd56 bl db3c <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
e5e0: e594304c ldr r3, [r4, #76] ; 0x4c e5e4: e3530001 cmp r3, #1
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
e5e8: e2842054 add r2, r4, #84 ; 0x54
e5ec: 1a000010 bne e634 <IMFS_fsunmount+0x98>
e5f0: e5943050 ldr r3, [r4, #80] ; 0x50 e5f4: e1530002 cmp r3, r2
e5f8: 0a00000d beq e634 <IMFS_fsunmount+0x98> result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) {
e5fc: e3540000 cmp r4, #0
e600: 0a000008 beq e628 <IMFS_fsunmount+0x8c> if ( jnode->type == IMFS_DIRECTORY ) {
e604: e594304c ldr r3, [r4, #76] ; 0x4c e608: e3530001 cmp r3, #1
e60c: 1affffef bne e5d0 <IMFS_fsunmount+0x34>
e610: e5943050 ldr r3, [r4, #80] ; 0x50 e614: e2842054 add r2, r4, #84 ; 0x54 e618: e1530002 cmp r3, r2
e61c: 0affffeb beq e5d0 <IMFS_fsunmount+0x34> if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL);
e620: e2534000 subs r4, r3, #0
e624: 1affffe9 bne e5d0 <IMFS_fsunmount+0x34>
e628: e3a00000 mov r0, #0
return 0; }
e62c: e28dd014 add sp, sp, #20 e630: e8bd8070 pop {r4, r5, r6, pc}
result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc );
e634: e3a00000 mov r0, #0 e638: e1a0100d mov r1, sp e63c: ebffd0f1 bl 2a08 <IMFS_unlink>
if (result != 0)
e640: e3500000 cmp r0, #0 e644: 01a04006 moveq r4, r6
e648: 0affffeb beq e5fc <IMFS_fsunmount+0x60> if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL);
e64c: e3e00000 mvn r0, #0 <== NOT EXECUTED e650: eafffff5 b e62c <IMFS_fsunmount+0x90> <== NOT EXECUTED
000095ac <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,
95ac: e59fc0d0 ldr ip, [pc, #208] ; 9684 <IMFS_initialize_support+0xd8> 95b0: e59cc000 ldr ip, [ip]
int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
95b4: e35c0010 cmp ip, #16
rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) {
95b8: e92d40f0 push {r4, r5, r6, r7, lr} 95bc: e1a04000 mov r4, r0 95c0: e1a06001 mov r6, r1 95c4: e1a07002 mov r7, r2 95c8: e1a05003 mov r5, r3
int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 95cc: 0a000008 beq 95f4 <IMFS_initialize_support+0x48>
95d0: e3a03000 mov r3, #0 95d4: e3a02020 mov r2, #32 95d8: e15c0002 cmp ip, r2 95dc: e2833001 add r3, r3, #1
95e0: 0a000003 beq 95f4 <IMFS_initialize_support+0x48>
95e4: e3530005 cmp r3, #5 95e8: e1a02082 lsl r2, r2, #1
95ec: 1afffff9 bne 95d8 <IMFS_initialize_support+0x2c>
95f0: e3a0c080 mov ip, #128 ; 0x80 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid)
95f4: e59f308c ldr r3, [pc, #140] ; 9688 <IMFS_initialize_support+0xdc> 95f8: e583c000 str ip, [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();
95fc: eb000b44 bl c314 <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;
9600: e59fe084 ldr lr, [pc, #132] ; 968c <IMFS_initialize_support+0xe0>
/* * 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();
9604: 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;
9608: e8be000f ldm lr!, {r0, r1, r2, r3} 960c: e284c038 add ip, r4, #56 ; 0x38 9610: e8ac000f stmia ip!, {r0, r1, r2, r3} 9614: e8be000f ldm lr!, {r0, r1, r2, r3} 9618: e8ac000f stmia ip!, {r0, r1, r2, r3} 961c: 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;
9620: e5846028 str r6, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
9624: 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;
9628: e5845024 str r5, [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 ) );
962c: e3a00001 mov r0, #1 9630: e3a0100c mov r1, #12 9634: eb0000be bl 9934 <calloc>
if ( !fs_info ) {
9638: e3500000 cmp r0, #0
963c: 0a000009 beq 9668 <IMFS_initialize_support+0xbc> 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;
9640: e594201c ldr r2, [r4, #28]
/* * Set st_ino for the root to 1. */ fs_info->ino_count = 1;
9644: e3a03001 mov r3, #1 9648: e5803000 str r3, [r0]
fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers;
964c: e5805008 str r5, [r0, #8]
/* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers;
9650: e5807004 str r7, [r0, #4]
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;
9654: 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;
9658: e5823038 str r3, [r2, #56] ; 0x38
/* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize();
965c: eb000895 bl b8b8 <rtems_pipe_initialize> 9660: e3a00000 mov r0, #0
return 0; }
9664: e8bd80f0 pop {r4, r5, r6, r7, pc}
/* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access);
9668: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 966c: ebffe11b bl 1ae0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
9670: eb001167 bl dc14 <__errno> <== NOT EXECUTED 9674: e3a0300c mov r3, #12 <== NOT EXECUTED 9678: e5803000 str r3, [r0] <== NOT EXECUTED 967c: e3e00000 mvn r0, #0 <== NOT EXECUTED 9680: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
9684: 000194c4 .word 0x000194c4 9688: 0001aca4 .word 0x0001aca4 968c: 0001a128 .word 0x0001a128
000026c0 <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 */ ) {
26c0: e92d4070 push {r4, r5, r6, lr}
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
26c4: 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 */ ) {
26c8: e24dd048 sub sp, sp, #72 ; 0x48
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
26cc: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
26d0: e1d333b4 ldrh r3, [r3, #52] ; 0x34 26d4: 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 */ ) {
26d8: e1a05001 mov r5, r1 26dc: 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 ) 26e0: 8a00001e bhi 2760 <IMFS_link+0xa0> rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i );
26e4: e1a00002 mov r0, r2 26e8: eb0046a5 bl 14184 <strlen> 26ec: e28d4004 add r4, sp, #4 26f0: e1a01000 mov r1, r0 26f4: e1a02004 mov r2, r4 26f8: e28d3044 add r3, sp, #68 ; 0x44 26fc: e1a00006 mov r0, r6 2700: eb003002 bl e710 <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(
2704: e3a03ca2 mov r3, #41472 ; 0xa200 2708: e28dc028 add ip, sp, #40 ; 0x28 270c: e1a00005 mov r0, r5 2710: e1a02004 mov r2, r4 2714: e2433001 sub r3, r3, #1 2718: e3a01003 mov r1, #3 271c: e58dc000 str ip, [sp] 2720: eb002cb3 bl d9f4 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node )
2724: e3500000 cmp r0, #0
2728: 0a000011 beq 2774 <IMFS_link+0xb4> rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++;
272c: e59d3028 ldr r3, [sp, #40] ; 0x28 2730: e1d323b4 ldrh r2, [r3, #52] ; 0x34 2734: e2822001 add r2, r2, #1 2738: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
273c: e28d003c add r0, sp, #60 ; 0x3c 2740: e3a01000 mov r1, #0 2744: eb00027e bl 3144 <gettimeofday> 2748: e59d203c ldr r2, [sp, #60] ; 0x3c 274c: e59d3028 ldr r3, [sp, #40] ; 0x28 2750: e5832048 str r2, [r3, #72] ; 0x48 2754: e3a00000 mov r0, #0
return 0; }
2758: e28dd048 add sp, sp, #72 ; 0x48 275c: e8bd8070 pop {r4, r5, r6, pc}
/* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK );
2760: eb0042ae bl 13220 <__errno> 2764: e3a0301f mov r3, #31 2768: e5803000 str r3, [r0] 276c: e3e00000 mvn r0, #0 2770: eafffff8 b 2758 <IMFS_link+0x98>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM );
2774: eb0042a9 bl 13220 <__errno> <== NOT EXECUTED 2778: e3a0300c mov r3, #12 <== NOT EXECUTED 277c: e5803000 str r3, [r0] <== NOT EXECUTED 2780: e3e00000 mvn r0, #0 <== NOT EXECUTED 2784: eafffff3 b 2758 <IMFS_link+0x98> <== NOT EXECUTED
00011340 <IMFS_memfile_addblock>: ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode );
11340: e2503000 subs r3, r0, #0
MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) {
11344: e92d4030 push {r4, r5, lr}
block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 11348: 0a00000f beq 1138c <IMFS_memfile_addblock+0x4c> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
1134c: e593304c ldr r3, [r3, #76] ; 0x4c 11350: e3530005 cmp r3, #5
11354: 1a000012 bne 113a4 <IMFS_memfile_addblock+0x64> 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 );
11358: e3a02001 mov r2, #1 1135c: ebfffe94 bl 10db4 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
11360: e5904000 ldr r4, [r0] 11364: 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 );
11368: e1a05000 mov r5, r0
if ( *block_entry_ptr )
1136c: 13a00000 movne r0, #0 11370: 18bd8030 popne {r4, r5, pc}
#if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block();
11374: ebfffe81 bl 10d80 <memfile_alloc_block>
if ( !memory )
11378: e3500000 cmp r0, #0
return 1; *block_entry_ptr = memory;
1137c: 15850000 strne r0, [r5]
fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory )
11380: 03a00001 moveq r0, #1
return 1; *block_entry_ptr = memory;
11384: 11a00004 movne r0, r4
return 0; }
11388: e8bd8030 pop {r4, r5, pc}
) { block_p memory; block_p *block_entry_ptr; assert( the_jnode );
1138c: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED 11390: e2811001 add r1, r1, #1 <== NOT EXECUTED 11394: e59f0020 ldr r0, [pc, #32] ; 113bc <IMFS_memfile_addblock+0x7c><== NOT EXECUTED 11398: e59f2020 ldr r2, [pc, #32] ; 113c0 <IMFS_memfile_addblock+0x80><== NOT EXECUTED 1139c: e59f3020 ldr r3, [pc, #32] ; 113c4 <IMFS_memfile_addblock+0x84><== NOT EXECUTED 113a0: ebfff575 bl e97c <__assert_func> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
113a4: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED 113a8: e2811001 add r1, r1, #1 <== NOT EXECUTED 113ac: e59f0008 ldr r0, [pc, #8] ; 113bc <IMFS_memfile_addblock+0x7c><== NOT EXECUTED 113b0: e59f2008 ldr r2, [pc, #8] ; 113c0 <IMFS_memfile_addblock+0x80><== NOT EXECUTED 113b4: e59f300c ldr r3, [pc, #12] ; 113c8 <IMFS_memfile_addblock+0x88><== NOT EXECUTED 113b8: ebfff56f bl e97c <__assert_func> <== NOT EXECUTED
113bc: 000205d0 .word 0x000205d0 113c0: 0001fd48 .word 0x0001fd48 113c4: 00020618 .word 0x00020618 113c8: 00020624 .word 0x00020624
000113cc <IMFS_memfile_extend>: MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
113cc: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
113d0: e2504000 subs r4, r0, #0
MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
113d4: e24dd004 sub sp, sp, #4 113d8: e1a08001 mov r8, r1 113dc: e1a06002 mov r6, r2
/* * Perform internal consistency checks */ assert( the_jnode ); 113e0: 0a00004f beq 11524 <IMFS_memfile_extend+0x158> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
113e4: e594304c ldr r3, [r4, #76] ; 0x4c 113e8: e3530005 cmp r3, #5
113ec: 1a000046 bne 1150c <IMFS_memfile_extend+0x140> if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
113f0: e59f3144 ldr r3, [pc, #324] ; 1153c <IMFS_memfile_extend+0x170> 113f4: e593b000 ldr fp, [r3] 113f8: e1a0312b lsr r3, fp, #2 113fc: e0213393 mla r1, r3, r3, r3 11400: e0223391 mla r2, r1, r3, r3 11404: e3a03000 mov r3, #0 11408: e1530006 cmp r3, r6 1140c: e2423001 sub r3, r2, #1 11410: e002039b mul r2, fp, r3
11414: ca000007 bgt 11438 <IMFS_memfile_extend+0x6c> 11418: 0a000004 beq 11430 <IMFS_memfile_extend+0x64> rtems_set_errno_and_return_minus_one( EINVAL );
1141c: eb00077f bl 13220 <__errno> <== NOT EXECUTED 11420: e3a03016 mov r3, #22 <== NOT EXECUTED 11424: e5803000 str r3, [r0] <== NOT EXECUTED 11428: e3e00000 mvn r0, #0 <== NOT EXECUTED 1142c: ea00002e b 114ec <IMFS_memfile_extend+0x120> <== NOT EXECUTED
assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
11430: e1520008 cmp r2, r8
11434: 9afffff8 bls 1141c <IMFS_memfile_extend+0x50> rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size )
11438: e5947054 ldr r7, [r4, #84] ; 0x54 1143c: e1560007 cmp r6, r7 11440: e594a050 ldr sl, [r4, #80] ; 0x50
11444: da000026 ble 114e4 <IMFS_memfile_extend+0x118> /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
11448: e1a0cfcb asr ip, fp, #31 1144c: e1a0300c mov r3, ip 11450: e1a0200b mov r2, fp 11454: e1a00008 mov r0, r8 11458: e1a01006 mov r1, r6 1145c: e58dc000 str ip, [sp] 11460: eb002f7c bl 1d258 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
11464: e59dc000 ldr ip, [sp]
/* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
11468: e1a05000 mov r5, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
1146c: e1a01007 mov r1, r7 11470: e1a0000a mov r0, sl 11474: e1a0200b mov r2, fp 11478: e1a0300c mov r3, ip 1147c: eb002f75 bl 1d258 <__divdi3>
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
11480: e1550000 cmp r5, r0
/* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
11484: e1a0a000 mov sl, r0
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 11488: 3a000019 bcc 114f4 <IMFS_memfile_extend+0x128>
1148c: e1a07000 mov r7, r0 11490: ea000002 b 114a0 <IMFS_memfile_extend+0xd4> 11494: e2877001 add r7, r7, #1 11498: e1550007 cmp r5, r7
1149c: 3a000014 bcc 114f4 <IMFS_memfile_extend+0x128> if ( IMFS_memfile_addblock( the_jnode, block ) ) {
114a0: e1a00004 mov r0, r4 114a4: e1a01007 mov r1, r7 114a8: ebffffa4 bl 11340 <IMFS_memfile_addblock> 114ac: e3500000 cmp r0, #0
114b0: 0afffff7 beq 11494 <IMFS_memfile_extend+0xc8>
114b4: ea000003 b 114c8 <IMFS_memfile_extend+0xfc> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block );
114b8: e1a01007 mov r1, r7 <== NOT EXECUTED 114bc: e1a00004 mov r0, r4 <== NOT EXECUTED
* Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) {
114c0: e2477001 sub r7, r7, #1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
114c4: ebfffeed bl 11080 <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-- ) {
114c8: e15a0007 cmp sl, r7 <== NOT EXECUTED 114cc: 9afffff9 bls 114b8 <IMFS_memfile_extend+0xec> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC );
114d0: eb000752 bl 13220 <__errno> <== NOT EXECUTED 114d4: e3a0301c mov r3, #28 <== NOT EXECUTED 114d8: e5803000 str r3, [r0] <== NOT EXECUTED 114dc: e3e00000 mvn r0, #0 <== NOT EXECUTED 114e0: ea000001 b 114ec <IMFS_memfile_extend+0x120> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 114e4: 0a000005 beq 11500 <IMFS_memfile_extend+0x134> /* * Set the new length of the file. */ the_jnode->info.file.size = new_length;
114e8: e3a00000 mov r0, #0
return 0; }
114ec: e28dd004 add sp, sp, #4 114f0: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc}
/* * Set the new length of the file. */ the_jnode->info.file.size = new_length;
114f4: e5846054 str r6, [r4, #84] ; 0x54 114f8: e5848050 str r8, [r4, #80] ; 0x50 114fc: eafffff9 b 114e8 <IMFS_memfile_extend+0x11c>
rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size )
11500: e158000a cmp r8, sl
11504: 8affffcf bhi 11448 <IMFS_memfile_extend+0x7c>
11508: eafffff6 b 114e8 <IMFS_memfile_extend+0x11c>
assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
1150c: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED 11510: e2811001 add r1, r1, #1 <== NOT EXECUTED 11514: e59f0024 ldr r0, [pc, #36] ; 11540 <IMFS_memfile_extend+0x174><== NOT EXECUTED 11518: e59f2024 ldr r2, [pc, #36] ; 11544 <IMFS_memfile_extend+0x178><== NOT EXECUTED 1151c: e59f3024 ldr r3, [pc, #36] ; 11548 <IMFS_memfile_extend+0x17c><== NOT EXECUTED 11520: ebfff515 bl e97c <__assert_func> <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
11524: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED 11528: e2811001 add r1, r1, #1 <== NOT EXECUTED 1152c: e59f000c ldr r0, [pc, #12] ; 11540 <IMFS_memfile_extend+0x174><== NOT EXECUTED 11530: e59f200c ldr r2, [pc, #12] ; 11544 <IMFS_memfile_extend+0x178><== NOT EXECUTED 11534: e59f3010 ldr r3, [pc, #16] ; 1154c <IMFS_memfile_extend+0x180><== NOT EXECUTED 11538: ebfff50f bl e97c <__assert_func> <== NOT EXECUTED
1153c: 000209ac .word 0x000209ac 11540: 000205d0 .word 0x000205d0 11544: 0001fd60 .word 0x0001fd60 11548: 00020624 .word 0x00020624 1154c: 00020618 .word 0x00020618
00010db4 <IMFS_memfile_get_block_pointer>: #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
10db4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
10db8: e2504000 subs r4, r0, #0
#endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
10dbc: e24dd004 sub sp, sp, #4
/* * Perform internal consistency checks */ assert( the_jnode ); 10dc0: 0a000078 beq 10fa8 <IMFS_memfile_get_block_pointer+0x1f4> if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE );
10dc4: e594304c ldr r3, [r4, #76] ; 0x4c 10dc8: e3530005 cmp r3, #5
10dcc: 1a000070 bne 10f94 <IMFS_memfile_get_block_pointer+0x1e0> /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) {
10dd0: e59f320c ldr r3, [pc, #524] ; 10fe4 <IMFS_memfile_get_block_pointer+0x230> 10dd4: e5935000 ldr r5, [r3] 10dd8: e1a05125 lsr r5, r5, #2 10ddc: e2453001 sub r3, r5, #1 10de0: e1510003 cmp r1, r3
10de4: 9a000019 bls 10e50 <IMFS_memfile_get_block_pointer+0x9c> /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) {
10de8: e0265595 mla r6, r5, r5, r5 <== NOT EXECUTED 10dec: e2463001 sub r3, r6, #1 <== NOT EXECUTED 10df0: e1510003 cmp r1, r3 <== NOT EXECUTED 10df4: 8a000025 bhi 10e90 <IMFS_memfile_get_block_pointer+0xdc> <== NOT EXECUTED
#if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT;
10df8: e0656001 rsb r6, r5, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10dfc: e1a00006 mov r0, r6 <== NOT EXECUTED 10e00: e1a01005 mov r1, r5 <== NOT EXECUTED 10e04: e58d2000 str r2, [sp] <== NOT EXECUTED 10e08: eb002e65 bl 1c7a4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
10e0c: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10e10: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
10e14: e1a00006 mov r0, r6 <== NOT EXECUTED 10e18: eb002e1d bl 1c694 <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect; if ( malloc_it ) {
10e1c: e59d2000 ldr r2, [sp] <== NOT EXECUTED 10e20: e3520000 cmp r2, #0 <== NOT EXECUTED
#endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
10e24: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->doubly_indirect;
10e28: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( malloc_it ) {
10e2c: 0a000044 beq 10f44 <IMFS_memfile_get_block_pointer+0x190> <== NOT EXECUTED
if ( !p ) {
10e30: e3530000 cmp r3, #0 <== NOT EXECUTED 10e34: 0a000049 beq 10f60 <IMFS_memfile_get_block_pointer+0x1ac> <== NOT EXECUTED
if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ];
10e38: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
10e3c: e3500000 cmp r0, #0 <== NOT EXECUTED
if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ];
10e40: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
10e44: 0a000034 beq 10f1c <IMFS_memfile_get_block_pointer+0x168> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
10e48: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 10e4c: ea000005 b 10e68 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) {
10e50: e3520000 cmp r2, #0
if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect;
10e54: e5940058 ldr r0, [r4, #88] ; 0x58
if ( malloc_it ) { 10e58: 0a000035 beq 10f34 <IMFS_memfile_get_block_pointer+0x180> if ( !p ) {
10e5c: e3500000 cmp r0, #0
10e60: 0a000002 beq 10e70 <IMFS_memfile_get_block_pointer+0xbc> } if ( !p ) return 0; return &info->indirect[ my_block ];
10e64: e0800101 add r0, r0, r1, lsl #2
/* * This means the requested block number is out of range. */ return 0; }
10e68: e28dd004 add sp, sp, #4 10e6c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block();
10e70: e58d1000 str r1, [sp] 10e74: ebffffc1 bl 10d80 <memfile_alloc_block>
if ( !p )
10e78: e3500000 cmp r0, #0 10e7c: e59d1000 ldr r1, [sp]
return 0; info->indirect = p;
10e80: 15840058 strne r0, [r4, #88] ; 0x58
if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 10e84: 1afffff6 bne 10e64 <IMFS_memfile_get_block_pointer+0xb0> p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
10e88: e3a00000 mov r0, #0 <== NOT EXECUTED 10e8c: eafffff5 b 10e68 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
#endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) {
10e90: e0235596 mla r3, r6, r5, r5 <== NOT EXECUTED 10e94: e2433001 sub r3, r3, #1 <== NOT EXECUTED 10e98: e1510003 cmp r1, r3 <== NOT EXECUTED 10e9c: 8afffff9 bhi 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
10ea0: e0666001 rsb r6, r6, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10ea4: e1a00006 mov r0, r6 <== NOT EXECUTED 10ea8: e1a01005 mov r1, r5 <== NOT EXECUTED 10eac: e58d2000 str r2, [sp] <== NOT EXECUTED 10eb0: eb002e3b bl 1c7a4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
10eb4: e1a01005 mov r1, r5 <== NOT EXECUTED
*/ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10eb8: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
10ebc: e1a00006 mov r0, r6 <== NOT EXECUTED 10ec0: eb002df3 bl 1c694 <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
10ec4: 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;
10ec8: e1a08000 mov r8, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
10ecc: eb002df0 bl 1c694 <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
10ed0: 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;
10ed4: e1a06000 mov r6, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
10ed8: e1a00008 mov r0, r8 <== NOT EXECUTED 10edc: eb002e30 bl 1c7a4 <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect; if ( malloc_it ) {
10ee0: e59d2000 ldr r2, [sp] <== NOT EXECUTED 10ee4: e3520000 cmp r2, #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;
10ee8: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->triply_indirect;
10eec: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if ( malloc_it ) {
10ef0: 0a00001f beq 10f74 <IMFS_memfile_get_block_pointer+0x1c0> <== NOT EXECUTED
if ( !p ) {
10ef4: e3530000 cmp r3, #0 <== NOT EXECUTED 10ef8: 0a000034 beq 10fd0 <IMFS_memfile_get_block_pointer+0x21c> <== NOT EXECUTED
if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ];
10efc: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
10f00: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ];
10f04: e0836106 add r6, r3, r6, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
10f08: 0a00002b beq 10fbc <IMFS_memfile_get_block_pointer+0x208> <== NOT EXECUTED
if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ];
10f0c: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED
if ( !p2 ) {
10f10: e3500000 cmp r0, #0 <== NOT EXECUTED
if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ];
10f14: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED
if ( !p2 ) {
10f18: 1affffca bne 10e48 <IMFS_memfile_get_block_pointer+0x94> <== NOT EXECUTED
p2 = memfile_alloc_block();
10f1c: ebffff97 bl 10d80 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
10f20: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0; p1[ doubly ] = (block_p) p2;
10f24: 15850000 strne r0, [r5] <== NOT EXECUTED
} p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 )
10f28: 0affffd6 beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
10f2c: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 10f30: eaffffcc b 10e68 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p )
10f34: e3500000 cmp r0, #0
10f38: 1affffc9 bne 10e64 <IMFS_memfile_get_block_pointer+0xb0> p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
10f3c: e3a00000 mov r0, #0 <== NOT EXECUTED 10f40: eaffffc8 b 10e68 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
} return (block_p *)&p1[ singly ]; } if ( !p )
10f44: e3530000 cmp r3, #0 <== NOT EXECUTED 10f48: 0affffce beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0; p = (block_p *)p[ doubly ];
10f4c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
if ( !p )
10f50: e3500000 cmp r0, #0 <== NOT EXECUTED 10f54: 0affffcb beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
10f58: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 10f5c: eaffffc1 b 10e68 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block();
10f60: ebffff86 bl 10d80 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
10f64: e2503000 subs r3, r0, #0 <== NOT EXECUTED 10f68: 0affffc6 beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0; info->doubly_indirect = p;
10f6c: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED 10f70: eaffffb0 b 10e38 <IMFS_memfile_get_block_pointer+0x84> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p )
10f74: e3530000 cmp r3, #0 <== NOT EXECUTED 10f78: 0affffc2 beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
#if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ];
10f7c: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p1 )
10f80: e3530000 cmp r3, #0 <== NOT EXECUTED 10f84: 0affffbf beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
10f88: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED 10f8c: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED 10f90: eaffffb4 b 10e68 <IMFS_memfile_get_block_pointer+0xb4> <== NOT EXECUTED
assert( the_jnode ); if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE );
10f94: e59f004c ldr r0, [pc, #76] ; 10fe8 <IMFS_memfile_get_block_pointer+0x234><== NOT EXECUTED 10f98: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED 10f9c: e59f2048 ldr r2, [pc, #72] ; 10fec <IMFS_memfile_get_block_pointer+0x238><== NOT EXECUTED 10fa0: e59f3048 ldr r3, [pc, #72] ; 10ff0 <IMFS_memfile_get_block_pointer+0x23c><== NOT EXECUTED 10fa4: ebfff674 bl e97c <__assert_func> <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
10fa8: e59f0038 ldr r0, [pc, #56] ; 10fe8 <IMFS_memfile_get_block_pointer+0x234><== NOT EXECUTED 10fac: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED 10fb0: e59f2034 ldr r2, [pc, #52] ; 10fec <IMFS_memfile_get_block_pointer+0x238><== NOT EXECUTED 10fb4: e59f3038 ldr r3, [pc, #56] ; 10ff4 <IMFS_memfile_get_block_pointer+0x240><== NOT EXECUTED 10fb8: ebfff66f bl e97c <__assert_func> <== NOT EXECUTED
info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block();
10fbc: ebffff6f bl 10d80 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
10fc0: e2502000 subs r2, r0, #0 <== NOT EXECUTED 10fc4: 0affffaf beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0; p[ triply ] = (block_p) p1;
10fc8: e5862000 str r2, [r6] <== NOT EXECUTED 10fcc: eaffffce b 10f0c <IMFS_memfile_get_block_pointer+0x158> <== NOT EXECUTED
p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block();
10fd0: ebffff6a bl 10d80 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
10fd4: e2503000 subs r3, r0, #0 <== NOT EXECUTED 10fd8: 0affffaa beq 10e88 <IMFS_memfile_get_block_pointer+0xd4> <== NOT EXECUTED
return 0; info->triply_indirect = p;
10fdc: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED 10fe0: eaffffc5 b 10efc <IMFS_memfile_get_block_pointer+0x148> <== NOT EXECUTED
10fe4: 000209ac .word 0x000209ac 10fe8: 000205d0 .word 0x000205d0 10fec: 0001fcd8 .word 0x0001fcd8 10ff0: 00020624 .word 0x00020624 10ff4: 00020618 .word 0x00020618
000119e8 <IMFS_memfile_read>: IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
119e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
119ec: e2509000 subs r9, r0, #0
IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
119f0: e24dd014 sub sp, sp, #20 119f4: e1a08003 mov r8, r3 119f8: e1a0a001 mov sl, r1 119fc: e1a0b002 mov fp, r2 11a00: e59d5038 ldr r5, [sp, #56] ; 0x38
/* * Perform internal consistency checks */ assert( the_jnode ); 11a04: 0a000095 beq 11c60 <IMFS_memfile_read+0x278> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ||
11a08: e599304c ldr r3, [r9, #76] ; 0x4c 11a0c: e2432005 sub r2, r3, #5 11a10: e3520001 cmp r2, #1
11a14: 8a00008b bhi 11c48 <IMFS_memfile_read+0x260> /* * Error checks on arguments */ assert( dest );
11a18: e3580000 cmp r8, #0
11a1c: 0a00009a beq 11c8c <IMFS_memfile_read+0x2a4> /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length )
11a20: e3550000 cmp r5, #0
11a24: 0a000076 beq 11c04 <IMFS_memfile_read+0x21c> /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) {
11a28: e3530006 cmp r3, #6
11a2c: 0a00005a beq 11b9c <IMFS_memfile_read+0x1b4> * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size )
11a30: e5993054 ldr r3, [r9, #84] ; 0x54 11a34: e3a02000 mov r2, #0 11a38: e1520003 cmp r2, r3
/* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length;
11a3c: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
11a40: e5992050 ldr r2, [r9, #80] ; 0x50 11a44: e0851001 add r1, r5, r1
11a48: ca000051 bgt 11b94 <IMFS_memfile_read+0x1ac> 11a4c: 0a00004e beq 11b8c <IMFS_memfile_read+0x1a4> /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
11a50: e59f624c ldr r6, [pc, #588] ; 11ca4 <IMFS_memfile_read+0x2bc> 11a54: e5964000 ldr r4, [r6] 11a58: e1a0000a mov r0, sl 11a5c: e1a02004 mov r2, r4 11a60: e1a03fc2 asr r3, r2, #31 11a64: e1a0100b mov r1, fp 11a68: e98d000c stmib sp, {r2, r3} 11a6c: eb002f23 bl 1d700 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
11a70: e1a0100b mov r1, fp
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
11a74: e1a0c000 mov ip, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
11a78: e99d000c ldmib sp, {r2, r3} 11a7c: e1a0000a mov r0, sl 11a80: e58dc000 str ip, [sp] 11a84: eb002df3 bl 1d258 <__divdi3>
if ( start_offset ) {
11a88: e59dc000 ldr ip, [sp] 11a8c: e35c0000 cmp ip, #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;
11a90: e1a07000 mov r7, r0
if ( start_offset ) {
11a94: 01a0a00c moveq sl, ip
11a98: 0a000013 beq 11aec <IMFS_memfile_read+0x104> to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11a9c: e1a00009 mov r0, r9 11aa0: e1a01007 mov r1, r7 11aa4: e3a02000 mov r2, #0 11aa8: e58dc000 str ip, [sp] 11aac: ebfffcc0 bl 10db4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
11ab0: e3500000 cmp r0, #0 11ab4: e59dc000 ldr ip, [sp]
11ab8: 0a00006d beq 11c74 <IMFS_memfile_read+0x28c> */ 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;
11abc: e06ca004 rsb sl, ip, r4
to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
11ac0: 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;
11ac4: e155000a cmp r5, sl 11ac8: 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 );
11acc: e1a00008 mov r0, r8 11ad0: e081100c add r1, r1, ip 11ad4: e1a0200a mov r2, sl 11ad8: eb0007de bl 13a58 <memcpy>
dest += to_copy; block++; my_length -= to_copy;
11adc: e5964000 ldr r4, [r6]
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy;
11ae0: e088800a add r8, r8, sl
block++;
11ae4: e2877001 add r7, r7, #1
my_length -= to_copy;
11ae8: e06a5005 rsb r5, sl, r5
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
11aec: e1550004 cmp r5, r4
11af0: 3a000010 bcc 11b38 <IMFS_memfile_read+0x150> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11af4: e1a00009 mov r0, r9 11af8: e1a01007 mov r1, r7 11afc: e3a02000 mov r2, #0 11b00: ebfffcab bl 10db4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
11b04: e3500000 cmp r0, #0
11b08: 0a000042 beq 11c18 <IMFS_memfile_read+0x230> if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
11b0c: e5901000 ldr r1, [r0] 11b10: e1a02004 mov r2, r4 11b14: e1a00008 mov r0, r8 11b18: eb0007ce bl 13a58 <memcpy>
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
11b1c: e5963000 ldr r3, [r6]
if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy;
11b20: e0645005 rsb r5, r4, r5
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
11b24: e1530005 cmp r3, r5
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy;
11b28: e0888004 add r8, r8, r4
block++;
11b2c: e2877001 add r7, r7, #1
my_length -= to_copy; copied += to_copy;
11b30: e08aa004 add sl, sl, r4
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11b34: 9affffee bls 11af4 <IMFS_memfile_read+0x10c> * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) {
11b38: e3550000 cmp r5, #0
11b3c: 0a00000a beq 11b6c <IMFS_memfile_read+0x184> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11b40: e1a01007 mov r1, r7 11b44: e1a00009 mov r0, r9 11b48: e3a02000 mov r2, #0 11b4c: ebfffc98 bl 10db4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
11b50: e2503000 subs r3, r0, #0
11b54: 0a000035 beq 11c30 <IMFS_memfile_read+0x248> if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length );
11b58: e1a00008 mov r0, r8 11b5c: e5931000 ldr r1, [r3] 11b60: e1a02005 mov r2, r5 11b64: eb0007bb bl 13a58 <memcpy>
copied += my_length;
11b68: e08aa005 add sl, sl, r5
} IMFS_update_atime( the_jnode );
11b6c: e28d000c add r0, sp, #12 11b70: e3a01000 mov r1, #0 11b74: ebffc572 bl 3144 <gettimeofday> 11b78: e59d300c ldr r3, [sp, #12] 11b7c: e5893040 str r3, [r9, #64] ; 0x40
return copied;
11b80: e1a0000a mov r0, sl
}
11b84: e28dd014 add sp, sp, #20 11b88: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size )
11b8c: e1510002 cmp r1, r2
11b90: 9affffae bls 11a50 <IMFS_memfile_read+0x68> my_length = the_jnode->info.file.size - start;
11b94: e0635002 rsb r5, r3, r2 11b98: eaffffac b 11a50 <IMFS_memfile_read+0x68>
if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start))
11b9c: e2894050 add r4, r9, #80 ; 0x50 <== NOT EXECUTED 11ba0: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED 11ba4: e1a00003 mov r0, r3 <== NOT EXECUTED 11ba8: e1a01004 mov r1, r4 <== NOT EXECUTED 11bac: e3a02000 mov r2, #0 <== NOT EXECUTED 11bb0: e050000a subs r0, r0, sl <== NOT EXECUTED 11bb4: e0c1100b sbc r1, r1, fp <== NOT EXECUTED 11bb8: e1520001 cmp r2, r1 <== NOT EXECUTED
* than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
11bbc: e5992058 ldr r2, [r9, #88] ; 0x58 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
11bc0: da00000b ble 11bf4 <IMFS_memfile_read+0x20c> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
11bc4: e06a5003 rsb r5, sl, r3 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
11bc8: e082100a add r1, r2, sl <== NOT EXECUTED 11bcc: e1a00008 mov r0, r8 <== NOT EXECUTED 11bd0: e1a02005 mov r2, r5 <== NOT EXECUTED 11bd4: eb00079f bl 13a58 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
11bd8: e28d000c add r0, sp, #12 <== NOT EXECUTED 11bdc: e3a01000 mov r1, #0 <== NOT EXECUTED 11be0: ebffc557 bl 3144 <gettimeofday> <== NOT EXECUTED 11be4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
return my_length;
11be8: e1a00005 mov r0, r5 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); IMFS_update_atime( the_jnode );
11bec: e5893040 str r3, [r9, #64] ; 0x40 <== NOT EXECUTED
return my_length;
11bf0: eaffffe3 b 11b84 <IMFS_memfile_read+0x19c> <== NOT EXECUTED
if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start))
11bf4: 1afffff3 bne 11bc8 <IMFS_memfile_read+0x1e0> <== NOT EXECUTED 11bf8: e1550000 cmp r5, r0 <== NOT EXECUTED 11bfc: 9afffff1 bls 11bc8 <IMFS_memfile_read+0x1e0> <== NOT EXECUTED 11c00: eaffffef b 11bc4 <IMFS_memfile_read+0x1dc> <== NOT EXECUTED
* If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL );
11c04: eb000585 bl 13220 <__errno> <== NOT EXECUTED 11c08: e3a03016 mov r3, #22 <== NOT EXECUTED 11c0c: e5803000 str r3, [r0] <== NOT EXECUTED 11c10: e3e00000 mvn r0, #0 <== NOT EXECUTED 11c14: eaffffda b 11b84 <IMFS_memfile_read+0x19c> <== NOT EXECUTED
*/ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr );
11c18: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED 11c1c: e2811003 add r1, r1, #3 <== NOT EXECUTED 11c20: e59f0080 ldr r0, [pc, #128] ; 11ca8 <IMFS_memfile_read+0x2c0><== NOT EXECUTED 11c24: e59f2080 ldr r2, [pc, #128] ; 11cac <IMFS_memfile_read+0x2c4><== NOT EXECUTED 11c28: e59f3080 ldr r3, [pc, #128] ; 11cb0 <IMFS_memfile_read+0x2c8><== NOT EXECUTED 11c2c: ebfff352 bl e97c <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr );
11c30: e3a01fae mov r1, #696 ; 0x2b8 <== NOT EXECUTED 11c34: e2811001 add r1, r1, #1 <== NOT EXECUTED 11c38: e59f0068 ldr r0, [pc, #104] ; 11ca8 <IMFS_memfile_read+0x2c0><== NOT EXECUTED 11c3c: e59f2068 ldr r2, [pc, #104] ; 11cac <IMFS_memfile_read+0x2c4><== NOT EXECUTED 11c40: e59f3068 ldr r3, [pc, #104] ; 11cb0 <IMFS_memfile_read+0x2c8><== NOT EXECUTED 11c44: ebfff34c bl e97c <__assert_func> <== NOT EXECUTED
assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ||
11c48: e3a01e25 mov r1, #592 ; 0x250 <== NOT EXECUTED 11c4c: e2811001 add r1, r1, #1 <== NOT EXECUTED 11c50: e59f0050 ldr r0, [pc, #80] ; 11ca8 <IMFS_memfile_read+0x2c0><== NOT EXECUTED 11c54: e59f2050 ldr r2, [pc, #80] ; 11cac <IMFS_memfile_read+0x2c4><== NOT EXECUTED 11c58: e59f3054 ldr r3, [pc, #84] ; 11cb4 <IMFS_memfile_read+0x2cc><== NOT EXECUTED 11c5c: ebfff346 bl e97c <__assert_func> <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
11c60: e59f0040 ldr r0, [pc, #64] ; 11ca8 <IMFS_memfile_read+0x2c0><== NOT EXECUTED 11c64: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED 11c68: e59f203c ldr r2, [pc, #60] ; 11cac <IMFS_memfile_read+0x2c4><== NOT EXECUTED 11c6c: e59f3044 ldr r3, [pc, #68] ; 11cb8 <IMFS_memfile_read+0x2d0><== NOT EXECUTED 11c70: ebfff341 bl e97c <__assert_func> <== NOT EXECUTED
if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr );
11c74: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED 11c78: e2811002 add r1, r1, #2 <== NOT EXECUTED 11c7c: e59f0024 ldr r0, [pc, #36] ; 11ca8 <IMFS_memfile_read+0x2c0><== NOT EXECUTED 11c80: e59f2024 ldr r2, [pc, #36] ; 11cac <IMFS_memfile_read+0x2c4><== NOT EXECUTED 11c84: e59f3024 ldr r3, [pc, #36] ; 11cb0 <IMFS_memfile_read+0x2c8><== NOT EXECUTED 11c88: ebfff33b bl e97c <__assert_func> <== NOT EXECUTED
/* * Error checks on arguments */ assert( dest );
11c8c: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED 11c90: e2811002 add r1, r1, #2 <== NOT EXECUTED 11c94: e59f000c ldr r0, [pc, #12] ; 11ca8 <IMFS_memfile_read+0x2c0><== NOT EXECUTED 11c98: e59f200c ldr r2, [pc, #12] ; 11cac <IMFS_memfile_read+0x2c4><== NOT EXECUTED 11c9c: e59f3018 ldr r3, [pc, #24] ; 11cbc <IMFS_memfile_read+0x2d4><== NOT EXECUTED 11ca0: ebfff335 bl e97c <__assert_func> <== NOT EXECUTED
11ca4: 000209ac .word 0x000209ac 11ca8: 000205d0 .word 0x000205d0 11cac: 0001fd88 .word 0x0001fd88 11cb0: 00020654 .word 0x00020654 11cb4: 00020668 .word 0x00020668 11cb8: 00020618 .word 0x00020618 11cbc: 000206b4 .word 0x000206b4
000110d0 <IMFS_memfile_remove>: */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) {
110d0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
110d4: e250a000 subs sl, r0, #0
110d8: 0a00004f beq 1121c <IMFS_memfile_remove+0x14c> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
110dc: e59a304c ldr r3, [sl, #76] ; 0x4c 110e0: e3530005 cmp r3, #5
110e4: 1a000052 bne 11234 <IMFS_memfile_remove+0x164> /* * 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;
110e8: e59f615c ldr r6, [pc, #348] ; 1124c <IMFS_memfile_remove+0x17c>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
110ec: e59a3058 ldr r3, [sl, #88] ; 0x58
/* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS;
110f0: e5967000 ldr r7, [r6]
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
110f4: 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;
110f8: e1a07127 lsr r7, r7, #2
*/ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free );
110fc: 128a0058 addne r0, sl, #88 ; 0x58 11100: 11a01007 movne r1, r7 11104: 1bffffbb blne 10ff8 <memfile_free_blocks_in_table>
} if ( info->doubly_indirect ) {
11108: e59a305c ldr r3, [sl, #92] ; 0x5c 1110c: e3530000 cmp r3, #0
11110: 0a000014 beq 11168 <IMFS_memfile_remove+0x98> for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
11114: e5962000 ldr r2, [r6] <== NOT EXECUTED 11118: e1b02122 lsrs r2, r2, #2 <== NOT EXECUTED 1111c: 0a00000e beq 1115c <IMFS_memfile_remove+0x8c> <== NOT EXECUTED 11120: e3a02000 mov r2, #0 <== NOT EXECUTED 11124: e1a04002 mov r4, r2 <== NOT EXECUTED 11128: ea000000 b 11130 <IMFS_memfile_remove+0x60> <== NOT EXECUTED 1112c: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
11130: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED 11134: e3510000 cmp r1, #0 <== NOT EXECUTED 11138: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED
memfile_free_blocks_in_table(
1113c: 10830002 addne r0, r3, r2 <== NOT EXECUTED 11140: 11a01007 movne r1, r7 <== NOT EXECUTED 11144: 1bffffab blne 10ff8 <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++ ) {
11148: e5963000 ldr r3, [r6] <== NOT EXECUTED 1114c: e2844001 add r4, r4, #1 <== NOT EXECUTED 11150: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED 11154: e1a02004 mov r2, r4 <== NOT EXECUTED 11158: 3afffff3 bcc 1112c <IMFS_memfile_remove+0x5c> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
1115c: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 11160: e1a01007 mov r1, r7 <== NOT EXECUTED 11164: ebffffa3 bl 10ff8 <memfile_free_blocks_in_table> <== NOT EXECUTED
} if ( info->triply_indirect ) {
11168: e59a0060 ldr r0, [sl, #96] ; 0x60 1116c: e3500000 cmp r0, #0
11170: 0a000027 beq 11214 <IMFS_memfile_remove+0x144> for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
11174: e5963000 ldr r3, [r6] <== NOT EXECUTED 11178: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED 1117c: 0a000021 beq 11208 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
11180: e5905000 ldr r5, [r0] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
11184: e3550000 cmp r5, #0 <== NOT EXECUTED 11188: 13a09000 movne r9, #0 <== NOT EXECUTED 1118c: 11a08009 movne r8, r9 <== NOT EXECUTED 11190: 0a00001c beq 11208 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
break; for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
11194: e3530000 cmp r3, #0 <== NOT EXECUTED 11198: 0a00000d beq 111d4 <IMFS_memfile_remove+0x104> <== NOT EXECUTED 1119c: e3a00000 mov r0, #0 <== NOT EXECUTED 111a0: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( p[j] ) {
111a4: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED 111a8: e3530000 cmp r3, #0 <== NOT EXECUTED 111ac: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
111b0: 10850000 addne r0, r5, r0 <== NOT EXECUTED 111b4: 11a01007 movne r1, r7 <== NOT EXECUTED 111b8: 1bffff8e blne 10ff8 <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++ ) {
111bc: e5963000 ldr r3, [r6] <== NOT EXECUTED 111c0: e2844001 add r4, r4, #1 <== NOT EXECUTED 111c4: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED 111c8: e1a00004 mov r0, r4 <== NOT EXECUTED 111cc: 3afffff4 bcc 111a4 <IMFS_memfile_remove+0xd4> <== NOT EXECUTED 111d0: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table(
111d4: e0800009 add r0, r0, r9 <== NOT EXECUTED 111d8: e1a01007 mov r1, r7 <== NOT EXECUTED 111dc: ebffff85 bl 10ff8 <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++ ) {
111e0: e5963000 ldr r3, [r6] <== NOT EXECUTED 111e4: e2888001 add r8, r8, #1 <== NOT EXECUTED 111e8: e1a03123 lsr r3, r3, #2 <== NOT EXECUTED 111ec: e1530008 cmp r3, r8 <== NOT EXECUTED 111f0: 9a000004 bls 11208 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
111f4: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED 111f8: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
111fc: e3550000 cmp r5, #0 <== NOT EXECUTED 11200: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED 11204: 1affffe2 bne 11194 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
} } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table(
11208: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED 1120c: e1a01007 mov r1, r7 <== NOT EXECUTED 11210: ebffff78 bl 10ff8 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free ); } return 0; }
11214: e3a00000 mov r0, #0 11218: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/* * Perform internal consistency checks */ assert( the_jnode );
1121c: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED 11220: e2811002 add r1, r1, #2 <== NOT EXECUTED 11224: e59f0024 ldr r0, [pc, #36] ; 11250 <IMFS_memfile_remove+0x180><== NOT EXECUTED 11228: e59f2024 ldr r2, [pc, #36] ; 11254 <IMFS_memfile_remove+0x184><== NOT EXECUTED 1122c: e59f3024 ldr r3, [pc, #36] ; 11258 <IMFS_memfile_remove+0x188><== NOT EXECUTED 11230: ebfff5d1 bl e97c <__assert_func> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
11234: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED 11238: e2811002 add r1, r1, #2 <== NOT EXECUTED 1123c: e59f000c ldr r0, [pc, #12] ; 11250 <IMFS_memfile_remove+0x180><== NOT EXECUTED 11240: e59f200c ldr r2, [pc, #12] ; 11254 <IMFS_memfile_remove+0x184><== NOT EXECUTED 11244: e59f3010 ldr r3, [pc, #16] ; 1125c <IMFS_memfile_remove+0x18c><== NOT EXECUTED 11248: ebfff5cb bl e97c <__assert_func> <== NOT EXECUTED
1124c: 000209ac .word 0x000209ac 11250: 000205d0 .word 0x000205d0 11254: 0001fd34 .word 0x0001fd34 11258: 00020618 .word 0x00020618 1125c: 00020624 .word 0x00020624
00011080 <IMFS_memfile_remove_block>: MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) {
11080: 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 );
11084: e3a02000 mov r2, #0 <== NOT EXECUTED 11088: ebffff49 bl 10db4 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
1108c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 11090: 0a000005 beq 110ac <IMFS_memfile_remove_block+0x2c> <== NOT EXECUTED
if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0;
11094: 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;
11098: e5930000 ldr r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
1109c: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
110a0: ebffff2e bl 10d60 <memfile_free_block> <== NOT EXECUTED
} return 1; }
110a4: e3a00001 mov r0, #1 <== NOT EXECUTED 110a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{ block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr );
110ac: e3a01f65 mov r1, #404 ; 0x194 <== NOT EXECUTED 110b0: e2811002 add r1, r1, #2 <== NOT EXECUTED 110b4: e59f0008 ldr r0, [pc, #8] ; 110c4 <IMFS_memfile_remove_block+0x44><== NOT EXECUTED 110b8: e59f2008 ldr r2, [pc, #8] ; 110c8 <IMFS_memfile_remove_block+0x48><== NOT EXECUTED 110bc: e59f3008 ldr r3, [pc, #8] ; 110cc <IMFS_memfile_remove_block+0x4c><== NOT EXECUTED 110c0: ebfff62d bl e97c <__assert_func> <== NOT EXECUTED
110c4: 000205d0 .word 0x000205d0 110c8: 0001fd18 .word 0x0001fd18 110cc: 00020654 .word 0x00020654
00011668 <IMFS_memfile_write>: IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
11668: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
1166c: e2509000 subs r9, r0, #0
IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
11670: e24dd014 sub sp, sp, #20 11674: e1a06001 mov r6, r1 11678: e1a07002 mov r7, r2 1167c: e1a08003 mov r8, r3 11680: e59da038 ldr sl, [sp, #56] ; 0x38
/* * Perform internal consistency checks */ assert( the_jnode ); 11684: 0a000084 beq 1189c <IMFS_memfile_write+0x234> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
11688: e599304c ldr r3, [r9, #76] ; 0x4c 1168c: e3530005 cmp r3, #5
11690: 1a000075 bne 1186c <IMFS_memfile_write+0x204> /* * Error check arguments */ assert( source );
11694: e3580000 cmp r8, #0
11698: 0a00006d beq 11854 <IMFS_memfile_write+0x1ec> /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length )
1169c: e35a0000 cmp sl, #0
116a0: 0a000061 beq 1182c <IMFS_memfile_write+0x1c4> * 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 ) {
116a4: e5993054 ldr r3, [r9, #84] ; 0x54 116a8: e3530000 cmp r3, #0 116ac: e08a1001 add r1, sl, r1
116b0: ba000053 blt 11804 <IMFS_memfile_write+0x19c> 116b4: 0a00004f beq 117f8 <IMFS_memfile_write+0x190> /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
116b8: e59f5208 ldr r5, [pc, #520] ; 118c8 <IMFS_memfile_write+0x260> 116bc: e5954000 ldr r4, [r5] 116c0: e1a00006 mov r0, r6 116c4: e1a02004 mov r2, r4 116c8: e1a03fc2 asr r3, r2, #31 116cc: e1a01007 mov r1, r7 116d0: e98d000c stmib sp, {r2, r3} 116d4: eb003009 bl 1d700 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
116d8: e1a01007 mov r1, r7
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
116dc: e1a0b000 mov fp, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
116e0: e99d000c ldmib sp, {r2, r3} 116e4: e1a00006 mov r0, r6 116e8: eb002eda bl 1d258 <__divdi3>
if ( start_offset ) {
116ec: e35b0000 cmp fp, #0 116f0: 01a0700a moveq r7, sl
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
116f4: e1a06000 mov r6, r0
if ( start_offset ) {
116f8: 01a0a00b moveq sl, fp
116fc: 0a000014 beq 11754 <IMFS_memfile_write+0xec> 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 );
11700: e1a00009 mov r0, r9 11704: e1a01006 mov r1, r6 11708: e3a02000 mov r2, #0 1170c: ebfffda8 bl 10db4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
11710: e3500000 cmp r0, #0
11714: 0a000066 beq 118b4 <IMFS_memfile_write+0x24c> */ 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;
11718: e06b3004 rsb r3, fp, r4
if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
1171c: 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;
11720: e153000a cmp r3, sl 11724: 21a0300a movcs r3, sl
if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
11728: e1a01008 mov r1, r8 1172c: e1a02003 mov r2, r3 11730: e080000b add r0, r0, fp 11734: e58d3000 str r3, [sp] 11738: eb0008c6 bl 13a58 <memcpy>
src += to_copy;
1173c: e59d3000 ldr r3, [sp]
block++; my_length -= to_copy; copied += to_copy;
11740: e5954000 ldr r4, [r5]
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy;
11744: e063700a rsb r7, r3, sl
return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy;
11748: e0888003 add r8, r8, r3
block++;
1174c: e2866001 add r6, r6, #1
my_length -= to_copy; copied += to_copy;
11750: e1a0a003 mov sl, r3
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
11754: e1570004 cmp r7, r4
11758: 3a000010 bcc 117a0 <IMFS_memfile_write+0x138> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1175c: e1a00009 mov r0, r9 11760: e1a01006 mov r1, r6 11764: e3a02000 mov r2, #0 11768: ebfffd91 bl 10db4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
1176c: e3500000 cmp r0, #0
11770: 0a000032 beq 11840 <IMFS_memfile_write+0x1d8> 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 );
11774: e1a01008 mov r1, r8 11778: e5900000 ldr r0, [r0] 1177c: e1a02004 mov r2, r4 11780: eb0008b4 bl 13a58 <memcpy>
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
11784: e5953000 ldr r3, [r5]
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy;
11788: e0647007 rsb r7, r4, r7
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
1178c: e1530007 cmp r3, r7
return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy;
11790: e0888004 add r8, r8, r4
block++;
11794: e2866001 add r6, r6, #1
* * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write(
11798: e08aa004 add sl, sl, r4
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1179c: 9affffee bls 1175c <IMFS_memfile_write+0xf4> */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) {
117a0: e3570000 cmp r7, #0
117a4: 0a00000a beq 117d4 <IMFS_memfile_write+0x16c> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
117a8: e1a01006 mov r1, r6 117ac: e1a00009 mov r0, r9 117b0: e3a02000 mov r2, #0 117b4: ebfffd7e bl 10db4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
117b8: e3500000 cmp r0, #0
117bc: 0a000030 beq 11884 <IMFS_memfile_write+0x21c> 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 );
117c0: e5900000 ldr r0, [r0] 117c4: e1a01008 mov r1, r8 117c8: e1a02007 mov r2, r7 117cc: eb0008a1 bl 13a58 <memcpy>
my_length = 0; copied += to_copy;
117d0: e08aa007 add sl, sl, r7
} IMFS_mtime_ctime_update( the_jnode );
117d4: e28d000c add r0, sp, #12 117d8: e3a01000 mov r1, #0 117dc: ebffc658 bl 3144 <gettimeofday> 117e0: e59d300c ldr r3, [sp, #12] 117e4: e5893048 str r3, [r9, #72] ; 0x48 117e8: e5893044 str r3, [r9, #68] ; 0x44
return copied; }
117ec: e1a0000a mov r0, sl 117f0: e28dd014 add sp, sp, #20 117f4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* 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 ) {
117f8: e5993050 ldr r3, [r9, #80] ; 0x50 117fc: e1530001 cmp r3, r1
11800: 2affffac bcs 116b8 <IMFS_memfile_write+0x50> status = IMFS_memfile_extend( the_jnode, last_byte );
11804: e1a00009 mov r0, r9 11808: e3a02000 mov r2, #0 1180c: ebfffeee bl 113cc <IMFS_memfile_extend>
if ( status )
11810: e3500000 cmp r0, #0
11814: 0affffa7 beq 116b8 <IMFS_memfile_write+0x50> rtems_set_errno_and_return_minus_one( ENOSPC );
11818: eb000680 bl 13220 <__errno> <== NOT EXECUTED 1181c: e3a0301c mov r3, #28 <== NOT EXECUTED 11820: e5803000 str r3, [r0] <== NOT EXECUTED 11824: e3e0a000 mvn sl, #0 <== NOT EXECUTED 11828: eaffffef b 117ec <IMFS_memfile_write+0x184> <== NOT EXECUTED
* If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL );
1182c: eb00067b bl 13220 <__errno> <== NOT EXECUTED 11830: e3a03016 mov r3, #22 <== NOT EXECUTED 11834: e5803000 str r3, [r0] <== NOT EXECUTED 11838: e3e0a000 mvn sl, #0 <== NOT EXECUTED 1183c: eaffffea b 117ec <IMFS_memfile_write+0x184> <== NOT EXECUTED
*/ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr );
11840: e59f0084 ldr r0, [pc, #132] ; 118cc <IMFS_memfile_write+0x264><== NOT EXECUTED 11844: e3a01e33 mov r1, #816 ; 0x330 <== NOT EXECUTED 11848: e59f2080 ldr r2, [pc, #128] ; 118d0 <IMFS_memfile_write+0x268><== NOT EXECUTED 1184c: e59f3080 ldr r3, [pc, #128] ; 118d4 <IMFS_memfile_write+0x26c><== NOT EXECUTED 11850: ebfff449 bl e97c <__assert_func> <== NOT EXECUTED
/* * Error check arguments */ assert( source );
11854: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED 11858: e2811003 add r1, r1, #3 <== NOT EXECUTED 1185c: e59f0068 ldr r0, [pc, #104] ; 118cc <IMFS_memfile_write+0x264><== NOT EXECUTED 11860: e59f2068 ldr r2, [pc, #104] ; 118d0 <IMFS_memfile_write+0x268><== NOT EXECUTED 11864: e59f306c ldr r3, [pc, #108] ; 118d8 <IMFS_memfile_write+0x270><== NOT EXECUTED 11868: ebfff443 bl e97c <__assert_func> <== NOT EXECUTED
assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
1186c: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED 11870: e2811003 add r1, r1, #3 <== NOT EXECUTED 11874: e59f0050 ldr r0, [pc, #80] ; 118cc <IMFS_memfile_write+0x264><== NOT EXECUTED 11878: e59f2050 ldr r2, [pc, #80] ; 118d0 <IMFS_memfile_write+0x268><== NOT EXECUTED 1187c: e59f3058 ldr r3, [pc, #88] ; 118dc <IMFS_memfile_write+0x274><== NOT EXECUTED 11880: ebfff43d bl e97c <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr );
11884: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED 11888: e2811002 add r1, r1, #2 <== NOT EXECUTED 1188c: e59f0038 ldr r0, [pc, #56] ; 118cc <IMFS_memfile_write+0x264><== NOT EXECUTED 11890: e59f2038 ldr r2, [pc, #56] ; 118d0 <IMFS_memfile_write+0x268><== NOT EXECUTED 11894: e59f3038 ldr r3, [pc, #56] ; 118d4 <IMFS_memfile_write+0x26c><== NOT EXECUTED 11898: ebfff437 bl e97c <__assert_func> <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
1189c: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED 118a0: e2811003 add r1, r1, #3 <== NOT EXECUTED 118a4: e59f0020 ldr r0, [pc, #32] ; 118cc <IMFS_memfile_write+0x264><== NOT EXECUTED 118a8: e59f2020 ldr r2, [pc, #32] ; 118d0 <IMFS_memfile_write+0x268><== NOT EXECUTED 118ac: e59f302c ldr r3, [pc, #44] ; 118e0 <IMFS_memfile_write+0x278><== NOT EXECUTED 118b0: ebfff431 bl e97c <__assert_func> <== NOT EXECUTED
if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr );
118b4: e59f0010 ldr r0, [pc, #16] ; 118cc <IMFS_memfile_write+0x264><== NOT EXECUTED 118b8: e3a01fc7 mov r1, #796 ; 0x31c <== NOT EXECUTED 118bc: e59f200c ldr r2, [pc, #12] ; 118d0 <IMFS_memfile_write+0x268><== NOT EXECUTED 118c0: e59f300c ldr r3, [pc, #12] ; 118d4 <IMFS_memfile_write+0x26c><== NOT EXECUTED 118c4: ebfff42c bl e97c <__assert_func> <== NOT EXECUTED
118c8: 000209ac .word 0x000209ac 118cc: 000205d0 .word 0x000205d0 118d0: 0001fd74 .word 0x0001fd74 118d4: 00020654 .word 0x00020654 118d8: 00020660 .word 0x00020660 118dc: 00020624 .word 0x00020624 118e0: 00020618 .word 0x00020618
00009690 <IMFS_mknod>: const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
9690: e92d41f0 push {r4, r5, r6, r7, r8, lr} 9694: e24dd040 sub sp, sp, #64 ; 0x40 9698: e1a04001 mov r4, r1 969c: e1a07002 mov r7, r2 96a0: e1a06003 mov r6, r3 96a4: e1a08000 mov r8, r0
IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result );
96a8: eb00154a bl ebd8 <strlen> 96ac: e28d5004 add r5, sp, #4 96b0: e1a01000 mov r1, r0 96b4: e28d303c add r3, sp, #60 ; 0x3c 96b8: e1a00008 mov r0, r8 96bc: e1a02005 mov r2, r5 96c0: ebffff7e bl 94c0 <IMFS_get_token>
/* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) )
96c4: e2043a0f and r3, r4, #61440 ; 0xf000 96c8: e3530901 cmp r3, #16384 ; 0x4000
96cc: 0a00001b beq 9740 <IMFS_mknod+0xb0> type = IMFS_DIRECTORY; else if ( S_ISREG(mode) )
96d0: e3530902 cmp r3, #32768 ; 0x8000 96d4: 03a01005 moveq r1, #5
96d8: 0a000005 beq 96f4 <IMFS_mknod+0x64> type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
96dc: e3530a06 cmp r3, #24576 ; 0x6000 96e0: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
96e4: 058d7028 streq r7, [sp, #40] ; 0x28 96e8: 058d602c streq r6, [sp, #44] ; 0x2c 96ec: 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) ) { 96f0: 1a00000a bne 9720 <IMFS_mknod+0x90> * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node(
96f4: e28dc028 add ip, sp, #40 ; 0x28 96f8: e59d0058 ldr r0, [sp, #88] ; 0x58 96fc: e1a02005 mov r2, r5 9700: e1a03004 mov r3, r4 9704: e58dc000 str ip, [sp] 9708: eb000b11 bl c354 <IMFS_create_node>
new_name, mode, &info ); if ( !new_node )
970c: e3500000 cmp r0, #0 9710: 13a00000 movne r0, #0
9714: 0a00000b beq 9748 <IMFS_mknod+0xb8> rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; }
9718: e28dd040 add sp, sp, #64 ; 0x40 971c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode))
9720: e3530a01 cmp r3, #4096 ; 0x1000 9724: 03a01007 moveq r1, #7
9728: 0afffff1 beq 96f4 <IMFS_mknod+0x64> type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL );
972c: eb001138 bl dc14 <__errno> <== NOT EXECUTED 9730: e3a03016 mov r3, #22 <== NOT EXECUTED 9734: e5803000 str r3, [r0] <== NOT EXECUTED 9738: e3e00000 mvn r0, #0 <== NOT EXECUTED 973c: eafffff5 b 9718 <IMFS_mknod+0x88> <== NOT EXECUTED
9740: e3a01001 mov r1, #1 9744: eaffffea b 96f4 <IMFS_mknod+0x64>
mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM );
9748: eb001131 bl dc14 <__errno> <== NOT EXECUTED 974c: e3a0300c mov r3, #12 <== NOT EXECUTED 9750: e5803000 str r3, [r0] <== NOT EXECUTED 9754: e3e00000 mvn r0, #0 <== NOT EXECUTED 9758: eaffffee b 9718 <IMFS_mknod+0x88> <== NOT EXECUTED
00002854 <IMFS_mount>: rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
2854: e5903008 ldr r3, [r0, #8]
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
2858: e593204c ldr r2, [r3, #76] ; 0x4c 285c: e3520001 cmp r2, #1
#include <rtems/seterr.h> int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
2860: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2864: 1a000002 bne 2874 <IMFS_mount+0x20> /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry;
2868: e583005c str r0, [r3, #92] ; 0x5c 286c: e3a00000 mov r0, #0
return 0; }
2870: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
2874: eb004269 bl 13220 <__errno> <== NOT EXECUTED 2878: e3a03014 mov r3, #20 <== NOT EXECUTED 287c: e5803000 str r3, [r0] <== NOT EXECUTED 2880: e3e00000 mvn r0, #0 <== NOT EXECUTED 2884: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000337c <IMFS_print_jnode>: */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) {
337c: e92d4030 push {r4, r5, lr}
assert( the_jnode );
3380: e2504000 subs r4, r0, #0
3384: 0a000055 beq 34e0 <IMFS_print_jnode+0x164> fprintf(stdout, "%s", the_jnode->name );
3388: e59f5164 ldr r5, [pc, #356] ; 34f4 <IMFS_print_jnode+0x178> 338c: e5953000 ldr r3, [r5] 3390: e284000c add r0, r4, #12 3394: e5931008 ldr r1, [r3, #8] 3398: eb003de1 bl 12b24 <fputs>
switch( the_jnode->type ) {
339c: e594204c ldr r2, [r4, #76] ; 0x4c 33a0: e2423001 sub r3, r2, #1 33a4: e3530006 cmp r3, #6 33a8: 979ff103 ldrls pc, [pc, r3, lsl #2]
33ac: ea000011 b 33f8 <IMFS_print_jnode+0x7c> <== NOT EXECUTED 33b0: 0000341c .word 0x0000341c <== NOT EXECUTED 33b4: 00003438 .word 0x00003438 <== NOT EXECUTED 33b8: 00003454 .word 0x00003454 <== NOT EXECUTED 33bc: 00003480 .word 0x00003480 <== NOT EXECUTED 33c0: 000034ac .word 0x000034ac <== NOT EXECUTED 33c4: 000034c4 .word 0x000034c4 <== NOT EXECUTED 33c8: 000033cc .word 0x000033cc <== NOT EXECUTED
fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" );
33cc: e5953000 ldr r3, [r5] <== NOT EXECUTED 33d0: e3a01001 mov r1, #1 <== NOT EXECUTED 33d4: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 33d8: e3a02012 mov r2, #18 <== NOT EXECUTED 33dc: e59f0114 ldr r0, [pc, #276] ; 34f8 <IMFS_print_jnode+0x17c><== NOT EXECUTED 33e0: eb0040e4 bl 13778 <fwrite> <== NOT EXECUTED
assert(0);
33e4: e59f0110 ldr r0, [pc, #272] ; 34fc <IMFS_print_jnode+0x180><== NOT EXECUTED 33e8: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 33ec: e59f210c ldr r2, [pc, #268] ; 3500 <IMFS_print_jnode+0x184><== NOT EXECUTED 33f0: e59f310c ldr r3, [pc, #268] ; 3504 <IMFS_print_jnode+0x188><== NOT EXECUTED 33f4: eb00025b bl 3d68 <__assert_func> <== NOT EXECUTED
break; default: fprintf(stdout, " bad type %d\n", the_jnode->type );
33f8: e5953000 ldr r3, [r5] <== NOT EXECUTED 33fc: e59f1104 ldr r1, [pc, #260] ; 3508 <IMFS_print_jnode+0x18c><== NOT EXECUTED 3400: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3404: eb003d65 bl 129a0 <fprintf> <== NOT EXECUTED
assert(0);
3408: e59f00ec ldr r0, [pc, #236] ; 34fc <IMFS_print_jnode+0x180><== NOT EXECUTED 340c: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 3410: e59f20e8 ldr r2, [pc, #232] ; 3500 <IMFS_print_jnode+0x184><== NOT EXECUTED 3414: e59f30e8 ldr r3, [pc, #232] ; 3504 <IMFS_print_jnode+0x188><== NOT EXECUTED 3418: eb000252 bl 3d68 <__assert_func> <== NOT EXECUTED
assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" );
341c: e5953000 ldr r3, [r5] 3420: e3a0002f mov r0, #47 ; 0x2f 3424: e5931008 ldr r1, [r3, #8] 3428: eb003d78 bl 12a10 <fputc>
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
342c: e59f00d8 ldr r0, [pc, #216] ; 350c <IMFS_print_jnode+0x190>
}
3430: e8bd4030 pop {r4, r5, lr}
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
3434: ea0044bf b 14738 <puts>
case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
3438: e5952000 ldr r2, [r5] 343c: e5943054 ldr r3, [r4, #84] ; 0x54 3440: e5920008 ldr r0, [r2, #8] 3444: e59f10c4 ldr r1, [pc, #196] ; 3510 <IMFS_print_jnode+0x194> 3448: e5942050 ldr r2, [r4, #80] ; 0x50 344c: eb003d53 bl 129a0 <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor ); break;
3450: eafffff5 b 342c <IMFS_print_jnode+0xb0>
(uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" );
3454: e5953000 ldr r3, [r5] <== NOT EXECUTED 3458: e3a01001 mov r1, #1 <== NOT EXECUTED 345c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3460: e3a02013 mov r2, #19 <== NOT EXECUTED 3464: e59f00a8 ldr r0, [pc, #168] ; 3514 <IMFS_print_jnode+0x198><== NOT EXECUTED 3468: eb0040c2 bl 13778 <fwrite> <== NOT EXECUTED
assert(0);
346c: e59f0088 ldr r0, [pc, #136] ; 34fc <IMFS_print_jnode+0x180><== NOT EXECUTED 3470: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 3474: e59f2084 ldr r2, [pc, #132] ; 3500 <IMFS_print_jnode+0x184><== NOT EXECUTED 3478: e59f3084 ldr r3, [pc, #132] ; 3504 <IMFS_print_jnode+0x188><== NOT EXECUTED 347c: eb000239 bl 3d68 <__assert_func> <== NOT EXECUTED
break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" );
3480: e5953000 ldr r3, [r5] <== NOT EXECUTED 3484: e3a01001 mov r1, #1 <== NOT EXECUTED 3488: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 348c: e3a02013 mov r2, #19 <== NOT EXECUTED 3490: e59f007c ldr r0, [pc, #124] ; 3514 <IMFS_print_jnode+0x198><== NOT EXECUTED 3494: eb0040b7 bl 13778 <fwrite> <== NOT EXECUTED
assert(0);
3498: e59f005c ldr r0, [pc, #92] ; 34fc <IMFS_print_jnode+0x180> <== NOT EXECUTED 349c: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 34a0: e59f2058 ldr r2, [pc, #88] ; 3500 <IMFS_print_jnode+0x184> <== NOT EXECUTED 34a4: e59f3058 ldr r3, [pc, #88] ; 3504 <IMFS_print_jnode+0x188> <== NOT EXECUTED 34a8: eb00022e bl 3d68 <__assert_func> <== NOT EXECUTED
the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")",
34ac: e5953000 ldr r3, [r5] 34b0: e5942050 ldr r2, [r4, #80] ; 0x50 34b4: e5930008 ldr r0, [r3, #8] 34b8: e59f1058 ldr r1, [pc, #88] ; 3518 <IMFS_print_jnode+0x19c> 34bc: eb003d37 bl 129a0 <fprintf>
(uint32_t)the_jnode->info.file.size ); #endif break;
34c0: eaffffd9 b 342c <IMFS_print_jnode+0xb0>
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)",
34c4: e5952000 ldr r2, [r5] <== NOT EXECUTED 34c8: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 34cc: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 34d0: e59f1044 ldr r1, [pc, #68] ; 351c <IMFS_print_jnode+0x1a0> <== NOT EXECUTED 34d4: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 34d8: eb003d30 bl 129a0 <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break;
34dc: eaffffd2 b 342c <IMFS_print_jnode+0xb0> <== NOT EXECUTED
void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode );
34e0: e59f0014 ldr r0, [pc, #20] ; 34fc <IMFS_print_jnode+0x180> <== NOT EXECUTED 34e4: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED 34e8: e59f2010 ldr r2, [pc, #16] ; 3500 <IMFS_print_jnode+0x184> <== NOT EXECUTED 34ec: e59f302c ldr r3, [pc, #44] ; 3520 <IMFS_print_jnode+0x1a4> <== NOT EXECUTED 34f0: eb00021c bl 3d68 <__assert_func> <== NOT EXECUTED
34f4: 00022664 .word 0x00022664 34f8: 000241f4 .word 0x000241f4 34fc: 00024158 .word 0x00024158 3500: 00022bbc .word 0x00022bbc 3504: 00024154 .word 0x00024154 3508: 00024208 .word 0x00024208 350c: 00023d20 .word 0x00023d20 3510: 000241b0 .word 0x000241b0 3514: 000241e0 .word 0x000241e0 3518: 000241d4 .word 0x000241d4 351c: 000241c4 .word 0x000241c4 3520: 000241a4 .word 0x000241a4
00002894 <IMFS_readlink>: ) { IMFS_jnode_t *node; int i; node = loc->node_access;
2894: e5903000 ldr r3, [r0]
if ( node->type != IMFS_SYM_LINK )
2898: e593004c ldr r0, [r3, #76] ; 0x4c 289c: e3500004 cmp r0, #4
int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) {
28a0: e92d4010 push {r4, lr}
IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 28a4: 1a000013 bne 28f8 <IMFS_readlink+0x64> rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
28a8: e3520000 cmp r2, #0
28ac: 0a00000f beq 28f0 <IMFS_readlink+0x5c>
28b0: e5930050 ldr r0, [r3, #80] ; 0x50 28b4: e5d0c000 ldrb ip, [r0] 28b8: e35c0000 cmp ip, #0
int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL );
28bc: 13a04000 movne r4, #0 28c0: 11a00004 movne r0, r4
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ ) 28c4: 0a000009 beq 28f0 <IMFS_readlink+0x5c>
28c8: e2800001 add r0, r0, #1 28cc: e1520000 cmp r2, r0
buf[i] = node->info.sym_link.name[i];
28d0: e7c1c004 strb ip, [r1, r4]
node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
28d4: e1a04000 mov r4, r0 28d8: 98bd8010 popls {r4, pc} 28dc: e593c050 ldr ip, [r3, #80] ; 0x50 28e0: e7dcc000 ldrb ip, [ip, r0] 28e4: e35c0000 cmp ip, #0
28e8: 1afffff6 bne 28c8 <IMFS_readlink+0x34>
28ec: e8bd8010 pop {r4, pc}
28f0: e3a00000 mov r0, #0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i]; return i; }
28f4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL );
28f8: eb004248 bl 13220 <__errno> <== NOT EXECUTED 28fc: e3a03016 mov r3, #22 <== NOT EXECUTED 2900: e5803000 str r3, [r0] <== NOT EXECUTED 2904: e3e00000 mvn r0, #0 <== NOT EXECUTED 2908: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000290c <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 */ ) {
290c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access;
2910: 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 */ ) {
2914: e24dd008 sub sp, sp, #8 <== 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 );
2918: e1a01003 mov r1, r3 <== 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 */ ) {
291c: 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 );
2920: e284000c add r0, r4, #12 <== NOT EXECUTED 2924: e3a02020 mov r2, #32 <== NOT EXECUTED 2928: eb00462d bl 141e4 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
292c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 2930: e3530000 cmp r3, #0 <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
2934: 11a00004 movne r0, r4 <== NOT EXECUTED 2938: 1b0012f5 blne 7514 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access;
293c: 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 );
2940: e1a01004 mov r1, r4 <== NOT EXECUTED 2944: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED
the_jnode->Parent = new_parent;
2948: e5843008 str r3, [r4, #8] <== NOT EXECUTED 294c: eb0012e5 bl 74e8 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode );
2950: e1a0000d mov r0, sp <== NOT EXECUTED 2954: e3a01000 mov r1, #0 <== NOT EXECUTED 2958: eb0001f9 bl 3144 <gettimeofday> <== NOT EXECUTED 295c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
return 0; }
2960: 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 );
2964: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
return 0; }
2968: e28dd008 add sp, sp, #8 <== NOT EXECUTED 296c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00009820 <IMFS_stat>: ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access;
9820: e5903000 ldr r3, [r0]
switch ( the_jnode->type ) {
9824: e593204c ldr r2, [r3, #76] ; 0x4c 9828: e2422002 sub r2, r2, #2
int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
982c: e92d4800 push {fp, lr}
IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) {
9830: e3520005 cmp r2, #5 9834: 979ff102 ldrls pc, [pc, r2, lsl #2]
9838: ea000020 b 98c0 <IMFS_stat+0xa0> <== NOT EXECUTED 983c: 000098ac .word 0x000098ac <== NOT EXECUTED 9840: 000098c0 .word 0x000098c0 <== NOT EXECUTED 9844: 00009854 .word 0x00009854 <== NOT EXECUTED 9848: 000098d4 .word 0x000098d4 <== NOT EXECUTED 984c: 000098d4 .word 0x000098d4 <== NOT EXECUTED 9850: 00009854 .word 0x00009854 <== NOT EXECUTED
case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0;
9854: e3a0b000 mov fp, #0 <== NOT EXECUTED 9858: e3a0c000 mov ip, #0 <== NOT EXECUTED 985c: e581b020 str fp, [r1, #32] <== NOT EXECUTED 9860: e581c024 str ip, [r1, #36] ; 0x24 <== NOT EXECUTED
break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
9864: e5932038 ldr r2, [r3, #56] ; 0x38 9868: 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;
986c: e5932040 ldr r2, [r3, #64] ; 0x40 9870: e5812028 str r2, [r1, #40] ; 0x28
rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
9874: e1d3c3b4 ldrh ip, [r3, #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;
9878: e5932044 ldr r2, [r3, #68] ; 0x44
rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
987c: 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;
9880: e5812030 str r2, [r1, #48] ; 0x30
default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode;
9884: e5932030 ldr r2, [r3, #48] ; 0x30 9888: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid;
988c: e1d323bc ldrh r2, [r3, #60] ; 0x3c 9890: 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;
9894: e5930048 ldr r0, [r3, #72] ; 0x48
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;
9898: e1d333be ldrh r3, [r3, #62] ; 0x3e
buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime;
989c: 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;
98a0: e1c131b4 strh r3, [r1, #20]
buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime;
98a4: e3a00000 mov r0, #0
return 0; }
98a8: e8bd8800 pop {fp, pc}
switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
98ac: e5930054 ldr r0, [r3, #84] ; 0x54
rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major;
98b0: e5932050 ldr r2, [r3, #80] ; 0x50 98b4: e581001c str r0, [r1, #28] 98b8: e5812018 str r2, [r1, #24]
break;
98bc: eaffffe8 b 9864 <IMFS_stat+0x44>
case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP );
98c0: eb0010d3 bl dc14 <__errno> <== NOT EXECUTED 98c4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 98c8: e5803000 str r3, [r0] <== NOT EXECUTED 98cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 98d0: e8bd8800 pop {fp, pc} <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size;
98d4: e283c050 add ip, r3, #80 ; 0x50 98d8: e89c1800 ldm ip, {fp, ip} 98dc: e581b020 str fp, [r1, #32] 98e0: e581c024 str ip, [r1, #36] ; 0x24
break;
98e4: eaffffde b 9864 <IMFS_stat+0x44>
00002970 <IMFS_symlink>: int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
2970: e92d40f0 push {r4, r5, r6, r7, lr} 2974: e1a06000 mov r6, r0 2978: 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 );
297c: e1a00002 mov r0, r2
int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
2980: e1a07002 mov r7, r2 2984: e1a05001 mov r5, r1
int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
2988: eb0045fd bl 14184 <strlen> 298c: e28d4004 add r4, sp, #4 2990: e1a01000 mov r1, r0 2994: e1a02004 mov r2, r4 2998: e28d303c add r3, sp, #60 ; 0x3c 299c: e1a00007 mov r0, r7 29a0: eb002f5a bl e710 <IMFS_get_token>
/* * Duplicate link name */ info.sym_link.name = strdup(link_name);
29a4: e1a00005 mov r0, r5 29a8: eb0045e1 bl 14134 <strdup>
if (info.sym_link.name == NULL) {
29ac: 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);
29b0: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) { 29b4: 0a00000e beq 29f4 <IMFS_symlink+0x84> * 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(
29b8: e3a03ca2 mov r3, #41472 ; 0xa200 29bc: e28dc028 add ip, sp, #40 ; 0x28 29c0: e1a00006 mov r0, r6 29c4: e1a02004 mov r2, r4 29c8: e2433001 sub r3, r3, #1 29cc: e3a01004 mov r1, #4 29d0: e58dc000 str ip, [sp] 29d4: eb002c06 bl d9f4 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) {
29d8: e3500000 cmp r0, #0 29dc: 13a00000 movne r0, #0
29e0: 0a000001 beq 29ec <IMFS_symlink+0x7c> free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; }
29e4: e28dd040 add sp, sp, #64 ; 0x40 29e8: e8bd80f0 pop {r4, r5, r6, r7, pc}
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name);
29ec: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 29f0: eb0001aa bl 30a0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
29f4: eb004209 bl 13220 <__errno> <== NOT EXECUTED 29f8: e3a0300c mov r3, #12 <== NOT EXECUTED 29fc: e5803000 str r3, [r0] <== NOT EXECUTED 2a00: e3e00000 mvn r0, #0 <== NOT EXECUTED 2a04: eafffff6 b 29e4 <IMFS_symlink+0x74> <== NOT EXECUTED
00002a08 <IMFS_unlink>: int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
2a08: 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;
2a0c: e5915000 ldr r5, [r1]
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) {
2a10: e595304c ldr r3, [r5, #76] ; 0x4c 2a14: e3530003 cmp r3, #3
int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
2a18: e24dd01c sub sp, sp, #28 2a1c: e1a04001 mov r4, r1 2a20: e1a06000 mov r6, r0
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2a24: 0a000006 beq 2a44 <IMFS_unlink+0x3c> /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc );
2a28: e1a00006 mov r0, r6 2a2c: e1a01004 mov r1, r4 2a30: e5943008 ldr r3, [r4, #8] 2a34: e1a0e00f mov lr, pc 2a38: e593f034 ldr pc, [r3, #52] ; 0x34
return result; }
2a3c: e28dd01c add sp, sp, #28 2a40: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node )
2a44: e595e050 ldr lr, [r5, #80] ; 0x50 2a48: e35e0000 cmp lr, #0
2a4c: 0a00001f beq 2ad0 <IMFS_unlink+0xc8> rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc;
2a50: e1a07001 mov r7, r1 2a54: e8b7000f ldm r7!, {r0, r1, r2, r3} 2a58: e1a0c00d mov ip, sp 2a5c: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
2a60: e28d801c add r8, sp, #28 2a64: 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;
2a68: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
2a6c: 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;
2a70: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
2a74: eb002c30 bl db3c <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)
2a78: e5953050 ldr r3, [r5, #80] ; 0x50 2a7c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 2a80: e3520001 cmp r2, #1
2a84: 0a000008 beq 2aac <IMFS_unlink+0xa4> if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --;
2a88: e2422001 sub r2, r2, #1 2a8c: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
2a90: e28d0014 add r0, sp, #20 2a94: e3a01000 mov r1, #0 2a98: eb0001a9 bl 3144 <gettimeofday> 2a9c: e5953050 ldr r3, [r5, #80] ; 0x50 2aa0: e59d2014 ldr r2, [sp, #20] 2aa4: e5832048 str r2, [r3, #72] ; 0x48 2aa8: eaffffde b 2a28 <IMFS_unlink+0x20>
* to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
2aac: e1a0100d mov r1, sp 2ab0: e1a00006 mov r0, r6 2ab4: e59d3008 ldr r3, [sp, #8] 2ab8: e1a0e00f mov lr, pc 2abc: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
2ac0: e3500000 cmp r0, #0 2ac4: 13e00000 mvnne r0, #0
2ac8: 0affffd6 beq 2a28 <IMFS_unlink+0x20>
2acc: eaffffda b 2a3c <IMFS_unlink+0x34>
*/ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL );
2ad0: eb0041d2 bl 13220 <__errno> <== NOT EXECUTED 2ad4: e3a03016 mov r3, #22 <== NOT EXECUTED 2ad8: e5803000 str r3, [r0] <== NOT EXECUTED 2adc: e3e00000 mvn r0, #0 <== NOT EXECUTED 2ae0: eaffffd5 b 2a3c <IMFS_unlink+0x34> <== NOT EXECUTED
00002ae4 <IMFS_unmount>: rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
2ae4: e5903008 ldr r3, [r0, #8]
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
2ae8: e593204c ldr r2, [r3, #76] ; 0x4c 2aec: e3520001 cmp r2, #1
#include <rtems/seterr.h> int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
2af0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2af4: 1a000005 bne 2b10 <IMFS_unmount+0x2c> /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL )
2af8: e593205c ldr r2, [r3, #92] ; 0x5c 2afc: e3520000 cmp r2, #0
2b00: 0a000007 beq 2b24 <IMFS_unmount+0x40> /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL;
2b04: e3a00000 mov r0, #0 2b08: e583005c str r0, [r3, #92] ; 0x5c
return 0; }
2b0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
2b10: eb0041c2 bl 13220 <__errno> <== NOT EXECUTED 2b14: e3a03014 mov r3, #20 <== NOT EXECUTED 2b18: e5803000 str r3, [r0] <== NOT EXECUTED 2b1c: e3e00000 mvn r0, #0 <== NOT EXECUTED 2b20: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
2b24: eb0041bd bl 13220 <__errno> <== NOT EXECUTED 2b28: e3a03016 mov r3, #22 <== NOT EXECUTED 2b2c: e5803000 str r3, [r0] <== NOT EXECUTED 2b30: e3e00000 mvn r0, #0 <== NOT EXECUTED 2b34: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00001cdc <RTEMS_Malloc_Initialize>: #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) {
1cdc: e59f30d0 ldr r3, [pc, #208] ; 1db4 <RTEMS_Malloc_Initialize+0xd8> 1ce0: e5933000 ldr r3, [r3] 1ce4: e3530000 cmp r3, #0
void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) {
1ce8: e92d4070 push {r4, r5, r6, lr} 1cec: e1a05000 mov r5, r0 1cf0: e1a06001 mov r6, r1 1cf4: e1a04002 mov r4, r2
/* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)();
1cf8: 11a0e00f movne lr, pc 1cfc: 1593f000 ldrne pc, [r3]
} /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize();
1d00: ebffffe1 bl 1c8c <malloc_deferred_frees_initialize>
/* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) {
1d04: e59f30ac ldr r3, [pc, #172] ; 1db8 <RTEMS_Malloc_Initialize+0xdc> 1d08: e5933000 ldr r3, [r3] 1d0c: e3530000 cmp r3, #0
1d10: 0a000006 beq 1d30 <RTEMS_Malloc_Initialize+0x54> void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
1d14: e1a00005 mov r0, r5 <== NOT EXECUTED 1d18: e1a01004 mov r1, r4 <== NOT EXECUTED 1d1c: e1a0e00f mov lr, pc <== NOT EXECUTED 1d20: e593f000 ldr pc, [r3] <== NOT EXECUTED
heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
1d24: e0856006 add r6, r5, r6 <== NOT EXECUTED 1d28: e0606006 rsb r6, r0, r6 <== NOT EXECUTED 1d2c: e1a05000 mov r5, r0 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if (
1d30: e59f4084 ldr r4, [pc, #132] ; 1dbc <RTEMS_Malloc_Initialize+0xe0> 1d34: e5d41000 ldrb r1, [r4] 1d38: e3510000 cmp r1, #0
1d3c: 1a000018 bne 1da4 <RTEMS_Malloc_Initialize+0xc8> !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace()
1d40: e59f3078 ldr r3, [pc, #120] ; 1dc0 <RTEMS_Malloc_Initialize+0xe4> 1d44: e5d33028 ldrb r3, [r3, #40] ; 0x28 1d48: e3530000 cmp r3, #0
1d4c: 1a00000e bne 1d8c <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 );
1d50: e59f406c ldr r4, [pc, #108] ; 1dc4 <RTEMS_Malloc_Initialize+0xe8> 1d54: e1a01005 mov r1, r5 1d58: e1a02006 mov r2, r6 1d5c: e5940000 ldr r0, [r4] 1d60: e3a03004 mov r3, #4 1d64: eb00104c bl 5e9c <_Heap_Initialize>
RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) {
1d68: e3500000 cmp r0, #0
1d6c: 0a00000e beq 1dac <RTEMS_Malloc_Initialize+0xd0> rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
1d70: e59f5050 ldr r5, [pc, #80] ; 1dc8 <RTEMS_Malloc_Initialize+0xec> 1d74: e5940000 ldr r0, [r4] 1d78: e5954000 ldr r4, [r5] 1d7c: eb001358 bl 6ae4 <_Protected_heap_Get_size> 1d80: e0800004 add r0, r0, r4 1d84: e5850000 str r0, [r5]
printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif }
1d88: e8bd8070 pop {r4, r5, r6, pc}
if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size );
1d8c: e1a00005 mov r0, r5 1d90: e1a02006 mov r2, r6 1d94: eb0031e8 bl e53c <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 ) {
1d98: e5d43000 ldrb r3, [r4] 1d9c: e3530000 cmp r3, #0
1da0: 0affffea beq 1d50 <RTEMS_Malloc_Initialize+0x74>
1da4: e59f4018 ldr r4, [pc, #24] ; 1dc4 <RTEMS_Malloc_Initialize+0xe8> 1da8: eafffff0 b 1d70 <RTEMS_Malloc_Initialize+0x94>
heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
1dac: e280001a add r0, r0, #26 <== NOT EXECUTED 1db0: eb000e3a bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
1db4: 0001ab48 .word 0x0001ab48 1db8: 0001ab4c .word 0x0001ab4c 1dbc: 0001ab45 .word 0x0001ab45 1dc0: 00019574 .word 0x00019574 1dc4: 000194cc .word 0x000194cc 1dc8: 0001aea4 .word 0x0001aea4
00002f38 <Stack_check_Dump_threads_usage>: static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) {
2f38: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread )
2f3c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) {
2f40: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread )
2f44: 0a000031 beq 3010 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
return; if ( !print_handler )
2f48: e59f4110 ldr r4, [pc, #272] ; 3060 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED 2f4c: e5947004 ldr r7, [r4, #4] <== NOT EXECUTED 2f50: e3570000 cmp r7, #0 <== NOT EXECUTED 2f54: 0a00002d beq 3010 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) {
2f58: e37a0001 cmn sl, #1 <== NOT EXECUTED 2f5c: 0a000032 beq 302c <Stack_check_Dump_threads_usage+0xf4> <== NOT EXECUTED
} else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
2f60: e59a80f4 ldr r8, [sl, #244] ; 0xf4 <== NOT EXECUTED
current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack;
2f64: e28a50c4 add r5, sl, #196 ; 0xc4 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack);
2f68: e8950240 ldm r5, {r6, r9} <== NOT EXECUTED 2f6c: e2899010 add r9, r9, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
2f70: e2466010 sub r6, r6, #16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
2f74: e1a00009 mov r0, r9 <== NOT EXECUTED 2f78: e1a01006 mov r1, r6 <== NOT EXECUTED 2f7c: ebffffd7 bl 2ee0 <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
2f80: e250b000 subs fp, r0, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
2f84: 10899006 addne r9, r9, r6 <== NOT EXECUTED 2f88: 106bb009 rsbne fp, fp, r9 <== NOT EXECUTED
else used = 0; if ( the_thread ) {
2f8c: e35a0000 cmp sl, #0 <== NOT EXECUTED 2f90: 0a00002c beq 3048 <Stack_check_Dump_threads_usage+0x110> <== NOT EXECUTED
(*print_handler)(
2f94: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 2f98: e28d2008 add r2, sp, #8 <== NOT EXECUTED 2f9c: e3a01005 mov r1, #5 <== NOT EXECUTED 2fa0: e1a0000a mov r0, sl <== NOT EXECUTED 2fa4: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED 2fa8: eb00170d bl 8be4 <rtems_object_get_name> <== NOT EXECUTED 2fac: e1a0200a mov r2, sl <== NOT EXECUTED 2fb0: e1a03000 mov r3, r0 <== NOT EXECUTED 2fb4: e59f10a8 ldr r1, [pc, #168] ; 3064 <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED 2fb8: e1a00009 mov r0, r9 <== NOT EXECUTED 2fbc: e1a0e00f mov lr, pc <== NOT EXECUTED 2fc0: e12fff17 bx r7 <== NOT EXECUTED
); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)(
2fc4: e5953000 ldr r3, [r5] <== NOT EXECUTED 2fc8: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 2fcc: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2fd0: e0823003 add r3, r2, r3 <== NOT EXECUTED 2fd4: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 2fd8: e58d8000 str r8, [sp] <== NOT EXECUTED 2fdc: e58d6004 str r6, [sp, #4] <== NOT EXECUTED 2fe0: e59f1080 ldr r1, [pc, #128] ; 3068 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED 2fe4: e1a0e00f mov lr, pc <== NOT EXECUTED 2fe8: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) {
2fec: e5943000 ldr r3, [r4] <== NOT EXECUTED 2ff0: e3530000 cmp r3, #0 <== NOT EXECUTED
); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)(
2ff4: e59f3064 ldr r3, [pc, #100] ; 3060 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) {
2ff8: 0a000006 beq 3018 <Stack_check_Dump_threads_usage+0xe0> <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used );
2ffc: e1a0200b mov r2, fp <== NOT EXECUTED 3000: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3004: e59f1060 ldr r1, [pc, #96] ; 306c <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED 3008: e1a0e00f mov lr, pc <== NOT EXECUTED 300c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
} }
3010: e28dd010 add sp, sp, #16 <== NOT EXECUTED 3014: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" );
3018: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 301c: e59f104c ldr r1, [pc, #76] ; 3070 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED 3020: e1a0e00f mov lr, pc <== NOT EXECUTED 3024: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED 3028: eafffff8 b 3010 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) {
302c: e59f5040 ldr r5, [pc, #64] ; 3074 <Stack_check_Dump_threads_usage+0x13c><== NOT EXECUTED 3030: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 3034: e3530000 cmp r3, #0 <== NOT EXECUTED 3038: 13a08000 movne r8, #0 <== NOT EXECUTED 303c: 11a0a008 movne sl, r8 <== NOT EXECUTED 3040: 1affffc8 bne 2f68 <Stack_check_Dump_threads_usage+0x30> <== NOT EXECUTED 3044: eafffff1 b 3010 <Stack_check_Dump_threads_usage+0xd8> <== NOT EXECUTED
"0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
3048: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 304c: e59f1024 ldr r1, [pc, #36] ; 3078 <Stack_check_Dump_threads_usage+0x140><== NOT EXECUTED 3050: e3e02000 mvn r2, #0 <== NOT EXECUTED 3054: e1a0e00f mov lr, pc <== NOT EXECUTED 3058: e12fff17 bx r7 <== NOT EXECUTED 305c: eaffffd8 b 2fc4 <Stack_check_Dump_threads_usage+0x8c> <== NOT EXECUTED
3060: 00064778 .word 0x00064778 3064: 0005d86c .word 0x0005d86c 3068: 0005d88c .word 0x0005d88c 306c: 0005d8bc .word 0x0005d8bc 3070: 0005d8ac .word 0x0005d8ac 3074: 000673c4 .word 0x000673c4 3078: 0005d87c .word 0x0005d87c
00002ee0 <Stack_check_find_high_water_mark>: /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS;
2ee0: e2803010 add r3, r0, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
2ee4: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 2ee8: e0831001 add r1, r3, r1 <== NOT EXECUTED 2eec: e1530001 cmp r3, r1 <== NOT EXECUTED 2ef0: 2a00000c bcs 2f28 <Stack_check_find_high_water_mark+0x48> <== NOT EXECUTED
if (*base != U32_PATTERN)
2ef4: e3a02ca6 mov r2, #42496 ; 0xa600 <== NOT EXECUTED 2ef8: e242205b sub r2, r2, #91 ; 0x5b <== NOT EXECUTED 2efc: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2f00: e1822802 orr r2, r2, r2, lsl #16 <== NOT EXECUTED 2f04: e1500002 cmp r0, r2 <== NOT EXECUTED 2f08: 0a000003 beq 2f1c <Stack_check_find_high_water_mark+0x3c> <== NOT EXECUTED 2f0c: ea000007 b 2f30 <Stack_check_find_high_water_mark+0x50> <== NOT EXECUTED 2f10: e5932000 ldr r2, [r3] <== NOT EXECUTED 2f14: e1520000 cmp r2, r0 <== NOT EXECUTED 2f18: 1a000004 bne 2f30 <Stack_check_find_high_water_mark+0x50> <== 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++)
2f1c: e2833004 add r3, r3, #4 <== NOT EXECUTED 2f20: e1510003 cmp r1, r3 <== NOT EXECUTED 2f24: 8afffff9 bhi 2f10 <Stack_check_find_high_water_mark+0x30> <== NOT EXECUTED 2f28: e3a00000 mov r0, #0 <== NOT EXECUTED
if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; }
2f2c: e12fff1e bx lr <== NOT EXECUTED
*/ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base;
2f30: e1a00003 mov r0, r3 <== NOT EXECUTED 2f34: e12fff1e bx lr <== NOT EXECUTED
0000ae50 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
ae50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ae54: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size;
ae58: e5902010 ldr r2, [r0, #16]
Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
ae5c: e24dd01c sub sp, sp, #28 ae60: e1a05001 mov r5, r1
- HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) {
ae64: e2911004 adds r1, r1, #4
Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
ae68: e1a07000 mov r7, r0
- HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) {
ae6c: e58d1000 str r1, [sp]
Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
ae70: e1a0b003 mov fp, r3
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
ae74: e590a008 ldr sl, [r0, #8]
Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size;
ae78: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ae7c: 2a000076 bcs b05c <_Heap_Allocate_aligned_with_boundary+0x20c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) {
ae80: e3530000 cmp r3, #0
ae84: 1a000072 bne b054 <_Heap_Allocate_aligned_with_boundary+0x204> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
ae88: e157000a cmp r7, sl ae8c: 03a06000 moveq r6, #0
ae90: 0a000074 beq b068 <_Heap_Allocate_aligned_with_boundary+0x218> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1;
ae94: e59d300c ldr r3, [sp, #12]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
ae98: e2651004 rsb r1, r5, #4
uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1;
ae9c: e2833007 add r3, r3, #7
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
aea0: e3a06000 mov r6, #0
uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1;
aea4: e58d3010 str r3, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
aea8: e58d1014 str r1, [sp, #20] aeac: ea000004 b aec4 <_Heap_Allocate_aligned_with_boundary+0x74>
boundary ); } } if ( alloc_begin != 0 ) {
aeb0: e3540000 cmp r4, #0
aeb4: 1a000059 bne b020 <_Heap_Allocate_aligned_with_boundary+0x1d0> break; } block = block->next;
aeb8: e59aa008 ldr sl, [sl, #8]
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
aebc: e157000a cmp r7, sl
aec0: 0a000068 beq b068 <_Heap_Allocate_aligned_with_boundary+0x218> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) {
aec4: e59a9004 ldr r9, [sl, #4] aec8: e59d2000 ldr r2, [sp] aecc: e1520009 cmp r2, r9
while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count;
aed0: e2866001 add r6, r6, #1
/* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { aed4: 2afffff7 bcs aeb8 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) {
aed8: e3580000 cmp r8, #0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
aedc: 028a4008 addeq r4, sl, #8
aee0: 0afffff2 beq aeb0 <_Heap_Allocate_aligned_with_boundary+0x60> uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
aee4: e59d1014 ldr r1, [sp, #20]
uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size;
aee8: e3c99001 bic r9, r9, #1 aeec: e08a9009 add r9, sl, r9
uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size;
aef0: e5973014 ldr r3, [r7, #20]
uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1;
aef4: e59d2010 ldr r2, [sp, #16]
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
aef8: e0814009 add r4, r1, r9
uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size;
aefc: e58d3004 str r3, [sp, #4]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
af00: e1a00004 mov r0, r4
uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1;
af04: e0633002 rsb r3, r3, r2 af08: e1a01008 mov r1, r8 af0c: e0839009 add r9, r3, r9 af10: eb0030f6 bl 172f0 <__umodsi3> af14: e0604004 rsb r4, r0, r4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
af18: e28a3008 add r3, sl, #8
uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) {
af1c: e1590004 cmp r9, r4 af20: e58d3008 str r3, [sp, #8]
af24: 2a000003 bcs af38 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
af28: e1a00009 mov r0, r9 af2c: e1a01008 mov r1, r8 af30: eb0030ee bl 172f0 <__umodsi3> af34: e0604009 rsb r4, r0, r9
} alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) {
af38: e35b0000 cmp fp, #0
af3c: 0a000025 beq afd8 <_Heap_Allocate_aligned_with_boundary+0x188> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size;
af40: e0849005 add r9, r4, r5 af44: e1a00009 mov r0, r9 af48: e1a0100b mov r1, fp af4c: eb0030e7 bl 172f0 <__umodsi3> af50: e0600009 rsb r0, r0, r9
/* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
af54: e1590000 cmp r9, r0 af58: 93a03000 movls r3, #0 af5c: 83a03001 movhi r3, #1 af60: e1540000 cmp r4, r0 af64: 23a03000 movcs r3, #0 af68: e3530000 cmp r3, #0
af6c: 0a000019 beq afd8 <_Heap_Allocate_aligned_with_boundary+0x188> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
af70: e59d1008 ldr r1, [sp, #8] af74: e0819005 add r9, r1, r5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) {
af78: e1590000 cmp r9, r0 af7c: 958d6018 strls r6, [sp, #24]
af80: 9a000002 bls af90 <_Heap_Allocate_aligned_with_boundary+0x140>
af84: eaffffcb b aeb8 <_Heap_Allocate_aligned_with_boundary+0x68> af88: e1590000 cmp r9, r0
af8c: 8a000037 bhi b070 <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size;
af90: e0654000 rsb r4, r5, r0 af94: e1a01008 mov r1, r8 af98: e1a00004 mov r0, r4 af9c: eb0030d3 bl 172f0 <__umodsi3> afa0: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size;
afa4: e0846005 add r6, r4, r5 afa8: e1a00006 mov r0, r6 afac: e1a0100b mov r1, fp afb0: eb0030ce bl 172f0 <__umodsi3> afb4: e0600006 rsb r0, r0, r6
/* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
afb8: e1560000 cmp r6, r0 afbc: 93a03000 movls r3, #0 afc0: 83a03001 movhi r3, #1 afc4: e1540000 cmp r4, r0 afc8: 23a03000 movcs r3, #0 afcc: e3530000 cmp r3, #0
afd0: 1affffec bne af88 <_Heap_Allocate_aligned_with_boundary+0x138>
afd4: e59d6018 ldr r6, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) {
afd8: e59d2008 ldr r2, [sp, #8] afdc: e1520004 cmp r2, r4
afe0: 8affffb4 bhi aeb8 <_Heap_Allocate_aligned_with_boundary+0x68> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin;
afe4: e59d100c ldr r1, [sp, #12] afe8: e1a00004 mov r0, r4 afec: eb0030bf bl 172f0 <__umodsi3> aff0: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000 aff4: e28998ff add r9, r9, #16711680 ; 0xff0000 aff8: e2899cff add r9, r9, #65280 ; 0xff00 affc: e28990f8 add r9, r9, #248 ; 0xf8 b000: e0899004 add r9, r9, r4
if ( free_size >= min_block_size || free_size == 0 ) {
b004: e59d1004 ldr r1, [sp, #4] b008: e0603009 rsb r3, r0, r9 b00c: e1590000 cmp r9, r0 b010: 11510003 cmpne r1, r3
b014: 8affffa7 bhi aeb8 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) {
b018: e3540000 cmp r4, #0
b01c: 0affffa5 beq aeb8 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count;
b020: e597304c ldr r3, [r7, #76] ; 0x4c b024: e0833006 add r3, r3, r6 b028: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
b02c: e1a0100a mov r1, sl b030: e1a03005 mov r3, r5 b034: e1a00007 mov r0, r7 b038: e1a02004 mov r2, r4 b03c: ebffec2e bl 60fc <_Heap_Block_allocate> b040: e1a00004 mov r0, r4
uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats;
b044: e5973044 ldr r3, [r7, #68] ; 0x44 b048: e1530006 cmp r3, r6
); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
b04c: 35876044 strcc r6, [r7, #68] ; 0x44 b050: ea000002 b b060 <_Heap_Allocate_aligned_with_boundary+0x210>
/* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) {
b054: e1550003 cmp r5, r3
b058: 9a000006 bls b078 <_Heap_Allocate_aligned_with_boundary+0x228> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
b05c: e3a00000 mov r0, #0
} return (void *) alloc_begin; }
b060: e28dd01c add sp, sp, #28 b064: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
b068: e3a00000 mov r0, #0 b06c: eafffff4 b b044 <_Heap_Allocate_aligned_with_boundary+0x1f4>
b070: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED b074: eaffff8f b aeb8 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED
if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) {
b078: e3580000 cmp r8, #0 b07c: 01a08002 moveq r8, r2 b080: eaffff80 b ae88 <_Heap_Allocate_aligned_with_boundary+0x38>
00006e8c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) {
6e8c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) {
6e90: e59f35d0 ldr r3, [pc, #1488] ; 7468 <_Heap_Walk+0x5dc>
uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing;
6e94: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
6e98: e5933000 ldr r3, [r3]
uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing;
6e9c: e59f25c8 ldr r2, [pc, #1480] ; 746c <_Heap_Walk+0x5e0> 6ea0: e59fa5c8 ldr sl, [pc, #1480] ; 7470 <_Heap_Walk+0x5e4> 6ea4: 01a0a002 moveq sl, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
6ea8: e3530003 cmp r3, #3
Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size;
6eac: e5902010 ldr r2, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block;
6eb0: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) {
6eb4: e24dd038 sub sp, sp, #56 ; 0x38 6eb8: e1a04000 mov r4, r0 6ebc: e1a08001 mov r8, r1
uintptr_t const page_size = heap->page_size;
6ec0: e58d2020 str r2, [sp, #32]
uintptr_t const min_block_size = heap->min_block_size;
6ec4: e590b014 ldr fp, [r0, #20]
Heap_Block *const last_block = heap->last_block;
6ec8: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *block = heap->first_block;
6ecc: e5905020 ldr r5, [r0, #32]
Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 6ed0: 0a000002 beq 6ee0 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) {
6ed4: e3a00001 mov r0, #1
block = next_block; } return true; }
6ed8: e28dd038 add sp, sp, #56 ; 0x38 6edc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)(
6ee0: e5900018 ldr r0, [r0, #24] 6ee4: e594101c ldr r1, [r4, #28] 6ee8: e2842008 add r2, r4, #8 6eec: e892000c ldm r2, {r2, r3} 6ef0: e59dc024 ldr ip, [sp, #36] ; 0x24 6ef4: e98d0003 stmib sp, {r0, r1} 6ef8: e58d2014 str r2, [sp, #20] 6efc: e58d3018 str r3, [sp, #24] 6f00: e59f256c ldr r2, [pc, #1388] ; 7474 <_Heap_Walk+0x5e8> 6f04: e58db000 str fp, [sp] 6f08: e58d500c str r5, [sp, #12] 6f0c: e58dc010 str ip, [sp, #16] 6f10: e1a00008 mov r0, r8 6f14: e3a01000 mov r1, #0 6f18: e59d3020 ldr r3, [sp, #32] 6f1c: e1a0e00f mov lr, pc 6f20: e12fff1a bx sl
heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) {
6f24: e59d2020 ldr r2, [sp, #32] 6f28: e3520000 cmp r2, #0
6f2c: 0a000032 beq 6ffc <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
6f30: e59d3020 ldr r3, [sp, #32] 6f34: e2139003 ands r9, r3, #3
6f38: 1a000036 bne 7018 <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
6f3c: e1a0000b mov r0, fp 6f40: e59d1020 ldr r1, [sp, #32] 6f44: ebffe733 bl c18 <__umodsi3> 6f48: e2506000 subs r6, r0, #0
6f4c: 1a000038 bne 7034 <_Heap_Walk+0x1a8> ); return false; } if (
6f50: e2850008 add r0, r5, #8 6f54: e59d1020 ldr r1, [sp, #32] 6f58: ebffe72e bl c18 <__umodsi3> 6f5c: e2509000 subs r9, r0, #0
6f60: 1a00003b bne 7054 <_Heap_Walk+0x1c8> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED;
6f64: e5957004 ldr r7, [r5, #4]
); return false; } if ( !_Heap_Is_prev_used( first_block ) ) {
6f68: e2176001 ands r6, r7, #1
6f6c: 0a000040 beq 7074 <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) {
6f70: e5953000 ldr r3, [r5] 6f74: e59dc020 ldr ip, [sp, #32] 6f78: e15c0003 cmp ip, r3
6f7c: 1a000016 bne 6fdc <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) {
6f80: e59d2024 ldr r2, [sp, #36] ; 0x24 6f84: e5923004 ldr r3, [r2, #4] 6f88: e3c33001 bic r3, r3, #1 6f8c: e0823003 add r3, r2, r3 6f90: e5939004 ldr r9, [r3, #4] 6f94: e2199001 ands r9, r9, #1
6f98: 0a000112 beq 73e8 <_Heap_Walk+0x55c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
6f9c: e5949008 ldr r9, [r4, #8]
int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size;
6fa0: e5943010 ldr r3, [r4, #16]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) {
6fa4: e1540009 cmp r4, r9
int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size;
6fa8: e58d3028 str r3, [sp, #40] ; 0x28
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 6fac: 0a00006c beq 7164 <_Heap_Walk+0x2d8> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block;
6fb0: e594c020 ldr ip, [r4, #32]
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
6fb4: e15c0009 cmp ip, r9
6fb8: 9a000034 bls 7090 <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)(
6fbc: e1a00008 mov r0, r8 6fc0: e1a03009 mov r3, r9 6fc4: e3a01001 mov r1, #1 6fc8: e59f24a8 ldr r2, [pc, #1192] ; 7478 <_Heap_Walk+0x5ec> 6fcc: e1a0e00f mov lr, pc 6fd0: e12fff1a bx sl 6fd4: e3a00000 mov r0, #0 6fd8: eaffffbe b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( first_block->prev_size != page_size ) { (*printer)(
6fdc: e1a00008 mov r0, r8 6fe0: e58dc000 str ip, [sp] 6fe4: e3a01001 mov r1, #1 6fe8: e59f248c ldr r2, [pc, #1164] ; 747c <_Heap_Walk+0x5f0> 6fec: e1a0e00f mov lr, pc 6ff0: e12fff1a bx sl 6ff4: e1a00009 mov r0, r9 6ff8: eaffffb6 b 6ed8 <_Heap_Walk+0x4c>
first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" );
6ffc: e1a00008 mov r0, r8 7000: e3a01001 mov r1, #1 7004: e59f2474 ldr r2, [pc, #1140] ; 7480 <_Heap_Walk+0x5f4> 7008: e1a0e00f mov lr, pc 700c: e12fff1a bx sl 7010: e59d0020 ldr r0, [sp, #32] 7014: eaffffaf b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)(
7018: e1a00008 mov r0, r8 701c: e3a01001 mov r1, #1 7020: e59f245c ldr r2, [pc, #1116] ; 7484 <_Heap_Walk+0x5f8> 7024: e1a0e00f mov lr, pc 7028: e12fff1a bx sl 702c: e3a00000 mov r0, #0 7030: eaffffa8 b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)(
7034: e1a00008 mov r0, r8 7038: e1a0300b mov r3, fp 703c: e3a01001 mov r1, #1 7040: e59f2440 ldr r2, [pc, #1088] ; 7488 <_Heap_Walk+0x5fc> 7044: e1a0e00f mov lr, pc 7048: e12fff1a bx sl 704c: e1a00009 mov r0, r9 7050: eaffffa0 b 6ed8 <_Heap_Walk+0x4c>
} if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)(
7054: e1a00008 mov r0, r8 7058: e1a03005 mov r3, r5 705c: e3a01001 mov r1, #1 7060: e59f2424 ldr r2, [pc, #1060] ; 748c <_Heap_Walk+0x600> 7064: e1a0e00f mov lr, pc 7068: e12fff1a bx sl 706c: e1a00006 mov r0, r6 7070: eaffff98 b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)(
7074: e1a00008 mov r0, r8 7078: e3a01001 mov r1, #1 707c: e59f240c ldr r2, [pc, #1036] ; 7490 <_Heap_Walk+0x604> 7080: e1a0e00f mov lr, pc 7084: e12fff1a bx sl 7088: e1a00006 mov r0, r6 708c: eaffff91 b 6ed8 <_Heap_Walk+0x4c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
7090: e5942024 ldr r2, [r4, #36] ; 0x24
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
7094: e1520009 cmp r2, r9
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
7098: e58d202c str r2, [sp, #44] ; 0x2c
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 709c: 3affffc6 bcc 6fbc <_Heap_Walk+0x130> ); return false; } if (
70a0: e2890008 add r0, r9, #8 70a4: e1a01003 mov r1, r3 70a8: e58dc01c str ip, [sp, #28] 70ac: ebffe6d9 bl c18 <__umodsi3> 70b0: e3500000 cmp r0, #0 70b4: e59dc01c ldr ip, [sp, #28]
70b8: 1a0000d1 bne 7404 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) {
70bc: e5993004 ldr r3, [r9, #4] 70c0: e3c33001 bic r3, r3, #1 70c4: e0893003 add r3, r9, r3 70c8: e5933004 ldr r3, [r3, #4] 70cc: e3130001 tst r3, #1
70d0: 1a0000dc bne 7448 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) {
70d4: e599200c ldr r2, [r9, #12] 70d8: e1540002 cmp r4, r2
70dc: 1a0000d0 bne 7424 <_Heap_Walk+0x598>
70e0: e58d7030 str r7, [sp, #48] ; 0x30 70e4: e58db034 str fp, [sp, #52] ; 0x34 70e8: e59d702c ldr r7, [sp, #44] ; 0x2c 70ec: e59db028 ldr fp, [sp, #40] ; 0x28 70f0: e58d502c str r5, [sp, #44] ; 0x2c 70f4: e58d6028 str r6, [sp, #40] ; 0x28 70f8: e1a0600c mov r6, ip 70fc: ea000011 b 7148 <_Heap_Walk+0x2bc> 7100: e1590006 cmp r9, r6
7104: 3affffac bcc 6fbc <_Heap_Walk+0x130>
7108: e1570009 cmp r7, r9
); return false; } if (
710c: e2890008 add r0, r9, #8 7110: e1a0100b mov r1, fp
7114: 3affffa8 bcc 6fbc <_Heap_Walk+0x130>
7118: ebffe6be bl c18 <__umodsi3> 711c: e3500000 cmp r0, #0
7120: 1a0000b7 bne 7404 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) {
7124: e5993004 ldr r3, [r9, #4] 7128: e3c33001 bic r3, r3, #1 712c: e0833009 add r3, r3, r9 7130: e5933004 ldr r3, [r3, #4] 7134: e3130001 tst r3, #1
7138: 1a0000c2 bne 7448 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) {
713c: e599200c ldr r2, [r9, #12] 7140: e1520005 cmp r2, r5
7144: 1a0000b6 bne 7424 <_Heap_Walk+0x598> (*printer)(
7148: e1a05009 mov r5, r9
return false; } prev_block = free_block; free_block = free_block->next;
714c: e5999008 ldr r9, [r9, #8]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) {
7150: e1540009 cmp r4, r9
7154: 1affffe9 bne 7100 <_Heap_Walk+0x274>
7158: e28d502c add r5, sp, #44 ; 0x2c 715c: e89508a0 ldm r5, {r5, r7, fp} 7160: e59d6028 ldr r6, [sp, #40] ; 0x28
if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) {
7164: e59d3024 ldr r3, [sp, #36] ; 0x24 7168: e1530005 cmp r3, r5
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
716c: 158db028 strne fp, [sp, #40] ; 0x28
if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7170: 0affff57 beq 6ed4 <_Heap_Walk+0x48> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
7174: e3c77001 bic r7, r7, #1
uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) {
7178: e21610ff ands r1, r6, #255 ; 0xff
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset);
717c: e0876005 add r6, r7, r5
7180: 0a000012 beq 71d0 <_Heap_Walk+0x344> (*printer)(
7184: e1a03005 mov r3, r5 7188: e58d7000 str r7, [sp] 718c: e1a00008 mov r0, r8 7190: e3a01000 mov r1, #0 7194: e59f22f8 ldr r2, [pc, #760] ; 7494 <_Heap_Walk+0x608> 7198: e1a0e00f mov lr, pc 719c: e12fff1a bx sl
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
71a0: e5943020 ldr r3, [r4, #32] 71a4: e1530006 cmp r3, r6
71a8: 9a000013 bls 71fc <_Heap_Walk+0x370> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)(
71ac: e1a00008 mov r0, r8 71b0: e58d6000 str r6, [sp] 71b4: e1a03005 mov r3, r5 71b8: e3a01001 mov r1, #1 71bc: e59f22d4 ldr r2, [pc, #724] ; 7498 <_Heap_Walk+0x60c> 71c0: e1a0e00f mov lr, pc 71c4: e12fff1a bx sl 71c8: e3a00000 mov r0, #0
"block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false;
71cc: eaffff41 b 6ed8 <_Heap_Walk+0x4c>
"block 0x%08x: size %u\n", block, block_size ); } else { (*printer)(
71d0: e58d7000 str r7, [sp] 71d4: e5953000 ldr r3, [r5] 71d8: e1a00008 mov r0, r8 71dc: e58d3004 str r3, [sp, #4] 71e0: e59f22b4 ldr r2, [pc, #692] ; 749c <_Heap_Walk+0x610> 71e4: e1a03005 mov r3, r5 71e8: e1a0e00f mov lr, pc 71ec: e12fff1a bx sl 71f0: e5943020 ldr r3, [r4, #32] 71f4: e1530006 cmp r3, r6
71f8: 8affffeb bhi 71ac <_Heap_Walk+0x320>
71fc: e5943024 ldr r3, [r4, #36] ; 0x24 7200: e1530006 cmp r3, r6
7204: 3affffe8 bcc 71ac <_Heap_Walk+0x320> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) {
7208: e1a00007 mov r0, r7 720c: e59d1020 ldr r1, [sp, #32] 7210: ebffe680 bl c18 <__umodsi3> 7214: e2509000 subs r9, r0, #0
7218: 1a000055 bne 7374 <_Heap_Walk+0x4e8> ); return false; } if ( block_size < min_block_size ) {
721c: e59d3028 ldr r3, [sp, #40] ; 0x28 7220: e1530007 cmp r3, r7
7224: 8a00005b bhi 7398 <_Heap_Walk+0x50c> ); return false; } if ( next_block_begin <= block_begin ) {
7228: e1550006 cmp r5, r6
722c: 2a000064 bcs 73c4 <_Heap_Walk+0x538> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) {
7230: e5963004 ldr r3, [r6, #4] 7234: e3130001 tst r3, #1
7238: 1a000036 bne 7318 <_Heap_Walk+0x48c> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED;
723c: e595b004 ldr fp, [r5, #4]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
7240: e595200c ldr r2, [r5, #12]
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
7244: e5943008 ldr r3, [r4, #8]
- HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
7248: e3cb7001 bic r7, fp, #1
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
724c: e1530002 cmp r3, r2
} RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev;
7250: e594100c ldr r1, [r4, #12]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset);
7254: e0859007 add r9, r5, r7
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
7258: 059f0240 ldreq r0, [pc, #576] ; 74a0 <_Heap_Walk+0x614>
725c: 0a000003 beq 7270 <_Heap_Walk+0x3e4> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
7260: e59fc23c ldr ip, [pc, #572] ; 74a4 <_Heap_Walk+0x618> 7264: e1520004 cmp r2, r4 7268: e59f0238 ldr r0, [pc, #568] ; 74a8 <_Heap_Walk+0x61c> 726c: 11a0000c movne r0, ip
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
7270: e5953008 ldr r3, [r5, #8] 7274: e1510003 cmp r1, r3 7278: 059f122c ldreq r1, [pc, #556] ; 74ac <_Heap_Walk+0x620>
727c: 0a000003 beq 7290 <_Heap_Walk+0x404> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
7280: e59fc21c ldr ip, [pc, #540] ; 74a4 <_Heap_Walk+0x618> 7284: e1530004 cmp r3, r4 7288: e59f1220 ldr r1, [pc, #544] ; 74b0 <_Heap_Walk+0x624> 728c: 11a0100c movne r1, ip
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
7290: e58d2000 str r2, [sp] 7294: e98d0009 stmib sp, {r0, r3} 7298: e58d100c str r1, [sp, #12] 729c: e1a03005 mov r3, r5 72a0: e1a00008 mov r0, r8 72a4: e3a01000 mov r1, #0 72a8: e59f2204 ldr r2, [pc, #516] ; 74b4 <_Heap_Walk+0x628> 72ac: e1a0e00f mov lr, pc 72b0: e12fff1a bx sl
block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) {
72b4: e5993000 ldr r3, [r9] 72b8: e1570003 cmp r7, r3
72bc: 0a00000a beq 72ec <_Heap_Walk+0x460> (*printer)(
72c0: e58d3004 str r3, [sp, #4] 72c4: e1a00008 mov r0, r8 72c8: e58d7000 str r7, [sp] 72cc: e58d9008 str r9, [sp, #8] 72d0: e1a03005 mov r3, r5 72d4: e3a01001 mov r1, #1 72d8: e59f21d8 ldr r2, [pc, #472] ; 74b8 <_Heap_Walk+0x62c> 72dc: e1a0e00f mov lr, pc 72e0: e12fff1a bx sl 72e4: e3a00000 mov r0, #0 72e8: eafffefa b 6ed8 <_Heap_Walk+0x4c>
); return false; } if ( !prev_used ) {
72ec: e21b9001 ands r9, fp, #1
72f0: 0a000017 beq 7354 <_Heap_Walk+0x4c8>
72f4: e5943008 ldr r3, [r4, #8]
) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) {
72f8: e1530004 cmp r3, r4
72fc: 1a000003 bne 7310 <_Heap_Walk+0x484>
7300: ea00000b b 7334 <_Heap_Walk+0x4a8> <== NOT EXECUTED
if ( free_block == block ) { return true; } free_block = free_block->next;
7304: e5933008 ldr r3, [r3, #8]
) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) {
7308: e1530004 cmp r3, r4
730c: 0a000008 beq 7334 <_Heap_Walk+0x4a8> if ( free_block == block ) {
7310: e1530005 cmp r3, r5
7314: 1afffffa bne 7304 <_Heap_Walk+0x478> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) {
7318: e59d2024 ldr r2, [sp, #36] ; 0x24 731c: e1520006 cmp r2, r6
7320: 0afffeeb beq 6ed4 <_Heap_Walk+0x48> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) {
7324: e5967004 ldr r7, [r6, #4] 7328: e1a05006 mov r5, r6 732c: e2076001 and r6, r7, #1 7330: eaffff8f b 7174 <_Heap_Walk+0x2e8>
return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)(
7334: e1a00008 mov r0, r8 7338: e1a03005 mov r3, r5 733c: e3a01001 mov r1, #1 7340: e59f2174 ldr r2, [pc, #372] ; 74bc <_Heap_Walk+0x630> 7344: e1a0e00f mov lr, pc 7348: e12fff1a bx sl 734c: e3a00000 mov r0, #0 7350: eafffee0 b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( !prev_used ) { (*printer)(
7354: e1a00008 mov r0, r8 7358: e1a03005 mov r3, r5 735c: e3a01001 mov r1, #1 7360: e59f2158 ldr r2, [pc, #344] ; 74c0 <_Heap_Walk+0x634> 7364: e1a0e00f mov lr, pc 7368: e12fff1a bx sl 736c: e1a00009 mov r0, r9 7370: eafffed8 b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)(
7374: e1a00008 mov r0, r8 7378: e58d7000 str r7, [sp] 737c: e1a03005 mov r3, r5 7380: e3a01001 mov r1, #1 7384: e59f2138 ldr r2, [pc, #312] ; 74c4 <_Heap_Walk+0x638> 7388: e1a0e00f mov lr, pc 738c: e12fff1a bx sl 7390: e3a00000 mov r0, #0
"block 0x%08x: block size %u not page aligned\n", block, block_size ); return false;
7394: eafffecf b 6ed8 <_Heap_Walk+0x4c>
} if ( block_size < min_block_size ) { (*printer)(
7398: e58d3004 str r3, [sp, #4] 739c: e1a00008 mov r0, r8 73a0: e1a0b003 mov fp, r3 73a4: e58d7000 str r7, [sp] 73a8: e1a03005 mov r3, r5 73ac: e3a01001 mov r1, #1 73b0: e59f2110 ldr r2, [pc, #272] ; 74c8 <_Heap_Walk+0x63c> 73b4: e1a0e00f mov lr, pc 73b8: e12fff1a bx sl 73bc: e1a00009 mov r0, r9
block, block_size, min_block_size ); return false;
73c0: eafffec4 b 6ed8 <_Heap_Walk+0x4c>
} if ( next_block_begin <= block_begin ) { (*printer)(
73c4: e1a00008 mov r0, r8 73c8: e58d6000 str r6, [sp] 73cc: e1a03005 mov r3, r5 73d0: e3a01001 mov r1, #1 73d4: e59f20f0 ldr r2, [pc, #240] ; 74cc <_Heap_Walk+0x640> 73d8: e1a0e00f mov lr, pc 73dc: e12fff1a bx sl 73e0: e1a00009 mov r0, r9
"block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false;
73e4: eafffebb b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)(
73e8: e1a00008 mov r0, r8 73ec: e3a01001 mov r1, #1 73f0: e59f20d8 ldr r2, [pc, #216] ; 74d0 <_Heap_Walk+0x644> 73f4: e1a0e00f mov lr, pc 73f8: e12fff1a bx sl 73fc: e1a00009 mov r0, r9 7400: eafffeb4 b 6ed8 <_Heap_Walk+0x4c>
} if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)(
7404: e1a00008 mov r0, r8 7408: e1a03009 mov r3, r9 740c: e3a01001 mov r1, #1 7410: e59f20bc ldr r2, [pc, #188] ; 74d4 <_Heap_Walk+0x648> 7414: e1a0e00f mov lr, pc 7418: e12fff1a bx sl 741c: e3a00000 mov r0, #0 7420: eafffeac b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( free_block->prev != prev_block ) { (*printer)(
7424: e58d2000 str r2, [sp] 7428: e1a00008 mov r0, r8 742c: e1a03009 mov r3, r9 7430: e3a01001 mov r1, #1 7434: e59f209c ldr r2, [pc, #156] ; 74d8 <_Heap_Walk+0x64c> 7438: e1a0e00f mov lr, pc 743c: e12fff1a bx sl 7440: e3a00000 mov r0, #0 7444: eafffea3 b 6ed8 <_Heap_Walk+0x4c>
return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)(
7448: e1a00008 mov r0, r8 744c: e1a03009 mov r3, r9 7450: e3a01001 mov r1, #1 7454: e59f2080 ldr r2, [pc, #128] ; 74dc <_Heap_Walk+0x650> 7458: e1a0e00f mov lr, pc 745c: e12fff1a bx sl 7460: e3a00000 mov r0, #0 7464: eafffe9b b 6ed8 <_Heap_Walk+0x4c> 7468: 0001d930 .word 0x0001d930 746c: 00006e80 .word 0x00006e80 7470: 000074e0 .word 0x000074e0 7474: 0001b94c .word 0x0001b94c 7478: 0001bae0 .word 0x0001bae0 747c: 0001ba9c .word 0x0001ba9c 7480: 0001b9e0 .word 0x0001b9e0 7484: 0001b9f4 .word 0x0001b9f4 7488: 0001ba14 .word 0x0001ba14 748c: 0001ba38 .word 0x0001ba38 7490: 0001ba6c .word 0x0001ba6c 7494: 0001bb80 .word 0x0001bb80 7498: 0001bbc0 .word 0x0001bbc0 749c: 0001bb98 .word 0x0001bb98 74a0: 0001bc80 .word 0x0001bc80 74a4: 0001bd14 .word 0x0001bd14 74a8: 0001bc8c .word 0x0001bc8c 74ac: 0001bc98 .word 0x0001bc98 74b0: 0001bca4 .word 0x0001bca4 74b4: 0001bcb0 .word 0x0001bcb0 74b8: 0001bcdc .word 0x0001bcdc 74bc: 0001bd48 .word 0x0001bd48 74c0: 0001bd18 .word 0x0001bd18 74c4: 0001bbf0 .word 0x0001bbf0 74c8: 0001bc20 .word 0x0001bc20 74cc: 0001bc4c .word 0x0001bc4c 74d0: 0001bac8 .word 0x0001bac8 74d4: 0001bb00 .word 0x0001bb00 74d8: 0001bb4c .word 0x0001bb4c 74dc: 0001bb30 .word 0x0001bb30
0000636c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) {
636c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
6370: e5908034 ldr r8, [r0, #52] ; 0x34 6374: e3580000 cmp r8, #0
*/ void _Objects_Extend_information( Objects_Information *information ) {
6378: e24dd014 sub sp, sp, #20 637c: e1a05000 mov r5, r0
/* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id );
6380: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6384: 0a00009c beq 65fc <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size;
6388: e1d091b4 ldrh r9, [r0, #20] 638c: e1d0a1b0 ldrh sl, [r0, #16] 6390: e1a01009 mov r1, r9 6394: e1a0000a mov r0, sl 6398: eb004390 bl 171e0 <__aeabi_uidiv> 639c: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
63a0: e1b03823 lsrs r3, r3, #16 63a4: 01a01009 moveq r1, r9 63a8: 01a06007 moveq r6, r7 63ac: 01a04003 moveq r4, r3
63b0: 0a00000f beq 63f4 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL )
63b4: e5984000 ldr r4, [r8] 63b8: e3540000 cmp r4, #0 63bc: 11a01009 movne r1, r9 63c0: 11a06007 movne r6, r7 63c4: 13a04000 movne r4, #0 63c8: 01a01009 moveq r1, r9 63cc: 01a06007 moveq r6, r7
63d0: 1a000003 bne 63e4 <_Objects_Extend_information+0x78>
63d4: ea000006 b 63f4 <_Objects_Extend_information+0x88> <== NOT EXECUTED
63d8: e7982104 ldr r2, [r8, r4, lsl #2] 63dc: e3520000 cmp r2, #0
63e0: 0a000003 beq 63f4 <_Objects_Extend_information+0x88> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) {
63e4: e2844001 add r4, r4, #1 63e8: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size;
63ec: e0866009 add r6, r6, r9
if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 63f0: 8afffff8 bhi 63d8 <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size;
63f4: e08aa001 add sl, sl, r1
/* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
63f8: e35a0801 cmp sl, #65536 ; 0x10000
63fc: 2a000064 bcs 6594 <_Objects_Extend_information+0x228> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) {
6400: e5d50012 ldrb r0, [r5, #18]
/* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size;
6404: e5952018 ldr r2, [r5, #24]
if ( information->auto_extend ) {
6408: e3500000 cmp r0, #0
/* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size;
640c: e0000192 mul r0, r2, r1
if ( information->auto_extend ) { 6410: 1a000061 bne 659c <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
6414: e58d3000 str r3, [sp] 6418: eb000835 bl 84f4 <_Workspace_Allocate_or_fatal_error> 641c: e59d3000 ldr r3, [sp] 6420: e1a09000 mov r9, r0
} /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) {
6424: e1d521b0 ldrh r2, [r5, #16] 6428: e1560002 cmp r6, r2
642c: 3a000038 bcc 6514 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++;
6430: e283c001 add ip, r3, #1
* Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size );
6434: e08c008c add r0, ip, ip, lsl #1 6438: e08a0000 add r0, sl, r0 643c: e0800007 add r0, r0, r7 6440: e1a00100 lsl r0, r0, #2 6444: e88d1008 stm sp, {r3, ip} 6448: eb000835 bl 8524 <_Workspace_Allocate>
if ( !object_blocks ) {
644c: e250b000 subs fp, r0, #0 6450: e89d1008 ldm sp, {r3, ip}
6454: 0a00006e beq 6614 <_Objects_Extend_information+0x2a8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) {
6458: e1d521b0 ldrh r2, [r5, #16] 645c: e1570002 cmp r7, r2
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset);
6460: e08b818c add r8, fp, ip, lsl #3 6464: e08bc10c add ip, fp, ip, lsl #2
6468: 3a000051 bcc 65b4 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
646c: e3570000 cmp r7, #0
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
6470: 13a02000 movne r2, #0
/* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL;
6474: 11a01002 movne r1, r2
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6478: 0a000003 beq 648c <_Objects_Extend_information+0x120> local_table[ index ] = NULL;
647c: e7881102 str r1, [r8, r2, lsl #2]
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
6480: e2822001 add r2, r2, #1 6484: e1570002 cmp r7, r2
6488: 8afffffb bhi 647c <_Objects_Extend_information+0x110>
648c: e1a03103 lsl r3, r3, #2
*/ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base );
6490: e1d511b4 ldrh r1, [r5, #20] 6494: e0861001 add r1, r6, r1
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
6498: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0; for ( index=index_base ;
649c: e1560001 cmp r6, r1
/* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0;
64a0: e78c0003 str r0, [ip, r3]
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
64a4: e78b0003 str r0, [fp, r3]
inactive_per_block[block_count] = 0; for ( index=index_base ; 64a8: 2a000005 bcs 64c4 <_Objects_Extend_information+0x158>
64ac: e0882106 add r2, r8, r6, lsl #2 64b0: e1a03006 mov r3, r6
index < ( information->allocation_size + index_base ); index++ ) {
64b4: e2833001 add r3, r3, #1
* Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ;
64b8: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL;
64bc: e4820004 str r0, [r2], #4
* Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 64c0: 3afffffb bcc 64b4 <_Objects_Extend_information+0x148>
64c4: e10f3000 mrs r3, CPSR 64c8: e3832080 orr r2, r3, #128 ; 0x80 64cc: e129f002 msr CPSR_fc, r2
information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
64d0: e5952000 ldr r2, [r5] 64d4: e1d510b4 ldrh r1, [r5, #4] 64d8: e1a02c02 lsl r2, r2, #24
old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum;
64dc: e1a0a80a lsl sl, sl, #16
information->maximum_id = _Objects_Build_id(
64e0: e3822801 orr r2, r2, #65536 ; 0x10000
old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum;
64e4: e1a0a82a lsr sl, sl, #16
information->maximum_id = _Objects_Build_id(
64e8: e1822d81 orr r2, r2, r1, lsl #27 64ec: e182200a orr r2, r2, sl
local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks;
64f0: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block;
64f4: e585c030 str ip, [r5, #48] ; 0x30
information->local_table = local_table;
64f8: e585801c str r8, [r5, #28]
information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
64fc: e585200c str r2, [r5, #12]
old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum;
6500: e1c5a1b0 strh sl, [r5, #16]
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks;
6504: e585b034 str fp, [r5, #52] ; 0x34
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
6508: e129f003 msr CPSR_fc, r3
information->maximum ); _ISR_Enable( level ); if ( old_tables )
650c: e3500000 cmp r0, #0
_Workspace_Free( old_tables );
6510: 1b000809 blne 853c <_Workspace_Free>
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
6514: e5953034 ldr r3, [r5, #52] ; 0x34
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
6518: e28d7008 add r7, sp, #8
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
651c: e7839104 str r9, [r3, r4, lsl #2]
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
6520: e1a01009 mov r1, r9 6524: e1a00007 mov r0, r7 6528: e1d521b4 ldrh r2, [r5, #20] 652c: e5953018 ldr r3, [r5, #24] 6530: eb0011a4 bl abc8 <_Chain_Initialize>
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
6534: e1a04104 lsl r4, r4, #2
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
6538: e2858020 add r8, r5, #32
/* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
653c: ea000008 b 6564 <_Objects_Extend_information+0x1f8>
the_object->id = _Objects_Build_id(
6540: e5952000 ldr r2, [r5] 6544: e1d5c0b4 ldrh ip, [r5, #4] 6548: e1a02c02 lsl r2, r2, #24 654c: e3822801 orr r2, r2, #65536 ; 0x10000 6550: e1822d8c orr r2, r2, ip, lsl #27 6554: e1822006 orr r2, r2, r6 6558: e5832008 str r2, [r3, #8]
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
655c: ebfffd18 bl 59c4 <_Chain_Append>
index++;
6560: e2866001 add r6, r6, #1
/* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
6564: e1a00007 mov r0, r7 6568: ebfffd20 bl 59f0 <_Chain_Get> 656c: e2503000 subs r3, r0, #0
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
6570: e1a01003 mov r1, r3 6574: e1a00008 mov r0, r8
/* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6578: 1afffff0 bne 6540 <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
657c: e1d531b4 ldrh r3, [r5, #20]
information->inactive =
6580: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
6584: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
6588: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
658c: e7813004 str r3, [r1, r4]
information->inactive =
6590: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size); }
6594: e28dd014 add sp, sp, #20 6598: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size );
659c: e58d3000 str r3, [sp] 65a0: eb0007df bl 8524 <_Workspace_Allocate>
if ( !new_object_block )
65a4: e2509000 subs r9, r0, #0 65a8: e59d3000 ldr r3, [sp]
65ac: 1affff9c bne 6424 <_Objects_Extend_information+0xb8>
65b0: eafffff7 b 6594 <_Objects_Extend_information+0x228>
/* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks,
65b4: e1a03103 lsl r3, r3, #2 65b8: e1a02003 mov r2, r3 65bc: e5951034 ldr r1, [r5, #52] ; 0x34 65c0: e88d1008 stm sp, {r3, ip} 65c4: eb001fa0 bl e44c <memcpy>
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block,
65c8: e89d1008 ldm sp, {r3, ip} 65cc: e1a0000c mov r0, ip 65d0: e1a02003 mov r2, r3 65d4: e5951030 ldr r1, [r5, #48] ; 0x30 65d8: eb001f9b bl e44c <memcpy>
information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
65dc: e1d521b0 ldrh r2, [r5, #16] 65e0: e0872002 add r2, r7, r2 65e4: e1a02102 lsl r2, r2, #2 65e8: e1a00008 mov r0, r8 65ec: e595101c ldr r1, [r5, #28] 65f0: eb001f95 bl e44c <memcpy> 65f4: e89d1008 ldm sp, {r3, ip} 65f8: eaffffa4 b 6490 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
65fc: e1a04008 mov r4, r8 6600: e1d0a1b0 ldrh sl, [r0, #16] 6604: e1d011b4 ldrh r1, [r0, #20] 6608: e1a06007 mov r6, r7 660c: e1a03008 mov r3, r8 6610: eaffff77 b 63f4 <_Objects_Extend_information+0x88>
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block );
6614: e1a00009 mov r0, r9 6618: eb0007c7 bl 853c <_Workspace_Free>
return;
661c: eaffffdc b 6594 <_Objects_Extend_information+0x228>
00006130 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
6130: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 6134: e1a04001 mov r4, r1 6138: e24dd004 sub sp, sp, #4 613c: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
6140: e1a0100d mov r1, sp 6144: e1a00004 mov r0, r4
pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
6148: e1a08002 mov r8, r2 614c: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
6150: eb000075 bl 632c <_POSIX_Mutex_Get> 6154: e3500000 cmp r0, #0
6158: 0a00000a beq 6188 <_POSIX_Condition_variables_Wait_support+0x58> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
615c: e59f30dc ldr r3, [pc, #220] ; 6240 <_POSIX_Condition_variables_Wait_support+0x110> 6160: e5932000 ldr r2, [r3] 6164: e2422001 sub r2, r2, #1 6168: e5832000 str r2, [r3]
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
616c: e1a0100d mov r1, sp 6170: e1a00006 mov r0, r6 6174: ebffff76 bl 5f54 <_POSIX_Condition_variables_Get>
switch ( location ) {
6178: e59d3000 ldr r3, [sp] 617c: e3530000 cmp r3, #0
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
6180: e1a0a000 mov sl, r0
switch ( location ) { 6184: 0a000003 beq 6198 <_POSIX_Condition_variables_Wait_support+0x68> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status )
6188: e3a05016 mov r5, #22
case OBJECTS_ERROR: break; } return EINVAL; }
618c: e1a00005 mov r0, r5 6190: e28dd004 add sp, sp, #4 6194: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
6198: e5903014 ldr r3, [r0, #20] 619c: e3530000 cmp r3, #0
61a0: 0a000005 beq 61bc <_POSIX_Condition_variables_Wait_support+0x8c>
61a4: e5942000 ldr r2, [r4] 61a8: e1530002 cmp r3, r2
61ac: 0a000002 beq 61bc <_POSIX_Condition_variables_Wait_support+0x8c> _Thread_Enable_dispatch();
61b0: eb000c6f bl 9374 <_Thread_Enable_dispatch> 61b4: e3a05016 mov r5, #22
return EINVAL;
61b8: eafffff3 b 618c <_POSIX_Condition_variables_Wait_support+0x5c>
} (void) pthread_mutex_unlock( mutex );
61bc: e1a00004 mov r0, r4 61c0: eb0000e3 bl 6554 <pthread_mutex_unlock>
_Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) {
61c4: e3570000 cmp r7, #0
61c8: 0a000006 beq 61e8 <_POSIX_Condition_variables_Wait_support+0xb8> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch();
61cc: eb000c68 bl 9374 <_Thread_Enable_dispatch> 61d0: e3a05074 mov r5, #116 ; 0x74
/* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex );
61d4: e1a00004 mov r0, r4 61d8: eb0000bc bl 64d0 <pthread_mutex_lock>
if ( mutex_status )
61dc: e3500000 cmp r0, #0
61e0: 0affffe9 beq 618c <_POSIX_Condition_variables_Wait_support+0x5c>
61e4: eaffffe7 b 6188 <_POSIX_Condition_variables_Wait_support+0x58>
if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
61e8: e59f5054 ldr r5, [pc, #84] ; 6244 <_POSIX_Condition_variables_Wait_support+0x114>
return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex;
61ec: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
61f0: e5953000 ldr r3, [r5]
return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex;
61f4: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
61f8: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond;
61fc: e5961000 ldr r1, [r6]
if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue;
6200: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
6204: e5831020 str r1, [r3, #32]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
6208: e3a01001 mov r1, #1
if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue;
620c: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
6210: e1a00002 mov r0, r2 6214: e58a1048 str r1, [sl, #72] ; 0x48 6218: e59f2028 ldr r2, [pc, #40] ; 6248 <_POSIX_Condition_variables_Wait_support+0x118> 621c: e1a01008 mov r1, r8 6220: eb000d99 bl 988c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
6224: eb000c52 bl 9374 <_Thread_Enable_dispatch>
/* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code;
6228: e5953000 ldr r3, [r5] 622c: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
6230: e3550074 cmp r5, #116 ; 0x74 6234: 13550000 cmpne r5, #0
6238: 0affffe5 beq 61d4 <_POSIX_Condition_variables_Wait_support+0xa4>
623c: eaffffd2 b 618c <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
6240: 0001dc0c .word 0x0001dc0c 6244: 0001dcc0 .word 0x0001dcc0 6248: 00009c7c .word 0x00009c7c
0000d85c <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
d85c: e10f2000 mrs r2, CPSR d860: e3823080 orr r3, r2, #128 ; 0x80 d864: e129f003 msr CPSR_fc, r3
mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
d868: e59f1064 ldr r1, [pc, #100] ; d8d4 <_POSIX_signals_Clear_process_signals+0x78> d86c: e0803080 add r3, r0, r0, lsl #1 d870: e7911103 ldr r1, [r1, r3, lsl #2] d874: e3510002 cmp r1, #2 d878: e1a01103 lsl r1, r3, #2
d87c: 0a00000c beq d8b4 <_POSIX_signals_Clear_process_signals+0x58> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask;
d880: e59f3050 ldr r3, [pc, #80] ; d8d8 <_POSIX_signals_Clear_process_signals+0x7c> d884: e5931000 ldr r1, [r3] d888: e3a0c001 mov ip, #1 d88c: e2400001 sub r0, r0, #1 d890: e1c1001c bic r0, r1, ip, lsl r0
if ( !_POSIX_signals_Pending )
d894: e3500000 cmp r0, #0
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask;
d898: e5830000 str r0, [r3]
if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--;
d89c: 059f3038 ldreq r3, [pc, #56] ; d8dc <_POSIX_signals_Clear_process_signals+0x80> d8a0: 05931000 ldreq r1, [r3] d8a4: 02411001 subeq r1, r1, #1 d8a8: 05831000 streq r1, [r3]
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
d8ac: e129f002 msr CPSR_fc, r2
} _ISR_Enable( level ); }
d8b0: e12fff1e bx lr
ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
d8b4: e59fc024 ldr ip, [pc, #36] ; d8e0 <_POSIX_signals_Clear_process_signals+0x84>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
d8b8: e79c3103 ldr r3, [ip, r3, lsl #2] d8bc: e08c1001 add r1, ip, r1 d8c0: e2811004 add r1, r1, #4 d8c4: e1530001 cmp r3, r1
d8c8: 0affffec beq d880 <_POSIX_signals_Clear_process_signals+0x24>
d8cc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); }
d8d0: e12fff1e bx lr <== NOT EXECUTED
d8d4: 0001b50c .word 0x0001b50c d8d8: 0001b700 .word 0x0001b700 d8dc: 0001b0a4 .word 0x0001b0a4 d8e0: 0001b704 .word 0x0001b704
000076ac <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority;
76ac: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) {
76b0: e92d05f0 push {r4, r5, r6, r7, r8, sl}
_Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
76b4: e1a0c323 lsr ip, r3, #6
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
76b8: e281503c add r5, r1, #60 ; 0x3c 76bc: e08cc08c add ip, ip, ip, lsl #1
block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) )
76c0: e3130020 tst r3, #32
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
76c4: e2814038 add r4, r1, #56 ; 0x38
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
76c8: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
76cc: e3a05000 mov r5, #0 76d0: e581503c str r5, [r1, #60] ; 0x3c
the_chain->last = _Chain_Head(the_chain);
76d4: e5814040 str r4, [r1, #64] ; 0x40
_Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
76d8: e080c10c add ip, r0, ip, lsl #2
block_state = the_thread_queue->state;
76dc: e5906038 ldr r6, [r0, #56] ; 0x38 76e0: 159fa178 ldrne sl, [pc, #376] ; 7860 <_Thread_queue_Enqueue_priority+0x1b4>
if ( _Thread_queue_Is_reverse_search( priority ) ) 76e4: 1a00001c bne 775c <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
76e8: e28ca004 add sl, ip, #4
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
76ec: e10f8000 mrs r8, CPSR 76f0: e3884080 orr r4, r8, #128 ; 0x80 76f4: 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;
76f8: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
76fc: e154000a cmp r4, sl
7700: 1a000009 bne 772c <_Thread_queue_Enqueue_priority+0x80>
7704: ea000052 b 7854 <_Thread_queue_Enqueue_priority+0x1a8>
static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile (
7708: e10f7000 mrs r7, CPSR 770c: e129f008 msr CPSR_fc, r8 7710: e129f007 msr CPSR_fc, r7
search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7714: e5947010 ldr r7, [r4, #16] 7718: e1160007 tst r6, r7
771c: 0a000033 beq 77f0 <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next;
7720: 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 ) ) {
7724: e154000a cmp r4, sl
7728: 0a000002 beq 7738 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority;
772c: e5945014 ldr r5, [r4, #20]
if ( priority <= search_priority )
7730: e1530005 cmp r3, r5
7734: 8afffff3 bhi 7708 <_Thread_queue_Enqueue_priority+0x5c> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7738: e1a06008 mov r6, r8
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
773c: e590c030 ldr ip, [r0, #48] ; 0x30 7740: e35c0001 cmp ip, #1
7744: 0a00002b beq 77f8 <_Thread_queue_Enqueue_priority+0x14c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level;
7748: e5826000 str r6, [r2]
return the_thread_queue->sync_state;
774c: e1a0000c mov r0, ip
}
7750: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 7754: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
7758: e129f008 msr CPSR_fc, r8
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1;
775c: e5da5000 ldrb r5, [sl] 7760: e2855001 add r5, r5, #1
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
7764: e10f8000 mrs r8, CPSR 7768: e3884080 orr r4, r8, #128 ; 0x80 776c: e129f004 msr CPSR_fc, r4
_ISR_Disable( level ); search_thread = (Thread_Control *) header->last;
7770: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7774: e154000c cmp r4, ip
7778: 1a000009 bne 77a4 <_Thread_queue_Enqueue_priority+0xf8>
777c: ea00000b b 77b0 <_Thread_queue_Enqueue_priority+0x104>
static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile (
7780: e10f7000 mrs r7, CPSR 7784: e129f008 msr CPSR_fc, r8 7788: e129f007 msr CPSR_fc, r7
search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) {
778c: e5947010 ldr r7, [r4, #16] 7790: e1160007 tst r6, r7
7794: 0affffef beq 7758 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *)
7798: 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 ) ) {
779c: e154000c cmp r4, ip
77a0: 0a000002 beq 77b0 <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority;
77a4: e5945014 ldr r5, [r4, #20]
if ( priority >= search_priority )
77a8: e1530005 cmp r3, r5
77ac: 3afffff3 bcc 7780 <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
77b0: e590c030 ldr ip, [r0, #48] ; 0x30 77b4: 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 ) ) {
77b8: e1a06008 mov r6, r8
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 77bc: 1affffe1 bne 7748 <_Thread_queue_Enqueue_priority+0x9c> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority )
77c0: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
77c4: e3a03000 mov r3, #0 77c8: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority ) 77cc: 0a000016 beq 782c <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
77d0: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
77d4: e8810018 stm r1, {r3, r4}
search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
77d8: 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;
77dc: e5841000 str r1, [r4]
next_node->previous = the_node;
77e0: e5831004 str r1, [r3, #4]
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
77e4: e129f008 msr CPSR_fc, r8 77e8: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
77ec: eaffffd7 b 7750 <_Thread_queue_Enqueue_priority+0xa4>
77f0: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 77f4: eaffffbc b 76ec <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority )
77f8: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
77fc: e3a03000 mov r3, #0 7800: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority ) 7804: 0a000008 beq 782c <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
7808: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
780c: e5814000 str r4, [r1]
the_node->previous = previous_node;
7810: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
7814: 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;
7818: e5831000 str r1, [r3]
search_node->previous = the_node;
781c: e5841004 str r1, [r4, #4] 7820: e129f008 msr CPSR_fc, r8 7824: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7828: eaffffc8 b 7750 <_Thread_queue_Enqueue_priority+0xa4> 782c: 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;
7830: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
7834: e5814000 str r4, [r1]
the_node->previous = previous_node;
7838: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
783c: 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;
7840: e5831000 str r1, [r3]
search_node->previous = the_node;
7844: e5841004 str r1, [r4, #4] 7848: e129f006 msr CPSR_fc, r6 784c: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7850: eaffffbe b 7750 <_Thread_queue_Enqueue_priority+0xa4>
restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7854: e1a06008 mov r6, r8 7858: e3e05000 mvn r5, #0 785c: eaffffb6 b 773c <_Thread_queue_Enqueue_priority+0x90> 7860: 00019570 .word 0x00019570
000162d0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
162d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 162d4: e24dd024 sub sp, sp, #36 ; 0x24 162d8: e28d700c add r7, sp, #12 162dc: e28d2018 add r2, sp, #24 162e0: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL;
162e4: e3a03000 mov r3, #0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
162e8: e282a004 add sl, r2, #4 162ec: e2872004 add r2, r7, #4 162f0: e58d2000 str r2, [sp]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL;
162f4: e58d301c str r3, [sp, #28]
the_chain->last = _Chain_Head(the_chain);
162f8: e28d0018 add r0, sp, #24
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
162fc: e58d200c str r2, [sp, #12]
the_chain->permanent_null = NULL;
16300: e58d3010 str r3, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
16304: e2842008 add r2, r4, #8
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16308: e2843040 add r3, r4, #64 ; 0x40
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
1630c: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
16310: e58d0020 str r0, [sp, #32] 16314: e58d7014 str r7, [sp, #20] 16318: e59f91a0 ldr r9, [pc, #416] ; 164c0 <_Timer_server_Body+0x1f0> 1631c: e59fb1a0 ldr fp, [pc, #416] ; 164c4 <_Timer_server_Body+0x1f4>
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
16320: e58d2008 str r2, [sp, #8]
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
16324: e58d3004 str r3, [sp, #4]
*/ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16328: e2846030 add r6, r4, #48 ; 0x30
/* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1632c: e2848068 add r8, r4, #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;
16330: e28d0018 add r0, sp, #24 16334: e5840078 str r0, [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;
16338: e5993000 ldr r3, [r9]
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1633c: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
16340: e1a00006 mov r0, r6 16344: e0611003 rsb r1, r1, r3
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot;
16348: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1634c: e1a02007 mov r2, r7 16350: eb00111f bl 1a7d4 <_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();
16354: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
16358: e5941074 ldr r1, [r4, #116] ; 0x74
/* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) {
1635c: e1550001 cmp r5, r1
16360: 8a000022 bhi 163f0 <_Timer_server_Body+0x120> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 16364: 3a000018 bcc 163cc <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot;
16368: e5845074 str r5, [r4, #116] ; 0x74
} static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
1636c: e5940078 ldr r0, [r4, #120] ; 0x78 16370: eb00025c bl 16ce8 <_Chain_Get>
if ( timer == NULL ) {
16374: e3500000 cmp r0, #0
16378: 0a00000b beq 163ac <_Timer_server_Body+0xdc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1637c: e5903038 ldr r3, [r0, #56] ; 0x38 16380: e3530001 cmp r3, #1
16384: 0a000015 beq 163e0 <_Timer_server_Body+0x110> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
16388: e3530003 cmp r3, #3
1638c: 1afffff6 bne 1636c <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
16390: e2801010 add r1, r0, #16 16394: e1a00008 mov r0, r8 16398: eb00113c bl 1a890 <_Watchdog_Insert>
} static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
1639c: e5940078 ldr r0, [r4, #120] ; 0x78 163a0: eb000250 bl 16ce8 <_Chain_Get>
if ( timer == NULL ) {
163a4: e3500000 cmp r0, #0
163a8: 1afffff3 bne 1637c <_Timer_server_Body+0xac> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
163ac: e10f2000 mrs r2, CPSR 163b0: e3823080 orr r3, r2, #128 ; 0x80 163b4: e129f003 msr CPSR_fc, r3
* body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) {
163b8: e59d3018 ldr r3, [sp, #24] 163bc: e15a0003 cmp sl, r3
163c0: 0a00000f beq 16404 <_Timer_server_Body+0x134> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
163c4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 163c8: eaffffda b 16338 <_Timer_server_Body+0x68> <== NOT EXECUTED
/* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
163cc: e0652001 rsb r2, r5, r1 163d0: e1a00008 mov r0, r8 163d4: e3a01001 mov r1, #1 163d8: eb0010ce bl 1a718 <_Watchdog_Adjust> 163dc: eaffffe1 b 16368 <_Timer_server_Body+0x98>
Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
163e0: e2801010 add r1, r0, #16 163e4: e1a00006 mov r0, r6 163e8: eb001128 bl 1a890 <_Watchdog_Insert> 163ec: eaffffde b 1636c <_Timer_server_Body+0x9c>
/* * 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 );
163f0: e0611005 rsb r1, r1, r5 163f4: e1a00008 mov r0, r8 163f8: e1a02007 mov r2, r7 163fc: eb0010f4 bl 1a7d4 <_Watchdog_Adjust_to_chain> 16400: eaffffd8 b 16368 <_Timer_server_Body+0x98>
*/ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL;
16404: e5840078 str r0, [r4, #120] ; 0x78 16408: e129f002 msr CPSR_fc, r2
_Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) {
1640c: e59d300c ldr r3, [sp, #12] 16410: e59d2000 ldr r2, [sp] 16414: e1520003 cmp r2, r3 16418: 159d5000 ldrne r5, [sp]
1641c: 1a00000a bne 1644c <_Timer_server_Body+0x17c>
16420: ea000011 b 1646c <_Timer_server_Body+0x19c>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
16424: e5932000 ldr r2, [r3]
* service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE;
16428: e3a00000 mov r0, #0
the_chain->first = new_first;
1642c: e58d200c str r2, [sp, #12] 16430: e5830008 str r0, [r3, #8]
new_first->previous = _Chain_Head(the_chain);
16434: e5827004 str r7, [r2, #4] 16438: e129f001 msr CPSR_fc, r1
/* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data );
1643c: e2830020 add r0, r3, #32 16440: e8900003 ldm r0, {r0, r1} 16444: e1a0e00f mov lr, pc 16448: e593f01c ldr pc, [r3, #28]
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
1644c: e10f1000 mrs r1, CPSR 16450: e3813080 orr r3, r1, #128 ; 0x80 16454: e129f003 msr CPSR_fc, r3
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
16458: e59d300c ldr r3, [sp, #12]
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain))
1645c: e1550003 cmp r5, r3
16460: 1affffef bne 16424 <_Timer_server_Body+0x154> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
16464: e129f001 msr CPSR_fc, r1 16468: eaffffb0 b 16330 <_Timer_server_Body+0x60>
} } else { ts->active = false;
1646c: e3a02000 mov r2, #0 16470: e5c4207c strb r2, [r4, #124] ; 0x7c 16474: e59f004c ldr r0, [pc, #76] ; 164c8 <_Timer_server_Body+0x1f8> 16478: e5903000 ldr r3, [r0] 1647c: e2833001 add r3, r3, #1 16480: e5803000 str r3, [r0]
/* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING );
16484: e3a01008 mov r1, #8 16488: e5940000 ldr r0, [r4] 1648c: eb000e25 bl 19d28 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
16490: e1a00004 mov r0, r4 16494: ebffff61 bl 16220 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
16498: e1a00004 mov r0, r4 1649c: ebffff75 bl 16278 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
164a0: eb000b62 bl 19230 <_Thread_Enable_dispatch>
ts->active = true;
164a4: e3a02001 mov r2, #1 164a8: e5c4207c strb r2, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
164ac: e59d0008 ldr r0, [sp, #8] 164b0: eb001159 bl 1aa1c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
164b4: e59d0004 ldr r0, [sp, #4] 164b8: eb001157 bl 1aa1c <_Watchdog_Remove> 164bc: eaffff9b b 16330 <_Timer_server_Body+0x60> 164c0: 0003c404 .word 0x0003c404 164c4: 0003c334 .word 0x0003c334 164c8: 0003c2ac .word 0x0003c2ac
0000a1c8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) {
a1c8: e92d41f0 push {r4, r5, r6, r7, r8, lr} a1cc: e1a04000 mov r4, r0 a1d0: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
a1d4: e10f3000 mrs r3, CPSR a1d8: e3832080 orr r2, r3, #128 ; 0x80 a1dc: e129f002 msr CPSR_fc, r2
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
a1e0: e1a07000 mov r7, r0 a1e4: e4972004 ldr r2, [r7], #4
* hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) {
a1e8: e1520007 cmp r2, r7
a1ec: 0a000018 beq a254 <_Watchdog_Adjust+0x8c> switch ( direction ) {
a1f0: e3510000 cmp r1, #0
a1f4: 1a000018 bne a25c <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
a1f8: e3550000 cmp r5, #0
a1fc: 0a000014 beq a254 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) {
a200: e5926010 ldr r6, [r2, #16] a204: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1;
a208: 23a08001 movcs r8, #1
case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { a20c: 2a000005 bcs a228 <_Watchdog_Adjust+0x60>
a210: ea000018 b a278 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
a214: e0555006 subs r5, r5, r6
a218: 0a00000d beq a254 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) {
a21c: e5926010 ldr r6, [r2, #16] a220: e1560005 cmp r6, r5
a224: 8a000013 bhi a278 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1;
a228: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
a22c: e129f003 msr CPSR_fc, r3
_ISR_Enable( level ); _Watchdog_Tickle( header );
a230: e1a00004 mov r0, r4 a234: eb0000a0 bl a4bc <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
a238: e10f3000 mrs r3, CPSR a23c: e3832080 orr r2, r3, #128 ; 0x80 a240: e129f002 msr CPSR_fc, r2 a244: e5941000 ldr r1, [r4]
_ISR_Disable( level ); if ( _Chain_Is_empty( header ) )
a248: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first );
a24c: e1a02001 mov r2, r1
a250: 1affffef bne a214 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
a254: e129f003 msr CPSR_fc, r3
} } _ISR_Enable( level ); }
a258: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) {
a25c: e3510001 cmp r1, #1
a260: 1afffffb bne a254 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units;
a264: e5921010 ldr r1, [r2, #16] a268: e0815005 add r5, r1, r5 a26c: e5825010 str r5, [r2, #16] a270: e129f003 msr CPSR_fc, r3
} } _ISR_Enable( level ); }
a274: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units;
a278: e0655006 rsb r5, r5, r6 a27c: e5825010 str r5, [r2, #16]
break;
a280: eafffff3 b a254 <_Watchdog_Adjust+0x8c>
00018cc0 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL();
18cc0: e24dd004 sub sp, sp, #4 18cc4: e58d0000 str r0, [sp] 18cc8: eb0001f0 bl 19490 <___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();
18ccc: ebffffe1 bl 18c58 <libc_wrapup>
rtems_shutdown_executive(status);
18cd0: e59d0000 ldr r0, [sp] 18cd4: eb00003e bl 18dd4 <rtems_shutdown_executive>
18cd8: eafffffe b 18cd8 <_exit+0x18> <== NOT EXECUTED
00038e20 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg );
38e20: e1a00001 mov r0, r1 <== NOT EXECUTED 38e24: e1a01002 mov r1, r2 <== NOT EXECUTED 38e28: e1a02003 mov r2, r3 <== NOT EXECUTED 38e2c: eaffff81 b 38c38 <fcntl> <== NOT EXECUTED
0000c618 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); }
c618: e3a00001 mov r0, #1 <== NOT EXECUTED c61c: e12fff1e bx lr <== NOT EXECUTED
00009bb8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp );
9bb8: eaffffe4 b 9b50 <gettimeofday> <== NOT EXECUTED
0002679c <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new );
2679c: e1a00001 mov r0, r1 <== NOT EXECUTED 267a0: e1a01002 mov r1, r2 <== NOT EXECUTED 267a4: eaffff60 b 2652c <link> <== NOT EXECUTED
000269e8 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf );
269e8: e1a00001 mov r0, r1 <== NOT EXECUTED 269ec: e1a01002 mov r1, r2 <== NOT EXECUTED 269f0: eaffffc2 b 26900 <lstat> <== NOT EXECUTED
00018db8 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size );
18db8: e1a00001 mov r0, r1 <== NOT EXECUTED 18dbc: e1a01002 mov r1, r2 <== NOT EXECUTED 18dc0: ea00000e b 18e00 <realloc> <== NOT EXECUTED
00058af8 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
58af8: e92d45f0 push {r4, r5, r6, r7, r8, sl, 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 );
58afc: e1a00001 mov r0, r1 <== NOT EXECUTED
int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
58b00: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 58b04: e1a05001 mov r5, r1 <== NOT EXECUTED 58b08: 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 );
58b0c: ebfeafa6 bl 49ac <rtems_filesystem_dirname> <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
58b10: e2507000 subs r7, r0, #0 <== NOT EXECUTED 58b14: 1a0000f1 bne 58ee0 <_rename_r+0x3e8> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
58b18: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 58b1c: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 58b20: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 58b24: 1a000063 bne 58cb8 <_rename_r+0x1c0> <== NOT EXECUTED 58b28: e59f33e4 ldr r3, [pc, #996] ; 58f14 <_rename_r+0x41c> <== NOT EXECUTED 58b2c: e593c000 ldr ip, [r3] <== NOT EXECUTED 58b30: e28cc018 add ip, ip, #24 <== NOT EXECUTED 58b34: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 58b38: e28d4018 add r4, sp, #24 <== NOT EXECUTED 58b3c: e1a0a004 mov sl, r4 <== NOT EXECUTED 58b40: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED 58b44: e59c2000 ldr r2, [ip] <== NOT EXECUTED 58b48: e58a2000 str r2, [sl] <== NOT EXECUTED 58b4c: e3a08000 mov r8, #0 <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
58b50: e1a0e004 mov lr, r4 <== NOT EXECUTED 58b54: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 58b58: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 58b5c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 58b60: e59e3000 ldr r3, [lr] <== NOT EXECUTED
name = old + old_parent_pathlen;
58b64: 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;
58b68: e58c3000 str r3, [ip] <== NOT EXECUTED
name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
58b6c: 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;
58b70: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
58b74: ebffb36e bl 45934 <strlen> <== NOT EXECUTED 58b78: e1a01000 mov r1, r0 <== NOT EXECUTED 58b7c: e1a00005 mov r0, r5 <== NOT EXECUTED 58b80: ebfeaf75 bl 495c <rtems_filesystem_prefix_separators> <== NOT EXECUTED 58b84: e0855000 add r5, r5, r0 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
58b88: 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 ) );
58b8c: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
58b90: ebffb367 bl 45934 <strlen> <== NOT EXECUTED 58b94: e28d702c add r7, sp, #44 ; 0x2c <== NOT EXECUTED 58b98: e3a0c000 mov ip, #0 <== NOT EXECUTED 58b9c: e1a01000 mov r1, r0 <== NOT EXECUTED 58ba0: e1a0200c mov r2, ip <== NOT EXECUTED 58ba4: e1a00005 mov r0, r5 <== NOT EXECUTED 58ba8: e1a03007 mov r3, r7 <== NOT EXECUTED 58bac: e58dc000 str ip, [sp] <== NOT EXECUTED 58bb0: ebfeaf97 bl 4a14 <rtems_filesystem_evaluate_relative_path> <== NOT EXECUTED
0, &old_loc, false ); if ( result != 0 ) {
58bb4: e2505000 subs r5, r0, #0 <== NOT EXECUTED 58bb8: 1a000080 bne 58dc0 <_rename_r+0x2c8> <== NOT EXECUTED
/* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
58bbc: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 58bc0: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 58bc4: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 58bc8: 13a0c000 movne ip, #0 <== NOT EXECUTED 58bcc: 03a0c001 moveq ip, #1 <== NOT EXECUTED 58bd0: 1a000045 bne 58cec <_rename_r+0x1f4> <== NOT EXECUTED 58bd4: e59f3338 ldr r3, [pc, #824] ; 58f14 <_rename_r+0x41c> <== NOT EXECUTED 58bd8: e593c000 ldr ip, [r3] <== NOT EXECUTED 58bdc: e28cc018 add ip, ip, #24 <== NOT EXECUTED 58be0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 58be4: e28d5004 add r5, sp, #4 <== NOT EXECUTED 58be8: e1a0a005 mov sl, r5 <== NOT EXECUTED 58bec: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED 58bf0: e59c2000 ldr r2, [ip] <== NOT EXECUTED 58bf4: e58a2000 str r2, [sl] <== NOT EXECUTED 58bf8: e3a0c001 mov ip, #1 <== NOT EXECUTED
if ( !new_parent_loc.ops->evalformake_h ) {
58bfc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 58c00: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 58c04: e3530000 cmp r3, #0 <== NOT EXECUTED 58c08: 0a00009d beq 58e84 <_rename_r+0x38c> <== 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 );
58c0c: e086000c add r0, r6, ip <== NOT EXECUTED 58c10: e1a01005 mov r1, r5 <== NOT EXECUTED 58c14: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 58c18: e1a0e00f mov lr, pc <== NOT EXECUTED 58c1c: e12fff13 bx r3 <== NOT EXECUTED
if ( result != 0 ) {
58c20: e2506000 subs r6, r0, #0 <== NOT EXECUTED 58c24: 1a000073 bne 58df8 <_rename_r+0x300> <== 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 ) {
58c28: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 58c2c: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 58c30: e1520003 cmp r2, r3 <== NOT EXECUTED 58c34: 1a000042 bne 58d44 <_rename_r+0x24c> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) {
58c38: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 58c3c: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 58c40: e35c0000 cmp ip, #0 <== NOT EXECUTED 58c44: 0a000089 beq 58e70 <_rename_r+0x378> <== 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 );
58c48: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 58c4c: e1a00004 mov r0, r4 <== NOT EXECUTED 58c50: e1a01007 mov r1, r7 <== NOT EXECUTED 58c54: e1a02005 mov r2, r5 <== NOT EXECUTED 58c58: e1a0e00f mov lr, pc <== NOT EXECUTED 58c5c: e12fff1c bx ip <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
58c60: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 58c64: 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 );
58c68: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
58c6c: 0a000004 beq 58c84 <_rename_r+0x18c> <== NOT EXECUTED 58c70: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58c74: e3530000 cmp r3, #0 <== NOT EXECUTED 58c78: 11a00005 movne r0, r5 <== NOT EXECUTED 58c7c: 11a0e00f movne lr, pc <== NOT EXECUTED 58c80: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
58c84: e3580000 cmp r8, #0 <== NOT EXECUTED 58c88: 1a000023 bne 58d1c <_rename_r+0x224> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc );
58c8c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 58c90: e3530000 cmp r3, #0 <== NOT EXECUTED 58c94: 0a000004 beq 58cac <_rename_r+0x1b4> <== NOT EXECUTED 58c98: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58c9c: e3530000 cmp r3, #0 <== NOT EXECUTED 58ca0: 11a00007 movne r0, r7 <== NOT EXECUTED 58ca4: 11a0e00f movne lr, pc <== NOT EXECUTED 58ca8: 112fff13 bxne r3 <== NOT EXECUTED
return result; }
58cac: e1a00006 mov r0, r6 <== NOT EXECUTED 58cb0: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 58cb4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
*/ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
58cb8: e3530000 cmp r3, #0 <== NOT EXECUTED 58cbc: 0affff99 beq 58b28 <_rename_r+0x30> <== NOT EXECUTED 58cc0: e59f324c ldr r3, [pc, #588] ; 58f14 <_rename_r+0x41c> <== NOT EXECUTED 58cc4: e593c000 ldr ip, [r3] <== NOT EXECUTED 58cc8: e28cc004 add ip, ip, #4 <== NOT EXECUTED 58ccc: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 58cd0: e28d4018 add r4, sp, #24 <== NOT EXECUTED 58cd4: e1a0e004 mov lr, r4 <== NOT EXECUTED 58cd8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 58cdc: e59c2000 ldr r2, [ip] <== NOT EXECUTED 58ce0: e1a08007 mov r8, r7 <== NOT EXECUTED 58ce4: e58e2000 str r2, [lr] <== NOT EXECUTED 58ce8: eaffff98 b 58b50 <_rename_r+0x58> <== NOT EXECUTED
/* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
58cec: e3530000 cmp r3, #0 <== NOT EXECUTED 58cf0: 0affffb7 beq 58bd4 <_rename_r+0xdc> <== NOT EXECUTED 58cf4: e59f3218 ldr r3, [pc, #536] ; 58f14 <_rename_r+0x41c> <== NOT EXECUTED 58cf8: e593e000 ldr lr, [r3] <== NOT EXECUTED 58cfc: e28ee004 add lr, lr, #4 <== NOT EXECUTED 58d00: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 58d04: e28d5004 add r5, sp, #4 <== NOT EXECUTED 58d08: e1a0a005 mov sl, r5 <== NOT EXECUTED 58d0c: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED 58d10: e59e2000 ldr r2, [lr] <== NOT EXECUTED 58d14: e58a2000 str r2, [sl] <== NOT EXECUTED 58d18: eaffffb7 b 58bfc <_rename_r+0x104> <== NOT EXECUTED
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc );
58d1c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 58d20: e3530000 cmp r3, #0 <== NOT EXECUTED 58d24: 0affffd8 beq 58c8c <_rename_r+0x194> <== NOT EXECUTED 58d28: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58d2c: e3530000 cmp r3, #0 <== NOT EXECUTED 58d30: 0affffd5 beq 58c8c <_rename_r+0x194> <== NOT EXECUTED 58d34: e1a00004 mov r0, r4 <== NOT EXECUTED 58d38: e1a0e00f mov lr, pc <== NOT EXECUTED 58d3c: e12fff13 bx r3 <== NOT EXECUTED 58d40: eaffffd1 b 58c8c <_rename_r+0x194> <== 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 ) { rtems_filesystem_freenode( &new_parent_loc );
58d44: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 58d48: e3530000 cmp r3, #0 <== NOT EXECUTED 58d4c: 0a000004 beq 58d64 <_rename_r+0x26c> <== NOT EXECUTED 58d50: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58d54: e3530000 cmp r3, #0 <== NOT EXECUTED 58d58: 11a00005 movne r0, r5 <== NOT EXECUTED 58d5c: 11a0e00f movne lr, pc <== NOT EXECUTED 58d60: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
58d64: e3580000 cmp r8, #0 <== NOT EXECUTED 58d68: 0a000007 beq 58d8c <_rename_r+0x294> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
58d6c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 58d70: e3530000 cmp r3, #0 <== NOT EXECUTED 58d74: 0a000004 beq 58d8c <_rename_r+0x294> <== NOT EXECUTED 58d78: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58d7c: e3530000 cmp r3, #0 <== NOT EXECUTED 58d80: 11a00004 movne r0, r4 <== NOT EXECUTED 58d84: 11a0e00f movne lr, pc <== NOT EXECUTED 58d88: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
58d8c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 58d90: e3530000 cmp r3, #0 <== NOT EXECUTED 58d94: 0a000004 beq 58dac <_rename_r+0x2b4> <== NOT EXECUTED 58d98: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58d9c: e3530000 cmp r3, #0 <== NOT EXECUTED 58da0: 11a00007 movne r0, r7 <== NOT EXECUTED 58da4: 11a0e00f movne lr, pc <== NOT EXECUTED 58da8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
58dac: ebff9855 bl 3ef08 <__errno> <== NOT EXECUTED 58db0: e3a03012 mov r3, #18 <== NOT EXECUTED 58db4: e5803000 str r3, [r0] <== NOT EXECUTED 58db8: e3e06000 mvn r6, #0 <== NOT EXECUTED 58dbc: eaffffba b 58cac <_rename_r+0x1b4> <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc )
58dc0: e3580000 cmp r8, #0 <== NOT EXECUTED 58dc4: 0a000007 beq 58de8 <_rename_r+0x2f0> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
58dc8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 58dcc: e3530000 cmp r3, #0 <== NOT EXECUTED 58dd0: 0a000004 beq 58de8 <_rename_r+0x2f0> <== NOT EXECUTED 58dd4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58dd8: e3530000 cmp r3, #0 <== NOT EXECUTED 58ddc: 11a00004 movne r0, r4 <== NOT EXECUTED 58de0: 11a0e00f movne lr, pc <== NOT EXECUTED 58de4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
58de8: ebff9846 bl 3ef08 <__errno> <== NOT EXECUTED 58dec: e3e06000 mvn r6, #0 <== NOT EXECUTED 58df0: e5805000 str r5, [r0] <== NOT EXECUTED 58df4: eaffffac b 58cac <_rename_r+0x1b4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc );
58df8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 58dfc: e3530000 cmp r3, #0 <== NOT EXECUTED 58e00: 0a000004 beq 58e18 <_rename_r+0x320> <== NOT EXECUTED 58e04: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58e08: e3530000 cmp r3, #0 <== NOT EXECUTED 58e0c: 11a00005 movne r0, r5 <== NOT EXECUTED 58e10: 11a0e00f movne lr, pc <== NOT EXECUTED 58e14: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
58e18: e3580000 cmp r8, #0 <== NOT EXECUTED 58e1c: 0a000007 beq 58e40 <_rename_r+0x348> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
58e20: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 58e24: e3530000 cmp r3, #0 <== NOT EXECUTED 58e28: 0a000004 beq 58e40 <_rename_r+0x348> <== NOT EXECUTED 58e2c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58e30: e3530000 cmp r3, #0 <== NOT EXECUTED 58e34: 11a00004 movne r0, r4 <== NOT EXECUTED 58e38: 11a0e00f movne lr, pc <== NOT EXECUTED 58e3c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
58e40: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 58e44: e3530000 cmp r3, #0 <== NOT EXECUTED 58e48: 0a000004 beq 58e60 <_rename_r+0x368> <== NOT EXECUTED 58e4c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58e50: e3530000 cmp r3, #0 <== NOT EXECUTED 58e54: 11a00007 movne r0, r7 <== NOT EXECUTED 58e58: 11a0e00f movne lr, pc <== NOT EXECUTED 58e5c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
58e60: ebff9828 bl 3ef08 <__errno> <== NOT EXECUTED 58e64: e5806000 str r6, [r0] <== NOT EXECUTED 58e68: e3e06000 mvn r6, #0 <== NOT EXECUTED 58e6c: eaffff8e b 58cac <_rename_r+0x1b4> <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc );
58e70: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58e74: e3530000 cmp r3, #0 <== NOT EXECUTED 58e78: 11a00005 movne r0, r5 <== NOT EXECUTED 58e7c: 11a0e00f movne lr, pc <== NOT EXECUTED 58e80: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_old_parentloc )
58e84: e3580000 cmp r8, #0 <== NOT EXECUTED 58e88: 0a000007 beq 58eac <_rename_r+0x3b4> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
58e8c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 58e90: e3530000 cmp r3, #0 <== NOT EXECUTED 58e94: 0a000004 beq 58eac <_rename_r+0x3b4> <== NOT EXECUTED 58e98: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58e9c: e3530000 cmp r3, #0 <== NOT EXECUTED 58ea0: 11a00004 movne r0, r4 <== NOT EXECUTED 58ea4: 11a0e00f movne lr, pc <== NOT EXECUTED 58ea8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
58eac: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 58eb0: e3530000 cmp r3, #0 <== NOT EXECUTED 58eb4: 0a000004 beq 58ecc <_rename_r+0x3d4> <== NOT EXECUTED 58eb8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 58ebc: e3530000 cmp r3, #0 <== NOT EXECUTED 58ec0: 11a00007 movne r0, r7 <== NOT EXECUTED 58ec4: 11a0e00f movne lr, pc <== NOT EXECUTED 58ec8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
58ecc: ebff980d bl 3ef08 <__errno> <== NOT EXECUTED 58ed0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 58ed4: e5803000 str r3, [r0] <== NOT EXECUTED 58ed8: e3e06000 mvn r6, #0 <== NOT EXECUTED 58edc: eaffff72 b 58cac <_rename_r+0x1b4> <== NOT EXECUTED
old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
58ee0: e28d4018 add r4, sp, #24 <== NOT EXECUTED 58ee4: e3a0c000 mov ip, #0 <== NOT EXECUTED 58ee8: e1a00005 mov r0, r5 <== NOT EXECUTED 58eec: e1a01007 mov r1, r7 <== NOT EXECUTED 58ef0: e3a02002 mov r2, #2 <== NOT EXECUTED 58ef4: e1a03004 mov r3, r4 <== NOT EXECUTED 58ef8: e58dc000 str ip, [sp] <== NOT EXECUTED 58efc: ebfeaf00 bl 4b04 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 )
58f00: e3500000 cmp r0, #0 <== NOT EXECUTED 58f04: 03a08001 moveq r8, #1 <== NOT EXECUTED 58f08: 0affff10 beq 58b50 <_rename_r+0x58> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_set_errno_and_return_minus_one( result );
58f0c: e3e06000 mvn r6, #0 <== NOT EXECUTED 58f10: eaffff65 b 58cac <_rename_r+0x1b4> <== NOT EXECUTED
58f14: 00059348 .word 0x00059348
00006158 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf );
6158: e1a00001 mov r0, r1 <== NOT EXECUTED 615c: e1a01002 mov r1, r2 <== NOT EXECUTED 6160: eaffffc2 b 6070 <stat> <== NOT EXECUTED
0000d578 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path );
d578: e1a00001 mov r0, r1 <== NOT EXECUTED d57c: eaffff55 b d2d8 <unlink> <== NOT EXECUTED
000251a0 <chdir>: #include <rtems/seterr.h> int chdir( const char *pathname ) {
251a0: e92d4030 push {r4, r5, lr}
rtems_filesystem_location_info_t loc; int result; if ( !pathname )
251a4: e2505000 subs r5, r0, #0
#include <rtems/seterr.h> int chdir( const char *pathname ) {
251a8: e24dd018 sub sp, sp, #24
rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 251ac: 0a000031 beq 25278 <chdir+0xd8> /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
251b0: eb0081df bl 45934 <strlen>
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
251b4: e28d4004 add r4, sp, #4 251b8: e3a0c001 mov ip, #1
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
251bc: 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(
251c0: e1a0200c mov r2, ip 251c4: e1a00005 mov r0, r5 251c8: e1a03004 mov r3, r4 251cc: e58dc000 str ip, [sp] 251d0: ebff7e4b bl 4b04 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 )
251d4: e3500000 cmp r0, #0
251d8: 1a000024 bne 25270 <chdir+0xd0> return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) {
251dc: e59d2010 ldr r2, [sp, #16] 251e0: e5923010 ldr r3, [r2, #16] 251e4: e3530000 cmp r3, #0
251e8: 0a000018 beq 25250 <chdir+0xb0> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
251ec: e1a00004 mov r0, r4 251f0: e1a0e00f mov lr, pc 251f4: e12fff13 bx r3 251f8: e3500001 cmp r0, #1
251fc: 1a000022 bne 2528c <chdir+0xec> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current );
25200: e59f50b8 ldr r5, [pc, #184] ; 252c0 <chdir+0x120> 25204: e595c000 ldr ip, [r5] 25208: e59c3010 ldr r3, [ip, #16] 2520c: e3530000 cmp r3, #0
25210: 0a000006 beq 25230 <chdir+0x90>
25214: e593301c ldr r3, [r3, #28] 25218: e3530000 cmp r3, #0
2521c: 0a000003 beq 25230 <chdir+0x90>
25220: e28c0004 add r0, ip, #4 25224: e1a0e00f mov lr, pc 25228: e12fff13 bx r3 2522c: e595c000 ldr ip, [r5]
rtems_filesystem_current = loc;
25230: e8b4000f ldm r4!, {r0, r1, r2, r3} 25234: e28cc004 add ip, ip, #4 25238: e8ac000f stmia ip!, {r0, r1, r2, r3} 2523c: e5943000 ldr r3, [r4] 25240: e58c3000 str r3, [ip] 25244: e3a00000 mov r0, #0
return 0; }
25248: e28dd018 add sp, sp, #24 2524c: e8bd8030 pop {r4, r5, pc}
/* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc );
25250: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 25254: e3530000 cmp r3, #0 <== NOT EXECUTED 25258: 11a00004 movne r0, r4 <== NOT EXECUTED 2525c: 11a0e00f movne lr, pc <== NOT EXECUTED 25260: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
25264: eb006727 bl 3ef08 <__errno> <== NOT EXECUTED 25268: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2526c: e5803000 str r3, [r0] <== NOT EXECUTED
25270: e3e00000 mvn r0, #0 25274: eafffff3 b 25248 <chdir+0xa8>
{ rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT );
25278: eb006722 bl 3ef08 <__errno> 2527c: e3a0300e mov r3, #14 25280: e5803000 str r3, [r0] 25284: e3e00000 mvn r0, #0 25288: eaffffee b 25248 <chdir+0xa8>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc );
2528c: e59d3010 ldr r3, [sp, #16] 25290: e3530000 cmp r3, #0
25294: 0a000004 beq 252ac <chdir+0x10c>
25298: e593301c ldr r3, [r3, #28] 2529c: e3530000 cmp r3, #0 252a0: 11a00004 movne r0, r4 252a4: 11a0e00f movne lr, pc 252a8: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
252ac: eb006715 bl 3ef08 <__errno> 252b0: e3a03014 mov r3, #20 252b4: e5803000 str r3, [r0] 252b8: e3e00000 mvn r0, #0 252bc: eaffffe1 b 25248 <chdir+0xa8> 252c0: 00059348 .word 0x00059348
000047bc <chmod>: int chmod( const char *path, mode_t mode ) {
47bc: e92d4070 push {r4, r5, r6, lr} 47c0: e24dd018 sub sp, sp, #24 47c4: e1a05001 mov r5, r1 47c8: 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 );
47cc: eb010458 bl 45934 <strlen> 47d0: e28d4004 add r4, sp, #4 47d4: e1a01000 mov r1, r0 47d8: e3a0c001 mov ip, #1 47dc: e1a00006 mov r0, r6 47e0: e3a02000 mov r2, #0 47e4: e1a03004 mov r3, r4 47e8: e58dc000 str ip, [sp] 47ec: eb0000c4 bl 4b04 <rtems_filesystem_evaluate_path>
if ( status != 0 )
47f0: e3500000 cmp r0, #0
47f4: 1a000020 bne 487c <chmod+0xc0> return -1; if ( !loc.handlers ){
47f8: e59d300c ldr r3, [sp, #12] 47fc: e3530000 cmp r3, #0
4800: 0a000012 beq 4850 <chmod+0x94> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){
4804: e593301c ldr r3, [r3, #28] 4808: e3530000 cmp r3, #0
480c: 0a00001c beq 4884 <chmod+0xc8> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode );
4810: e1a01005 mov r1, r5 4814: e1a00004 mov r0, r4 4818: e1a0e00f mov lr, pc 481c: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
4820: e59d3010 ldr r3, [sp, #16] 4824: 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 );
4828: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 482c: 0a000004 beq 4844 <chmod+0x88>
4830: e593301c ldr r3, [r3, #28] 4834: e3530000 cmp r3, #0 4838: 11a00004 movne r0, r4 483c: 11a0e00f movne lr, pc 4840: 112fff13 bxne r3
return result; }
4844: e1a00005 mov r0, r5 4848: e28dd018 add sp, sp, #24 484c: e8bd8070 pop {r4, r5, r6, pc}
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc );
4850: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4854: e3530000 cmp r3, #0 <== NOT EXECUTED 4858: 0a000004 beq 4870 <chmod+0xb4> <== NOT EXECUTED 485c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4860: e3530000 cmp r3, #0 <== NOT EXECUTED 4864: 11a00004 movne r0, r4 <== NOT EXECUTED 4868: 11a0e00f movne lr, pc <== NOT EXECUTED 486c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
4870: eb00e9a4 bl 3ef08 <__errno> <== NOT EXECUTED 4874: e3a03009 mov r3, #9 <== NOT EXECUTED 4878: e5803000 str r3, [r0] <== NOT EXECUTED
487c: e3e05000 mvn r5, #0 4880: eaffffef b 4844 <chmod+0x88>
} if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc );
4884: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4888: e3530000 cmp r3, #0 <== NOT EXECUTED 488c: 0a000004 beq 48a4 <chmod+0xe8> <== NOT EXECUTED 4890: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4894: e3530000 cmp r3, #0 <== NOT EXECUTED 4898: 11a00004 movne r0, r4 <== NOT EXECUTED 489c: 11a0e00f movne lr, pc <== NOT EXECUTED 48a0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
48a4: eb00e997 bl 3ef08 <__errno> <== NOT EXECUTED 48a8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 48ac: e5803000 str r3, [r0] <== NOT EXECUTED 48b0: e3e05000 mvn r5, #0 <== NOT EXECUTED 48b4: eaffffe2 b 4844 <chmod+0x88> <== NOT EXECUTED
000252c4 <chown>: int chown( const char *path, uid_t owner, gid_t group ) {
252c4: e92d40f0 push {r4, r5, r6, r7, lr} 252c8: e1a01801 lsl r1, r1, #16 252cc: e24dd018 sub sp, sp, #24 252d0: e1a02802 lsl r2, r2, #16 252d4: e1a06821 lsr r6, r1, #16 252d8: e1a05822 lsr r5, r2, #16 252dc: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
252e0: eb008193 bl 45934 <strlen> 252e4: e28d4004 add r4, sp, #4 252e8: e1a01000 mov r1, r0 252ec: e3a0c001 mov ip, #1 252f0: e1a00007 mov r0, r7 252f4: e3a02000 mov r2, #0 252f8: e1a03004 mov r3, r4 252fc: e58dc000 str ip, [sp] 25300: ebff7dff bl 4b04 <rtems_filesystem_evaluate_path> 25304: e3500000 cmp r0, #0
25308: 1a00001c bne 25380 <chown+0xbc> return -1; if ( !loc.ops->chown_h ) {
2530c: e59d2010 ldr r2, [sp, #16] 25310: e5923018 ldr r3, [r2, #24] 25314: e3530000 cmp r3, #0
25318: 0a000010 beq 25360 <chown+0x9c> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group );
2531c: e1a02005 mov r2, r5 25320: e1a01006 mov r1, r6 25324: e1a00004 mov r0, r4 25328: e1a0e00f mov lr, pc 2532c: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
25330: e59d3010 ldr r3, [sp, #16] 25334: 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 );
25338: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 2533c: 0a000004 beq 25354 <chown+0x90>
25340: e593301c ldr r3, [r3, #28] 25344: e3530000 cmp r3, #0 25348: 11a00004 movne r0, r4 2534c: 11a0e00f movne lr, pc 25350: 112fff13 bxne r3
return result; }
25354: e1a00005 mov r0, r5 25358: e28dd018 add sp, sp, #24 2535c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc );
25360: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 25364: e3530000 cmp r3, #0 <== NOT EXECUTED 25368: 11a00004 movne r0, r4 <== NOT EXECUTED 2536c: 11a0e00f movne lr, pc <== NOT EXECUTED 25370: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
25374: eb0066e3 bl 3ef08 <__errno> <== NOT EXECUTED 25378: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2537c: e5803000 str r3, [r0] <== NOT EXECUTED
25380: e3e05000 mvn r5, #0 25384: eafffff2 b 25354 <chown+0x90>
00025388 <chroot>: #include <rtems/seterr.h> int chroot( const char *pathname ) {
25388: 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) {
2538c: e59f50d8 ldr r5, [pc, #216] ; 2546c <chroot+0xe4> 25390: e59f30d8 ldr r3, [pc, #216] ; 25470 <chroot+0xe8> 25394: e5954000 ldr r4, [r5] 25398: e1540003 cmp r4, r3
#include <rtems/seterr.h> int chroot( const char *pathname ) {
2539c: e24dd018 sub sp, sp, #24 253a0: 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) { 253a4: 0a000020 beq 2542c <chroot+0xa4> rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname);
253a8: e1a00006 mov r0, r6 253ac: ebffff7b bl 251a0 <chdir>
if (result) {
253b0: e250c000 subs ip, r0, #0
253b4: 1a000025 bne 25450 <chroot+0xc8> rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
253b8: e28d4004 add r4, sp, #4 253bc: e1a0200c mov r2, ip 253c0: e59f00ac ldr r0, [pc, #172] ; 25474 <chroot+0xec> 253c4: e3a01001 mov r1, #1 253c8: e1a03004 mov r3, r4 253cc: e58dc000 str ip, [sp] 253d0: ebff7dcb bl 4b04 <rtems_filesystem_evaluate_path> 253d4: e3500000 cmp r0, #0
253d8: 1a00001c bne 25450 <chroot+0xc8> /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root);
253dc: e595c000 ldr ip, [r5] 253e0: e59c3024 ldr r3, [ip, #36] ; 0x24 253e4: e3530000 cmp r3, #0
253e8: 0a000007 beq 2540c <chroot+0x84>
253ec: e593301c ldr r3, [r3, #28] 253f0: e3530000 cmp r3, #0
253f4: 0a000004 beq 2540c <chroot+0x84>
253f8: e28c0018 add r0, ip, #24 253fc: e1a0e00f mov lr, pc 25400: e12fff13 bx r3 25404: e59f3060 ldr r3, [pc, #96] ; 2546c <chroot+0xe4> 25408: e593c000 ldr ip, [r3]
rtems_filesystem_root = loc;
2540c: e8b4000f ldm r4!, {r0, r1, r2, r3} 25410: e28cc018 add ip, ip, #24 25414: e8ac000f stmia ip!, {r0, r1, r2, r3} 25418: e5943000 ldr r3, [r4] 2541c: e58c3000 str r3, [ip] 25420: e3a00000 mov r0, #0
return 0; }
25424: e28dd018 add sp, sp, #24 25428: e8bd8070 pop {r4, r5, r6, pc}
int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/
2542c: eb000621 bl 26cb8 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
25430: e5953000 ldr r3, [r5] 25434: e1530004 cmp r3, r4
25438: 1affffda bne 253a8 <chroot+0x20> rtems_set_errno_and_return_minus_one( ENOTSUP );
2543c: eb0066b1 bl 3ef08 <__errno> <== NOT EXECUTED 25440: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25444: e5803000 str r3, [r0] <== NOT EXECUTED 25448: e3e00000 mvn r0, #0 <== NOT EXECUTED 2544c: eafffff4 b 25424 <chroot+0x9c> <== NOT EXECUTED
} /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno );
25450: eb0066ac bl 3ef08 <__errno> <== NOT EXECUTED 25454: e1a04000 mov r4, r0 <== NOT EXECUTED 25458: eb0066aa bl 3ef08 <__errno> <== NOT EXECUTED 2545c: e5903000 ldr r3, [r0] <== NOT EXECUTED 25460: e3e00000 mvn r0, #0 <== NOT EXECUTED 25464: e5843000 str r3, [r4] <== NOT EXECUTED 25468: eaffffed b 25424 <chroot+0x9c> <== NOT EXECUTED
2546c: 00059348 .word 0x00059348 25470: 00067428 .word 0x00067428 25474: 0005e1b8 .word 0x0005e1b8
000088c8 <devFS_evaluate_path>: const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
88c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, 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;
88cc: e5936000 ldr r6, [r3]
if (!device_name_table)
88d0: e3560000 cmp r6, #0
const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
88d4: e1a0b003 mov fp, r3 88d8: e1a0a000 mov sl, r0 88dc: e1a07001 mov r7, 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) 88e0: 0a000026 beq 8980 <devFS_evaluate_path+0xb8> rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
88e4: e59f30a8 ldr r3, [pc, #168] ; 8994 <devFS_evaluate_path+0xcc> 88e8: e5938000 ldr r8, [r3] 88ec: e3580000 cmp r8, #0
} /* 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 );
88f0: 13a09000 movne r9, #0 88f4: 11a04009 movne r4, r9
for (i = 0; i < rtems_device_table_size; i++) { 88f8: 0a000011 beq 8944 <devFS_evaluate_path+0x7c> if (!device_name_table[i].device_name)
88fc: e0899109 add r9, r9, r9, lsl #2 8900: e7965109 ldr r5, [r6, r9, lsl #2] 8904: e3550000 cmp r5, #0
continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8908: e1a0000a mov r0, sl 890c: e1a02007 mov r2, r7 8910: e1a01005 mov r1, r5
/* 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++) {
8914: e2844001 add r4, r4, #1
if (!device_name_table[i].device_name)
8918: e0869109 add r9, r6, r9, lsl #2
891c: 0a000005 beq 8938 <devFS_evaluate_path+0x70> continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8920: eb000d23 bl bdb4 <strncmp> 8924: e3500000 cmp r0, #0
8928: 1a000002 bne 8938 <devFS_evaluate_path+0x70> continue; if (device_name_table[i].device_name[pathnamelen] != '\0')
892c: e7d50007 ldrb r0, [r5, r7] 8930: e3500000 cmp r0, #0
8934: 0a000007 beq 8958 <devFS_evaluate_path+0x90> /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
8938: e1580004 cmp r8, r4 893c: e1a09004 mov r9, r4
8940: 8affffed bhi 88fc <devFS_evaluate_path+0x34> pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT );
8944: eb000964 bl aedc <__errno> 8948: e3a03002 mov r3, #2 894c: e5803000 str r3, [r0] 8950: e3e00000 mvn r0, #0
}
8954: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8958: e59f3038 ldr r3, [pc, #56] ; 8998 <devFS_evaluate_path+0xd0> 895c: e5933000 ldr r3, [r3] 8960: e5933028 ldr r3, [r3, #40] ; 0x28 8964: e58b3010 str r3, [fp, #16]
if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers;
8968: e59f302c ldr r3, [pc, #44] ; 899c <devFS_evaluate_path+0xd4> 896c: e58b3008 str r3, [fp, #8]
pathloc->ops = &devFS_ops;
8970: e59f3028 ldr r3, [pc, #40] ; 89a0 <devFS_evaluate_path+0xd8>
if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i];
8974: e58b9000 str r9, [fp]
pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops;
8978: e58b300c str r3, [fp, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0;
897c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, 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 );
8980: eb000955 bl aedc <__errno> <== NOT EXECUTED 8984: e3a0300e mov r3, #14 <== NOT EXECUTED 8988: e5803000 str r3, [r0] <== NOT EXECUTED 898c: e3e00000 mvn r0, #0 <== NOT EXECUTED 8990: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
8994: 0000d9d4 .word 0x0000d9d4 8998: 0000dbbc .word 0x0000dbbc 899c: 0000db28 .word 0x0000db28 89a0: 0000db60 .word 0x0000db60
0000130c <devFS_initialize>: int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) {
130c: e92d4070 push {r4, r5, r6, lr}
rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
1310: e59f605c ldr r6, [pc, #92] ; 1374 <devFS_initialize+0x68> 1314: e5963000 ldr r3, [r6] 1318: e0833103 add r3, r3, r3, lsl #2
int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) {
131c: 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(
1320: e1a00103 lsl r0, r3, #2 1324: eb001c37 bl 8408 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table)
1328: e2505000 subs r5, r0, #0
132c: 0a00000b beq 1360 <devFS_initialize+0x54> rtems_set_errno_and_return_minus_one( ENOMEM ); memset(
1330: e5962000 ldr r2, [r6] 1334: e0822102 add r2, r2, r2, lsl #2 1338: e1a02102 lsl r2, r2, #2 133c: e3a01000 mov r1, #0 1340: eb002913 bl b794 <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;
1344: e59f302c ldr r3, [pc, #44] ; 1378 <devFS_initialize+0x6c>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
1348: 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;
134c: 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;
1350: 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;
1354: 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;
1358: e3a00000 mov r0, #0
return 0; }
135c: e8bd8070 pop {r4, r5, r6, pc}
sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM );
1360: eb0026dd bl aedc <__errno> <== NOT EXECUTED 1364: e3a0300c mov r3, #12 <== NOT EXECUTED 1368: e5803000 str r3, [r0] <== NOT EXECUTED 136c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1370: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
1374: 0000d9d4 .word 0x0000d9d4 1378: 0000db28 .word 0x0000db28
000014e4 <devFS_ioctl>: int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
14e4: e52de004 push {lr} ; (str lr, [sp, #-4]!) 14e8: e24dd010 sub sp, sp, #16 14ec: e1a03000 mov r3, r0
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command;
14f0: e58d1004 str r1, [sp, #4]
{ rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info;
14f4: e5900038 ldr r0, [r0, #56] ; 0x38
args.iop = iop; args.command = command; args.buffer = buffer;
14f8: e58d2008 str r2, [sp, #8]
status = rtems_io_control(
14fc: e590100c ldr r1, [r0, #12] 1500: e1a0200d mov r2, sp 1504: e5900008 ldr r0, [r0, #8]
rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop;
1508: e58d3000 str r3, [sp]
args.command = command; args.buffer = buffer; status = rtems_io_control(
150c: eb00105f bl 5690 <rtems_io_control>
np->major, np->minor, (void *) &args ); if ( status )
1510: e3500000 cmp r0, #0
return rtems_deviceio_errno(status); return args.ioctl_return;
1514: 059d000c ldreq r0, [sp, #12]
np->major, np->minor, (void *) &args ); if ( status ) 1518: 1a000001 bne 1524 <devFS_ioctl+0x40> return rtems_deviceio_errno(status); return args.ioctl_return; }
151c: e28dd010 add sp, sp, #16 1520: e8bd8000 pop {pc}
np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
1524: eb001d1e bl 89a4 <rtems_deviceio_errno> <== NOT EXECUTED 1528: eafffffb b 151c <devFS_ioctl+0x38> <== NOT EXECUTED
0000137c <devFS_mknod>: const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) {
137c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1380: 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') &&
1384: e5d00000 ldrb r0, [r0] 1388: e3500064 cmp r0, #100 ; 0x64
const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) {
138c: e1a05001 mov r5, r1 1390: e1a06002 mov r6, r2 1394: e1a0b003 mov fp, r3
* condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 1398: 0a000035 beq 1474 <devFS_mknod+0xf8> (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode))
139c: e2053a0f and r3, r5, #61440 ; 0xf000 13a0: e3530a02 cmp r3, #8192 ; 0x2000 13a4: 13530a06 cmpne r3, #24576 ; 0x6000 13a8: 03a03000 moveq r3, #0 13ac: 13a03001 movne r3, #1
13b0: 1a000039 bne 149c <devFS_mknod+0x120> rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access;
13b4: e59d2024 ldr r2, [sp, #36] ; 0x24 13b8: e5928000 ldr r8, [r2]
if (!device_name_table)
13bc: e3580000 cmp r8, #0
13c0: 0a00003f beq 14c4 <devFS_mknod+0x148> rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){
13c4: e59f210c ldr r2, [pc, #268] ; 14d8 <devFS_mknod+0x15c> 13c8: e592a000 ldr sl, [r2] 13cc: e35a0000 cmp sl, #0
rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT );
13d0: 13e09000 mvnne r9, #0 13d4: 11a07003 movne r7, r3
for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 13d8: 1a000007 bne 13fc <devFS_mknod+0x80>
13dc: ea000033 b 14b0 <devFS_mknod+0x134> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0)
13e0: eb002993 bl ba34 <strcmp> <== NOT EXECUTED 13e4: e3500000 cmp r0, #0 <== NOT EXECUTED 13e8: 0a00001c beq 1460 <devFS_mknod+0xe4> <== NOT EXECUTED
/* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){
13ec: e2877001 add r7, r7, #1 <== NOT EXECUTED 13f0: e157000a cmp r7, sl <== NOT EXECUTED 13f4: e1a03007 mov r3, r7 <== NOT EXECUTED 13f8: 2a000009 bcs 1424 <devFS_mknod+0xa8> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
13fc: e0833103 add r3, r3, r3, lsl #2 1400: e7983103 ldr r3, [r8, r3, lsl #2] 1404: e2531000 subs r1, r3, #0
slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0)
1408: e1a00004 mov r0, r4
device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 140c: 1afffff3 bne 13e0 <devFS_mknod+0x64> slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST );
1410: e1a09007 mov r9, r7
/* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){
1414: e2877001 add r7, r7, #1 1418: e157000a cmp r7, sl 141c: e1a03007 mov r3, r7
1420: 3afffff5 bcc 13fc <devFS_mknod+0x80> else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1)
1424: e3790001 cmn r9, #1
1428: 0a000020 beq 14b0 <devFS_mknod+0x134> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
142c: e10f7000 mrs r7, CPSR 1430: e3873080 orr r3, r7, #128 ; 0x80 1434: e129f003 msr CPSR_fc, r3
rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path;
1438: e0899109 add r9, r9, r9, lsl #2 143c: e7884109 str r4, [r8, r9, lsl #2]
device_name_table[slot].device_name_length = strlen(path);
1440: e1a00004 mov r0, r4 1444: eb002a42 bl bd54 <strlen>
if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path;
1448: e0888109 add r8, r8, r9, lsl #2
device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode;
144c: e5885010 str r5, [r8, #16]
if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path);
1450: e9880841 stmib r8, {r0, r6, fp}
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
1454: e129f007 msr CPSR_fc, r7 1458: e3a00000 mov r0, #0
device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; }
145c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST );
1460: eb00269d bl aedc <__errno> <== NOT EXECUTED 1464: e3a03011 mov r3, #17 <== NOT EXECUTED 1468: e5803000 str r3, [r0] <== NOT EXECUTED 146c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1470: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') &&
1474: e5d43001 ldrb r3, [r4, #1] 1478: e3530065 cmp r3, #101 ; 0x65
147c: 1affffc6 bne 139c <devFS_mknod+0x20> (path[2] == 'v') && (path[3] == '\0'))
1480: e5d43002 ldrb r3, [r4, #2] 1484: e3530076 cmp r3, #118 ; 0x76
1488: 1affffc3 bne 139c <devFS_mknod+0x20>
148c: e5d40003 ldrb r0, [r4, #3] 1490: e3500000 cmp r0, #0
1494: 1affffc0 bne 139c <devFS_mknod+0x20>
1498: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL );
149c: eb00268e bl aedc <__errno> <== NOT EXECUTED 14a0: e3a03016 mov r3, #22 <== NOT EXECUTED 14a4: e5803000 str r3, [r0] <== NOT EXECUTED 14a8: e3e00000 mvn r0, #0 <== NOT EXECUTED 14ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM );
14b0: eb002689 bl aedc <__errno> <== NOT EXECUTED 14b4: e3a0300c mov r3, #12 <== NOT EXECUTED 14b8: e5803000 str r3, [r0] <== NOT EXECUTED 14bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 14c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT );
14c4: eb002684 bl aedc <__errno> <== NOT EXECUTED 14c8: e3a0300e mov r3, #14 <== NOT EXECUTED 14cc: e5803000 str r3, [r0] <== NOT EXECUTED 14d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 14d4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
14d8: 0000d9d4 .word 0x0000d9d4
0000156c <devFS_read>: ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) {
156c: e92d4800 push {fp, lr} <== NOT EXECUTED 1570: e1a03000 mov r3, r0 <== NOT EXECUTED 1574: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
1578: 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;
157c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
1580: e3a02000 mov r2, #0 <== NOT EXECUTED 1584: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
1588: 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;
158c: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset;
1590: e283c00c add ip, r3, #12 <== NOT EXECUTED 1594: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
1598: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read(
159c: e2820008 add r0, r2, #8 <== NOT EXECUTED 15a0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 15a4: 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;
15a8: 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;
15ac: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read(
15b0: eb001098 bl 5818 <rtems_io_read> <== NOT EXECUTED
np->major, np->minor, (void *) &args ); if ( status )
15b4: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
15b8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->major, np->minor, (void *) &args ); if ( status )
15bc: 1a000001 bne 15c8 <devFS_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; }
15c0: e28dd01c add sp, sp, #28 <== NOT EXECUTED 15c4: e8bd8800 pop {fp, pc} <== NOT EXECUTED
np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
15c8: eb001cf5 bl 89a4 <rtems_deviceio_errno> <== NOT EXECUTED 15cc: eafffffb b 15c0 <devFS_read+0x54> <== NOT EXECUTED
000015d0 <devFS_stat>: struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access;
15d0: e5903000 ldr r3, [r0]
if (!the_dev)
15d4: e3530000 cmp r3, #0
int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
15d8: 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) 15dc: 0a000007 beq 1600 <devFS_stat+0x30> rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode;
15e0: 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 );
15e4: e593200c ldr r2, [r3, #12]
rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major;
15e8: e5933008 ldr r3, [r3, #8]
buf->st_mode = the_dev->mode;
15ec: 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 );
15f0: e5813018 str r3, [r1, #24] 15f4: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
15f8: e3a00000 mov r0, #0
return 0; }
15fc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{ rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT );
1600: eb002635 bl aedc <__errno> <== NOT EXECUTED 1604: e3a0300e mov r3, #14 <== NOT EXECUTED 1608: e5803000 str r3, [r0] <== NOT EXECUTED 160c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1610: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00001614 <devFS_write>: ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
1614: e92d4800 push {fp, lr} 1618: e1a03000 mov r3, r0 161c: e24dd01c sub sp, sp, #28
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags;
1620: e5900014 ldr r0, [r0, #20]
np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count;
1624: e58d2010 str r2, [sp, #16]
args.flags = iop->flags; args.bytes_moved = 0;
1628: e3a02000 mov r2, #0 162c: e58d2018 str r2, [sp, #24]
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags;
1630: e58d0014 str r0, [sp, #20]
{ rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info;
1634: e5932038 ldr r2, [r3, #56] ; 0x38
args.iop = iop; args.offset = iop->offset;
1638: e283c00c add ip, r3, #12 163c: e89c1800 ldm ip, {fp, ip}
args.buffer = (void *) buffer;
1640: e58d100c str r1, [sp, #12]
args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write(
1644: e2820008 add r0, r2, #8 1648: e8900003 ldm r0, {r0, r1} 164c: e1a0200d mov r2, sp
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset;
1650: e98d1800 stmib sp, {fp, ip}
rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop;
1654: e58d3000 str r3, [sp]
args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write(
1658: eb001082 bl 5868 <rtems_io_write>
np->major, np->minor, (void *) &args ); if ( status )
165c: e3500000 cmp r0, #0
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
1660: 059d0018 ldreq r0, [sp, #24]
np->major, np->minor, (void *) &args ); if ( status ) 1664: 1a000001 bne 1670 <devFS_write+0x5c> return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; }
1668: e28dd01c add sp, sp, #28 166c: e8bd8800 pop {fp, pc}
np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
1670: eb001ccb bl 89a4 <rtems_deviceio_errno> <== NOT EXECUTED 1674: eafffffb b 1668 <devFS_write+0x54> <== NOT EXECUTED
0000b73c <device_ioctl>: int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
b73c: e52de004 push {lr} ; (str lr, [sp, #-4]!) b740: e24dd010 sub sp, sp, #16
rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer;
b744: e88d0007 stm sp, {r0, r1, r2}
the_jnode = iop->file_info;
b748: e5903038 ldr r3, [r0, #56] ; 0x38
status = rtems_io_control(
b74c: e1a0200d mov r2, sp b750: e2830050 add r0, r3, #80 ; 0x50 b754: e8900003 ldm r0, {r0, r1} b758: eb000575 bl cd34 <rtems_io_control>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
b75c: e3500000 cmp r0, #0
return rtems_deviceio_errno(status); return args.ioctl_return;
b760: 059d000c ldreq r0, [sp, #12]
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b764: 1a000001 bne b770 <device_ioctl+0x34> return rtems_deviceio_errno(status); return args.ioctl_return; }
b768: e28dd010 add sp, sp, #16 b76c: e8bd8000 pop {pc}
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
b770: eb0006c4 bl d288 <rtems_deviceio_errno> <== NOT EXECUTED b774: eafffffb b b768 <device_ioctl+0x2c> <== NOT EXECUTED
0000b7d8 <device_read>: ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) {
b7d8: e92d4800 push {fp, lr} <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
b7dc: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
b7e0: e280c00c add ip, r0, #12 <== NOT EXECUTED b7e4: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) {
b7e8: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
b7ec: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
b7f0: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
b7f4: e3a03000 mov r3, #0 <== NOT EXECUTED
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count;
b7f8: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
b7fc: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer;
b800: e58d100c str r1, [sp, #12] <== NOT EXECUTED
rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop;
b804: 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;
b808: 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(
b80c: e1a0200d mov r2, sp <== NOT EXECUTED b810: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED b814: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED b818: eb00056d bl cdd4 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
b81c: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
b820: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
b824: 1a000001 bne b830 <device_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; }
b828: e28dd01c add sp, sp, #28 <== NOT EXECUTED b82c: e8bd8800 pop {fp, pc} <== NOT EXECUTED
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
b830: eb000694 bl d288 <rtems_deviceio_errno> <== NOT EXECUTED b834: eafffffb b b828 <device_read+0x50> <== NOT EXECUTED
0000b778 <device_write>: ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
b778: e92d4800 push {fp, lr}
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags;
b77c: e5903014 ldr r3, [r0, #20]
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
b780: e280c00c add ip, r0, #12 b784: e89c1800 ldm ip, {fp, ip}
ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
b788: e24dd01c sub sp, sp, #28
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags;
b78c: e58d3014 str r3, [sp, #20]
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
b790: e98d1800 stmib sp, {fp, ip}
args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
b794: e3a03000 mov r3, #0
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count;
b798: e58d2010 str r2, [sp, #16]
args.flags = iop->flags; args.bytes_moved = 0;
b79c: e58d3018 str r3, [sp, #24]
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer;
b7a0: e58d100c str r1, [sp, #12]
rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop;
b7a4: e58d0000 str r0, [sp]
{ rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
b7a8: e5903038 ldr r3, [r0, #56] ; 0x38
args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write(
b7ac: e1a0200d mov r2, sp b7b0: e2830050 add r0, r3, #80 ; 0x50 b7b4: e8900003 ldm r0, {r0, r1} b7b8: eb000599 bl ce24 <rtems_io_write>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
b7bc: e3500000 cmp r0, #0
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
b7c0: 059d0018 ldreq r0, [sp, #24]
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b7c4: 1a000001 bne b7d0 <device_write+0x58> return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; }
b7c8: e28dd01c add sp, sp, #28 b7cc: e8bd8800 pop {fp, pc}
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
b7d0: eb0006ac bl d288 <rtems_deviceio_errno> <== NOT EXECUTED b7d4: eafffffb b b7c8 <device_write+0x50> <== NOT EXECUTED
000036a8 <drainOutput>: drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
36a8: e59030b4 ldr r3, [r0, #180] ; 0xb4 36ac: e3530000 cmp r3, #0
/* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) {
36b0: e92d4030 push {r4, r5, lr} 36b4: e1a04000 mov r4, r0
rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
36b8: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
36bc: e10f3000 mrs r3, CPSR <== NOT EXECUTED 36c0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 36c4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
36c8: e5901084 ldr r1, [r0, #132] ; 0x84 <== NOT EXECUTED 36cc: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 36d0: e1510002 cmp r1, r2 <== NOT EXECUTED 36d4: 0a00000f beq 3718 <drainOutput+0x70> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
36d8: e3a05002 mov r5, #2 <== NOT EXECUTED 36dc: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
36e0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
36e4: e3a01000 mov r1, #0 <== NOT EXECUTED 36e8: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 36ec: e1a02001 mov r2, r1 <== NOT EXECUTED 36f0: eb00064a bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
36f4: e3500000 cmp r0, #0 <== NOT EXECUTED 36f8: 1a000008 bne 3720 <drainOutput+0x78> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
36fc: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3700: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3704: 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) {
3708: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 370c: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 3710: e1510002 cmp r1, r2 <== NOT EXECUTED 3714: 1afffff0 bne 36dc <drainOutput+0x34> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
3718: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 371c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
3720: eb0007de bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
00002760 <dup2>: int dup2( int fildes, int fildes2 ) {
2760: e92d4070 push {r4, r5, r6, lr} 2764: e24dd048 sub sp, sp, #72 ; 0x48 2768: e1a05001 mov r5, r1
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
276c: e1a0100d mov r1, sp
int dup2( int fildes, int fildes2 ) {
2770: e1a06000 mov r6, r0
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
2774: eb0001c4 bl 2e8c <fstat>
if ( status == -1 )
2778: e3700001 cmn r0, #1
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
277c: e1a0400d mov r4, sp
if ( status == -1 ) 2780: 1a000002 bne 2790 <dup2+0x30> /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 );
2784: e3e00000 mvn r0, #0
}
2788: e28dd048 add sp, sp, #72 ; 0x48 278c: e8bd8070 pop {r4, r5, r6, pc}
/* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf );
2790: e1a0100d mov r1, sp 2794: e1a00005 mov r0, r5 2798: eb0001bb bl 2e8c <fstat>
if ( status == -1 )
279c: e3700001 cmn r0, #1
27a0: 0afffff7 beq 2784 <dup2+0x24> /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 );
27a4: e1a00006 mov r0, r6 <== NOT EXECUTED 27a8: e1a02005 mov r2, r5 <== NOT EXECUTED 27ac: e3a01000 mov r1, #0 <== NOT EXECUTED 27b0: eb0000a3 bl 2a44 <fcntl> <== NOT EXECUTED 27b4: eafffff3 b 2788 <dup2+0x28> <== NOT EXECUTED
00003118 <echo>: /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) {
3118: e92d4010 push {r4, lr} <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
311c: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 3120: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) {
3124: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 3128: e1a04001 mov r4, r1 <== NOT EXECUTED 312c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
3130: 0a000007 beq 3154 <echo+0x3c> <== NOT EXECUTED 3134: e59f3060 ldr r3, [pc, #96] ; 319c <echo+0x84> <== NOT EXECUTED 3138: e5933000 ldr r3, [r3] <== NOT EXECUTED 313c: e0833000 add r3, r3, r0 <== NOT EXECUTED 3140: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 3144: e2503009 subs r3, r0, #9 <== NOT EXECUTED 3148: 13a03001 movne r3, #1 <== NOT EXECUTED 314c: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 3150: 1a000003 bne 3164 <echo+0x4c> <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty);
3154: e1a01004 mov r1, r4 <== NOT EXECUTED 3158: ebffff92 bl 2fa8 <oproc> <== NOT EXECUTED
} }
315c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3160: e8bd8010 pop {r4, pc} <== NOT EXECUTED
* Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
3164: e350000a cmp r0, #10 <== NOT EXECUTED 3168: 0afffff9 beq 3154 <echo+0x3c> <== NOT EXECUTED
char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40;
316c: 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] = '^';
3170: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
3174: e1a0000d mov r0, sp <== NOT EXECUTED 3178: e3a01002 mov r1, #2 <== NOT EXECUTED 317c: 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;
3180: 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] = '^';
3184: e5cdc000 strb ip, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
3188: ebffff3e bl 2e88 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
318c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3190: e2833002 add r3, r3, #2 <== NOT EXECUTED 3194: 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')) {
3198: eaffffef b 315c <echo+0x44> <== NOT EXECUTED
319c: 00019700 .word 0x00019700
00025aa0 <endgrent>: group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL)
25aa0: e59f300c ldr r3, [pc, #12] ; 25ab4 <endgrent+0x14> <== NOT EXECUTED 25aa4: e5930000 ldr r0, [r3] <== NOT EXECUTED 25aa8: e3500000 cmp r0, #0 <== NOT EXECUTED 25aac: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
25ab0: ea006561 b 3f03c <fclose> <== NOT EXECUTED
25ab4: 00066f80 .word 0x00066f80
00025ab8 <endpwent>: passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL)
25ab8: e59f300c ldr r3, [pc, #12] ; 25acc <endpwent+0x14> <== NOT EXECUTED 25abc: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 25ac0: e3500000 cmp r0, #0 <== NOT EXECUTED 25ac4: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
25ac8: ea00655b b 3f03c <fclose> <== NOT EXECUTED
25acc: 00066f80 .word 0x00066f80
000031a0 <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)
31a0: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 31a4: 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) {
31a8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 31ac: e1a04000 mov r4, r0 <== NOT EXECUTED 31b0: e1a06001 mov r6, r1 <== NOT EXECUTED
if (tty->ccount == 0)
31b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
return; if (lineFlag) {
31b8: e3510000 cmp r1, #0 <== NOT EXECUTED 31bc: 0590203c ldreq r2, [r0, #60] ; 0x3c <== NOT EXECUTED 31c0: 1a000025 bne 325c <erase+0xbc> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
31c4: e59f71d4 ldr r7, [pc, #468] ; 33a0 <erase+0x200> <== NOT EXECUTED 31c8: ea000007 b 31ec <erase+0x4c> <== NOT EXECUTED 31cc: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 31d0: 1a00005a bne 3340 <erase+0x1a0> <== NOT EXECUTED
if (tty->column) tty->column--; } } } if (!lineFlag)
31d4: e3560000 cmp r6, #0 <== NOT EXECUTED 31d8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) {
31dc: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 31e0: e3530000 cmp r3, #0 <== NOT EXECUTED 31e4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 31e8: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED
unsigned char c = tty->cbuf[--tty->ccount];
31ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED 31f0: e5843020 str r3, [r4, #32] <== NOT EXECUTED 31f4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
31f8: e3120008 tst r2, #8 <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
31fc: e7d05003 ldrb r5, [r0, r3] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3200: 0afffff3 beq 31d4 <erase+0x34> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
3204: e3560000 cmp r6, #0 <== NOT EXECUTED 3208: 1a000001 bne 3214 <erase+0x74> <== NOT EXECUTED 320c: e3120010 tst r2, #16 <== NOT EXECUTED 3210: 0a000046 beq 3330 <erase+0x190> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') {
3214: e3550009 cmp r5, #9 <== NOT EXECUTED 3218: 0a000020 beq 32a0 <erase+0x100> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
321c: e5973000 ldr r3, [r7] <== NOT EXECUTED 3220: e2855001 add r5, r5, #1 <== NOT EXECUTED 3224: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3228: e3130020 tst r3, #32 <== NOT EXECUTED 322c: 1affffe6 bne 31cc <erase+0x2c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty);
3230: e59f016c ldr r0, [pc, #364] ; 33a4 <erase+0x204> <== NOT EXECUTED 3234: e3a01003 mov r1, #3 <== NOT EXECUTED 3238: e1a02004 mov r2, r4 <== NOT EXECUTED 323c: ebffff11 bl 2e88 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3240: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3244: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3248: 12433001 subne r3, r3, #1 <== NOT EXECUTED 324c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} } } if (!lineFlag)
3250: e3560000 cmp r6, #0 <== NOT EXECUTED 3254: 1affffe0 bne 31dc <erase+0x3c> <== NOT EXECUTED 3258: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) {
325c: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED 3260: e2121008 ands r1, r2, #8 <== NOT EXECUTED
tty->ccount = 0;
3264: 05801020 streq r1, [r0, #32] <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) {
3268: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) {
326c: e2121010 ands r1, r2, #16 <== NOT EXECUTED 3270: 1affffd3 bne 31c4 <erase+0x24> <== NOT EXECUTED
tty->ccount = 0;
3274: e5801020 str r1, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
3278: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 327c: e1a01004 mov r1, r4 <== NOT EXECUTED 3280: ebffffa4 bl 3118 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
3284: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3288: e3130020 tst r3, #32 <== NOT EXECUTED 328c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
echo ('\n', tty);
3290: e1a01004 mov r1, r4 <== NOT EXECUTED 3294: e3a0000a mov r0, #10 <== NOT EXECUTED
} } if (!lineFlag) break; } }
3298: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
} if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty);
329c: eaffff9d b 3118 <echo> <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
32a0: e3530000 cmp r3, #0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column;
32a4: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
32a8: 0a000011 beq 32f4 <erase+0x154> <== NOT EXECUTED
c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) {
32ac: e5978000 ldr r8, [r7] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
32b0: e202ac02 and sl, r2, #512 ; 0x200 <== NOT EXECUTED
while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) {
32b4: e3a02000 mov r2, #0 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++];
32b8: e7d01002 ldrb r1, [r0, r2] <== NOT EXECUTED
if (c == '\t') {
32bc: e3510009 cmp r1, #9 <== NOT EXECUTED
col = (col | 7) + 1;
32c0: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
} else if (iscntrl (c)) {
32c4: e088c001 add ip, r8, r1 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++];
32c8: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (c == '\t') { col = (col | 7) + 1;
32cc: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') {
32d0: 0a000005 beq 32ec <erase+0x14c> <== NOT EXECUTED
col = (col | 7) + 1; } else if (iscntrl (c)) {
32d4: e5dc1001 ldrb r1, [ip, #1] <== NOT EXECUTED 32d8: e3110020 tst r1, #32 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++;
32dc: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) {
32e0: 0a000001 beq 32ec <erase+0x14c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
32e4: e35a0000 cmp sl, #0 <== NOT EXECUTED
col += 2;
32e8: 12855002 addne r5, r5, #2 <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
32ec: e1530002 cmp r3, r2 <== NOT EXECUTED 32f0: 1afffff0 bne 32b8 <erase+0x118> <== NOT EXECUTED
} /* * Back up over the tab */ while (tty->column > col) {
32f4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 32f8: e1550003 cmp r5, r3 <== NOT EXECUTED 32fc: aaffffb4 bge 31d4 <erase+0x34> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
3300: e59f00a0 ldr r0, [pc, #160] ; 33a8 <erase+0x208> <== NOT EXECUTED 3304: e3a01001 mov r1, #1 <== NOT EXECUTED 3308: e1a02004 mov r2, r4 <== NOT EXECUTED 330c: ebfffedd bl 2e88 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
3310: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3314: e2433001 sub r3, r3, #1 <== NOT EXECUTED
} /* * Back up over the tab */ while (tty->column > col) {
3318: e1550003 cmp r5, r3 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty); tty->column--;
331c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} /* * Back up over the tab */ while (tty->column > col) {
3320: bafffff6 blt 3300 <erase+0x160> <== NOT EXECUTED
if (tty->column) tty->column--; } } } if (!lineFlag)
3324: e3560000 cmp r6, #0 <== NOT EXECUTED 3328: 1affffab bne 31dc <erase+0x3c> <== NOT EXECUTED 332c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty);
3330: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 3334: e1a01004 mov r1, r4 <== NOT EXECUTED
} } if (!lineFlag) break; } }
3338: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty);
333c: eaffff75 b 3118 <echo> <== NOT EXECUTED
tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty);
3340: e59f005c ldr r0, [pc, #92] ; 33a4 <erase+0x204> <== NOT EXECUTED 3344: e3a01003 mov r1, #3 <== NOT EXECUTED 3348: e1a02004 mov r2, r4 <== NOT EXECUTED 334c: ebfffecd bl 2e88 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3350: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3354: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3358: 12433001 subne r3, r3, #1 <== NOT EXECUTED 335c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
3360: e5973000 ldr r3, [r7] <== NOT EXECUTED 3364: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3368: e3130020 tst r3, #32 <== NOT EXECUTED 336c: 0affffaf beq 3230 <erase+0x90> <== NOT EXECUTED 3370: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 3374: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 3378: 0affff95 beq 31d4 <erase+0x34> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
337c: e59f0020 ldr r0, [pc, #32] ; 33a4 <erase+0x204> <== NOT EXECUTED 3380: e3a01003 mov r1, #3 <== NOT EXECUTED 3384: e1a02004 mov r2, r4 <== NOT EXECUTED 3388: ebfffebe bl 2e88 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
338c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3390: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3394: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3398: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 339c: eaffffab b 3250 <erase+0xb0> <== NOT EXECUTED
33a0: 00019700 .word 0x00019700 33a4: 0001a664 .word 0x0001a664 33a8: 0001a660 .word 0x0001a660
00038aa8 <fchdir>: #include <rtems/seterr.h> int fchdir( int fd ) {
38aa8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd );
38aac: e59f3174 ldr r3, [pc, #372] ; 38c28 <fchdir+0x180> <== NOT EXECUTED 38ab0: e5933000 ldr r3, [r3] <== NOT EXECUTED 38ab4: e1500003 cmp r0, r3 <== NOT EXECUTED
#include <rtems/seterr.h> int fchdir( int fd ) {
38ab8: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd );
38abc: 2a000042 bcs 38bcc <fchdir+0x124> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
38ac0: e59f3164 ldr r3, [pc, #356] ; 38c2c <fchdir+0x184> <== NOT EXECUTED 38ac4: e5934000 ldr r4, [r3] <== NOT EXECUTED 38ac8: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
38acc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 38ad0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 38ad4: 0a00003c beq 38bcc <fchdir+0x124> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
38ad8: e3130002 tst r3, #2 <== NOT EXECUTED 38adc: 0a000047 beq 38c00 <fchdir+0x158> <== NOT EXECUTED
/* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) {
38ae0: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 38ae4: e3530000 cmp r3, #0 <== NOT EXECUTED 38ae8: 0a000049 beq 38c14 <fchdir+0x16c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) {
38aec: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 38af0: e3530000 cmp r3, #0 <== NOT EXECUTED 38af4: 0a000046 beq 38c14 <fchdir+0x16c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
38af8: e2844018 add r4, r4, #24 <== NOT EXECUTED 38afc: e1a00004 mov r0, r4 <== NOT EXECUTED 38b00: e1a0e00f mov lr, pc <== NOT EXECUTED 38b04: e12fff13 bx r3 <== NOT EXECUTED 38b08: e3500001 cmp r0, #1 <== NOT EXECUTED 38b0c: e1a0e000 mov lr, r0 <== NOT EXECUTED 38b10: 1a000028 bne 38bb8 <fchdir+0x110> <== NOT EXECUTED
* but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current;
38b14: e59f6114 ldr r6, [pc, #276] ; 38c30 <fchdir+0x188> <== NOT EXECUTED 38b18: e5967000 ldr r7, [r6] <== NOT EXECUTED 38b1c: e287c004 add ip, r7, #4 <== NOT EXECUTED 38b20: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 38b24: e28d5004 add r5, sp, #4 <== NOT EXECUTED 38b28: e1a08005 mov r8, r5 <== NOT EXECUTED 38b2c: e8a8000f stmia r8!, {r0, r1, r2, r3} <== NOT EXECUTED 38b30: e59c3000 ldr r3, [ip] <== NOT EXECUTED 38b34: e5883000 str r3, [r8] <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
38b38: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 38b3c: e2877004 add r7, r7, #4 <== NOT EXECUTED 38b40: e8a7000f stmia r7!, {r0, r1, r2, r3} <== NOT EXECUTED 38b44: e5943000 ldr r3, [r4] <== NOT EXECUTED
/* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
38b48: e3a07000 mov r7, #0 <== NOT EXECUTED 38b4c: e28d4018 add r4, sp, #24 <== NOT EXECUTED
* share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo;
38b50: e58c3000 str r3, [ip] <== NOT EXECUTED
/* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
38b54: e1a0100e mov r1, lr <== NOT EXECUTED 38b58: e1a02007 mov r2, r7 <== NOT EXECUTED 38b5c: e59f00d0 ldr r0, [pc, #208] ; 38c34 <fchdir+0x18c> <== NOT EXECUTED 38b60: e1a03004 mov r3, r4 <== NOT EXECUTED 38b64: e58d7000 str r7, [sp] <== NOT EXECUTED 38b68: ebff2fe5 bl 4b04 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 38b6c: e1500007 cmp r0, r7 <== NOT EXECUTED 38b70: 1a00001a bne 38be0 <fchdir+0x138> <== NOT EXECUTED
/* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved );
38b74: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 38b78: e3530000 cmp r3, #0 <== NOT EXECUTED 38b7c: 0a000004 beq 38b94 <fchdir+0xec> <== NOT EXECUTED 38b80: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 38b84: e3530000 cmp r3, #0 <== NOT EXECUTED 38b88: 11a00005 movne r0, r5 <== NOT EXECUTED 38b8c: 11a0e00f movne lr, pc <== NOT EXECUTED 38b90: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_current = loc;
38b94: e596c000 ldr ip, [r6] <== NOT EXECUTED 38b98: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 38b9c: e28cc004 add ip, ip, #4 <== NOT EXECUTED 38ba0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 38ba4: e5943000 ldr r3, [r4] <== NOT EXECUTED 38ba8: e58c3000 str r3, [ip] <== NOT EXECUTED 38bac: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0; }
38bb0: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 38bb4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR );
38bb8: eb0018d2 bl 3ef08 <__errno> <== NOT EXECUTED 38bbc: e3a03014 mov r3, #20 <== NOT EXECUTED 38bc0: e5803000 str r3, [r0] <== NOT EXECUTED 38bc4: e3e00000 mvn r0, #0 <== NOT EXECUTED 38bc8: eafffff8 b 38bb0 <fchdir+0x108> <== NOT EXECUTED
rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
38bcc: eb0018cd bl 3ef08 <__errno> <== NOT EXECUTED 38bd0: e3a03009 mov r3, #9 <== NOT EXECUTED 38bd4: e5803000 str r3, [r0] <== NOT EXECUTED 38bd8: e3e00000 mvn r0, #0 <== NOT EXECUTED 38bdc: eafffff3 b 38bb0 <fchdir+0x108> <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved;
38be0: e596c000 ldr ip, [r6] <== NOT EXECUTED 38be4: e8b5000f ldm r5!, {r0, r1, r2, r3} <== NOT EXECUTED 38be8: e28cc004 add ip, ip, #4 <== NOT EXECUTED 38bec: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 38bf0: e5983000 ldr r3, [r8] <== NOT EXECUTED 38bf4: e3e00000 mvn r0, #0 <== NOT EXECUTED 38bf8: e58c3000 str r3, [ip] <== NOT EXECUTED
return -1;
38bfc: eaffffeb b 38bb0 <fchdir+0x108> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
38c00: eb0018c0 bl 3ef08 <__errno> <== NOT EXECUTED 38c04: e3a03016 mov r3, #22 <== NOT EXECUTED 38c08: e5803000 str r3, [r0] <== NOT EXECUTED 38c0c: e3e00000 mvn r0, #0 <== NOT EXECUTED 38c10: eaffffe6 b 38bb0 <fchdir+0x108> <== NOT EXECUTED
if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP );
38c14: eb0018bb bl 3ef08 <__errno> <== NOT EXECUTED 38c18: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 38c1c: e5803000 str r3, [r0] <== NOT EXECUTED 38c20: e3e00000 mvn r0, #0 <== NOT EXECUTED 38c24: eaffffe1 b 38bb0 <fchdir+0x108> <== NOT EXECUTED
38c28: 00059070 .word 0x00059070 38c2c: 000673cc .word 0x000673cc 38c30: 00059348 .word 0x00059348 38c34: 0005e1b8 .word 0x0005e1b8
00025690 <fchmod>: mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd );
25690: e59f308c ldr r3, [pc, #140] ; 25724 <fchmod+0x94> <== NOT EXECUTED 25694: e5932000 ldr r2, [r3] <== NOT EXECUTED 25698: e1500002 cmp r0, r2 <== NOT EXECUTED
int fchmod( int fd, mode_t mode ) {
2569c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
256a0: 2a000010 bcs 256e8 <fchmod+0x58> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
256a4: e59f307c ldr r3, [pc, #124] ; 25728 <fchmod+0x98> <== NOT EXECUTED 256a8: e5933000 ldr r3, [r3] <== NOT EXECUTED 256ac: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
256b0: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 256b4: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 256b8: 0a00000a beq 256e8 <fchmod+0x58> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
256bc: e3120004 tst r2, #4 <== NOT EXECUTED 256c0: 0a00000d beq 256fc <fchmod+0x6c> <== NOT EXECUTED
if ( !iop->handlers->fchmod_h )
256c4: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 256c8: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 256cc: e3520000 cmp r2, #0 <== NOT EXECUTED 256d0: 0a00000e beq 25710 <fchmod+0x80> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
256d4: e2830018 add r0, r3, #24 <== NOT EXECUTED 256d8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 256dc: e1a0e00f mov lr, pc <== NOT EXECUTED 256e0: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED
}
256e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{ rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
256e8: eb006606 bl 3ef08 <__errno> <== NOT EXECUTED 256ec: e3a03009 mov r3, #9 <== NOT EXECUTED 256f0: e5803000 str r3, [r0] <== NOT EXECUTED 256f4: e3e00000 mvn r0, #0 <== NOT EXECUTED 256f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
256fc: eb006601 bl 3ef08 <__errno> <== NOT EXECUTED 25700: e3a03016 mov r3, #22 <== NOT EXECUTED 25704: e5803000 str r3, [r0] <== NOT EXECUTED 25708: e3e00000 mvn r0, #0 <== NOT EXECUTED 2570c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
25710: eb0065fc bl 3ef08 <__errno> <== NOT EXECUTED 25714: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25718: e5803000 str r3, [r0] <== NOT EXECUTED 2571c: e3e00000 mvn r0, #0 <== NOT EXECUTED 25720: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
25724: 00059070 .word 0x00059070 25728: 000673cc .word 0x000673cc
0002572c <fchown>: gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd );
2572c: e59f3098 ldr r3, [pc, #152] ; 257cc <fchown+0xa0> <== NOT EXECUTED 25730: e5933000 ldr r3, [r3] <== NOT EXECUTED
int fchown( int fd, uid_t owner, gid_t group ) {
25734: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 25738: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
2573c: e1500003 cmp r0, r3 <== NOT EXECUTED
int fchown( int fd, uid_t owner, gid_t group ) {
25740: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 25744: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 25748: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
2574c: 2a00000f bcs 25790 <fchown+0x64> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
25750: e59f3078 ldr r3, [pc, #120] ; 257d0 <fchown+0xa4> <== NOT EXECUTED 25754: e5933000 ldr r3, [r3] <== NOT EXECUTED 25758: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
2575c: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 25760: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 25764: 0a000009 beq 25790 <fchown+0x64> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
25768: e3130004 tst r3, #4 <== NOT EXECUTED 2576c: 0a00000c beq 257a4 <fchown+0x78> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
25770: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 25774: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 25778: e3530000 cmp r3, #0 <== NOT EXECUTED 2577c: 0a00000d beq 257b8 <fchown+0x8c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
25780: e2800018 add r0, r0, #24 <== NOT EXECUTED 25784: e1a0e00f mov lr, pc <== NOT EXECUTED 25788: e12fff13 bx r3 <== NOT EXECUTED
}
2578c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{ rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
25790: eb0065dc bl 3ef08 <__errno> <== NOT EXECUTED 25794: e3a03009 mov r3, #9 <== NOT EXECUTED 25798: e5803000 str r3, [r0] <== NOT EXECUTED 2579c: e3e00000 mvn r0, #0 <== NOT EXECUTED 257a0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
257a4: eb0065d7 bl 3ef08 <__errno> <== NOT EXECUTED 257a8: e3a03016 mov r3, #22 <== NOT EXECUTED 257ac: e5803000 str r3, [r0] <== NOT EXECUTED 257b0: e3e00000 mvn r0, #0 <== NOT EXECUTED 257b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
257b8: eb0065d2 bl 3ef08 <__errno> <== NOT EXECUTED 257bc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 257c0: e5803000 str r3, [r0] <== NOT EXECUTED 257c4: e3e00000 mvn r0, #0 <== NOT EXECUTED 257c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
257cc: 00059070 .word 0x00059070 257d0: 000673cc .word 0x000673cc
00038c38 <fcntl>: int fcntl( int fd, int cmd, ... ) {
38c38: e92d000e push {r1, r2, r3} 38c3c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
38c40: e59f31d0 ldr r3, [pc, #464] ; 38e18 <fcntl+0x1e0> 38c44: e5933000 ldr r3, [r3]
int fcntl( int fd, int cmd, ... ) {
38c48: e24dd004 sub sp, sp, #4
int ret; va_list ap; va_start( ap, cmd );
38c4c: e28d2028 add r2, sp, #40 ; 0x28
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
38c50: e1500003 cmp r0, r3
... ) { int ret; va_list ap; va_start( ap, cmd );
38c54: e58d2000 str r2, [sp]
int fcntl( int fd, int cmd, ... ) {
38c58: e59d4024 ldr r4, [sp, #36] ; 0x24
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 38c5c: 2a000061 bcs 38de8 <fcntl+0x1b0> iop = rtems_libio_iop( fd );
38c60: e59f81b4 ldr r8, [pc, #436] ; 38e1c <fcntl+0x1e4> 38c64: e5986000 ldr r6, [r8] 38c68: e0865300 add r5, r6, r0, lsl #6
rtems_libio_check_is_open(iop);
38c6c: e595c014 ldr ip, [r5, #20] 38c70: e31c0c01 tst ip, #256 ; 0x100
38c74: 0a00005b beq 38de8 <fcntl+0x1b0> /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) {
38c78: e3540009 cmp r4, #9 38c7c: 979ff104 ldrls pc, [pc, r4, lsl #2] 38c80: ea00002c b 38d38 <fcntl+0x100>
38c84: 00038d4c .word 0x00038d4c <== NOT EXECUTED 38c88: 00038dac .word 0x00038dac <== NOT EXECUTED 38c8c: 00038db8 .word 0x00038db8 <== NOT EXECUTED 38c90: 00038dd8 .word 0x00038dd8 <== NOT EXECUTED 38c94: 00038cd0 .word 0x00038cd0 <== NOT EXECUTED 38c98: 00038cac .word 0x00038cac <== NOT EXECUTED 38c9c: 00038cac .word 0x00038cac <== NOT EXECUTED 38ca0: 00038cac .word 0x00038cac <== NOT EXECUTED 38ca4: 00038cac .word 0x00038cac <== NOT EXECUTED 38ca8: 00038cac .word 0x00038cac <== NOT EXECUTED
errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP;
38cac: eb001895 bl 3ef08 <__errno> 38cb0: e3a03086 mov r3, #134 ; 0x86 38cb4: e5803000 str r3, [r0] 38cb8: e3e06000 mvn r6, #0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
38cbc: e1a00006 mov r0, r6 38cc0: e28dd004 add sp, sp, #4 38cc4: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 38cc8: e28dd00c add sp, sp, #12 38ccc: e12fff1e bx lr
case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
38cd0: e5920000 ldr r0, [r2] 38cd4: ebff3058 bl 4e3c <rtems_libio_fcntl_flags>
/* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask);
38cd8: e5953014 ldr r3, [r5, #20] 38cdc: e3c00f7f bic r0, r0, #508 ; 0x1fc 38ce0: e3c00002 bic r0, r0, #2 38ce4: e1a00b00 lsl r0, r0, #22 38ce8: e3c33c02 bic r3, r3, #512 ; 0x200 38cec: e1a00b20 lsr r0, r0, #22 38cf0: e3c33001 bic r3, r3, #1 38cf4: e1800003 orr r0, r0, r3 38cf8: e5850014 str r0, [r5, #20] 38cfc: e3a06000 mov r6, #0
* If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) {
38d00: e595303c ldr r3, [r5, #60] ; 0x3c 38d04: e5933030 ldr r3, [r3, #48] ; 0x30 38d08: e3530000 cmp r3, #0
38d0c: 0affffea beq 38cbc <fcntl+0x84> int err = (*iop->handlers->fcntl_h)( cmd, iop );
38d10: e1a00004 mov r0, r4 38d14: e1a01005 mov r1, r5 38d18: e1a0e00f mov lr, pc 38d1c: e12fff13 bx r3
if (err) {
38d20: e2504000 subs r4, r0, #0
38d24: 0affffe4 beq 38cbc <fcntl+0x84> errno = err;
38d28: eb001876 bl 3ef08 <__errno> <== NOT EXECUTED 38d2c: e5804000 str r4, [r0] <== NOT EXECUTED 38d30: e3e06000 mvn r6, #0 <== NOT EXECUTED 38d34: eaffffe0 b 38cbc <fcntl+0x84> <== NOT EXECUTED
errno = ENOTSUP; ret = -1; break; default: errno = EINVAL;
38d38: eb001872 bl 3ef08 <__errno> 38d3c: e3a03016 mov r3, #22 38d40: e5803000 str r3, [r0] 38d44: e3e06000 mvn r6, #0 38d48: eaffffdb b 38cbc <fcntl+0x84>
* This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int );
38d4c: e5927000 ldr r7, [r2]
if ( fd2 )
38d50: e3570000 cmp r7, #0
38d54: 0a000028 beq 38dfc <fcntl+0x1c4> diop = rtems_libio_iop( fd2 );
38d58: e1530007 cmp r3, r7 <== NOT EXECUTED 38d5c: 93a09000 movls r9, #0 <== NOT EXECUTED 38d60: 80867307 addhi r7, r6, r7, lsl #6 <== NOT EXECUTED 38d64: 91a07009 movls r7, r9 <== NOT EXECUTED 38d68: 81a09007 movhi r9, r7 <== NOT EXECUTED
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
38d6c: e2858018 add r8, r5, #24 38d70: e8b8000f ldm r8!, {r0, r1, r2, r3} 38d74: e287a018 add sl, r7, #24 38d78: e8aa000f stmia sl!, {r0, r1, r2, r3}
ret = -1; break; } } diop->handlers = iop->handlers;
38d7c: e595203c ldr r2, [r5, #60] ; 0x3c
diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
38d80: e5981000 ldr r1, [r8]
break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info;
38d84: e5953038 ldr r3, [r5, #56] ; 0x38
diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops);
38d88: e0666009 rsb r6, r6, r9
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
38d8c: e58a1000 str r1, [sl]
ret = -1; break; } } diop->handlers = iop->handlers;
38d90: e587203c str r2, [r7, #60] ; 0x3c
diop->file_info = iop->file_info;
38d94: e5873038 str r3, [r7, #56] ; 0x38
diop->flags = iop->flags;
38d98: e587c014 str ip, [r7, #20]
diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops);
38d9c: e1a06346 asr r6, r6, #6
/* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) {
38da0: e3560000 cmp r6, #0
38da4: aaffffd5 bge 38d00 <fcntl+0xc8>
38da8: eaffffc3 b 38cbc <fcntl+0x84> <== NOT EXECUTED
diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
38dac: e1a0c5ac lsr ip, ip, #11 38db0: e20c6001 and r6, ip, #1 38db4: eaffffd1 b 38d00 <fcntl+0xc8>
* 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 ) )
38db8: e5926000 ldr r6, [r2] 38dbc: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
38dc0: 138ccb02 orrne ip, ip, #2048 ; 0x800
else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
38dc4: 03cccb02 biceq ip, ip, #2048 ; 0x800
* processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
38dc8: 1585c014 strne ip, [r5, #20] 38dcc: 13a06000 movne r6, #0
else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
38dd0: 0585c014 streq ip, [r5, #20] 38dd4: eaffffc9 b 38d00 <fcntl+0xc8>
break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags );
38dd8: e1a0000c mov r0, ip 38ddc: ebff3006 bl 4dfc <rtems_libio_to_fcntl_flags> 38de0: e1a06000 mov r6, r0 38de4: eaffffed b 38da0 <fcntl+0x168>
int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
38de8: eb001846 bl 3ef08 <__errno> <== NOT EXECUTED 38dec: e3a03009 mov r3, #9 <== NOT EXECUTED 38df0: e5803000 str r3, [r0] <== NOT EXECUTED 38df4: e3e06000 mvn r6, #0 <== NOT EXECUTED 38df8: eaffffaf b 38cbc <fcntl+0x84> <== NOT EXECUTED
fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate();
38dfc: ebff301b bl 4e70 <rtems_libio_allocate>
if ( diop == 0 ) {
38e00: e2507000 subs r7, r0, #0
38e04: 0affffc9 beq 38d30 <fcntl+0xf8>
38e08: e5986000 ldr r6, [r8] 38e0c: e595c014 ldr ip, [r5, #20] 38e10: e1a09007 mov r9, r7 38e14: eaffffd4 b 38d6c <fcntl+0x134> 38e18: 00059070 .word 0x00059070 38e1c: 000673cc .word 0x000673cc
0000be74 <fifo_open>: */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
be74: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
be78: e59f5408 ldr r5, [pc, #1032] ; c288 <fifo_open+0x414>
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
be7c: e1a07001 mov r7, r1
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
be80: e3a01000 mov r1, #0
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
be84: e24dd00c sub sp, sp, #12 be88: e1a04000 mov r4, r0
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
be8c: e1a02001 mov r2, r1 be90: e5950000 ldr r0, [r5] be94: ebffe461 bl 5020 <rtems_semaphore_obtain> be98: e2509000 subs r9, r0, #0 be9c: 13e0a003 mvnne sl, #3
bea0: 1a00001c bne bf18 <fifo_open+0xa4> RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep;
bea4: e5946000 ldr r6, [r4] <== NOT EXECUTED
if (pipe == NULL) {
bea8: e3560000 cmp r6, #0 <== NOT EXECUTED beac: 0a00007d beq c0a8 <fifo_open+0x234> <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
beb0: e3a01000 mov r1, #0 <== NOT EXECUTED beb4: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED beb8: e1a02001 mov r2, r1 <== NOT EXECUTED bebc: ebffe457 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
bec0: e5943000 ldr r3, [r4] <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
bec4: e3500000 cmp r0, #0 <== NOT EXECUTED bec8: 01a0a000 moveq sl, r0 <== NOT EXECUTED becc: 13e0a003 mvnne sl, #3 <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
bed0: e3530000 cmp r3, #0 <== NOT EXECUTED bed4: 0a000038 beq bfbc <fifo_open+0x148> <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
bed8: e5950000 ldr r0, [r5] <== NOT EXECUTED bedc: ebffe497 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err)
bee0: e35a0000 cmp sl, #0 <== NOT EXECUTED bee4: 1a00000b bne bf18 <fifo_open+0xa4> <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) {
bee8: e5972014 ldr r2, [r7, #20] <== NOT EXECUTED beec: e2023006 and r3, r2, #6 <== NOT EXECUTED bef0: e3530004 cmp r3, #4 <== NOT EXECUTED
int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep;
bef4: e5945000 ldr r5, [r4] <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
bef8: 0a000009 beq bf24 <fifo_open+0xb0> <== NOT EXECUTED befc: e3530006 cmp r3, #6 <== NOT EXECUTED bf00: 0a000054 beq c058 <fifo_open+0x1e4> <== NOT EXECUTED bf04: e3530002 cmp r3, #2 <== NOT EXECUTED bf08: 0a000031 beq bfd4 <fifo_open+0x160> <== NOT EXECUTED
if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe);
bf0c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED bf10: ebffe48a bl 5140 <rtems_semaphore_release> <== NOT EXECUTED bf14: e3a0a000 mov sl, #0 <== NOT EXECUTED
return 0; out_error: pipe_release(pipep, iop); return err; }
bf18: e1a0000a mov r0, sl bf1c: e28dd00c add sp, sp, #12 bf20: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
} while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
bf24: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED bf28: e3530000 cmp r3, #0 <== NOT EXECUTED bf2c: 1a000002 bne bf3c <fifo_open+0xc8> <== NOT EXECUTED bf30: e3120001 tst r2, #1 <== NOT EXECUTED bf34: 13e0a005 mvnne sl, #5 <== NOT EXECUTED bf38: 1a00001b bne bfac <fifo_open+0x138> <== NOT EXECUTED
err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0)
bf3c: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
bf40: e5951024 ldr r1, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
bf44: e3520000 cmp r2, #0 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
bf48: e2811001 add r1, r1, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
bf4c: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
bf50: e5851024 str r1, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
bf54: e5852014 str r2, [r5, #20] <== NOT EXECUTED bf58: 0a0000b8 beq c240 <fifo_open+0x3cc> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) {
bf5c: e3530000 cmp r3, #0 <== NOT EXECUTED bf60: 1affffe9 bne bf0c <fifo_open+0x98> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
bf64: e5956020 ldr r6, [r5, #32] <== NOT EXECUTED bf68: ea000006 b bf88 <fifo_open+0x114> <== NOT EXECUTED
err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe))
bf6c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED bf70: ebffe42a bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED bf74: e3500000 cmp r0, #0 <== NOT EXECUTED bf78: 1a00000a bne bfa8 <fifo_open+0x134> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->readerCounter);
bf7c: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED bf80: e1530006 cmp r3, r6 <== NOT EXECUTED bf84: 1affffe0 bne bf0c <fifo_open+0x98> <== NOT EXECUTED
if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe);
bf88: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED bf8c: ebffe46b bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
bf90: e3a01000 mov r1, #0 <== NOT EXECUTED bf94: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED bf98: eb0002dd bl cb14 <rtems_barrier_wait> <== NOT EXECUTED bf9c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
bfa0: e1a02001 mov r2, r1 <== NOT EXECUTED
if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe))
bfa4: 0afffff0 beq bf6c <fifo_open+0xf8> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0;
bfa8: e3e0a003 mvn sl, #3 <== NOT EXECUTED
out_error: pipe_release(pipep, iop);
bfac: e1a00004 mov r0, r4 <== NOT EXECUTED bfb0: e1a01007 mov r1, r7 <== NOT EXECUTED bfb4: ebffff68 bl bd5c <pipe_release> <== NOT EXECUTED
return err;
bfb8: eaffffd6 b bf18 <fifo_open+0xa4> <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err)
bfbc: e35a0000 cmp sl, #0 <== NOT EXECUTED bfc0: 1a0000a3 bne c254 <fifo_open+0x3e0> <== NOT EXECUTED
pipe_free(pipe); else *pipep = pipe;
bfc4: e5846000 str r6, [r4] <== NOT EXECUTED
} out: rtems_semaphore_release(rtems_pipe_semaphore);
bfc8: e5950000 ldr r0, [r5] <== NOT EXECUTED bfcc: ebffe45b bl 5140 <rtems_semaphore_release> <== NOT EXECUTED bfd0: eaffffc4 b bee8 <fifo_open+0x74> <== NOT EXECUTED
pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
bfd4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
bfd8: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
bfdc: e3530000 cmp r3, #0 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
bfe0: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
bfe4: e2833001 add r3, r3, #1 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
bfe8: e5852020 str r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
bfec: e5853010 str r3, [r5, #16] <== NOT EXECUTED bff0: 0a00008e beq c230 <fifo_open+0x3bc> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) {
bff4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED bff8: e3530000 cmp r3, #0 <== NOT EXECUTED bffc: 1affffc2 bne bf0c <fifo_open+0x98> <== NOT EXECUTED
/* Not an error */ if (LIBIO_NODELAY(iop))
c000: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED c004: e3130001 tst r3, #1 <== NOT EXECUTED c008: 1affffbf bne bf0c <fifo_open+0x98> <== NOT EXECUTED
break; prevCounter = pipe->writerCounter;
c00c: e5956024 ldr r6, [r5, #36] ; 0x24 <== NOT EXECUTED c010: ea000006 b c030 <fifo_open+0x1bc> <== NOT EXECUTED
/* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe))
c014: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED c018: ebffe400 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED c01c: e3500000 cmp r0, #0 <== NOT EXECUTED c020: 1affffe0 bne bfa8 <fifo_open+0x134> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->writerCounter);
c024: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED c028: e1530006 cmp r3, r6 <== NOT EXECUTED c02c: 1affffb6 bne bf0c <fifo_open+0x98> <== NOT EXECUTED
prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe);
c030: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED c034: ebffe441 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
c038: e3a01000 mov r1, #0 <== NOT EXECUTED c03c: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED c040: eb0002b3 bl cb14 <rtems_barrier_wait> <== NOT EXECUTED c044: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
c048: 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))
c04c: 0afffff0 beq c014 <fifo_open+0x1a0> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0;
c050: e3e0a003 mvn sl, #3 <== NOT EXECUTED c054: eaffffd4 b bfac <fifo_open+0x138> <== NOT EXECUTED
} break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
c058: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
c05c: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
c060: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
c064: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
c068: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
c06c: e5852020 str r2, [r5, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
c070: e5853010 str r3, [r5, #16] <== NOT EXECUTED c074: 0a000069 beq c220 <fifo_open+0x3ac> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0)
c078: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
c07c: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
c080: e3530000 cmp r3, #0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
c084: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
c088: e2833001 add r3, r3, #1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
c08c: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
c090: e5853014 str r3, [r5, #20] <== NOT EXECUTED c094: 1affff9c bne bf0c <fifo_open+0x98> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
c098: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED c09c: e28d1008 add r1, sp, #8 <== NOT EXECUTED c0a0: eb000282 bl cab0 <rtems_barrier_release> <== NOT EXECUTED c0a4: eaffff98 b bf0c <fifo_open+0x98> <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
c0a8: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED c0ac: ebffd746 bl 1dcc <malloc> <== NOT EXECUTED
if (pipe == NULL)
c0b0: e3500000 cmp r0, #0 <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
c0b4: e1a08000 mov r8, r0 <== NOT EXECUTED c0b8: e1a06000 mov r6, r0 <== NOT EXECUTED
if (pipe == NULL)
c0bc: 03e0a00b mvneq sl, #11 <== NOT EXECUTED c0c0: 0affff84 beq bed8 <fifo_open+0x64> <== NOT EXECUTED
return err; memset(pipe, 0, sizeof(pipe_control_t));
c0c4: e1a03000 mov r3, r0 <== NOT EXECUTED c0c8: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0cc: e2833004 add r3, r3, #4 <== NOT EXECUTED c0d0: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0d4: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0d8: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0dc: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0e0: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0e4: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0e8: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0ec: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0f0: e4839004 str r9, [r3], #4 <== NOT EXECUTED c0f4: e4839004 str r9, [r3], #4 <== NOT EXECUTED
pipe->Size = PIPE_BUF;
c0f8: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t));
c0fc: e5839000 str r9, [r3] <== NOT EXECUTED
pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size);
c100: e1a00002 mov r0, r2 <== NOT EXECUTED
pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF;
c104: e5882004 str r2, [r8, #4] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
c108: ebffd72f bl 1dcc <malloc> <== NOT EXECUTED
if (! pipe->Buffer)
c10c: 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);
c110: e5880000 str r0, [r8] <== NOT EXECUTED
if (! pipe->Buffer)
c114: 03e0a00b mvneq sl, #11 <== NOT EXECUTED c118: 0a00003d beq c214 <fifo_open+0x3a0> <== NOT EXECUTED
goto err_buf; err = -EINTR; if (rtems_barrier_create(
c11c: e59fa168 ldr sl, [pc, #360] ; c28c <fifo_open+0x418> <== NOT EXECUTED c120: e5da0000 ldrb r0, [sl] <== NOT EXECUTED c124: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED c128: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED c12c: e1a01009 mov r1, r9 <== NOT EXECUTED c130: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED c134: e1a02009 mov r2, r9 <== NOT EXECUTED c138: e288302c add r3, r8, #44 ; 0x2c <== NOT EXECUTED c13c: eb000210 bl c984 <rtems_barrier_create> <== NOT EXECUTED c140: e2501000 subs r1, r0, #0 <== NOT EXECUTED c144: 1a00002f bne c208 <fifo_open+0x394> <== 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(
c148: e5da0000 ldrb r0, [sl] <== NOT EXECUTED c14c: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED c150: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED c154: e2883030 add r3, r8, #48 ; 0x30 <== NOT EXECUTED c158: e3800c77 orr r0, r0, #30464 ; 0x7700 <== NOT EXECUTED c15c: e1a02001 mov r2, r1 <== NOT EXECUTED c160: eb000207 bl c984 <rtems_barrier_create> <== NOT EXECUTED c164: e2503000 subs r3, r0, #0 <== NOT EXECUTED c168: 1a000024 bne c200 <fifo_open+0x38c> <== 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(
c16c: e5da0000 ldrb r0, [sl] <== NOT EXECUTED c170: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED c174: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED c178: e288c028 add ip, r8, #40 ; 0x28 <== NOT EXECUTED c17c: e3800c73 orr r0, r0, #29440 ; 0x7300 <== NOT EXECUTED c180: e3a01001 mov r1, #1 <== NOT EXECUTED c184: e3a02010 mov r2, #16 <== NOT EXECUTED c188: e58dc000 str ip, [sp] <== NOT EXECUTED c18c: ebffe308 bl 4db4 <rtems_semaphore_create> <== NOT EXECUTED c190: e3500000 cmp r0, #0 <== NOT EXECUTED c194: 1a000017 bne c1f8 <fifo_open+0x384> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *)
c198: e28d8004 add r8, sp, #4 <== NOT EXECUTED c19c: e596102c ldr r1, [r6, #44] ; 0x2c <== NOT EXECUTED c1a0: e1a02008 mov r2, r8 <== NOT EXECUTED c1a4: e59f00e4 ldr r0, [pc, #228] ; c290 <fifo_open+0x41c> <== NOT EXECUTED c1a8: ebffe971 bl 6774 <_Objects_Get> <== NOT EXECUTED
/* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
c1ac: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED c1b0: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED c1b4: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
c1b8: ebffebca bl 70e8 <_Thread_Enable_dispatch> <== NOT EXECUTED c1bc: e1a02008 mov r2, r8 <== NOT EXECUTED c1c0: e5961030 ldr r1, [r6, #48] ; 0x30 <== NOT EXECUTED c1c4: e59f00c4 ldr r0, [pc, #196] ; c290 <fifo_open+0x41c> <== NOT EXECUTED c1c8: ebffe969 bl 6774 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
c1cc: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED c1d0: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED c1d4: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
c1d8: ebffebc2 bl 70e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z')
c1dc: e5da3000 ldrb r3, [sl] <== NOT EXECUTED c1e0: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED c1e4: e2833001 add r3, r3, #1 <== NOT EXECUTED c1e8: e5ca3000 strb r3, [sl] <== NOT EXECUTED
c = 'a';
c1ec: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED c1f0: 05ca3000 strbeq r3, [sl] <== NOT EXECUTED c1f4: eaffff2d b beb0 <fifo_open+0x3c> <== NOT EXECUTED
return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier);
c1f8: e5980030 ldr r0, [r8, #48] ; 0x30 <== NOT EXECUTED c1fc: eb000211 bl ca48 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
c200: e598002c ldr r0, [r8, #44] ; 0x2c <== NOT EXECUTED c204: eb00020f bl ca48 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
c208: e5980000 ldr r0, [r8] <== NOT EXECUTED c20c: ebffd633 bl 1ae0 <free> <== NOT EXECUTED c210: e3e0a003 mvn sl, #3 <== NOT EXECUTED
err_buf: free(pipe);
c214: e1a00008 mov r0, r8 <== NOT EXECUTED c218: ebffd630 bl 1ae0 <free> <== NOT EXECUTED c21c: eaffff2d b bed8 <fifo_open+0x64> <== NOT EXECUTED
break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe);
c220: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED c224: e28d1008 add r1, sp, #8 <== NOT EXECUTED c228: eb000220 bl cab0 <rtems_barrier_release> <== NOT EXECUTED c22c: eaffff91 b c078 <fifo_open+0x204> <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe);
c230: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED c234: e28d1008 add r1, sp, #8 <== NOT EXECUTED c238: eb00021c bl cab0 <rtems_barrier_release> <== NOT EXECUTED c23c: eaffff6c b bff4 <fifo_open+0x180> <== NOT EXECUTED
goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe);
c240: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED c244: e28d1008 add r1, sp, #8 <== NOT EXECUTED c248: eb000218 bl cab0 <rtems_barrier_release> <== NOT EXECUTED c24c: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED c250: eaffff41 b bf5c <fifo_open+0xe8> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier);
c254: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED c258: eb0001fa bl ca48 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
c25c: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED c260: eb0001f8 bl ca48 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
c264: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED c268: ebffe343 bl 4f7c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
c26c: e5960000 ldr r0, [r6] <== NOT EXECUTED c270: ebffd61a bl 1ae0 <free> <== NOT EXECUTED
free(pipe);
c274: e1a00006 mov r0, r6 <== NOT EXECUTED c278: ebffd618 bl 1ae0 <free> <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
c27c: e5950000 ldr r0, [r5] <== NOT EXECUTED c280: ebffe3ae bl 5140 <rtems_semaphore_release> <== NOT EXECUTED c284: eaffff23 b bf18 <fifo_open+0xa4> <== NOT EXECUTED
c288: 0001aca8 .word 0x0001aca8 c28c: 000196ec .word 0x000196ec c290: 0001b8f8 .word 0x0001b8f8
00027564 <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;
27564: e59f2044 ldr r2, [pc, #68] ; 275b0 <file_systems_below_this_mountpoint+0x4c><== NOT EXECUTED 27568: e4923004 ldr r3, [r2], #4 <== NOT EXECUTED 2756c: e1530002 cmp r3, r2 <== NOT EXECUTED 27570: 0a00000a beq 275a0 <file_systems_below_this_mountpoint+0x3c><== 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 ) {
27574: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 27578: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED 2757c: e1510000 cmp r1, r0 <== NOT EXECUTED 27580: 1a000003 bne 27594 <file_systems_below_this_mountpoint+0x30><== NOT EXECUTED 27584: ea000007 b 275a8 <file_systems_below_this_mountpoint+0x44> <== NOT EXECUTED 27588: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED 2758c: e1510000 cmp r1, r0 <== NOT EXECUTED 27590: 0a000004 beq 275a8 <file_systems_below_this_mountpoint+0x44><== 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 ) {
27594: e5933000 ldr r3, [r3] <== NOT EXECUTED
/* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
27598: e1530002 cmp r3, r2 <== NOT EXECUTED 2759c: 1afffff9 bne 27588 <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED 275a0: e3a00000 mov r0, #0 <== NOT EXECUTED
return true; } } return false; }
275a4: e12fff1e bx lr <== NOT EXECUTED
/* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
275a8: e3a00001 mov r0, #1 <== NOT EXECUTED 275ac: e12fff1e bx lr <== NOT EXECUTED
275b0: 00067410 .word 0x00067410
00002cd0 <fpathconf>: { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd);
2cd0: e59f3108 ldr r3, [pc, #264] ; 2de0 <fpathconf+0x110> 2cd4: e5933000 ldr r3, [r3] 2cd8: e1500003 cmp r0, r3
long fpathconf( int fd, int name ) {
2cdc: 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); 2ce0: 2a000034 bcs 2db8 <fpathconf+0xe8> iop = rtems_libio_iop(fd);
2ce4: e59f30f8 ldr r3, [pc, #248] ; 2de4 <fpathconf+0x114> 2ce8: e5933000 ldr r3, [r3] 2cec: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2cf0: e5903014 ldr r3, [r0, #20] 2cf4: e3130c01 tst r3, #256 ; 0x100
2cf8: 0a00002e beq 2db8 <fpathconf+0xe8> rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
2cfc: e3130002 tst r3, #2
2d00: 0a000031 beq 2dcc <fpathconf+0xfc> /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2d04: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
2d08: e351000b cmp r1, #11 2d0c: 979ff101 ldrls pc, [pc, r1, lsl #2] 2d10: ea00000d b 2d4c <fpathconf+0x7c>
2d14: 00002d60 .word 0x00002d60 <== NOT EXECUTED 2d18: 00002d68 .word 0x00002d68 <== NOT EXECUTED 2d1c: 00002d70 .word 0x00002d70 <== NOT EXECUTED 2d20: 00002d78 .word 0x00002d78 <== NOT EXECUTED 2d24: 00002d80 .word 0x00002d80 <== NOT EXECUTED 2d28: 00002d88 .word 0x00002d88 <== NOT EXECUTED 2d2c: 00002d90 .word 0x00002d90 <== NOT EXECUTED 2d30: 00002d98 .word 0x00002d98 <== NOT EXECUTED 2d34: 00002da0 .word 0x00002da0 <== NOT EXECUTED 2d38: 00002da8 .word 0x00002da8 <== NOT EXECUTED 2d3c: 00002db0 .word 0x00002db0 <== NOT EXECUTED 2d40: 00002d44 .word 0x00002d44 <== NOT EXECUTED
break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io;
2d44: e5930060 ldr r0, [r3, #96] ; 0x60
break;
2d48: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default: rtems_set_errno_and_return_minus_one( EINVAL );
2d4c: eb00361c bl 105c4 <__errno> 2d50: e3a03016 mov r3, #22 2d54: e5803000 str r3, [r0] 2d58: e3e00000 mvn r0, #0
break; } return return_value; }
2d5c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max;
2d60: e5930038 ldr r0, [r3, #56] ; 0x38
break;
2d64: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON: return_value = the_limits->max_canon;
2d68: e593003c ldr r0, [r3, #60] ; 0x3c
break;
2d6c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT: return_value = the_limits->max_input;
2d70: e5930040 ldr r0, [r3, #64] ; 0x40
break;
2d74: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX: return_value = the_limits->name_max;
2d78: e5930044 ldr r0, [r3, #68] ; 0x44
break;
2d7c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX: return_value = the_limits->path_max;
2d80: e5930048 ldr r0, [r3, #72] ; 0x48
break;
2d84: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF: return_value = the_limits->pipe_buf;
2d88: e593004c ldr r0, [r3, #76] ; 0x4c
break;
2d8c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions;
2d90: e5930054 ldr r0, [r3, #84] ; 0x54
break;
2d94: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc;
2d98: e5930058 ldr r0, [r3, #88] ; 0x58
break;
2d9c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE: return_value = the_limits->posix_vdisable;
2da0: e5930064 ldr r0, [r3, #100] ; 0x64
break;
2da4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO: return_value = the_limits->posix_async_io;
2da8: e5930050 ldr r0, [r3, #80] ; 0x50
break;
2dac: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO: return_value = the_limits->posix_prio_io;
2db0: e593005c ldr r0, [r3, #92] ; 0x5c
break;
2db4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop);
2db8: eb003601 bl 105c4 <__errno> 2dbc: e3a03009 mov r3, #9 2dc0: e5803000 str r3, [r0] 2dc4: e3e00000 mvn r0, #0 2dc8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
2dcc: eb0035fc bl 105c4 <__errno> <== NOT EXECUTED 2dd0: e3a03016 mov r3, #22 <== NOT EXECUTED 2dd4: e5803000 str r3, [r0] <== NOT EXECUTED 2dd8: e3e00000 mvn r0, #0 <== NOT EXECUTED 2ddc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
2de0: 0001d1e0 .word 0x0001d1e0 2de4: 0001ef14 .word 0x0001ef14
00001ae0 <free>: void free( void *ptr ) { MSBUMP(free_calls, 1);
1ae0: e59f3088 ldr r3, [pc, #136] ; 1b70 <free+0x90> 1ae4: e593200c ldr r2, [r3, #12] 1ae8: e92d4030 push {r4, r5, lr} 1aec: e2822001 add r2, r2, #1
if ( !ptr )
1af0: e2504000 subs r4, r0, #0
void free( void *ptr ) { MSBUMP(free_calls, 1);
1af4: e583200c str r2, [r3, #12]
if ( !ptr )
1af8: 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()) &&
1afc: e59f3070 ldr r3, [pc, #112] ; 1b74 <free+0x94> 1b00: e5933000 ldr r3, [r3] 1b04: e3530003 cmp r3, #3
1b08: 0a000012 beq 1b58 <free+0x78> #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
1b0c: e59f3064 ldr r3, [pc, #100] ; 1b78 <free+0x98> 1b10: e5933000 ldr r3, [r3] 1b14: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1b18: 11a00004 movne r0, r4 1b1c: 11a0e00f movne lr, pc 1b20: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
1b24: e59f5050 ldr r5, [pc, #80] ; 1b7c <free+0x9c> 1b28: e1a01004 mov r1, r4 1b2c: e5950000 ldr r0, [r5] 1b30: eb0013dc bl 6aa8 <_Protected_heap_Free> 1b34: e3500000 cmp r0, #0 1b38: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin,
1b3c: 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",
1b40: e59f0038 ldr r0, [pc, #56] ; 1b80 <free+0xa0> <== NOT EXECUTED 1b44: e2822018 add r2, r2, #24 <== NOT EXECUTED 1b48: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 1b4c: e1a01004 mov r1, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
1b50: 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",
1b54: ea000346 b 2874 <printk> <== NOT EXECUTED
/* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) &&
1b58: eb00003f bl 1c5c <malloc_is_system_state_OK> 1b5c: e3500000 cmp r0, #0
1b60: 1affffe9 bne 1b0c <free+0x2c> !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr);
1b64: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
1b68: 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);
1b6c: ea00004d b 1ca8 <malloc_deferred_free> <== NOT EXECUTED
1b70: 0001aea4 .word 0x0001aea4 1b74: 0001b1b0 .word 0x0001b1b0 1b78: 0001ab48 .word 0x0001ab48 1b7c: 000194cc .word 0x000194cc 1b80: 0001a618 .word 0x0001a618
00026ba4 <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
26ba4: e59f3058 ldr r3, [pc, #88] ; 26c04 <free_user_env+0x60> <== NOT EXECUTED 26ba8: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) {
26bac: e92d4010 push {r4, lr} <== NOT EXECUTED 26bb0: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env
26bb4: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory);
26bb8: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 26bbc: e3530000 cmp r3, #0 <== NOT EXECUTED 26bc0: 0a000004 beq 26bd8 <free_user_env+0x34> <== NOT EXECUTED 26bc4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26bc8: e3530000 cmp r3, #0 <== NOT EXECUTED 26bcc: 12800004 addne r0, r0, #4 <== NOT EXECUTED 26bd0: 11a0e00f movne lr, pc <== NOT EXECUTED 26bd4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
26bd8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 26bdc: e3530000 cmp r3, #0 <== NOT EXECUTED 26be0: 0a000004 beq 26bf8 <free_user_env+0x54> <== NOT EXECUTED 26be4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26be8: e3530000 cmp r3, #0 <== NOT EXECUTED 26bec: 12840018 addne r0, r4, #24 <== NOT EXECUTED 26bf0: 11a0e00f movne lr, pc <== NOT EXECUTED 26bf4: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
26bf8: e1a00004 mov r0, r4 <== NOT EXECUTED
} }
26bfc: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env);
26c00: eaff77f5 b 4bdc <free> <== NOT EXECUTED
26c04: 00067428 .word 0x00067428
00018a2c <fstat>: int fstat( int fd, struct stat *sbuf ) {
18a2c: e92d4030 push {r4, r5, lr}
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf )
18a30: e2515000 subs r5, r1, #0
18a34: 0a000023 beq 18ac8 <fstat+0x9c> /* * Now process the stat() request. */ iop = rtems_libio_iop( fd );
18a38: e59f309c ldr r3, [pc, #156] ; 18adc <fstat+0xb0> 18a3c: e5933000 ldr r3, [r3] 18a40: e1500003 cmp r0, r3
18a44: 2a000015 bcs 18aa0 <fstat+0x74>
18a48: e59f3090 ldr r3, [pc, #144] ; 18ae0 <fstat+0xb4> 18a4c: e5934000 ldr r4, [r3] 18a50: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
18a54: e5943014 ldr r3, [r4, #20] 18a58: e3130c01 tst r3, #256 ; 0x100
18a5c: 0a00000f beq 18aa0 <fstat+0x74> if ( !iop->handlers )
18a60: e594303c ldr r3, [r4, #60] ; 0x3c 18a64: e3530000 cmp r3, #0
18a68: 0a00000c beq 18aa0 <fstat+0x74> rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h )
18a6c: e5933018 ldr r3, [r3, #24] 18a70: e3530000 cmp r3, #0
18a74: 0a00000e beq 18ab4 <fstat+0x88> /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) );
18a78: e3a01000 mov r1, #0 18a7c: e3a02048 mov r2, #72 ; 0x48 18a80: e1a00005 mov r0, r5 18a84: ebffd6ac bl e53c <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
18a88: e2840018 add r0, r4, #24 18a8c: e1a01005 mov r1, r5 18a90: e594303c ldr r3, [r4, #60] ; 0x3c 18a94: e1a0e00f mov lr, pc 18a98: e593f018 ldr pc, [r3, #24]
}
18a9c: e8bd8030 pop {r4, r5, pc}
iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF );
18aa0: ebffd45b bl dc14 <__errno> 18aa4: e3a03009 mov r3, #9 18aa8: e5803000 str r3, [r0] 18aac: e3e00000 mvn r0, #0 18ab0: e8bd8030 pop {r4, r5, pc}
if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
18ab4: ebffd456 bl dc14 <__errno> <== NOT EXECUTED 18ab8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 18abc: e5803000 str r3, [r0] <== NOT EXECUTED 18ac0: e3e00000 mvn r0, #0 <== NOT EXECUTED 18ac4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT );
18ac8: ebffd451 bl dc14 <__errno> 18acc: e3a0300e mov r3, #14 18ad0: e5803000 str r3, [r0] 18ad4: e3e00000 mvn r0, #0 18ad8: e8bd8030 pop {r4, r5, pc} 18adc: 000194c0 .word 0x000194c0 18ae0: 0001ae8c .word 0x0001ae8c
00025898 <fsync>: int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd );
25898: e59f308c ldr r3, [pc, #140] ; 2592c <fsync+0x94> 2589c: e5933000 ldr r3, [r3] 258a0: e1500003 cmp r0, r3
#include <rtems/seterr.h> int fsync( int fd ) {
258a4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop; rtems_libio_check_fd( fd ); 258a8: 2a000010 bcs 258f0 <fsync+0x58> iop = rtems_libio_iop( fd );
258ac: e59f307c ldr r3, [pc, #124] ; 25930 <fsync+0x98> 258b0: e5933000 ldr r3, [r3] 258b4: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
258b8: e5903014 ldr r3, [r0, #20] 258bc: e3130c01 tst r3, #256 ; 0x100
258c0: 0a00000a beq 258f0 <fsync+0x58> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
258c4: e3130004 tst r3, #4
258c8: 0a00000d beq 25904 <fsync+0x6c> /* * Now process the fsync(). */ if ( !iop->handlers )
258cc: e590303c ldr r3, [r0, #60] ; 0x3c 258d0: e3530000 cmp r3, #0
258d4: 0a000005 beq 258f0 <fsync+0x58> rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h )
258d8: e5933028 ldr r3, [r3, #40] ; 0x28 258dc: e3530000 cmp r3, #0
258e0: 0a00000c beq 25918 <fsync+0x80> rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop );
258e4: e1a0e00f mov lr, pc 258e8: e12fff13 bx r3
}
258ec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF );
258f0: eb006584 bl 3ef08 <__errno> <== NOT EXECUTED 258f4: e3a03009 mov r3, #9 <== NOT EXECUTED 258f8: e5803000 str r3, [r0] <== NOT EXECUTED 258fc: e3e00000 mvn r0, #0 <== NOT EXECUTED 25900: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
25904: eb00657f bl 3ef08 <__errno> 25908: e3a03016 mov r3, #22 2590c: e5803000 str r3, [r0] 25910: e3e00000 mvn r0, #0 25914: e49df004 pop {pc} ; (ldr pc, [sp], #4)
if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
25918: eb00657a bl 3ef08 <__errno> 2591c: e3a03086 mov r3, #134 ; 0x86 25920: e5803000 str r3, [r0] 25924: e3e00000 mvn r0, #0 25928: e49df004 pop {pc} ; (ldr pc, [sp], #4) 2592c: 00059070 .word 0x00059070 25930: 000673cc .word 0x000673cc
00009a20 <ftruncate>: int ftruncate( int fd, off_t length ) {
9a20: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd );
9a24: e59f30f4 ldr r3, [pc, #244] ; 9b20 <ftruncate+0x100> 9a28: e5933000 ldr r3, [r3] 9a2c: e1500003 cmp r0, r3
int ftruncate( int fd, off_t length ) {
9a30: e24dd014 sub sp, sp, #20 9a34: e1a05001 mov r5, r1 9a38: e1a06002 mov r6, r2
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 9a3c: 2a000023 bcs 9ad0 <ftruncate+0xb0> iop = rtems_libio_iop( fd );
9a40: e59f30dc ldr r3, [pc, #220] ; 9b24 <ftruncate+0x104> 9a44: e5934000 ldr r4, [r3] 9a48: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
9a4c: e5943014 ldr r3, [r4, #20] 9a50: e3130c01 tst r3, #256 ; 0x100
9a54: 0a00001d beq 9ad0 <ftruncate+0xb0> /* * Make sure we are not working on a directory */ loc = iop->pathinfo;
9a58: e284c018 add ip, r4, #24 9a5c: e8bc000f ldm ip!, {r0, r1, r2, r3} 9a60: e1a0700d mov r7, sp 9a64: e8a7000f stmia r7!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
9a68: e59d200c ldr r2, [sp, #12]
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
9a6c: e1a03007 mov r3, r7
if ( !loc.ops->node_type_h )
9a70: e5927010 ldr r7, [r2, #16]
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
9a74: e59c2000 ldr r2, [ip]
if ( !loc.ops->node_type_h )
9a78: e3570000 cmp r7, #0
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
9a7c: e5832000 str r2, [r3]
if ( !loc.ops->node_type_h ) 9a80: 0a00001c beq 9af8 <ftruncate+0xd8> rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
9a84: e1a0000d mov r0, sp 9a88: e1a0e00f mov lr, pc 9a8c: e12fff17 bx r7 9a90: e3500001 cmp r0, #1
9a94: 0a00001c beq 9b0c <ftruncate+0xec> rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
9a98: e5943014 ldr r3, [r4, #20] 9a9c: e3130004 tst r3, #4
9aa0: 0a00000f beq 9ae4 <ftruncate+0xc4> if ( !iop->handlers->ftruncate_h )
9aa4: e594303c ldr r3, [r4, #60] ; 0x3c 9aa8: e5933020 ldr r3, [r3, #32] 9aac: e3530000 cmp r3, #0
9ab0: 0a000010 beq 9af8 <ftruncate+0xd8> rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length );
9ab4: e1a00004 mov r0, r4 9ab8: e1a01005 mov r1, r5 9abc: e1a02006 mov r2, r6 9ac0: e1a0e00f mov lr, pc 9ac4: e12fff13 bx r3
}
9ac8: e28dd014 add sp, sp, #20 9acc: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
9ad0: eb00104f bl dc14 <__errno> <== NOT EXECUTED 9ad4: e3a03009 mov r3, #9 <== NOT EXECUTED 9ad8: e5803000 str r3, [r0] <== NOT EXECUTED 9adc: e3e00000 mvn r0, #0 <== NOT EXECUTED 9ae0: eafffff8 b 9ac8 <ftruncate+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
9ae4: eb00104a bl dc14 <__errno> <== NOT EXECUTED 9ae8: e3a03016 mov r3, #22 <== NOT EXECUTED 9aec: e5803000 str r3, [r0] <== NOT EXECUTED 9af0: e3e00000 mvn r0, #0 <== NOT EXECUTED 9af4: eafffff3 b 9ac8 <ftruncate+0xa8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
9af8: eb001045 bl dc14 <__errno> <== NOT EXECUTED 9afc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9b00: e5803000 str r3, [r0] <== NOT EXECUTED 9b04: e3e00000 mvn r0, #0 <== NOT EXECUTED 9b08: eaffffee b 9ac8 <ftruncate+0xa8> <== NOT EXECUTED
loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR );
9b0c: eb001040 bl dc14 <__errno> 9b10: e3a03015 mov r3, #21 9b14: e5803000 str r3, [r0] 9b18: e3e00000 mvn r0, #0 9b1c: eaffffe9 b 9ac8 <ftruncate+0xa8> 9b20: 000194c0 .word 0x000194c0 9b24: 0001ae8c .word 0x0001ae8c
00058a14 <getdents>: /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
58a14: e59f30b8 ldr r3, [pc, #184] ; 58ad4 <getdents+0xc0> 58a18: e5933000 ldr r3, [r3] 58a1c: e1500003 cmp r0, r3 58a20: 359f30b0 ldrcc r3, [pc, #176] ; 58ad8 <getdents+0xc4>
int getdents( int dd_fd, char *dd_buf, int dd_len ) {
58a24: e92d40f0 push {r4, r5, r6, r7, lr}
/* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
58a28: 35934000 ldrcc r4, [r3] 58a2c: 23a04000 movcs r4, #0 58a30: 30844300 addcc r4, r4, r0, lsl #6
/* * Make sure we are working on a directory */ loc = iop->pathinfo;
58a34: e284c018 add ip, r4, #24
int getdents( int dd_fd, char *dd_buf, int dd_len ) {
58a38: e24dd014 sub sp, sp, #20 58a3c: e1a06001 mov r6, r1 58a40: e1a05002 mov r5, r2
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
58a44: e8bc000f ldm ip!, {r0, r1, r2, r3} 58a48: e1a0700d mov r7, sp 58a4c: e8a7000f stmia r7!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
58a50: e59d200c ldr r2, [sp, #12]
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
58a54: e1a03007 mov r3, r7
if ( !loc.ops->node_type_h )
58a58: e5927010 ldr r7, [r2, #16]
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
58a5c: e59c2000 ldr r2, [ip]
if ( !loc.ops->node_type_h )
58a60: e3570000 cmp r7, #0
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
58a64: e5832000 str r2, [r3]
if ( !loc.ops->node_type_h ) 58a68: 0a000014 beq 58ac0 <getdents+0xac> rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
58a6c: e1a0000d mov r0, sp 58a70: e1a0e00f mov lr, pc 58a74: e12fff17 bx r7 58a78: e3500001 cmp r0, #1
58a7c: 1a00000a bne 58aac <getdents+0x98> /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h )
58a80: e594303c ldr r3, [r4, #60] ; 0x3c 58a84: e5933008 ldr r3, [r3, #8] 58a88: e3530000 cmp r3, #0
58a8c: 0a00000b beq 58ac0 <getdents+0xac> rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
58a90: e1a00004 mov r0, r4 58a94: e1a01006 mov r1, r6 58a98: e1a02005 mov r2, r5 58a9c: e1a0e00f mov lr, pc 58aa0: e12fff13 bx r3
}
58aa4: e28dd014 add sp, sp, #20 58aa8: e8bd80f0 pop {r4, r5, r6, r7, pc}
loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
58aac: ebff9915 bl 3ef08 <__errno> 58ab0: e3a03014 mov r3, #20 58ab4: e5803000 str r3, [r0] 58ab8: e3e00000 mvn r0, #0 58abc: eafffff8 b 58aa4 <getdents+0x90>
* Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
58ac0: ebff9910 bl 3ef08 <__errno> <== NOT EXECUTED 58ac4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 58ac8: e5803000 str r3, [r0] <== NOT EXECUTED 58acc: e3e00000 mvn r0, #0 <== NOT EXECUTED 58ad0: eafffff3 b 58aa4 <getdents+0x90> <== NOT EXECUTED
58ad4: 00059070 .word 0x00059070 58ad8: 000673cc .word 0x000673cc
00025a64 <getgid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) {
25a64: e59f3008 ldr r3, [pc, #8] ; 25a74 <getgid+0x10> <== NOT EXECUTED 25a68: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Gid; }
25a6c: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 25a70: e12fff1e bx lr <== NOT EXECUTED
25a74: 00059348 .word 0x00059348
000260d0 <getgr_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
260d0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 260d4: e59d801c ldr r8, [sp, #28] 260d8: e1a05000 mov r5, r0 260dc: e1a0a001 mov sl, r1 260e0: e1a04002 mov r4, r2 260e4: e1a07003 mov r7, r3
FILE *fp; int match; init_etc_passwd_group();
260e8: ebffffb2 bl 25fb8 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
260ec: e59f00b0 ldr r0, [pc, #176] ; 261a4 <getgr_r+0xd4> 260f0: e59f10b0 ldr r1, [pc, #176] ; 261a8 <getgr_r+0xd8> 260f4: eb0065f3 bl 3f8c8 <fopen> 260f8: e2506000 subs r6, r0, #0
260fc: 1a000006 bne 2611c <getgr_r+0x4c>
26100: ea000022 b 26190 <getgr_r+0xc0> <== NOT EXECUTED
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0);
26104: e5940000 ldr r0, [r4] 26108: eb007ba1 bl 44f94 <strcmp> 2610c: e2700001 rsbs r0, r0, #1 26110: 33a00000 movcc r0, #0
} else { match = (grp->gr_gid == gid); } if (match) {
26114: e3500000 cmp r0, #0
26118: 1a00000f bne 2615c <getgr_r+0x8c> if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) {
2611c: e1a01004 mov r1, r4 26120: e1a02007 mov r2, r7 26124: e1a03008 mov r3, r8 26128: e1a00006 mov r0, r6 2612c: ebfffee1 bl 25cb8 <scangr> 26130: e3500000 cmp r0, #0
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0);
26134: e1a01005 mov r1, r5
if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 26138: 0a00000d beq 26174 <getgr_r+0xa4> errno = EINVAL; fclose(fp); return -1; } if (name) {
2613c: e3550000 cmp r5, #0
26140: 1affffef bne 26104 <getgr_r+0x34> match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid);
26144: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 26148: e150000a cmp r0, sl <== NOT EXECUTED 2614c: 13a00000 movne r0, #0 <== NOT EXECUTED 26150: 03a00001 moveq r0, #1 <== NOT EXECUTED
} if (match) {
26154: e3500000 cmp r0, #0 <== NOT EXECUTED 26158: 0affffef beq 2611c <getgr_r+0x4c> <== NOT EXECUTED
fclose(fp);
2615c: e1a00006 mov r0, r6 26160: eb0063b5 bl 3f03c <fclose>
*result = grp;
26164: e59d3020 ldr r3, [sp, #32] 26168: e3a00000 mov r0, #0 2616c: e5834000 str r4, [r3]
} } fclose(fp); errno = EINVAL; return -1; }
26170: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL;
26174: eb006363 bl 3ef08 <__errno> <== NOT EXECUTED 26178: e3a03016 mov r3, #22 <== NOT EXECUTED 2617c: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
26180: e1a00006 mov r0, r6 <== NOT EXECUTED 26184: eb0063ac bl 3f03c <fclose> <== NOT EXECUTED 26188: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
2618c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL;
26190: eb00635c bl 3ef08 <__errno> <== NOT EXECUTED 26194: e3a03016 mov r3, #22 <== NOT EXECUTED 26198: e5803000 str r3, [r0] <== NOT EXECUTED 2619c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
261a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
261a4: 0005d574 .word 0x0005d574 261a8: 00062d78 .word 0x00062d78
00025e0c <getgrent>: return NULL; return p; } struct group *getgrent(void) {
25e0c: e92d4010 push {r4, lr} <== NOT EXECUTED
if (group_fp == NULL)
25e10: e59f4030 ldr r4, [pc, #48] ; 25e48 <getgrent+0x3c> <== NOT EXECUTED 25e14: e5940000 ldr r0, [r4] <== NOT EXECUTED 25e18: e3500000 cmp r0, #0 <== NOT EXECUTED 25e1c: 1a000001 bne 25e28 <getgrent+0x1c> <== NOT EXECUTED
return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
25e20: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL; return &grent; }
25e24: e8bd8010 pop {r4, pc} <== NOT EXECUTED
struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
25e28: e2841008 add r1, r4, #8 <== NOT EXECUTED 25e2c: e2842018 add r2, r4, #24 <== NOT EXECUTED 25e30: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25e34: ebffff9f bl 25cb8 <scangr> <== NOT EXECUTED 25e38: e3500000 cmp r0, #0 <== NOT EXECUTED 25e3c: 12840008 addne r0, r4, #8 <== NOT EXECUTED 25e40: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25e44: eafffff5 b 25e20 <getgrent+0x14> <== NOT EXECUTED
25e48: 00066f80 .word 0x00066f80
000261e8 <getgrgid>: struct group *getgrgid( gid_t gid ) {
261e8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
261ec: e59f1030 ldr r1, [pc, #48] ; 26224 <getgrgid+0x3c> <== NOT EXECUTED
} struct group *getgrgid( gid_t gid ) {
261f0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 261f4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
261f8: e28dc004 add ip, sp, #4 <== NOT EXECUTED 261fc: e2812010 add r2, r1, #16 <== NOT EXECUTED 26200: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 26204: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 26208: e58dc000 str ip, [sp] <== NOT EXECUTED 2620c: ebffffe6 bl 261ac <getgrgid_r> <== NOT EXECUTED 26210: e3500000 cmp r0, #0 <== NOT EXECUTED 26214: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL; return p;
26218: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
2621c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 26220: e8bd8000 pop {pc} <== NOT EXECUTED
26224: 00066f88 .word 0x00066f88
000261ac <getgrgid_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
261ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 261b0: e1a0c002 mov ip, r2 <== NOT EXECUTED 261b4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 261b8: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
261bc: e58d3000 str r3, [sp] <== NOT EXECUTED
struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
261c0: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
261c4: e1a0300c mov r3, ip <== NOT EXECUTED 261c8: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 261cc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 261d0: e1a0200e mov r2, lr <== NOT EXECUTED 261d4: e3a00000 mov r0, #0 <== NOT EXECUTED 261d8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 261dc: ebffffbb bl 260d0 <getgr_r> <== NOT EXECUTED
}
261e0: e28dd008 add sp, sp, #8 <== NOT EXECUTED 261e4: e8bd8000 pop {pc} <== NOT EXECUTED
000262c8 <getpw_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
262c8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 262cc: e59d801c ldr r8, [sp, #28] 262d0: e1a05000 mov r5, r0 262d4: e1a0a001 mov sl, r1 262d8: e1a04002 mov r4, r2 262dc: e1a07003 mov r7, r3
FILE *fp; int match; init_etc_passwd_group();
262e0: ebffff34 bl 25fb8 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
262e4: e59f00b0 ldr r0, [pc, #176] ; 2639c <getpw_r+0xd4> 262e8: e59f10b0 ldr r1, [pc, #176] ; 263a0 <getpw_r+0xd8> 262ec: eb006575 bl 3f8c8 <fopen> 262f0: e2506000 subs r6, r0, #0
262f4: 1a000006 bne 26314 <getpw_r+0x4c>
262f8: ea000022 b 26388 <getpw_r+0xc0> <== NOT EXECUTED
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0);
262fc: e5940000 ldr r0, [r4] 26300: eb007b23 bl 44f94 <strcmp> 26304: e2700001 rsbs r0, r0, #1 26308: 33a00000 movcc r0, #0
} else { match = (pwd->pw_uid == uid); } if (match) {
2630c: e3500000 cmp r0, #0
26310: 1a00000f bne 26354 <getpw_r+0x8c> if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) {
26314: e1a01004 mov r1, r4 26318: e1a02007 mov r2, r7 2631c: e1a03008 mov r3, r8 26320: e1a00006 mov r0, r6 26324: ebfffec8 bl 25e4c <scanpw> 26328: e3500000 cmp r0, #0
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0);
2632c: e1a01005 mov r1, r5
if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 26330: 0a00000d beq 2636c <getpw_r+0xa4> errno = EINVAL; fclose(fp); return -1; } if (name) {
26334: e3550000 cmp r5, #0
26338: 1affffef bne 262fc <getpw_r+0x34> match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid);
2633c: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 26340: e150000a cmp r0, sl <== NOT EXECUTED 26344: 13a00000 movne r0, #0 <== NOT EXECUTED 26348: 03a00001 moveq r0, #1 <== NOT EXECUTED
} if (match) {
2634c: e3500000 cmp r0, #0 <== NOT EXECUTED 26350: 0affffef beq 26314 <getpw_r+0x4c> <== NOT EXECUTED
fclose(fp);
26354: e1a00006 mov r0, r6 26358: eb006337 bl 3f03c <fclose>
*result = pwd;
2635c: e59d3020 ldr r3, [sp, #32] 26360: e3a00000 mov r0, #0 26364: e5834000 str r4, [r3]
} } fclose(fp); errno = EINVAL; return -1; }
26368: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL;
2636c: eb0062e5 bl 3ef08 <__errno> <== NOT EXECUTED 26370: e3a03016 mov r3, #22 <== NOT EXECUTED 26374: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
26378: e1a00006 mov r0, r6 <== NOT EXECUTED 2637c: eb00632e bl 3f03c <fclose> <== NOT EXECUTED 26380: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
26384: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL;
26388: eb0062de bl 3ef08 <__errno> <== NOT EXECUTED 2638c: e3a03016 mov r3, #22 <== NOT EXECUTED 26390: e5803000 str r3, [r0] <== NOT EXECUTED 26394: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
26398: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
2639c: 0005d4c4 .word 0x0005d4c4 263a0: 00062d78 .word 0x00062d78
00025f78 <getpwent>: return NULL; return p; } struct passwd *getpwent(void) {
25f78: e92d4010 push {r4, lr} <== NOT EXECUTED
if (passwd_fp == NULL)
25f7c: e59f4030 ldr r4, [pc, #48] ; 25fb4 <getpwent+0x3c> <== NOT EXECUTED 25f80: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 25f84: e3500000 cmp r0, #0 <== NOT EXECUTED 25f88: 1a000001 bne 25f94 <getpwent+0x1c> <== NOT EXECUTED
return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
25f8c: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL; return &pwent; }
25f90: e8bd8010 pop {r4, pc} <== NOT EXECUTED
struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
25f94: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 25f98: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 25f9c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25fa0: ebffffa9 bl 25e4c <scanpw> <== NOT EXECUTED 25fa4: e3500000 cmp r0, #0 <== NOT EXECUTED 25fa8: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 25fac: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25fb0: eafffff5 b 25f8c <getpwent+0x14> <== NOT EXECUTED
25fb4: 00066f80 .word 0x00066f80
000263e0 <getpwuid>: struct passwd *getpwuid( uid_t uid ) {
263e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
263e4: e59f1030 ldr r1, [pc, #48] ; 2641c <getpwuid+0x3c> <== NOT EXECUTED
} struct passwd *getpwuid( uid_t uid ) {
263e8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 263ec: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
263f0: e28dc004 add ip, sp, #4 <== NOT EXECUTED 263f4: e281201c add r2, r1, #28 <== NOT EXECUTED 263f8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 263fc: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 26400: e58dc000 str ip, [sp] <== NOT EXECUTED 26404: ebffffe6 bl 263a4 <getpwuid_r> <== NOT EXECUTED 26408: e3500000 cmp r0, #0 <== NOT EXECUTED 2640c: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL; return p;
26410: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
26414: e28dd008 add sp, sp, #8 <== NOT EXECUTED 26418: e8bd8000 pop {pc} <== NOT EXECUTED
2641c: 00067060 .word 0x00067060
000263a4 <getpwuid_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
263a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 263a8: e1a0c002 mov ip, r2 <== NOT EXECUTED 263ac: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 263b0: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
263b4: e58d3000 str r3, [sp] <== NOT EXECUTED
struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
263b8: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
263bc: e1a0300c mov r3, ip <== NOT EXECUTED 263c0: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 263c4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 263c8: e1a0200e mov r2, lr <== NOT EXECUTED 263cc: e3a00000 mov r0, #0 <== NOT EXECUTED 263d0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 263d4: ebffffbb bl 262c8 <getpw_r> <== NOT EXECUTED
}
263d8: e28dd008 add sp, sp, #8 <== NOT EXECUTED 263dc: e8bd8000 pop {pc} <== NOT EXECUTED
00009b50 <gettimeofday>: */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) {
9b50: e92d4030 push {r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) {
9b54: e2504000 subs r4, r0, #0
*/ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) {
9b58: e24dd008 sub sp, sp, #8
/* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 9b5c: 0a00000f beq 9ba0 <gettimeofday+0x50> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
9b60: e10f5000 mrs r5, CPSR 9b64: e3853080 orr r3, r5, #128 ; 0x80 9b68: e129f003 msr CPSR_fc, r3
ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now );
9b6c: e1a0000d mov r0, sp 9b70: eb00047c bl ad68 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
9b74: e129f005 msr CPSR_fc, r5
useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds;
9b78: e59f2034 ldr r2, [pc, #52] ; 9bb4 <gettimeofday+0x64>
_ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec;
9b7c: e59d3004 ldr r3, [sp, #4]
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds;
9b80: e0c10392 smull r0, r1, r2, r3
_ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec;
9b84: e59d2000 ldr r2, [sp]
time->tv_usec = useconds;
9b88: e1a03fc3 asr r3, r3, #31 9b8c: e0633341 rsb r3, r3, r1, asr #6 9b90: e884000c stm r4, {r2, r3} 9b94: 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; }
9b98: e28dd008 add sp, sp, #8 9b9c: e8bd8030 pop {r4, r5, pc}
void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT;
9ba0: eb00101b bl dc14 <__errno> <== NOT EXECUTED 9ba4: e3a0300e mov r3, #14 <== NOT EXECUTED 9ba8: e5803000 str r3, [r0] <== NOT EXECUTED 9bac: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
9bb0: eafffff8 b 9b98 <gettimeofday+0x48> <== NOT EXECUTED
9bb4: 10624dd3 .word 0x10624dd3
00004cf8 <getuid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) {
4cf8: e59f3008 ldr r3, [pc, #8] ; 4d08 <getuid+0x10> <== NOT EXECUTED 4cfc: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Uid; }
4d00: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 4d04: e12fff1e bx lr <== NOT EXECUTED
4d08: 00059348 .word 0x00059348
000056b4 <ioctl>: int ioctl( int fd, ioctl_command_t command, ... ) {
56b4: e92d000e push {r1, r2, r3}
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd );
56b8: e59f3090 ldr r3, [pc, #144] ; 5750 <ioctl+0x9c>
int ioctl( int fd, ioctl_command_t command, ... ) {
56bc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd );
56c0: e5933000 ldr r3, [r3] 56c4: e1500003 cmp r0, r3
int ioctl( int fd, ioctl_command_t command, ... ) {
56c8: e24dd004 sub sp, sp, #4
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 56cc: 2a000015 bcs 5728 <ioctl+0x74> iop = rtems_libio_iop( fd );
56d0: e59f307c ldr r3, [pc, #124] ; 5754 <ioctl+0xa0> 56d4: e5933000 ldr r3, [r3] 56d8: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
56dc: e5903014 ldr r3, [r0, #20] 56e0: e3130c01 tst r3, #256 ; 0x100
56e4: 0a00000f beq 5728 <ioctl+0x74> /* * Now process the ioctl(). */ if ( !iop->handlers )
56e8: 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 *);
56ec: e28d2010 add r2, sp, #16
/* * Now process the ioctl(). */ if ( !iop->handlers )
56f0: e3530000 cmp r3, #0
iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *);
56f4: e58d2000 str r2, [sp] 56f8: e59d200c ldr r2, [sp, #12]
/* * Now process the ioctl(). */ if ( !iop->handlers ) 56fc: 0a000009 beq 5728 <ioctl+0x74> rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h )
5700: e5933010 ldr r3, [r3, #16] 5704: e3530000 cmp r3, #0
5708: 0a00000b beq 573c <ioctl+0x88> rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
570c: e59d1008 ldr r1, [sp, #8] 5710: e1a0e00f mov lr, pc 5714: e12fff13 bx r3
return rc; }
5718: e28dd004 add sp, sp, #4 571c: e49de004 pop {lr} ; (ldr lr, [sp], #4) 5720: e28dd00c add sp, sp, #12 5724: e12fff1e bx lr
/* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF );
5728: eb0037b4 bl 13600 <__errno> 572c: e3a03009 mov r3, #9 5730: e5803000 str r3, [r0] 5734: e3e00000 mvn r0, #0 5738: eafffff6 b 5718 <ioctl+0x64>
if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
573c: eb0037af bl 13600 <__errno> <== NOT EXECUTED 5740: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5744: e5803000 str r3, [r0] <== NOT EXECUTED 5748: e3e00000 mvn r0, #0 <== NOT EXECUTED 574c: eafffff1 b 5718 <ioctl+0x64> <== NOT EXECUTED
5750: 0001f390 .word 0x0001f390 5754: 0002115c .word 0x0002115c
000033ac <iproc>: * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP)
33ac: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 33b0: e3130020 tst r3, #32 <== NOT EXECUTED
/* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) {
33b4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 33b8: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f;
33bc: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
33c0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) {
33c4: e1a05001 mov r5, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC)
33c8: 0a000007 beq 33ec <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
33cc: e59f2198 ldr r2, [pc, #408] ; 356c <iproc+0x1c0> <== NOT EXECUTED 33d0: e5922000 ldr r2, [r2] <== NOT EXECUTED 33d4: e0822004 add r2, r2, r4 <== NOT EXECUTED 33d8: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 33dc: e2022003 and r2, r2, #3 <== NOT EXECUTED 33e0: e3520001 cmp r2, #1 <== NOT EXECUTED 33e4: 02844020 addeq r4, r4, #32 <== NOT EXECUTED 33e8: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
33ec: e354000d cmp r4, #13 <== NOT EXECUTED 33f0: 0a000012 beq 3440 <iproc+0x94> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
33f4: e354000a cmp r4, #10 <== NOT EXECUTED 33f8: 0a000034 beq 34d0 <iproc+0x124> <== NOT EXECUTED
c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
33fc: e3540000 cmp r4, #0 <== NOT EXECUTED 3400: 1a000015 bne 345c <iproc+0xb0> <== NOT EXECUTED
} /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) {
3404: e59f3164 ldr r3, [pc, #356] ; 3570 <iproc+0x1c4> <== NOT EXECUTED 3408: e5932000 ldr r2, [r3] <== NOT EXECUTED 340c: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 3410: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3414: e1530002 cmp r3, r2 <== NOT EXECUTED 3418: aa00000a bge 3448 <iproc+0x9c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
341c: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED 3420: e3120008 tst r2, #8 <== NOT EXECUTED 3424: 1a00002c bne 34dc <iproc+0x130> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
3428: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 342c: e2832001 add r2, r3, #1 <== NOT EXECUTED 3430: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 3434: e3a00000 mov r0, #0 <== NOT EXECUTED 3438: e5852020 str r2, [r5, #32] <== NOT EXECUTED 343c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR)
3440: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 3444: 0a000001 beq 3450 <iproc+0xa4> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c;
3448: e3a00000 mov r0, #0 <== NOT EXECUTED
} return 0; }
344c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL)
3450: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3454: 03a0400d moveq r4, #13 <== NOT EXECUTED 3458: 13a0400a movne r4, #10 <== NOT EXECUTED
c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
345c: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED 3460: e3130002 tst r3, #2 <== NOT EXECUTED 3464: 0affffe6 beq 3404 <iproc+0x58> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
3468: e5d52043 ldrb r2, [r5, #67] ; 0x43 <== NOT EXECUTED 346c: e1520004 cmp r2, r4 <== NOT EXECUTED 3470: 0a000038 beq 3558 <iproc+0x1ac> <== NOT EXECUTED
erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) {
3474: e5d52044 ldrb r2, [r5, #68] ; 0x44 <== NOT EXECUTED 3478: e1520004 cmp r2, r4 <== NOT EXECUTED 347c: 0a000030 beq 3544 <iproc+0x198> <== NOT EXECUTED
erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) {
3480: e5d52045 ldrb r2, [r5, #69] ; 0x45 <== NOT EXECUTED 3484: e1520004 cmp r2, r4 <== NOT EXECUTED 3488: 0a000027 beq 352c <iproc+0x180> <== NOT EXECUTED
return 1; } else if (c == '\n') {
348c: e354000a cmp r4, #10 <== NOT EXECUTED 3490: 0a00001b beq 3504 <iproc+0x158> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL])
3494: e5d5204c ldrb r2, [r5, #76] ; 0x4c <== NOT EXECUTED 3498: e1520004 cmp r2, r4 <== NOT EXECUTED 349c: 0a000002 beq 34ac <iproc+0x100> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
34a0: e5d52051 ldrb r2, [r5, #81] ; 0x51 <== NOT EXECUTED 34a4: e1520004 cmp r2, r4 <== NOT EXECUTED 34a8: 1affffd5 bne 3404 <iproc+0x58> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
34ac: e3130008 tst r3, #8 <== NOT EXECUTED 34b0: 1a00001f bne 3534 <iproc+0x188> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
34b4: e285101c add r1, r5, #28 <== NOT EXECUTED 34b8: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 34bc: e2832001 add r2, r3, #1 <== NOT EXECUTED 34c0: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 34c4: e3a00001 mov r0, #1 <== NOT EXECUTED 34c8: e5852020 str r2, [r5, #32] <== NOT EXECUTED
return 1;
34cc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
34d0: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 34d4: 13a0400d movne r4, #13 <== NOT EXECUTED 34d8: eaffffdf b 345c <iproc+0xb0> <== NOT EXECUTED
/* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty);
34dc: e1a00004 mov r0, r4 <== NOT EXECUTED 34e0: e1a01005 mov r1, r5 <== NOT EXECUTED 34e4: ebffff0b bl 3118 <echo> <== NOT EXECUTED 34e8: e285101c add r1, r5, #28 <== NOT EXECUTED 34ec: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
34f0: e2832001 add r2, r3, #1 <== NOT EXECUTED 34f4: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 34f8: e3a00000 mov r0, #0 <== NOT EXECUTED 34fc: e5852020 str r2, [r5, #32] <== NOT EXECUTED 3500: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
} else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL))
3504: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
3508: 11a00004 movne r0, r4 <== NOT EXECUTED 350c: 11a01005 movne r1, r5 <== NOT EXECUTED 3510: 1bffff00 blne 3118 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3514: e285101c add r1, r5, #28 <== NOT EXECUTED 3518: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 351c: e2832001 add r2, r3, #1 <== NOT EXECUTED 3520: e3a0000a mov r0, #10 <== NOT EXECUTED 3524: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 3528: e5852020 str r2, [r5, #32] <== NOT EXECUTED 352c: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
3530: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
} else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty);
3534: e1a00004 mov r0, r4 <== NOT EXECUTED 3538: e1a01005 mov r1, r5 <== NOT EXECUTED 353c: ebfffef5 bl 3118 <echo> <== NOT EXECUTED 3540: eaffffdb b 34b4 <iproc+0x108> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1);
3544: e1a00005 mov r0, r5 <== NOT EXECUTED 3548: e3a01001 mov r1, #1 <== NOT EXECUTED 354c: ebffff13 bl 31a0 <erase> <== NOT EXECUTED 3550: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
3554: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0);
3558: e1a00005 mov r0, r5 <== NOT EXECUTED 355c: e3a01000 mov r1, #0 <== NOT EXECUTED 3560: ebffff0e bl 31a0 <erase> <== NOT EXECUTED 3564: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
3568: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
356c: 00019700 .word 0x00019700 3570: 00019644 .word 0x00019644
0000d580 <killinfo>: int killinfo( pid_t pid, int sig, const union sigval *value ) {
d580: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} d584: e24dd00c sub sp, sp, #12 d588: e1a04000 mov r4, r0 d58c: e1a05001 mov r5, r1 d590: e1a08002 mov r8, r2
POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() )
d594: ebfffc1d bl c610 <getpid> d598: e1500004 cmp r0, r4
d59c: 1a000095 bne d7f8 <killinfo+0x278> rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig )
d5a0: e3550000 cmp r5, #0
d5a4: 0a000098 beq d80c <killinfo+0x28c> static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 );
d5a8: e2453001 sub r3, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) )
d5ac: e353001f cmp r3, #31
d5b0: 8a000095 bhi d80c <killinfo+0x28c> rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
d5b4: e59f627c ldr r6, [pc, #636] ; d838 <killinfo+0x2b8> d5b8: e1a07085 lsl r7, r5, #1 d5bc: e0872005 add r2, r7, r5 d5c0: e0862102 add r2, r6, r2, lsl #2 d5c4: e5922008 ldr r2, [r2, #8] d5c8: e3520001 cmp r2, #1
d5cc: 0a000039 beq d6b8 <killinfo+0x138> /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
d5d0: e3550008 cmp r5, #8 d5d4: 13550004 cmpne r5, #4
d5d8: 0a000039 beq d6c4 <killinfo+0x144>
d5dc: e355000b cmp r5, #11
d5e0: 0a000037 beq d6c4 <killinfo+0x144> static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1);
d5e4: e3a04001 mov r4, #1
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER;
d5e8: e58d4004 str r4, [sp, #4]
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig;
d5ec: e58d5000 str r5, [sp]
siginfo->si_code = SI_USER; if ( !value ) {
d5f0: e3580000 cmp r8, #0 d5f4: e1a04314 lsl r4, r4, r3
siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value;
d5f8: 15983000 ldrne r3, [r8] d5fc: 158d3008 strne r3, [sp, #8] d600: e59f3234 ldr r3, [pc, #564] ; d83c <killinfo+0x2bc> d604: e5932000 ldr r2, [r3] d608: e2822001 add r2, r2, #1
*/ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0;
d60c: 058d8008 streq r8, [sp, #8] d610: e5832000 str r2, [r3]
/* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing;
d614: e59f3224 ldr r3, [pc, #548] ; d840 <killinfo+0x2c0> d618: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
d61c: e5903108 ldr r3, [r0, #264] ; 0x108 d620: e59330cc ldr r3, [r3, #204] ; 0xcc d624: e1d43003 bics r3, r4, r3
d628: 1a000014 bne d680 <killinfo+0x100> /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ;
d62c: e59f1210 ldr r1, [pc, #528] ; d844 <killinfo+0x2c4> d630: e4913004 ldr r3, [r1], #4 d634: e1530001 cmp r3, r1
d638: 0a000036 beq d718 <killinfo+0x198> #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
d63c: e5932030 ldr r2, [r3, #48] ; 0x30 d640: e1140002 tst r4, r2
for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node;
d644: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
d648: e5932108 ldr r2, [r3, #264] ; 0x108
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) d64c: 0a000008 beq d674 <killinfo+0xf4>
d650: ea00000a b d680 <killinfo+0x100>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) {
d654: e5933000 ldr r3, [r3]
/* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ;
d658: e1530001 cmp r3, r1
d65c: 0a00002d beq d718 <killinfo+0x198> #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
d660: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED d664: e1140002 tst r4, r2 <== NOT EXECUTED
for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node;
d668: e1a00003 mov r0, r3 <== NOT EXECUTED
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
d66c: e5932108 ldr r2, [r3, #264] ; 0x108 <== NOT EXECUTED
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
d670: 1a000002 bne d680 <killinfo+0x100> <== NOT EXECUTED
/* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask)
d674: e59220cc ldr r2, [r2, #204] ; 0xcc d678: e1d42002 bics r2, r4, r2
d67c: 0afffff4 beq d654 <killinfo+0xd4> * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true;
d680: e3a03001 mov r3, #1 d684: e5c03074 strb r3, [r0, #116] ; 0x74
/* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
d688: e1a01005 mov r1, r5 d68c: e1a0200d mov r2, sp d690: eb0000a5 bl d92c <_POSIX_signals_Unblock_thread> d694: e3500000 cmp r0, #0
d698: 1a00001b bne d70c <killinfo+0x18c> * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
d69c: e0875005 add r5, r7, r5
/* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask );
d6a0: e1a00004 mov r0, r4 d6a4: eb00008e bl d8e4 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
d6a8: e7963105 ldr r3, [r6, r5, lsl #2] d6ac: e3530002 cmp r3, #2
d6b0: 0a000007 beq d6d4 <killinfo+0x154> _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch();
d6b4: ebffe68b bl 70e8 <_Thread_Enable_dispatch> d6b8: e3a00000 mov r0, #0
return 0; }
d6bc: e28dd00c add sp, sp, #12 d6c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig );
d6c4: eb000123 bl db58 <pthread_self> d6c8: e1a01005 mov r1, r5 d6cc: eb0000e3 bl da60 <pthread_kill> d6d0: eafffff9 b d6bc <killinfo+0x13c>
*/ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *)
d6d4: e59f016c ldr r0, [pc, #364] ; d848 <killinfo+0x2c8> d6d8: ebffe0c4 bl 59f0 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) {
d6dc: e250c000 subs ip, r0, #0
d6e0: 0a00004e beq d820 <killinfo+0x2a0> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo;
d6e4: e1a0300d mov r3, sp d6e8: e8930007 ldm r3, {r0, r1, r2} d6ec: e28c3008 add r3, ip, #8 d6f0: e8830007 stm r3, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
d6f4: e59f0150 ldr r0, [pc, #336] ; d84c <killinfo+0x2cc> d6f8: e1a0100c mov r1, ip d6fc: e0800105 add r0, r0, r5, lsl #2 d700: ebffe0af bl 59c4 <_Chain_Append>
} DEBUG_STEP("\n"); _Thread_Enable_dispatch();
d704: ebffe677 bl 70e8 <_Thread_Enable_dispatch> d708: eaffffea b d6b8 <killinfo+0x138>
/* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch();
d70c: ebffe675 bl 70e8 <_Thread_Enable_dispatch> d710: e3a00000 mov r0, #0
return 0;
d714: eaffffe8 b d6bc <killinfo+0x13c>
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
d718: e59f3130 ldr r3, [pc, #304] ; d850 <killinfo+0x2d0> d71c: e5d3c000 ldrb ip, [r3] d720: e59f812c ldr r8, [pc, #300] ; d854 <killinfo+0x2d4> d724: e28cc001 add ip, ip, #1
*/ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo(
d728: e3a0a000 mov sl, #0
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] )
d72c: e5983008 ldr r3, [r8, #8] d730: e3530000 cmp r3, #0
d734: 0a000020 beq d7bc <killinfo+0x23c> continue; the_info = _Objects_Information_table[ the_api ][ 1 ];
d738: e5933004 ldr r3, [r3, #4]
*/ if ( !the_info ) continue; #endif maximum = the_info->maximum;
d73c: e1d301b0 ldrh r0, [r3, #16]
object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
d740: e3500000 cmp r0, #0
if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table;
d744: e593e01c ldr lr, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) { d748: 0a00001b beq d7bc <killinfo+0x23c>
d74c: e3a03001 mov r3, #1
the_thread = (Thread_Control *) object_table[ index ];
d750: e79e2103 ldr r2, [lr, r3, lsl #2]
if ( !the_thread )
d754: e3520000 cmp r2, #0
#endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
d758: e2833001 add r3, r3, #1
the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) d75c: 0a000014 beq d7b4 <killinfo+0x234> /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority )
d760: e5921014 ldr r1, [r2, #20] d764: e151000c cmp r1, ip
d768: 8a000011 bhi d7b4 <killinfo+0x234> DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ];
d76c: e5929108 ldr r9, [r2, #264] ; 0x108 d770: e59990cc ldr r9, [r9, #204] ; 0xcc d774: e1d49009 bics r9, r4, r9
d778: 0a00000d beq d7b4 <killinfo+0x234> * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) {
d77c: e151000c cmp r1, ip
d780: 3a000009 bcc d7ac <killinfo+0x22c> * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) {
d784: e59a9010 ldr r9, [sl, #16] d788: e3590000 cmp r9, #0
d78c: 0a000008 beq d7b4 <killinfo+0x234> /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) {
d790: e592b010 ldr fp, [r2, #16] d794: e35b0000 cmp fp, #0
d798: 0a000003 beq d7ac <killinfo+0x22c> continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
d79c: e3190201 tst r9, #268435456 ; 0x10000000
d7a0: 1a000003 bne d7b4 <killinfo+0x234> DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
d7a4: e31b0201 tst fp, #268435456 ; 0x10000000
d7a8: 0a000001 beq d7b4 <killinfo+0x234>
d7ac: e1a0c001 mov ip, r1 d7b0: e1a0a002 mov sl, r2
#endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
d7b4: e1500003 cmp r0, r3
d7b8: 2affffe4 bcs d750 <killinfo+0x1d0> * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
d7bc: e59f3094 ldr r3, [pc, #148] ; d858 <killinfo+0x2d8>
#endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
d7c0: e2888004 add r8, r8, #4
* + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
d7c4: e1580003 cmp r8, r3
d7c8: 1affffd7 bne d72c <killinfo+0x1ac> } } } } if ( interested ) {
d7cc: e35a0000 cmp sl, #0
d7d0: 0affffb1 beq d69c <killinfo+0x11c>
d7d4: e1a0000a mov r0, sl
* thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true;
d7d8: e3a03001 mov r3, #1 d7dc: e5c03074 strb r3, [r0, #116] ; 0x74
/* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
d7e0: e1a01005 mov r1, r5 d7e4: e1a0200d mov r2, sp d7e8: eb00004f bl d92c <_POSIX_signals_Unblock_thread> d7ec: e3500000 cmp r0, #0
d7f0: 0affffa9 beq d69c <killinfo+0x11c>
d7f4: eaffffc4 b d70c <killinfo+0x18c> <== NOT EXECUTED
/* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH );
d7f8: eb000105 bl dc14 <__errno> d7fc: e3a03003 mov r3, #3 d800: e5803000 str r3, [r0] d804: e3e00000 mvn r0, #0 d808: eaffffab b d6bc <killinfo+0x13c>
*/ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL );
d80c: eb000100 bl dc14 <__errno> d810: e3a03016 mov r3, #22 d814: e5803000 str r3, [r0] d818: e3e00000 mvn r0, #0 d81c: eaffffa6 b d6bc <killinfo+0x13c>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch();
d820: ebffe630 bl 70e8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
d824: eb0000fa bl dc14 <__errno> d828: e3a0300b mov r3, #11 d82c: e5803000 str r3, [r0] d830: e3e00000 mvn r0, #0 d834: eaffffa0 b d6bc <killinfo+0x13c> d838: 0001b50c .word 0x0001b50c d83c: 0001b00c .word 0x0001b00c d840: 0001b0c0 .word 0x0001b0c0 d844: 0001b698 .word 0x0001b698 d848: 0001b68c .word 0x0001b68c d84c: 0001b704 .word 0x0001b704 d850: 00019570 .word 0x00019570 d854: 0001afc8 .word 0x0001afc8 d858: 0001afd4 .word 0x0001afd4
0002652c <link>: int link( const char *existing, const char *new ) {
2652c: e92d40f0 push {r4, r5, r6, r7, lr} 26530: e24dd030 sub sp, sp, #48 ; 0x30 26534: e1a06001 mov r6, r1 26538: e1a04000 mov r4, r0
/* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
2653c: eb007cfc bl 45934 <strlen> 26540: e28d5018 add r5, sp, #24 26544: e1a01000 mov r1, r0 26548: e3a0c001 mov ip, #1 2654c: e1a00004 mov r0, r4 26550: e3a02000 mov r2, #0 26554: e1a03005 mov r3, r5 26558: e58dc000 str ip, [sp] 2655c: ebff7968 bl 4b04 <rtems_filesystem_evaluate_path>
0, &existing_loc, true ); if ( result != 0 )
26560: e3500000 cmp r0, #0
26564: 1a000052 bne 266b4 <link+0x188> /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc );
26568: e5d63000 ldrb r3, [r6] 2656c: e353002f cmp r3, #47 ; 0x2f 26570: 1353005c cmpne r3, #92 ; 0x5c 26574: 13a0e000 movne lr, #0 26578: 03a0e001 moveq lr, #1
2657c: 1a000035 bne 26658 <link+0x12c>
26580: e59f3210 ldr r3, [pc, #528] ; 26798 <link+0x26c> 26584: e593c000 ldr ip, [r3] 26588: e28cc018 add ip, ip, #24 2658c: e8bc000f ldm ip!, {r0, r1, r2, r3} 26590: e28d4004 add r4, sp, #4 26594: e1a07004 mov r7, r4 26598: e8a7000f stmia r7!, {r0, r1, r2, r3} 2659c: e59c2000 ldr r2, [ip] 265a0: e5872000 str r2, [r7] 265a4: e3a0e001 mov lr, #1
if ( !parent_loc.ops->evalformake_h ) {
265a8: e59d3010 ldr r3, [sp, #16] 265ac: e5933004 ldr r3, [r3, #4] 265b0: e3530000 cmp r3, #0
265b4: 0a000033 beq 26688 <link+0x15c> rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
265b8: e086000e add r0, r6, lr 265bc: e1a01004 mov r1, r4 265c0: e28d202c add r2, sp, #44 ; 0x2c 265c4: e1a0e00f mov lr, pc 265c8: e12fff13 bx r3
if ( result != 0 ) {
265cc: e2506000 subs r6, r0, #0
265d0: 1a00004e bne 26710 <link+0x1e4> /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
265d4: e59d3028 ldr r3, [sp, #40] ; 0x28 265d8: e59d2014 ldr r2, [sp, #20] 265dc: e1520003 cmp r2, r3
265e0: 1a000035 bne 266bc <link+0x190> rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) {
265e4: e59d2010 ldr r2, [sp, #16] 265e8: e5923008 ldr r3, [r2, #8] 265ec: e3530000 cmp r3, #0
265f0: 0a000052 beq 26740 <link+0x214> 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 );
265f4: e1a00005 mov r0, r5 265f8: e1a01004 mov r1, r4 265fc: e59d202c ldr r2, [sp, #44] ; 0x2c 26600: e1a0e00f mov lr, pc 26604: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
26608: e59d3024 ldr r3, [sp, #36] ; 0x24 2660c: 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 );
26610: e1a06000 mov r6, r0
rtems_filesystem_freenode( &existing_loc ); 26614: 0a000004 beq 2662c <link+0x100>
26618: e593301c ldr r3, [r3, #28] 2661c: e3530000 cmp r3, #0 26620: 11a00005 movne r0, r5 26624: 11a0e00f movne lr, pc 26628: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
2662c: e59d3010 ldr r3, [sp, #16] 26630: e3530000 cmp r3, #0
26634: 0a000004 beq 2664c <link+0x120>
26638: e593301c ldr r3, [r3, #28] 2663c: e3530000 cmp r3, #0 26640: 11a00004 movne r0, r4 26644: 11a0e00f movne lr, pc 26648: 112fff13 bxne r3
return result; }
2664c: e1a00006 mov r0, r6 26650: e28dd030 add sp, sp, #48 ; 0x30 26654: e8bd80f0 pop {r4, r5, r6, r7, pc}
/* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc );
26658: e3530000 cmp r3, #0
2665c: 0affffc7 beq 26580 <link+0x54>
26660: e59f3130 ldr r3, [pc, #304] ; 26798 <link+0x26c> 26664: e593c000 ldr ip, [r3] 26668: e28cc004 add ip, ip, #4 2666c: e8bc000f ldm ip!, {r0, r1, r2, r3} 26670: e28d4004 add r4, sp, #4 26674: e1a07004 mov r7, r4 26678: e8a7000f stmia r7!, {r0, r1, r2, r3} 2667c: e59c2000 ldr r2, [ip] 26680: e5872000 str r2, [r7] 26684: eaffffc7 b 265a8 <link+0x7c>
if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc );
26688: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 2668c: e3530000 cmp r3, #0 <== NOT EXECUTED 26690: 0a000004 beq 266a8 <link+0x17c> <== NOT EXECUTED 26694: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26698: e3530000 cmp r3, #0 <== NOT EXECUTED 2669c: 11a00005 movne r0, r5 <== NOT EXECUTED 266a0: 11a0e00f movne lr, pc <== NOT EXECUTED 266a4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
266a8: eb006216 bl 3ef08 <__errno> <== NOT EXECUTED 266ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 266b0: e5803000 str r3, [r0] <== NOT EXECUTED
266b4: e3e06000 mvn r6, #0 266b8: eaffffe3 b 2664c <link+0x120>
* Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc );
266bc: e59d3024 ldr r3, [sp, #36] ; 0x24 266c0: e3530000 cmp r3, #0
266c4: 0a000004 beq 266dc <link+0x1b0>
266c8: e593301c ldr r3, [r3, #28] 266cc: e3530000 cmp r3, #0 266d0: 11a00005 movne r0, r5 266d4: 11a0e00f movne lr, pc 266d8: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
266dc: e59d3010 ldr r3, [sp, #16] 266e0: e3530000 cmp r3, #0
266e4: 0a000004 beq 266fc <link+0x1d0>
266e8: e593301c ldr r3, [r3, #28] 266ec: e3530000 cmp r3, #0 266f0: 11a00004 movne r0, r4 266f4: 11a0e00f movne lr, pc 266f8: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
266fc: eb006201 bl 3ef08 <__errno> 26700: e3a03012 mov r3, #18 26704: e5803000 str r3, [r0] 26708: e3e06000 mvn r6, #0 2670c: eaffffce b 2664c <link+0x120>
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc );
26710: e59d3024 ldr r3, [sp, #36] ; 0x24 26714: e3530000 cmp r3, #0
26718: 0a000004 beq 26730 <link+0x204>
2671c: e593301c ldr r3, [r3, #28] 26720: e3530000 cmp r3, #0 26724: 11a00005 movne r0, r5 26728: 11a0e00f movne lr, pc 2672c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
26730: eb0061f4 bl 3ef08 <__errno> 26734: e5806000 str r6, [r0] 26738: e3e06000 mvn r6, #0 2673c: eaffffc2 b 2664c <link+0x120>
rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc );
26740: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 26744: e3530000 cmp r3, #0 <== NOT EXECUTED 26748: 0a000006 beq 26768 <link+0x23c> <== NOT EXECUTED 2674c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26750: e3530000 cmp r3, #0 <== NOT EXECUTED 26754: 0a000003 beq 26768 <link+0x23c> <== NOT EXECUTED 26758: e1a00005 mov r0, r5 <== NOT EXECUTED 2675c: e1a0e00f mov lr, pc <== NOT EXECUTED 26760: e12fff13 bx r3 <== NOT EXECUTED 26764: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
26768: e3520000 cmp r2, #0 <== NOT EXECUTED 2676c: 0a000004 beq 26784 <link+0x258> <== NOT EXECUTED 26770: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 26774: e3530000 cmp r3, #0 <== NOT EXECUTED 26778: 11a00004 movne r0, r4 <== NOT EXECUTED 2677c: 11a0e00f movne lr, pc <== NOT EXECUTED 26780: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26784: eb0061df bl 3ef08 <__errno> <== NOT EXECUTED 26788: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2678c: e5803000 str r3, [r0] <== NOT EXECUTED 26790: e3e06000 mvn r6, #0 <== NOT EXECUTED 26794: eaffffac b 2664c <link+0x120> <== NOT EXECUTED
26798: 00059348 .word 0x00059348
00018af8 <lseek>: { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd );
18af8: e59fc134 ldr ip, [pc, #308] ; 18c34 <lseek+0x13c> 18afc: e59cc000 ldr ip, [ip] 18b00: e150000c cmp r0, ip
off_t lseek( int fd, off_t offset, int whence ) {
18b04: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 18b08: 2a00003d bcs 18c04 <lseek+0x10c> iop = rtems_libio_iop( fd );
18b0c: e59fc124 ldr ip, [pc, #292] ; 18c38 <lseek+0x140> 18b10: e59c4000 ldr r4, [ip] 18b14: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
18b18: e5940014 ldr r0, [r4, #20] 18b1c: e3100c01 tst r0, #256 ; 0x100
18b20: 0a000037 beq 18c04 <lseek+0x10c> /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h )
18b24: e594c03c ldr ip, [r4, #60] ; 0x3c 18b28: e59c0014 ldr r0, [ip, #20] 18b2c: e3500000 cmp r0, #0
18b30: 0a000039 beq 18c1c <lseek+0x124> /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) {
18b34: e3530001 cmp r3, #1
/* * Now process the lseek(). */ old_offset = iop->offset;
18b38: e284600c add r6, r4, #12 18b3c: e8960060 ldm r6, {r5, r6}
switch ( whence ) { 18b40: 0a000022 beq 18bd0 <lseek+0xd8>
18b44: e3530002 cmp r3, #2
18b48: 0a00000d beq 18b84 <lseek+0x8c>
18b4c: e3530000 cmp r3, #0
18b50: 1a000023 bne 18be4 <lseek+0xec> case SEEK_SET: iop->offset = offset;
18b54: e584100c str r1, [r4, #12] 18b58: e5842010 str r2, [r4, #16]
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
18b5c: e1a00004 mov r0, r4 18b60: e1a0e00f mov lr, pc 18b64: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
18b68: e3700001 cmn r0, #1
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
18b6c: e1a02000 mov r2, r0 18b70: e1a03001 mov r3, r1
if ( status == (off_t) -1 ) 18b74: 0a00000e beq 18bb4 <lseek+0xbc> /* * So if the operation failed, we have to restore iop->offset. */ return status; }
18b78: e1a01003 mov r1, r3 18b7c: e1a00002 mov r0, r2 18b80: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset;
18b84: e9940180 ldmib r4, {r7, r8} 18b88: e0977001 adds r7, r7, r1 18b8c: e0a88002 adc r8, r8, r2 18b90: e584700c str r7, [r4, #12] 18b94: e5848010 str r8, [r4, #16]
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
18b98: e1a00004 mov r0, r4 18b9c: e1a0e00f mov lr, pc 18ba0: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
18ba4: e3700001 cmn r0, #1
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
18ba8: e1a02000 mov r2, r0 18bac: e1a03001 mov r3, r1
if ( status == (off_t) -1 ) 18bb0: 1afffff0 bne 18b78 <lseek+0x80>
18bb4: e3710001 cmn r1, #1
18bb8: 1affffee bne 18b78 <lseek+0x80> iop->offset = old_offset;
18bbc: e584500c str r5, [r4, #12] 18bc0: e5846010 str r6, [r4, #16]
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
18bc4: e1a01003 mov r1, r3 18bc8: e1a00002 mov r0, r2 18bcc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset;
18bd0: e0917005 adds r7, r1, r5 18bd4: e0a28006 adc r8, r2, r6 18bd8: e584700c str r7, [r4, #12] 18bdc: e5848010 str r8, [r4, #16]
break;
18be0: eaffffdd b 18b5c <lseek+0x64>
case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL );
18be4: ebffd40a bl dc14 <__errno> 18be8: e3a03016 mov r3, #22 18bec: e5803000 str r3, [r0] 18bf0: e3e02000 mvn r2, #0 18bf4: e3e03000 mvn r3, #0
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
18bf8: e1a01003 mov r1, r3 18bfc: e1a00002 mov r0, r2 18c00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
18c04: ebffd402 bl dc14 <__errno> <== NOT EXECUTED 18c08: e3a03009 mov r3, #9 <== NOT EXECUTED 18c0c: e5803000 str r3, [r0] <== NOT EXECUTED 18c10: e3e02000 mvn r2, #0 <== NOT EXECUTED 18c14: e3e03000 mvn r3, #0 <== NOT EXECUTED 18c18: eaffffd6 b 18b78 <lseek+0x80> <== NOT EXECUTED
/* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
18c1c: ebffd3fc bl dc14 <__errno> <== NOT EXECUTED 18c20: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 18c24: e5803000 str r3, [r0] <== NOT EXECUTED 18c28: e3e02000 mvn r2, #0 <== NOT EXECUTED 18c2c: e3e03000 mvn r3, #0 <== NOT EXECUTED 18c30: eaffffd0 b 18b78 <lseek+0x80> <== NOT EXECUTED
18c34: 000194c0 .word 0x000194c0 18c38: 0001ae8c .word 0x0001ae8c
00026900 <lstat>: int _STAT_NAME( const char *path, struct stat *buf ) {
26900: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
26904: e2515000 subs r5, r1, #0 <== NOT EXECUTED
int _STAT_NAME( const char *path, struct stat *buf ) {
26908: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 2690c: e1a06000 mov r6, r0 <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
26910: 0a00002f beq 269d4 <lstat+0xd4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ),
26914: eb007c06 bl 45934 <strlen> <== NOT EXECUTED 26918: e28d4004 add r4, sp, #4 <== NOT EXECUTED 2691c: e3a0c000 mov ip, #0 <== NOT EXECUTED 26920: e1a01000 mov r1, r0 <== NOT EXECUTED 26924: e1a0200c mov r2, ip <== NOT EXECUTED 26928: e1a00006 mov r0, r6 <== NOT EXECUTED 2692c: e1a03004 mov r3, r4 <== NOT EXECUTED 26930: e58dc000 str ip, [sp] <== NOT EXECUTED 26934: ebff7872 bl 4b04 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
26938: e2501000 subs r1, r0, #0 <== NOT EXECUTED 2693c: 1a000022 bne 269cc <lstat+0xcc> <== NOT EXECUTED
return -1; if ( !loc.handlers->fstat_h ){
26940: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 26944: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 26948: e3530000 cmp r3, #0 <== NOT EXECUTED 2694c: 0a000013 beq 269a0 <lstat+0xa0> <== NOT EXECUTED
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
26950: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 26954: e1a00005 mov r0, r5 <== NOT EXECUTED 26958: eb006e22 bl 421e8 <memset> <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
2695c: e1a01005 mov r1, r5 <== NOT EXECUTED 26960: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 26964: e1a00004 mov r0, r4 <== NOT EXECUTED 26968: e1a0e00f mov lr, pc <== NOT EXECUTED 2696c: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
26970: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 26974: 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 );
26978: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2697c: 0a000004 beq 26994 <lstat+0x94> <== NOT EXECUTED 26980: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26984: e3530000 cmp r3, #0 <== NOT EXECUTED 26988: 11a00004 movne r0, r4 <== NOT EXECUTED 2698c: 11a0e00f movne lr, pc <== NOT EXECUTED 26990: 112fff13 bxne r3 <== NOT EXECUTED
return status; }
26994: e1a00005 mov r0, r5 <== NOT EXECUTED 26998: e28dd018 add sp, sp, #24 <== NOT EXECUTED 2699c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc );
269a0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 269a4: e3530000 cmp r3, #0 <== NOT EXECUTED 269a8: 0a000004 beq 269c0 <lstat+0xc0> <== NOT EXECUTED 269ac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 269b0: e3530000 cmp r3, #0 <== NOT EXECUTED 269b4: 11a00004 movne r0, r4 <== NOT EXECUTED 269b8: 11a0e00f movne lr, pc <== NOT EXECUTED 269bc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
269c0: eb006150 bl 3ef08 <__errno> <== NOT EXECUTED 269c4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 269c8: e5803000 str r3, [r0] <== NOT EXECUTED 269cc: e3e05000 mvn r5, #0 <== NOT EXECUTED 269d0: eaffffef b 26994 <lstat+0x94> <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT );
269d4: eb00614b bl 3ef08 <__errno> <== NOT EXECUTED 269d8: e3a0300e mov r3, #14 <== NOT EXECUTED 269dc: e5803000 str r3, [r0] <== NOT EXECUTED 269e0: e3e05000 mvn r5, #0 <== NOT EXECUTED 269e4: eaffffea b 26994 <lstat+0x94> <== NOT EXECUTED
00001dcc <malloc>: size_t size ) { void *return_this; MSBUMP(malloc_calls, 1);
1dcc: e59f30dc ldr r3, [pc, #220] ; 1eb0 <malloc+0xe4> 1dd0: e5932004 ldr r2, [r3, #4] 1dd4: e2822001 add r2, r2, #1 1dd8: e92d4070 push {r4, r5, r6, lr} 1ddc: e5832004 str r2, [r3, #4] 1de0: e1a04000 mov r4, r0
/* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process();
1de4: ebffffb3 bl 1cb8 <malloc_deferred_frees_process>
/* * Validate the parameters */ if ( !size )
1de8: e3540000 cmp r4, #0
1dec: 0a00001f beq 1e70 <malloc+0xa4> return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) &&
1df0: e59f30bc ldr r3, [pc, #188] ; 1eb4 <malloc+0xe8> 1df4: e5933000 ldr r3, [r3] 1df8: e3530003 cmp r3, #3
1dfc: 0a000018 beq 1e64 <malloc+0x98> RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
1e00: e59f30b0 ldr r3, [pc, #176] ; 1eb8 <malloc+0xec> 1e04: e3a02000 mov r2, #0 1e08: e5930000 ldr r0, [r3] 1e0c: e1a01004 mov r1, r4 1e10: e1a03002 mov r3, r2 1e14: eb001310 bl 6a5c <_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 ) {
1e18: 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;
1e1c: 11a05006 movne r5, r6
* If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1e20: 0a000015 beq 1e7c <malloc+0xb0> } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper )
1e24: e59f3090 ldr r3, [pc, #144] ; 1ebc <malloc+0xf0> 1e28: e5933000 ldr r3, [r3] 1e2c: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
1e30: 11a01004 movne r1, r4 1e34: 11a00005 movne r0, r5 1e38: 11a0e00f movne lr, pc 1e3c: 1593f000 ldrne pc, [r3]
/* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
1e40: e59f3078 ldr r3, [pc, #120] ; 1ec0 <malloc+0xf4> 1e44: e5933000 ldr r3, [r3] 1e48: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
1e4c: 11a00005 movne r0, r5 1e50: 11a0e00f movne lr, pc 1e54: 1593f004 ldrne pc, [r3, #4] 1e58: e1a06005 mov r6, r5
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
1e5c: e1a00006 mov r0, r6 1e60: e8bd8070 pop {r4, r5, r6, pc}
return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) &&
1e64: ebffff7c bl 1c5c <malloc_is_system_state_OK> 1e68: e3500000 cmp r0, #0
1e6c: 1affffe3 bne 1e00 <malloc+0x34> /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this);
1e70: e3a06000 mov r6, #0 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
1e74: e1a00006 mov r0, r6 <== NOT EXECUTED 1e78: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
*/ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers)
1e7c: e59f3040 ldr r3, [pc, #64] ; 1ec4 <malloc+0xf8> 1e80: e5933000 ldr r3, [r3] 1e84: e3530000 cmp r3, #0
1e88: 0a000004 beq 1ea0 <malloc+0xd4> return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
1e8c: e1a00004 mov r0, r4 <== NOT EXECUTED 1e90: e1a0e00f mov lr, pc <== NOT EXECUTED 1e94: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
1e98: e2505000 subs r5, r0, #0 <== NOT EXECUTED 1e9c: 1affffe0 bne 1e24 <malloc+0x58> <== NOT EXECUTED
errno = ENOMEM;
1ea0: eb002f5b bl dc14 <__errno> 1ea4: e3a0300c mov r3, #12 1ea8: e5803000 str r3, [r0]
return (void *) 0;
1eac: eaffffea b 1e5c <malloc+0x90> 1eb0: 0001aea4 .word 0x0001aea4 1eb4: 0001b1b0 .word 0x0001b1b0 1eb8: 000194cc .word 0x000194cc 1ebc: 0001ab50 .word 0x0001ab50 1ec0: 0001ab48 .word 0x0001ab48 1ec4: 0001ab4c .word 0x0001ab4c
00001ca8 <malloc_deferred_free>: } void malloc_deferred_free( void *pointer ) {
1ca8: 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 );
1cac: e59f0000 ldr r0, [pc, #0] ; 1cb4 <malloc_deferred_free+0xc><== NOT EXECUTED 1cb0: ea000f43 b 59c4 <_Chain_Append> <== NOT EXECUTED
1cb4: 0001ae98 .word 0x0001ae98
00001cb8 <malloc_deferred_frees_process>: { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) {
1cb8: 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)
1cbc: ea000000 b 1cc4 <malloc_deferred_frees_process+0xc>
free(to_be_freed);
1cc0: ebffff86 bl 1ae0 <free> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain );
1cc4: e59f000c ldr r0, [pc, #12] ; 1cd8 <malloc_deferred_frees_process+0x20> 1cc8: eb000f48 bl 59f0 <_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)
1ccc: e3500000 cmp r0, #0
1cd0: 1afffffa bne 1cc0 <malloc_deferred_frees_process+0x8> free(to_be_freed); }
1cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 1cd8: 0001ae98 .word 0x0001ae98
00010ff8 <memfile_free_blocks_in_table>: void memfile_free_blocks_in_table( block_p **block_table, int entries ) {
10ff8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/* * Perform internal consistency checks */ assert( block_table );
10ffc: e2504000 subs r4, r0, #0
void memfile_free_blocks_in_table( block_p **block_table, int entries ) {
11000: e1a08001 mov r8, r1
/* * Perform internal consistency checks */ assert( block_table ); 11004: 0a000014 beq 1105c <memfile_free_blocks_in_table+0x64> * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<entries ; i++ ) {
11008: e3510000 cmp r1, #0
/* * Now go through all the slots in the table and free the memory. */ b = *block_table;
1100c: e5947000 ldr r7, [r4]
for ( i=0 ; i<entries ; i++ ) { 11010: da00000c ble 11048 <memfile_free_blocks_in_table+0x50>
11014: e3a05000 mov r5, #0 11018: e1a06005 mov r6, r5
if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0;
1101c: e1a0a005 mov sl, r5
*/ b = *block_table; for ( i=0 ; i<entries ; i++ ) { if ( b[i] ) {
11020: e7970005 ldr r0, [r7, r5] 11024: e3500000 cmp r0, #0
11028: 0a000001 beq 11034 <memfile_free_blocks_in_table+0x3c> memfile_free_block( b[i] );
1102c: ebffff4b bl 10d60 <memfile_free_block>
b[i] = 0;
11030: e787a005 str sl, [r7, r5]
* Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<entries ; i++ ) {
11034: e2866001 add r6, r6, #1 11038: e1580006 cmp r8, r6 1103c: e2855004 add r5, r5, #4
11040: cafffff6 bgt 11020 <memfile_free_blocks_in_table+0x28>
11044: e5947000 ldr r7, [r4]
/* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table );
11048: e1a00007 mov r0, r7 1104c: ebffff43 bl 10d60 <memfile_free_block>
*block_table = 0;
11050: e3a03000 mov r3, #0 11054: e5843000 str r3, [r4]
}
11058: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/* * Perform internal consistency checks */ assert( block_table );
1105c: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED 11060: e2811003 add r1, r1, #3 <== NOT EXECUTED 11064: e59f0008 ldr r0, [pc, #8] ; 11074 <memfile_free_blocks_in_table+0x7c><== NOT EXECUTED 11068: e59f2008 ldr r2, [pc, #8] ; 11078 <memfile_free_blocks_in_table+0x80><== NOT EXECUTED 1106c: e59f3008 ldr r3, [pc, #8] ; 1107c <memfile_free_blocks_in_table+0x84><== NOT EXECUTED 11070: ebfff641 bl e97c <__assert_func> <== NOT EXECUTED
11074: 000205d0 .word 0x000205d0 11078: 0001fcf8 .word 0x0001fcf8 1107c: 00020648 .word 0x00020648
00011550 <memfile_ftruncate>: int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) {
11550: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
11554: 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 )
11558: e5943054 ldr r3, [r4, #84] ; 0x54 1155c: e1530002 cmp r3, r2
int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) {
11560: e24dd008 sub sp, sp, #8
* POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 11564: aa000003 bge 11578 <memfile_ftruncate+0x28> return IMFS_memfile_extend( the_jnode, length );
11568: e1a00004 mov r0, r4 <== NOT EXECUTED 1156c: ebffff96 bl 113cc <IMFS_memfile_extend> <== NOT EXECUTED
iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; }
11570: e28dd008 add sp, sp, #8 11574: e8bd8010 pop {r4, pc}
* POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 11578: 0a000009 beq 115a4 <memfile_ftruncate+0x54> * 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;
1157c: e5841050 str r1, [r4, #80] ; 0x50 11580: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
11584: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
11588: e3a01000 mov r1, #0 1158c: e1a0000d mov r0, sp 11590: ebffc6eb bl 3144 <gettimeofday> 11594: e59d3000 ldr r3, [sp] 11598: e3a00000 mov r0, #0 1159c: e5843040 str r3, [r4, #64] ; 0x40
return 0;
115a0: eafffff2 b 11570 <memfile_ftruncate+0x20>
* 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 )
115a4: e5943050 ldr r3, [r4, #80] ; 0x50 115a8: e1530001 cmp r3, r1
115ac: 2afffff2 bcs 1157c <memfile_ftruncate+0x2c>
115b0: eaffffec b 11568 <memfile_ftruncate+0x18> <== NOT EXECUTED
000115b4 <memfile_lseek>: rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
115b4: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
115b8: e5905038 ldr r5, [r0, #56] ; 0x38
if (the_jnode->type == IMFS_LINEAR_FILE) {
115bc: e595304c ldr r3, [r5, #76] ; 0x4c 115c0: e3530006 cmp r3, #6
rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
115c4: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 115c8: 0a00000d beq 11604 <memfile_lseek+0x50> if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset ))
115cc: e1a00005 mov r0, r5 115d0: e284200c add r2, r4, #12 115d4: e8920006 ldm r2, {r1, r2} 115d8: ebffff7b bl 113cc <IMFS_memfile_extend> 115dc: e3500000 cmp r0, #0
115e0: 1a00001a bne 11650 <memfile_lseek+0x9c> rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size;
115e4: e2853050 add r3, r5, #80 ; 0x50 115e8: e893000c ldm r3, {r2, r3} 115ec: e984000c stmib r4, {r2, r3} 115f0: e284300c add r3, r4, #12 115f4: e893000c ldm r3, {r2, r3}
} return iop->offset; }
115f8: e1a01003 mov r1, r3 115fc: e1a00002 mov r0, r2 11600: e8bd8030 pop {r4, r5, pc}
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size)
11604: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 11608: e2853050 add r3, r5, #80 ; 0x50 <== NOT EXECUTED 1160c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED 11610: e1510003 cmp r1, r3 <== NOT EXECUTED 11614: e590000c ldr r0, [r0, #12] <== NOT EXECUTED 11618: ca000007 bgt 1163c <memfile_lseek+0x88> <== NOT EXECUTED 1161c: 0a000004 beq 11634 <memfile_lseek+0x80> <== NOT EXECUTED 11620: e1a02000 mov r2, r0 <== NOT EXECUTED 11624: e1a03001 mov r3, r1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; }
11628: e1a01003 mov r1, r3 <== NOT EXECUTED 1162c: e1a00002 mov r0, r2 <== NOT EXECUTED 11630: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size)
11634: e1500002 cmp r0, r2 <== NOT EXECUTED 11638: 9afffff8 bls 11620 <memfile_lseek+0x6c> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
1163c: e584200c str r2, [r4, #12] <== NOT EXECUTED 11640: e5843010 str r3, [r4, #16] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; }
11644: e1a01003 mov r1, r3 <== NOT EXECUTED 11648: e1a00002 mov r0, r2 <== NOT EXECUTED 1164c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC );
11650: eb0006f2 bl 13220 <__errno> <== NOT EXECUTED 11654: e3a0301c mov r3, #28 <== NOT EXECUTED 11658: e5803000 str r3, [r0] <== NOT EXECUTED 1165c: e3e02000 mvn r2, #0 <== NOT EXECUTED 11660: e3e03000 mvn r3, #0 <== NOT EXECUTED 11664: eaffffe3 b 115f8 <memfile_lseek+0x44> <== NOT EXECUTED
00011928 <memfile_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
11928: e92d4830 push {r4, r5, fp, lr}
the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
1192c: e5903014 ldr r3, [r0, #20] 11930: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
11934: e24dd004 sub sp, sp, #4 11938: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
1193c: e5905038 ldr r5, [r0, #56] ; 0x38
/* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 11940: 0a000002 beq 11950 <memfile_open+0x28> && (the_jnode->type == IMFS_LINEAR_FILE)) {
11944: e595204c ldr r2, [r5, #76] ; 0x4c 11948: e3520006 cmp r2, #6
1194c: 0a00000b beq 11980 <memfile_open+0x58> the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0)
11950: e5952050 ldr r2, [r5, #80] ; 0x50 11954: e5951054 ldr r1, [r5, #84] ; 0x54
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND)
11958: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
1195c: 1584200c strne r2, [r4, #12] 11960: 15841010 strne r1, [r4, #16] 11964: 15951054 ldrne r1, [r5, #84] ; 0x54 11968: 15952050 ldrne r2, [r5, #80] ; 0x50
iop->size = the_jnode->info.file.size;
1196c: e5841008 str r1, [r4, #8] 11970: e5842004 str r2, [r4, #4] 11974: e3a00000 mov r0, #0
return 0; }
11978: e28dd004 add sp, sp, #4 1197c: e8bd8830 pop {r4, r5, fp, pc}
/* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size;
11980: e595c050 ldr ip, [r5, #80] ; 0x50 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0;
11984: e3a00000 mov r0, #0 <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE;
11988: e3a03005 mov r3, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
1198c: e3a01000 mov r1, #0 <== NOT EXECUTED 11990: e3a02000 mov r2, #0 <== NOT EXECUTED
the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0)
11994: 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;
11998: e585304c str r3, [r5, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0;
1199c: e5850060 str r0, [r5, #96] ; 0x60 <== NOT EXECUTED
* Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct;
119a0: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0;
119a4: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED 119a8: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0;
119ac: e585005c str r0, [r5, #92] ; 0x5c <== NOT EXECUTED
uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0;
119b0: e5850058 str r0, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0)
119b4: 1a000004 bne 119cc <memfile_open+0xa4> <== NOT EXECUTED 119b8: e1a0b001 mov fp, r1 <== NOT EXECUTED 119bc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 119c0: e1a01002 mov r1, r2 <== NOT EXECUTED 119c4: e1a0200b mov r2, fp <== NOT EXECUTED 119c8: eaffffe2 b 11958 <memfile_open+0x30> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
119cc: e1a00005 mov r0, r5 <== NOT EXECUTED 119d0: e58dc000 str ip, [sp] <== NOT EXECUTED 119d4: ebffff23 bl 11668 <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)
119d8: e3700001 cmn r0, #1 <== NOT EXECUTED 119dc: 0affffe5 beq 11978 <memfile_open+0x50> <== NOT EXECUTED 119e0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 119e4: eaffffd9 b 11950 <memfile_open+0x28> <== NOT EXECUTED
00001ed8 <mknod>: int mknod( const char *pathname, mode_t mode, dev_t dev ) {
1ed8: e92d45f0 push {r4, r5, r6, r7, r8, sl, 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) ) )
1edc: e3110a0f tst r1, #61440 ; 0xf000
int mknod( const char *pathname, mode_t mode, dev_t dev ) {
1ee0: e24dd01c sub sp, sp, #28 1ee4: e1a05001 mov r5, r1 1ee8: e1a0c000 mov ip, r0 1eec: e1a07002 mov r7, r2 1ef0: 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) ) ) 1ef4: 0a000045 beq 2010 <mknod+0x138> rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1ef8: e5d03000 ldrb r3, [r0] 1efc: e353002f cmp r3, #47 ; 0x2f 1f00: 1353005c cmpne r3, #92 ; 0x5c 1f04: 13a06000 movne r6, #0 1f08: 03a06001 moveq r6, #1
1f0c: 1a00002b bne 1fc0 <mknod+0xe8>
1f10: e59f3128 ldr r3, [pc, #296] ; 2040 <mknod+0x168> 1f14: e593e000 ldr lr, [r3] 1f18: e28ee018 add lr, lr, #24 1f1c: e8be000f ldm lr!, {r0, r1, r2, r3} 1f20: e28d4004 add r4, sp, #4 1f24: e1a06004 mov r6, r4 1f28: e8a6000f stmia r6!, {r0, r1, r2, r3}
if ( !temp_loc.ops->evalformake_h ) {
1f2c: e59d3010 ldr r3, [sp, #16] 1f30: e5933004 ldr r3, [r3, #4]
int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1f34: e59e2000 ldr r2, [lr]
if ( !temp_loc.ops->evalformake_h ) {
1f38: e3530000 cmp r3, #0
int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1f3c: e5862000 str r2, [r6] 1f40: e3a06001 mov r6, #1
if ( !temp_loc.ops->evalformake_h ) { 1f44: 0a00002c beq 1ffc <mknod+0x124> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)(
1f48: e08c0006 add r0, ip, r6 1f4c: e1a01004 mov r1, r4 1f50: e28d2018 add r2, sp, #24 1f54: e1a0e00f mov lr, pc 1f58: e12fff13 bx r3
&pathname[i], &temp_loc, &name_start ); if ( result != 0 )
1f5c: e3500000 cmp r0, #0
1f60: 1a000028 bne 2008 <mknod+0x130> return -1; if ( !temp_loc.ops->mknod_h ) {
1f64: e59d3010 ldr r3, [sp, #16] 1f68: e593c014 ldr ip, [r3, #20] 1f6c: e35c0000 cmp ip, #0
1f70: 0a00002b beq 2024 <mknod+0x14c> 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 );
1f74: e1a01005 mov r1, r5 1f78: e1a03008 mov r3, r8 1f7c: e58d4000 str r4, [sp] 1f80: e59d0018 ldr r0, [sp, #24] 1f84: e1a02007 mov r2, r7 1f88: e1a0e00f mov lr, pc 1f8c: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
1f90: e59d3010 ldr r3, [sp, #16] 1f94: 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 );
1f98: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc ); 1f9c: 0a000004 beq 1fb4 <mknod+0xdc>
1fa0: e593301c ldr r3, [r3, #28] 1fa4: e3530000 cmp r3, #0 1fa8: 11a00004 movne r0, r4 1fac: 11a0e00f movne lr, pc 1fb0: 112fff13 bxne r3
return result; }
1fb4: e1a00005 mov r0, r5 1fb8: e28dd01c add sp, sp, #28 1fbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1fc0: e3530000 cmp r3, #0
1fc4: 0affffd1 beq 1f10 <mknod+0x38>
1fc8: e59f3070 ldr r3, [pc, #112] ; 2040 <mknod+0x168> 1fcc: e593e000 ldr lr, [r3] 1fd0: e28ee004 add lr, lr, #4 1fd4: e8be000f ldm lr!, {r0, r1, r2, r3} 1fd8: e28d4004 add r4, sp, #4 1fdc: e1a0a004 mov sl, r4 1fe0: e8aa000f stmia sl!, {r0, r1, r2, r3}
if ( !temp_loc.ops->evalformake_h ) {
1fe4: e59d3010 ldr r3, [sp, #16] 1fe8: e5933004 ldr r3, [r3, #4]
int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1fec: e59e2000 ldr r2, [lr]
if ( !temp_loc.ops->evalformake_h ) {
1ff0: e3530000 cmp r3, #0
int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1ff4: e58a2000 str r2, [sl]
if ( !temp_loc.ops->evalformake_h ) { 1ff8: 1affffd2 bne 1f48 <mknod+0x70> if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP );
1ffc: eb002f04 bl dc14 <__errno> <== NOT EXECUTED 2000: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2004: e5803000 str r3, [r0] <== NOT EXECUTED
2008: e3e05000 mvn r5, #0 200c: eaffffe8 b 1fb4 <mknod+0xdc>
int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL );
2010: eb002eff bl dc14 <__errno> <== NOT EXECUTED 2014: e3a03016 mov r3, #22 <== NOT EXECUTED 2018: e5803000 str r3, [r0] <== NOT EXECUTED 201c: e3e05000 mvn r5, #0 <== NOT EXECUTED 2020: eaffffe3 b 1fb4 <mknod+0xdc> <== NOT EXECUTED
); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc );
2024: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2028: e3530000 cmp r3, #0 <== NOT EXECUTED 202c: 0afffff2 beq 1ffc <mknod+0x124> <== NOT EXECUTED 2030: e1a00004 mov r0, r4 <== NOT EXECUTED 2034: e1a0e00f mov lr, pc <== NOT EXECUTED 2038: e12fff13 bx r3 <== NOT EXECUTED 203c: eaffffee b 1ffc <mknod+0x124> <== NOT EXECUTED
2040: 00019658 .word 0x00019658
00002060 <mount>: const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) {
2060: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/* * Is there a file system operations table? */ if ( fs_ops == NULL ) {
2064: e2516000 subs r6, r1, #0
const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) {
2068: e24dd018 sub sp, sp, #24 206c: e1a07000 mov r7, r0 2070: e1a05002 mov r5, r2 2074: e1a09003 mov r9, r3 2078: e59da038 ldr sl, [sp, #56] ; 0x38
/* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 207c: 0a000083 beq 2290 <mount+0x230> /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
2080: e3520001 cmp r2, #1
2084: 8a000081 bhi 2290 <mount+0x230> errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) {
2088: e5968024 ldr r8, [r6, #36] ; 0x24 208c: e3580000 cmp r8, #0
2090: 0a000089 beq 22bc <mount+0x25c> /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device )
2094: e3530000 cmp r3, #0 2098: 03a0006c moveq r0, #108 ; 0x6c
209c: 0a000002 beq 20ac <mount+0x4c> size += strlen( device ) + 1;
20a0: e1a00003 mov r0, r3 <== NOT EXECUTED 20a4: eb0032cb bl ebd8 <strlen> <== NOT EXECUTED 20a8: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED
temp_mt_entry = malloc( size );
20ac: ebffff46 bl 1dcc <malloc>
if ( !temp_mt_entry ) {
20b0: e3500000 cmp r0, #0
*/ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size );
20b4: e1a04000 mov r4, r0 20b8: e1a08000 mov r8, r0
if ( !temp_mt_entry ) { 20bc: 0a000089 beq 22e8 <mount+0x288> return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) {
20c0: e3590000 cmp r9, #0
errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options;
20c4: e5805030 str r5, [r0, #48] ; 0x30
if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
20c8: 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;
20cc: 05809068 streq r9, [r0, #104] ; 0x68
return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 20d0: 0a000004 beq 20e8 <mount+0x88> temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
20d4: e280306c add r3, r0, #108 ; 0x6c <== NOT EXECUTED
strcpy( temp_mt_entry->dev, device );
20d8: e1a00003 mov r0, r3 <== NOT EXECUTED 20dc: e1a01009 mov r1, r9 <== NOT EXECUTED
} temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev =
20e0: e5843068 str r3, [r4, #104] ; 0x68 <== NOT EXECUTED
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device );
20e4: eb00327f bl eae8 <strcpy> <== NOT EXECUTED
/* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) {
20e8: e35a0000 cmp sl, #0
20ec: 0a00004a beq 221c <mount+0x1bc> if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
20f0: e1a0000a mov r0, sl 20f4: eb0032b7 bl ebd8 <strlen>
* permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path(
20f8: e28d5004 add r5, sp, #4
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
20fc: e1a01000 mov r1, r0
* permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path(
2100: e3a0c001 mov ip, #1 2104: e1a0000a mov r0, sl 2108: e3a02007 mov r2, #7 210c: e1a03005 mov r3, r5 2110: e58dc000 str ip, [sp] 2114: ebfffe3b bl 1a08 <rtems_filesystem_evaluate_path> 2118: e3700001 cmn r0, #1
211c: 0a000069 beq 22c8 <mount+0x268> /* * Test for node_type_h */ if (!loc.ops->node_type_h) {
2120: e59d3010 ldr r3, [sp, #16] 2124: e5933010 ldr r3, [r3, #16] 2128: e3530000 cmp r3, #0
212c: 0a000069 beq 22d8 <mount+0x278> /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
2130: e1a00005 mov r0, r5 2134: e1a0e00f mov lr, pc 2138: e12fff13 bx r3 213c: e3500001 cmp r0, #1
2140: 1a000059 bne 22ac <mount+0x24c> /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
2144: e59f11b0 ldr r1, [pc, #432] ; 22fc <mount+0x29c> 2148: e4913004 ldr r3, [r1], #4 214c: e1530001 cmp r3, r1
2150: 0a000053 beq 22a4 <mount+0x244> !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 )
2154: e59d0004 ldr r0, [sp, #4] 2158: e593201c ldr r2, [r3, #28] 215c: e1520000 cmp r2, r0
2160: 1a000003 bne 2174 <mount+0x114>
2164: ea000022 b 21f4 <mount+0x194> <== NOT EXECUTED
2168: e593201c ldr r2, [r3, #28] 216c: e1520000 cmp r2, r0
2170: 0a00001f beq 21f4 <mount+0x194> * 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 ) {
2174: e5933000 ldr r3, [r3]
/* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
2178: e1530001 cmp r3, r1
217c: 1afffff9 bne 2168 <mount+0x108> * 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;
2180: e28d100c add r1, sp, #12 2184: e8910006 ldm r1, {r1, r2}
/* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){
2188: 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;
218c: 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;
2190: 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 ){
2194: e3530000 cmp r3, #0
* 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;
2198: e5840008 str r0, [r4, #8]
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;
219c: 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;
21a0: 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 ){ 21a4: 0a00004b beq 22d8 <mount+0x278> errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) {
21a8: e1a00004 mov r0, r4 21ac: e1a0e00f mov lr, pc 21b0: e12fff13 bx r3 21b4: e3500000 cmp r0, #0
21b8: 1a000010 bne 2200 <mount+0x1a0> temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
21bc: e1a00004 mov r0, r4 21c0: e1a0e00f mov lr, pc 21c4: e596f024 ldr pc, [r6, #36] ; 0x24 21c8: e2506000 subs r6, r0, #0
21cc: 1a00001b bne 2240 <mount+0x1e0> RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node );
21d0: e59f0124 ldr r0, [pc, #292] ; 22fc <mount+0x29c> 21d4: e1a01004 mov r1, r4 21d8: eb000df9 bl 59c4 <_Chain_Append>
*/ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry )
21dc: e3570000 cmp r7, #0
*mt_entry = temp_mt_entry;
21e0: 15874000 strne r4, [r7]
*/ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry )
21e4: 01a00007 moveq r0, r7
*mt_entry = temp_mt_entry;
21e8: 11a00006 movne r0, r6
if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; }
21ec: e28dd018 add sp, sp, #24 21f0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY;
21f4: eb002e86 bl dc14 <__errno> 21f8: e3a03010 mov r3, #16 21fc: e5803000 str r3, [r0]
return 0; cleanup_and_bail: free( temp_mt_entry );
2200: e1a00004 mov r0, r4 2204: ebfffe35 bl 1ae0 <free>
if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free );
2208: e595300c ldr r3, [r5, #12] 220c: e3530000 cmp r3, #0
2210: 1a000016 bne 2270 <mount+0x210>
2214: e3e00000 mvn r0, #0 <== NOT EXECUTED 2218: eafffff3 b 21ec <mount+0x18c> <== 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;
221c: e584a01c str sl, [r4, #28]
temp_mt_entry->mt_fs_root.handlers = NULL;
2220: e584a024 str sl, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = NULL;
2224: e584a028 str sl, [r4, #40] ; 0x28
temp_mt_entry->mt_point_node.node_access = NULL;
2228: e584a008 str sl, [r4, #8]
temp_mt_entry->mt_point_node.handlers = NULL;
222c: e584a010 str sl, [r4, #16]
temp_mt_entry->mt_point_node.ops = NULL;
2230: e584a014 str sl, [r4, #20]
temp_mt_entry->mt_point_node.mt_entry = NULL;
2234: e584a018 str sl, [r4, #24] 2238: e1a0500a mov r5, sl 223c: eaffffde b 21bc <mount+0x15c>
} if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) {
2240: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2244: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 2248: e3530000 cmp r3, #0 <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
224c: 11a00004 movne r0, r4 <== NOT EXECUTED 2250: 11a0e00f movne lr, pc <== NOT EXECUTED 2254: 112fff13 bxne r3 <== NOT EXECUTED
return 0; cleanup_and_bail: free( temp_mt_entry );
2258: e1a00004 mov r0, r4 <== NOT EXECUTED 225c: ebfffe1f bl 1ae0 <free> <== NOT EXECUTED
if ( loc_to_free )
2260: e3550000 cmp r5, #0 <== NOT EXECUTED 2264: 1affffe7 bne 2208 <mount+0x1a8> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
2268: e3e00000 mvn r0, #0 <== NOT EXECUTED 226c: eaffffde b 21ec <mount+0x18c> <== NOT EXECUTED
2270: e593301c ldr r3, [r3, #28] 2274: e3530000 cmp r3, #0
2278: 0affffe5 beq 2214 <mount+0x1b4>
227c: e1a00005 mov r0, r5 2280: e1a0e00f mov lr, pc 2284: e12fff13 bx r3 2288: e3e00000 mvn r0, #0 228c: eaffffd6 b 21ec <mount+0x18c>
* Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL;
2290: eb002e5f bl dc14 <__errno> 2294: e3a03016 mov r3, #22 2298: e5803000 str r3, [r0] 229c: e3e00000 mvn r0, #0
return -1;
22a0: eaffffd1 b 21ec <mount+0x18c>
cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free );
22a4: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 22a8: eaffffb4 b 2180 <mount+0x120> <== NOT EXECUTED
/* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR;
22ac: eb002e58 bl dc14 <__errno> 22b0: e3a03014 mov r3, #20 22b4: e5803000 str r3, [r0]
goto cleanup_and_bail;
22b8: eaffffd0 b 2200 <mount+0x1a0>
return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP;
22bc: eb002e54 bl dc14 <__errno> <== NOT EXECUTED 22c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22c4: e5803000 str r3, [r0] <== NOT EXECUTED
return 0; cleanup_and_bail: free( temp_mt_entry );
22c8: e1a00008 mov r0, r8 <== NOT EXECUTED 22cc: ebfffe03 bl 1ae0 <free> <== NOT EXECUTED 22d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 22d4: eaffffc4 b 21ec <mount+0x18c> <== NOT EXECUTED
* 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;
22d8: eb002e4d bl dc14 <__errno> <== NOT EXECUTED 22dc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22e0: e5803000 str r3, [r0] <== NOT EXECUTED
goto cleanup_and_bail;
22e4: eaffffc5 b 2200 <mount+0x1a0> <== NOT EXECUTED
if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM;
22e8: eb002e49 bl dc14 <__errno> <== NOT EXECUTED 22ec: e3a0300c mov r3, #12 <== NOT EXECUTED 22f0: e5803000 str r3, [r0] <== NOT EXECUTED 22f4: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
22f8: eaffffbb b 21ec <mount+0x18c> <== NOT EXECUTED
22fc: 0001aed0 .word 0x0001aed0
00002370 <newlib_free_buffers>: */ int newlib_free_buffers( FILE *fp ) {
2370: e92d4010 push {r4, lr} 2374: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
2378: eb002f24 bl e010 <fileno> 237c: e3500002 cmp r0, #2
2380: 9a000003 bls 2394 <newlib_free_buffers+0x24> fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp);
2384: e1a00004 mov r0, r4 <== NOT EXECUTED 2388: eb002e6e bl dd48 <fclose> <== NOT EXECUTED
} return 0; }
238c: e3a00000 mov r0, #0 2390: e8bd8010 pop {r4, pc}
{ switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) {
2394: e1d430bc ldrh r3, [r4, #12] 2398: e3130080 tst r3, #128 ; 0x80
239c: 0afffffa beq 238c <newlib_free_buffers+0x1c> free( fp->_bf._base );
23a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 23a4: ebfffdcd bl 1ae0 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
23a8: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
23ac: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF;
23b0: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
23b4: e5843010 str r3, [r4, #16] <== NOT EXECUTED
case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF;
23b8: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
23bc: e5843000 str r3, [r4] <== NOT EXECUTED
break; default: fclose(fp); } return 0; }
23c0: e3a00000 mov r0, #0 <== NOT EXECUTED 23c4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000024e8 <null_initialize>: rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) {
24e8: e92d4010 push {r4, lr}
rtems_device_driver status; if ( !initialized ) {
24ec: e59f3044 ldr r3, [pc, #68] ; 2538 <null_initialize+0x50> 24f0: e5d32000 ldrb r2, [r3] 24f4: e3520000 cmp r2, #0
rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) {
24f8: e1a04000 mov r4, r0
rtems_device_driver status; if ( !initialized ) { 24fc: 0a000001 beq 2508 <null_initialize+0x20> NULL_major = major; } return RTEMS_SUCCESSFUL; }
2500: e3a00000 mov r0, #0 2504: e8bd8010 pop {r4, pc}
) { rtems_device_driver status; if ( !initialized ) { initialized = 1;
2508: e3a0c001 mov ip, #1
status = rtems_io_register_name(
250c: e59f0028 ldr r0, [pc, #40] ; 253c <null_initialize+0x54> 2510: e1a01004 mov r1, r4
) { rtems_device_driver status; if ( !initialized ) { initialized = 1;
2514: e5c3c000 strb ip, [r3]
status = rtems_io_register_name(
2518: eb000051 bl 2664 <rtems_io_register_name>
"/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL)
251c: e3500000 cmp r0, #0
2520: 1a000003 bne 2534 <null_initialize+0x4c> rtems_fatal_error_occurred(status); NULL_major = major;
2524: e59f3014 ldr r3, [pc, #20] ; 2540 <null_initialize+0x58>
} return RTEMS_SUCCESSFUL; }
2528: e3a00000 mov r0, #0
); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); NULL_major = major;
252c: e5834000 str r4, [r3]
} return RTEMS_SUCCESSFUL; }
2530: e8bd8010 pop {r4, pc}
major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status);
2534: eb0010d2 bl 6884 <rtems_fatal_error_occurred> <== NOT EXECUTED
2538: 0001fcf4 .word 0x0001fcf4 253c: 0001edf0 .word 0x0001edf0 2540: 00020008 .word 0x00020008
00002608 <open>: int open( const char *pathname, int flags, ... ) {
2608: e92d000e push {r1, r2, r3} 260c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 2610: e24dd01c sub sp, sp, #28 2614: e59d503c ldr r5, [sp, #60] ; 0x3c
/* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1;
2618: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
261c: e2138001 ands r8, r3, #1 2620: 13a08004 movne r8, #4
eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE )
2624: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int );
2628: e28d3044 add r3, sp, #68 ; 0x44
int open( const char *pathname, int flags, ... ) {
262c: e1a06000 mov r6, r0
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;
2630: 13888002 orrne r8, r8, #2
va_start(ap, flags); mode = va_arg( ap, int );
2634: e58d3018 str r3, [sp, #24] 2638: e59da040 ldr sl, [sp, #64] ; 0x40
* code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate();
263c: eb001d7e bl 9c3c <rtems_libio_allocate>
if ( iop == 0 ) {
2640: e2504000 subs r4, r0, #0 2644: 03a06017 moveq r6, #23
2648: 0a00005d beq 27c4 <open+0x1bc> /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true );
264c: e1a00006 mov r0, r6 2650: eb003160 bl ebd8 <strlen>
/* * See if the file exists. */ status = rtems_filesystem_evaluate_path(
2654: e28d7004 add r7, sp, #4
pathname, strlen( pathname ), eval_flags, &loc, true );
2658: e1a01000 mov r1, r0
/* * See if the file exists. */ status = rtems_filesystem_evaluate_path(
265c: e1a02008 mov r2, r8 2660: e1a00006 mov r0, r6 2664: e3a08001 mov r8, #1 2668: e1a03007 mov r3, r7 266c: e58d8000 str r8, [sp] 2670: ebfffce4 bl 1a08 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) {
2674: e3700001 cmn r0, #1
2678: 0a000055 beq 27d4 <open+0x1cc> if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
267c: e2053c0a and r3, r5, #2560 ; 0xa00 2680: e3530c0a cmp r3, #2560 ; 0xa00 2684: 03a06011 moveq r6, #17
2688: 0a000040 beq 2790 <open+0x188> /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers;
268c: e59d300c ldr r3, [sp, #12] 2690: e584303c str r3, [r4, #60] ; 0x3c
iop->file_info = loc.node_access;
2694: e59d3004 ldr r3, [sp, #4]
iop->flags |= rtems_libio_fcntl_flags( flags );
2698: e1a00005 mov r0, r5
* 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;
269c: e5843038 str r3, [r4, #56] ; 0x38
iop->flags |= rtems_libio_fcntl_flags( flags );
26a0: e5948014 ldr r8, [r4, #20] 26a4: eb001d57 bl 9c08 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
26a8: e1a0e007 mov lr, r7
* returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
26ac: e1808008 orr r8, r0, r8
iop->pathinfo = loc;
26b0: e8be000f ldm lr!, {r0, r1, r2, r3} 26b4: e284c018 add ip, r4, #24 26b8: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !iop->handlers || !iop->handlers->open_h ) {
26bc: 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;
26c0: e59e2000 ldr r2, [lr]
if ( !iop->handlers || !iop->handlers->open_h ) {
26c4: e3530000 cmp r3, #0
*/ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc;
26c8: 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 );
26cc: e5848014 str r8, [r4, #20]
iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 26d0: 0a00002d beq 278c <open+0x184>
26d4: e593c000 ldr ip, [r3] 26d8: e35c0000 cmp ip, #0
26dc: 0a00002a beq 278c <open+0x184> rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
26e0: e1a01006 mov r1, r6 26e4: e1a0300a mov r3, sl 26e8: e1a00004 mov r0, r4 26ec: e1a02005 mov r2, r5 26f0: e1a0e00f mov lr, pc 26f4: e12fff1c bx ip
if ( rc ) {
26f8: e3500000 cmp r0, #0
26fc: 1a000009 bne 2728 <open+0x120> /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) {
2700: e3150b01 tst r5, #1024 ; 0x400
2704: 1a00000c bne 273c <open+0x134>
2708: e59f5150 ldr r5, [pc, #336] ; 2860 <open+0x258>
if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops;
270c: e5950000 ldr r0, [r5] 2710: e0604004 rsb r4, r0, r4 2714: e1a00344 asr r0, r4, #6
}
2718: e28dd01c add sp, sp, #28 271c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 2720: e28dd00c add sp, sp, #12 2724: e12fff1e bx lr
goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno;
2728: eb002d39 bl dc14 <__errno> 272c: e5906000 ldr r6, [r0]
*/ done: va_end(ap); if ( rc ) {
2730: e3560000 cmp r6, #0
2734: 0afffff3 beq 2708 <open+0x100>
2738: ea000014 b 2790 <open+0x188>
/* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 );
273c: e59f511c ldr r5, [pc, #284] ; 2860 <open+0x258> 2740: e5950000 ldr r0, [r5] 2744: e0600004 rsb r0, r0, r4 2748: e1a00340 asr r0, r0, #6 274c: e3a01000 mov r1, #0 2750: e3a02000 mov r2, #0 2754: eb001cb1 bl 9a20 <ftruncate>
if ( rc ) {
2758: e2506000 subs r6, r0, #0
275c: 0affffea beq 270c <open+0x104> if(errno) rc = errno;
2760: eb002d2b bl dc14 <__errno> <== NOT EXECUTED 2764: e5903000 ldr r3, [r0] <== NOT EXECUTED 2768: e3530000 cmp r3, #0 <== NOT EXECUTED 276c: 1a000038 bne 2854 <open+0x24c> <== NOT EXECUTED
close( iop - rtems_libio_iops );
2770: e5950000 ldr r0, [r5] <== NOT EXECUTED 2774: e0600004 rsb r0, r0, r4 <== NOT EXECUTED 2778: e1a00340 asr r0, r0, #6 <== NOT EXECUTED 277c: e3a04000 mov r4, #0 <== NOT EXECUTED 2780: eb001c7d bl 997c <close> <== NOT EXECUTED 2784: e1a07004 mov r7, r4 <== NOT EXECUTED 2788: eaffffe8 b 2730 <open+0x128> <== NOT EXECUTED
if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops;
278c: e3a06086 mov r6, #134 ; 0x86 <== NOT EXECUTED
done: va_end(ap); if ( rc ) { if ( iop )
2790: e3540000 cmp r4, #0
rtems_libio_free( iop );
2794: 11a00004 movne r0, r4 2798: 1b001d7b blne 9d8c <rtems_libio_free>
if ( loc_to_free )
279c: e3570000 cmp r7, #0
27a0: 0a000007 beq 27c4 <open+0x1bc> rtems_filesystem_freenode( loc_to_free );
27a4: e597300c ldr r3, [r7, #12] 27a8: e3530000 cmp r3, #0
27ac: 0a000004 beq 27c4 <open+0x1bc>
27b0: e593301c ldr r3, [r3, #28] 27b4: e3530000 cmp r3, #0 27b8: 11a00007 movne r0, r7 27bc: 11a0e00f movne lr, pc 27c0: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
27c4: eb002d12 bl dc14 <__errno> 27c8: e5806000 str r6, [r0] 27cc: e3e00000 mvn r0, #0 27d0: eaffffd0 b 2718 <open+0x110>
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) {
27d4: eb002d0e bl dc14 <__errno> 27d8: e5903000 ldr r3, [r0] 27dc: e3530002 cmp r3, #2
27e0: 0a000003 beq 27f4 <open+0x1ec> } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno;
27e4: eb002d0a bl dc14 <__errno> 27e8: e3a07000 mov r7, #0 27ec: e5906000 ldr r6, [r0]
goto done;
27f0: eaffffce b 2730 <open+0x128>
rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) {
27f4: e2159c02 ands r9, r5, #512 ; 0x200 27f8: 01a07009 moveq r7, r9 27fc: 01a06003 moveq r6, r3
2800: 0affffe2 beq 2790 <open+0x188> rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL );
2804: e1a00006 mov r0, r6 2808: e38a1902 orr r1, sl, #32768 ; 0x8000 280c: e3a02000 mov r2, #0 2810: e3a03000 mov r3, #0 2814: ebfffdaf bl 1ed8 <mknod>
if ( rc ) {
2818: e2509000 subs r9, r0, #0
281c: 1afffff0 bne 27e4 <open+0x1dc> rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
2820: e1a00006 mov r0, r6 2824: eb0030eb bl ebd8 <strlen> 2828: e1a03007 mov r3, r7 282c: e1a01000 mov r1, r0 2830: e1a02009 mov r2, r9 2834: e1a00006 mov r0, r6 2838: e58d8000 str r8, [sp] 283c: ebfffc71 bl 1a08 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
2840: e3500000 cmp r0, #0 2844: 11a07009 movne r7, r9 2848: 13a0600d movne r6, #13
284c: 1affffcf bne 2790 <open+0x188>
2850: eaffff8d b 268c <open+0x84>
*/ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno;
2854: eb002cee bl dc14 <__errno> <== NOT EXECUTED 2858: e5906000 ldr r6, [r0] <== NOT EXECUTED 285c: eaffffc3 b 2770 <open+0x168> <== NOT EXECUTED
2860: 0001ae8c .word 0x0001ae8c
000025a0 <open_dev_console>: int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
25a0: e3a01000 mov r1, #0
/* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) {
25a4: 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) {
25a8: e59f004c ldr r0, [pc, #76] ; 25fc <open_dev_console+0x5c> 25ac: e1a02001 mov r2, r1 25b0: eb000014 bl 2608 <open> 25b4: e3700001 cmn r0, #1 25b8: 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)
25bc: e59f0038 ldr r0, [pc, #56] ; 25fc <open_dev_console+0x5c> 25c0: e3a01001 mov r1, #1 25c4: e3a02000 mov r2, #0 25c8: eb00000e bl 2608 <open> 25cc: e3700001 cmn r0, #1
25d0: 0a000007 beq 25f4 <open_dev_console+0x54> rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
25d4: e59f0020 ldr r0, [pc, #32] ; 25fc <open_dev_console+0x5c> 25d8: e3a01001 mov r1, #1 25dc: e3a02000 mov r2, #0 25e0: eb000008 bl 2608 <open> 25e4: e3700001 cmn r0, #1 25e8: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
25ec: e59f000c ldr r0, [pc, #12] ; 2600 <open_dev_console+0x60> <== NOT EXECUTED 25f0: eb000c2a bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
25f4: e59f0008 ldr r0, [pc, #8] ; 2604 <open_dev_console+0x64> <== NOT EXECUTED 25f8: eb000c28 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
25fc: 0001a5c4 .word 0x0001a5c4 2600: 55544432 .word 0x55544432 2604: 55544431 .word 0x55544431
00002fa8 <oproc>: /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
2fa8: e92d4010 push {r4, lr}
int i; if (tty->termios.c_oflag & OPOST) {
2fac: e5913034 ldr r3, [r1, #52] ; 0x34
/* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
2fb0: e24dd004 sub sp, sp, #4
int i; if (tty->termios.c_oflag & OPOST) {
2fb4: e3130001 tst r3, #1
/* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
2fb8: e1a04001 mov r4, r1 2fbc: e5cd0000 strb r0, [sp]
int i; if (tty->termios.c_oflag & OPOST) { 2fc0: 0a000014 beq 3018 <oproc+0x70> switch (c) {
2fc4: e5dd1000 ldrb r1, [sp] 2fc8: e2412008 sub r2, r1, #8 2fcc: e3520005 cmp r2, #5 2fd0: 979ff102 ldrls pc, [pc, r2, lsl #2] 2fd4: ea000005 b 2ff0 <oproc+0x48>
2fd8: 00003088 .word 0x00003088 <== NOT EXECUTED 2fdc: 00003064 .word 0x00003064 <== NOT EXECUTED 2fe0: 0000309c .word 0x0000309c <== NOT EXECUTED 2fe4: 00002ff0 .word 0x00002ff0 <== NOT EXECUTED 2fe8: 00002ff0 .word 0x00002ff0 <== NOT EXECUTED 2fec: 00003030 .word 0x00003030 <== NOT EXECUTED
if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC)
2ff0: e3130002 tst r3, #2
2ff4: 1a000034 bne 30cc <oproc+0x124>
2ff8: e59f310c ldr r3, [pc, #268] ; 310c <oproc+0x164> 2ffc: e5933000 ldr r3, [r3]
c = toupper(c); if (!iscntrl(c))
3000: e0831001 add r1, r3, r1 3004: e5d13001 ldrb r3, [r1, #1] 3008: e3130020 tst r3, #32
tty->column++;
300c: 05943028 ldreq r3, [r4, #40] ; 0x28 3010: 02833001 addeq r3, r3, #1 3014: 05843028 streq r3, [r4, #40] ; 0x28
break; } } rtems_termios_puts (&c, 1, tty);
3018: e1a02004 mov r2, r4 301c: e1a0000d mov r0, sp 3020: e3a01001 mov r1, #1 3024: ebffff97 bl 2e88 <rtems_termios_puts>
}
3028: e28dd004 add sp, sp, #4 302c: e8bd8010 pop {r4, pc}
tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
3030: e3130010 tst r3, #16 <== NOT EXECUTED 3034: 0a000002 beq 3044 <oproc+0x9c> <== NOT EXECUTED 3038: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 303c: e3520000 cmp r2, #0 <== NOT EXECUTED 3040: 0afffff8 beq 3028 <oproc+0x80> <== NOT EXECUTED
return; if (tty->termios.c_oflag & OCRNL) {
3044: e2132008 ands r2, r3, #8 <== NOT EXECUTED 3048: 0a00000c beq 3080 <oproc+0xd8> <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET)
304c: 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';
3050: e3a0300a mov r3, #10 <== NOT EXECUTED 3054: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET) tty->column = 0;
3058: 13a03000 movne r3, #0 <== NOT EXECUTED 305c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3060: eaffffec b 3018 <oproc+0x70> <== NOT EXECUTED
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
3064: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3068: e2033b06 and r3, r3, #6144 ; 0x1800
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
306c: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3070: e3530b06 cmp r3, #6144 ; 0x1800
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
3074: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i;
3078: 10812002 addne r2, r1, r2
tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 307c: 0a00001c beq 30f4 <oproc+0x14c> tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i;
3080: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
3084: eaffffe3 b 3018 <oproc+0x70> <== NOT EXECUTED
case '\b': if (tty->column > 0)
3088: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 308c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3090: c2433001 subgt r3, r3, #1 <== NOT EXECUTED 3094: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3098: eaffffde b 3018 <oproc+0x70> <== NOT EXECUTED
int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET)
309c: e3130020 tst r3, #32
tty->column = 0;
30a0: 13a02000 movne r2, #0 30a4: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
30a8: e3130004 tst r3, #4
30ac: 0affffd9 beq 3018 <oproc+0x70> rtems_termios_puts ("\r", 1, tty);
30b0: e59f0058 ldr r0, [pc, #88] ; 3110 <oproc+0x168> 30b4: e3a01001 mov r1, #1 30b8: e1a02004 mov r2, r4 30bc: ebffff71 bl 2e88 <rtems_termios_puts>
tty->column = 0;
30c0: e3a03000 mov r3, #0 30c4: e5843028 str r3, [r4, #40] ; 0x28 30c8: eaffffd2 b 3018 <oproc+0x70>
tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c);
30cc: e59f3038 ldr r3, [pc, #56] ; 310c <oproc+0x164> <== NOT EXECUTED 30d0: e5933000 ldr r3, [r3] <== NOT EXECUTED 30d4: e0832001 add r2, r3, r1 <== NOT EXECUTED 30d8: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30dc: e2022003 and r2, r2, #3 <== NOT EXECUTED 30e0: e3520002 cmp r2, #2 <== NOT EXECUTED 30e4: 02411020 subeq r1, r1, #32 <== NOT EXECUTED 30e8: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED 30ec: e5cd1000 strb r1, [sp] <== NOT EXECUTED 30f0: eaffffc2 b 3000 <oproc+0x58> <== NOT EXECUTED
break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i;
30f4: e0812002 add r2, r1, r2 30f8: e5842028 str r2, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
30fc: e59f0010 ldr r0, [pc, #16] ; 3114 <oproc+0x16c> 3100: e1a02004 mov r2, r4 3104: ebffff5f bl 2e88 <rtems_termios_puts>
return;
3108: eaffffc6 b 3028 <oproc+0x80> 310c: 00019700 .word 0x00019700 3110: 0001a724 .word 0x0001a724 3114: 0001a654 .word 0x0001a654
0000d0fc <pipe_create>: * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
d0fc: e92d4070 push {r4, r5, r6, lr} d100: 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)
d104: e28d4004 add r4, sp, #4 d108: e3a0c001 mov ip, #1
* Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
d10c: e1a05000 mov r5, r0
rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
d110: e3a01003 mov r1, #3 d114: e59f0154 ldr r0, [pc, #340] ; d270 <pipe_create+0x174> d118: e3a02007 mov r2, #7 d11c: e1a03004 mov r3, r4 d120: e58dc000 str ip, [sp] d124: ebffd237 bl 1a08 <rtems_filesystem_evaluate_path> d128: e3500000 cmp r0, #0
d12c: 1a00003a bne d21c <pipe_create+0x120> return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc);
d130: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED d134: e3530000 cmp r3, #0 <== NOT EXECUTED d138: 0a000004 beq d150 <pipe_create+0x54> <== NOT EXECUTED d13c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED d140: e3530000 cmp r3, #0 <== NOT EXECUTED d144: 11a00004 movne r0, r4 <== NOT EXECUTED d148: 11a0e00f movne lr, pc <== NOT EXECUTED d14c: 112fff13 bxne r3 <== NOT EXECUTED
/* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
d150: e59f311c ldr r3, [pc, #284] ; d274 <pipe_create+0x178> d154: e28d4018 add r4, sp, #24 d158: e8930007 ldm r3, {r0, r1, r2} d15c: e1a0c004 mov ip, r4 d160: e8ac0003 stmia ip!, {r0, r1}
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
d164: e59f310c ldr r3, [pc, #268] ; d278 <pipe_create+0x17c>
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
d168: e1a0100c mov r1, ip
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
d16c: e1d3c0b0 ldrh ip, [r3]
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
d170: e1c120b0 strh r2, [r1]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
d174: e1a0200c mov r2, ip d178: e28cc001 add ip, ip, #1 d17c: e59f10f8 ldr r1, [pc, #248] ; d27c <pipe_create+0x180> d180: e1c3c0b0 strh ip, [r3] d184: e284000a add r0, r4, #10 d188: eb000555 bl e6e4 <sprintf>
/* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
d18c: e1a00004 mov r0, r4 d190: e3a01d06 mov r1, #384 ; 0x180 d194: eb00004b bl d2c8 <mkfifo> d198: e2506000 subs r6, r0, #0
d19c: 1a00001c bne d214 <pipe_create+0x118> return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
d1a0: e1a00004 mov r0, r4 d1a4: e3a01901 mov r1, #16384 ; 0x4000 d1a8: ebffd516 bl 2608 <open>
if (filsdes[0] < 0) {
d1ac: 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);
d1b0: e5850000 str r0, [r5]
if (filsdes[0] < 0) { d1b4: ba000023 blt d248 <pipe_create+0x14c> the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]);
d1b8: e59f30c0 ldr r3, [pc, #192] ; d280 <pipe_create+0x184> <== NOT EXECUTED d1bc: e5933000 ldr r3, [r3] <== NOT EXECUTED d1c0: e1500003 cmp r0, r3 <== NOT EXECUTED d1c4: 359f30b8 ldrcc r3, [pc, #184] ; d284 <pipe_create+0x188> <== NOT EXECUTED d1c8: 35936000 ldrcc r6, [r3] <== NOT EXECUTED d1cc: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
d1d0: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED d1d4: e3c33001 bic r3, r3, #1 <== NOT EXECUTED d1d8: e5863014 str r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
d1dc: e1a00004 mov r0, r4 <== NOT EXECUTED d1e0: e3a01001 mov r1, #1 <== NOT EXECUTED d1e4: ebffd507 bl 2608 <open> <== NOT EXECUTED
if (filsdes[1] < 0) {
d1e8: 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);
d1ec: e5850004 str r0, [r5, #4] <== NOT EXECUTED
if (filsdes[1] < 0) {
d1f0: a3a06000 movge r6, #0 <== NOT EXECUTED d1f4: ba000018 blt d25c <pipe_create+0x160> <== NOT EXECUTED
err = errno; close(filsdes[0]); } unlink(fifopath);
d1f8: e1a00004 mov r0, r4 <== NOT EXECUTED d1fc: eb000035 bl d2d8 <unlink> <== NOT EXECUTED
} rtems_set_errno_and_return_minus_one(err);
d200: eb000283 bl dc14 <__errno> d204: e5806000 str r6, [r0]
}
d208: e3e00000 mvn r0, #0 d20c: e28dd028 add sp, sp, #40 ; 0x28 d210: e8bd8070 pop {r4, r5, r6, pc}
memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){
d214: eb00027e bl dc14 <__errno> <== NOT EXECUTED d218: eafffffa b d208 <pipe_create+0x10c> <== NOT EXECUTED
rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT)
d21c: eb00027c bl dc14 <__errno> d220: e5903000 ldr r3, [r0] d224: e3530002 cmp r3, #2
d228: 1afffff6 bne d208 <pipe_create+0x10c> return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
d22c: e3a01fff mov r1, #1020 ; 0x3fc d230: e2811003 add r1, r1, #3 d234: e59f0034 ldr r0, [pc, #52] ; d270 <pipe_create+0x174> d238: ebffd322 bl 1ec8 <mkdir> d23c: e3500000 cmp r0, #0
d240: 0affffc2 beq d150 <pipe_create+0x54>
d244: eaffffef b d208 <pipe_create+0x10c> <== NOT EXECUTED
} /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno;
d248: eb000271 bl dc14 <__errno> d24c: 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);
d250: e1a00004 mov r0, r4 d254: eb00001f bl d2d8 <unlink> d258: eaffffe8 b d200 <pipe_create+0x104>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno;
d25c: eb00026c bl dc14 <__errno> <== NOT EXECUTED d260: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
d264: e5950000 ldr r0, [r5] <== NOT EXECUTED d268: ebfff1c3 bl 997c <close> <== NOT EXECUTED d26c: eaffffe1 b d1f8 <pipe_create+0xfc> <== NOT EXECUTED
d270: 0001a8c8 .word 0x0001a8c8 d274: 0001a8d0 .word 0x0001a8d0 d278: 0001acae .word 0x0001acae d27c: 0001a8dc .word 0x0001a8dc d280: 000194c0 .word 0x000194c0 d284: 0001ae8c .word 0x0001ae8c
0000b928 <pipe_ioctl>: uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) {
b928: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED b92c: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED b930: e283313d add r3, r3, #1073741839 ; 0x4000000f <== NOT EXECUTED b934: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) {
b938: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED b93c: e1a05000 mov r5, r0 <== NOT EXECUTED b940: e1a04002 mov r4, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
b944: 13e00015 mvnne r0, #21 <== NOT EXECUTED b948: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
if (buffer == NULL)
b94c: e3520000 cmp r2, #0 <== NOT EXECUTED b950: 03e0000d mvneq r0, #13 <== NOT EXECUTED b954: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return -EFAULT; if (! PIPE_LOCK(pipe))
b958: e3a01000 mov r1, #0 <== NOT EXECUTED b95c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b960: e1a02001 mov r2, r1 <== NOT EXECUTED b964: ebffe5ad bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED b968: e2506000 subs r6, r0, #0 <== NOT EXECUTED b96c: 13e00003 mvnne r0, #3 <== NOT EXECUTED b970: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
b974: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
b978: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
b97c: e5843000 str r3, [r4] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
b980: ebffe5ee bl 5140 <rtems_semaphore_release> <== NOT EXECUTED b984: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0; } return -EINVAL; }
b988: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000b8b0 <pipe_lseek>: rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; }
b8b0: e3e0001c mvn r0, #28 <== NOT EXECUTED b8b4: e12fff1e bx lr <== NOT EXECUTED
0000b98c <pipe_read>: pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
b98c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED b990: e1a09001 mov r9, r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
b994: e3a01000 mov r1, #0 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
b998: e24dd008 sub sp, sp, #8 <== NOT EXECUTED b99c: e1a04000 mov r4, r0 <== NOT EXECUTED b9a0: e1a05002 mov r5, r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
b9a4: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED b9a8: e1a02001 mov r2, r1 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
b9ac: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
b9b0: ebffe59a bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED b9b4: e250a000 subs sl, r0, #0 <== NOT EXECUTED b9b8: 13e07003 mvnne r7, #3 <== NOT EXECUTED b9bc: 1a000027 bne ba60 <pipe_read+0xd4> <== NOT EXECUTED
return -EINTR; while (read < count) {
b9c0: e3550000 cmp r5, #0 <== NOT EXECUTED b9c4: 01a07005 moveq r7, r5 <== NOT EXECUTED b9c8: 01a06007 moveq r6, r7 <== NOT EXECUTED b9cc: 0a00001f beq ba50 <pipe_read+0xc4> <== NOT EXECUTED
/* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0)
b9d0: e1a0700a mov r7, sl <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe);
b9d4: e28db004 add fp, sp, #4 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) {
b9d8: e594200c ldr r2, [r4, #12] <== NOT EXECUTED b9dc: e3520000 cmp r2, #0 <== NOT EXECUTED b9e0: 1a000021 bne ba6c <pipe_read+0xe0> <== NOT EXECUTED
/* Not an error */ if (pipe->Writers == 0)
b9e4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED b9e8: e3530000 cmp r3, #0 <== NOT EXECUTED b9ec: 0a00003d beq bae8 <pipe_read+0x15c> <== NOT EXECUTED
goto out_locked; if (LIBIO_NODELAY(iop)) {
b9f0: e5986014 ldr r6, [r8, #20] <== NOT EXECUTED b9f4: e2166001 ands r6, r6, #1 <== NOT EXECUTED b9f8: 1a00003c bne baf0 <pipe_read+0x164> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++;
b9fc: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED ba00: e2833001 add r3, r3, #1 <== NOT EXECUTED ba04: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
ba08: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ba0c: ebffe5cb bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
ba10: e1a01006 mov r1, r6 <== NOT EXECUTED ba14: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED ba18: eb00043d bl cb14 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
ba1c: e1a01006 mov r1, r6 <== NOT EXECUTED ba20: 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))
ba24: e2506000 subs r6, r0, #0 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
ba28: 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))
ba2c: 13e06003 mvnne r6, #3 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
ba30: ebffe57a bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED ba34: e3500000 cmp r0, #0 <== NOT EXECUTED ba38: 1a00002e bne baf8 <pipe_read+0x16c> <== NOT EXECUTED
/* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
ba3c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
ba40: e3560000 cmp r6, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
ba44: e2433001 sub r3, r3, #1 <== NOT EXECUTED ba48: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
ba4c: 0affffe1 beq b9d8 <pipe_read+0x4c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
ba50: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ba54: ebffe5b9 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock: if (read > 0)
ba58: e3570000 cmp r7, #0 <== NOT EXECUTED ba5c: d1a07006 movle r7, r6 <== NOT EXECUTED
return read; return ret; }
ba60: e1a00007 mov r0, r7 <== NOT EXECUTED ba64: e28dd008 add sp, sp, #8 <== NOT EXECUTED ba68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start;
ba6c: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED ba70: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length);
ba74: e06a6005 rsb r6, sl, r5 <== NOT EXECUTED ba78: e1520006 cmp r2, r6 <== NOT EXECUTED ba7c: 31a06002 movcc r6, r2 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
ba80: e0613003 rsb r3, r1, r3 <== NOT EXECUTED
if (chunk > chunk1) {
ba84: e1560003 cmp r6, r3 <== NOT EXECUTED ba88: ca00001c bgt bb00 <pipe_read+0x174> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
ba8c: e5943000 ldr r3, [r4] <== NOT EXECUTED ba90: e089000a add r0, r9, sl <== NOT EXECUTED ba94: e0831001 add r1, r3, r1 <== NOT EXECUTED ba98: e1a02006 mov r2, r6 <== NOT EXECUTED ba9c: eb000a6a bl e44c <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
baa0: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED baa4: e0860000 add r0, r6, r0 <== NOT EXECUTED baa8: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
baac: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED bab0: eb002e0e bl 172f0 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
bab4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED bab8: e0663003 rsb r3, r6, r3 <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe))
babc: e3530000 cmp r3, #0 <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size;
bac0: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
bac4: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0;
bac8: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
if (pipe->waitingWriters > 0)
bacc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED bad0: e3530000 cmp r3, #0 <== NOT EXECUTED bad4: 1a000016 bne bb34 <pipe_read+0x1a8> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk;
bad8: e0877006 add r7, r7, r6 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) {
badc: e1570005 cmp r7, r5 <== NOT EXECUTED bae0: e1a0a007 mov sl, r7 <== NOT EXECUTED bae4: 3affffbb bcc b9d8 <pipe_read+0x4c> <== NOT EXECUTED bae8: e3a06000 mov r6, #0 <== NOT EXECUTED baec: eaffffd7 b ba50 <pipe_read+0xc4> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) {
baf0: e3e0600a mvn r6, #10 <== NOT EXECUTED baf4: eaffffd5 b ba50 <pipe_read+0xc4> <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) {
baf8: e3e06003 mvn r6, #3 <== NOT EXECUTED bafc: eaffffd5 b ba58 <pipe_read+0xcc> <== NOT EXECUTED
/* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
bb00: e5942000 ldr r2, [r4] <== NOT EXECUTED bb04: e089000a add r0, r9, sl <== NOT EXECUTED bb08: e0821001 add r1, r2, r1 <== NOT EXECUTED bb0c: e1a02003 mov r2, r3 <== NOT EXECUTED bb10: e58d3000 str r3, [sp] <== NOT EXECUTED bb14: eb000a4c bl e44c <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
bb18: e59d3000 ldr r3, [sp] <== NOT EXECUTED bb1c: e08a0003 add r0, sl, r3 <== NOT EXECUTED bb20: e0890000 add r0, r9, r0 <== NOT EXECUTED bb24: e0632006 rsb r2, r3, r6 <== NOT EXECUTED bb28: e5941000 ldr r1, [r4] <== NOT EXECUTED bb2c: eb000a46 bl e44c <memcpy> <== NOT EXECUTED bb30: eaffffda b baa0 <pipe_read+0x114> <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe);
bb34: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED bb38: e1a0100b mov r1, fp <== NOT EXECUTED bb3c: eb0003db bl cab0 <rtems_barrier_release> <== NOT EXECUTED bb40: eaffffe4 b bad8 <pipe_read+0x14c> <== NOT EXECUTED
0000bd5c <pipe_release>: */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
bd5c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
bd60: e5904000 ldr r4, [r0] <== NOT EXECUTED
*/ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
bd64: e1a05001 mov r5, r1 <== NOT EXECUTED
pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore,
bd68: e3a01000 mov r1, #0 <== NOT EXECUTED
*/ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
bd6c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED bd70: e1a07000 mov r7, r0 <== NOT EXECUTED
pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore,
bd74: e1a02001 mov r2, r1 <== NOT EXECUTED bd78: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED bd7c: ebffe4a7 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL)
bd80: e3500000 cmp r0, #0 <== NOT EXECUTED bd84: 1a000038 bne be6c <pipe_release+0x110> <== NOT EXECUTED
rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop);
bd88: e5956014 ldr r6, [r5, #20] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
bd8c: e3160002 tst r6, #2 <== NOT EXECUTED
pipe->Readers --;
bd90: 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);
bd94: e2066006 and r6, r6, #6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ) pipe->Readers --;
bd98: 12433001 subne r3, r3, #1 <== NOT EXECUTED bd9c: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
bda0: e3160004 tst r6, #4 <== NOT EXECUTED
pipe->Writers --;
bda4: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
bda8: e59f50c0 ldr r5, [pc, #192] ; be70 <pipe_release+0x114> <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --;
bdac: 12433001 subne r3, r3, #1 <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
bdb0: e3a01000 mov r1, #0 <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --;
bdb4: 15843014 strne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
bdb8: e5950000 ldr r0, [r5] <== NOT EXECUTED bdbc: e1a02001 mov r2, r1 <== NOT EXECUTED bdc0: ebffe496 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL)
bdc4: e3500000 cmp r0, #0 <== NOT EXECUTED bdc8: 1a000027 bne be6c <pipe_release+0x110> <== NOT EXECUTED
rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe);
bdcc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED bdd0: ebffe4da bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
bdd4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED bdd8: e3530000 cmp r3, #0 <== NOT EXECUTED bddc: 0a00000d beq be18 <pipe_release+0xbc> <== NOT EXECUTED
*pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
bde0: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED bde4: e2723001 rsbs r3, r2, #1 <== NOT EXECUTED bde8: 33a03000 movcc r3, #0 <== NOT EXECUTED bdec: e3560002 cmp r6, #2 <== NOT EXECUTED bdf0: 03a03000 moveq r3, #0 <== NOT EXECUTED bdf4: e3530000 cmp r3, #0 <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
bdf8: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED bdfc: 11a0100d movne r1, sp <== NOT EXECUTED be00: 1b00032a blne cab0 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
be04: e5950000 ldr r0, [r5] <== NOT EXECUTED be08: ebffe4cc bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; }
be0c: e3a00000 mov r0, #0 <== NOT EXECUTED be10: e28dd004 add sp, sp, #4 <== NOT EXECUTED be14: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) {
be18: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED be1c: e3580000 cmp r8, #0 <== NOT EXECUTED be20: 0a000005 beq be3c <pipe_release+0xe0> <== NOT EXECUTED
delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
be24: e3560004 cmp r6, #4 <== NOT EXECUTED be28: 0afffff5 beq be04 <pipe_release+0xa8> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe);
be2c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED be30: e1a0100d mov r1, sp <== NOT EXECUTED be34: eb00031d bl cab0 <rtems_barrier_release> <== NOT EXECUTED be38: eafffff1 b be04 <pipe_release+0xa8> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier);
be3c: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED be40: eb000300 bl ca48 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
be44: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED be48: eb0002fe bl ca48 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
be4c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED be50: ebffe449 bl 4f7c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
be54: e5940000 ldr r0, [r4] <== NOT EXECUTED be58: ebffd720 bl 1ae0 <free> <== NOT EXECUTED
free(pipe);
be5c: e1a00004 mov r0, r4 <== NOT EXECUTED be60: ebffd71e bl 1ae0 <free> <== NOT EXECUTED
/* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL;
be64: e5878000 str r8, [r7] <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) {
be68: eaffffe5 b be04 <pipe_release+0xa8> <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc);
be6c: ebffe60b bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
be70: 0001aca8 .word 0x0001aca8
0000bb44 <pipe_write>: pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
bb44: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0)
bb48: e2524000 subs r4, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
bb4c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED bb50: e1a05000 mov r5, r0 <== NOT EXECUTED bb54: e1a06001 mov r6, r1 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0)
bb58: 01a07004 moveq r7, r4 <== NOT EXECUTED bb5c: 1a000002 bne bb6c <pipe_write+0x28> <== NOT EXECUTED
#endif if (written > 0) return written; return ret; }
bb60: e1a00007 mov r0, r7 <== NOT EXECUTED bb64: e28dd008 add sp, sp, #8 <== NOT EXECUTED bb68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
/* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe))
bb6c: e3a01000 mov r1, #0 <== NOT EXECUTED bb70: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED bb74: e1a02001 mov r2, r1 <== NOT EXECUTED bb78: e58d3000 str r3, [sp] <== NOT EXECUTED bb7c: ebffe527 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED bb80: e2509000 subs r9, r0, #0 <== NOT EXECUTED bb84: e59d3000 ldr r3, [sp] <== NOT EXECUTED bb88: 13e07003 mvnne r7, #3 <== NOT EXECUTED bb8c: 1afffff3 bne bb60 <pipe_write+0x1c> <== NOT EXECUTED
return -EINTR; if (pipe->Readers == 0) {
bb90: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED bb94: e3570000 cmp r7, #0 <== NOT EXECUTED bb98: 0a00004f beq bcdc <pipe_write+0x198> <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1;
bb9c: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED bba0: e1540008 cmp r4, r8 <== NOT EXECUTED bba4: 91a0a004 movls sl, r4 <== NOT EXECUTED bba8: 83a0a001 movhi sl, #1 <== NOT EXECUTED
} pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) {
bbac: e1a07009 mov r7, r9 <== NOT EXECUTED
else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe);
bbb0: e28db004 add fp, sp, #4 <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) {
bbb4: e595100c ldr r1, [r5, #12] <== NOT EXECUTED bbb8: e0612008 rsb r2, r1, r8 <== NOT EXECUTED bbbc: e152000a cmp r2, sl <== NOT EXECUTED bbc0: 2a000021 bcs bc4c <pipe_write+0x108> <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
bbc4: e5938014 ldr r8, [r3, #20] <== NOT EXECUTED bbc8: e2188001 ands r8, r8, #1 <== NOT EXECUTED bbcc: 1a000050 bne bd14 <pipe_write+0x1d0> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++;
bbd0: e595201c ldr r2, [r5, #28] <== NOT EXECUTED bbd4: e2822001 add r2, r2, #1 <== NOT EXECUTED bbd8: e585201c str r2, [r5, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
bbdc: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED bbe0: e58d3000 str r3, [sp] <== NOT EXECUTED bbe4: ebffe555 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
bbe8: e1a01008 mov r1, r8 <== NOT EXECUTED bbec: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED bbf0: eb0003c7 bl cb14 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
bbf4: e1a01008 mov r1, r8 <== NOT EXECUTED bbf8: 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))
bbfc: e2508000 subs r8, r0, #0 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
bc00: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
} /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe))
bc04: 13e08003 mvnne r8, #3 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
bc08: ebffe504 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED bc0c: e3500000 cmp r0, #0 <== NOT EXECUTED bc10: e59d3000 ldr r3, [sp] <== NOT EXECUTED bc14: 1a00003c bne bd0c <pipe_write+0x1c8> <== NOT EXECUTED
/* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
bc18: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
if (ret != 0)
bc1c: e3580000 cmp r8, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
bc20: e2422001 sub r2, r2, #1 <== NOT EXECUTED bc24: e585201c str r2, [r5, #28] <== NOT EXECUTED
if (ret != 0)
bc28: 1a00002c bne bce0 <pipe_write+0x19c> <== NOT EXECUTED
goto out_locked; if (pipe->Readers == 0) {
bc2c: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED bc30: e3520000 cmp r2, #0 <== NOT EXECUTED bc34: 0a000028 beq bcdc <pipe_write+0x198> <== NOT EXECUTED bc38: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) {
bc3c: e595100c ldr r1, [r5, #12] <== NOT EXECUTED bc40: e0612008 rsb r2, r1, r8 <== NOT EXECUTED bc44: e152000a cmp r2, sl <== NOT EXECUTED bc48: 3affffdd bcc bbc4 <pipe_write+0x80> <== NOT EXECUTED
goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe);
bc4c: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe));
bc50: e069a004 rsb sl, r9, r4 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
bc54: e0810000 add r0, r1, r0 <== NOT EXECUTED bc58: e1a01008 mov r1, r8 <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe));
bc5c: e152000a cmp r2, sl <== NOT EXECUTED bc60: 31a0a002 movcc sl, r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
bc64: e58d3000 str r3, [sp] <== NOT EXECUTED bc68: eb002da0 bl 172f0 <__umodsi3> <== NOT EXECUTED bc6c: e0608008 rsb r8, r0, r8 <== NOT EXECUTED
if (chunk > chunk1) {
bc70: e15a0008 cmp sl, r8 <== NOT EXECUTED bc74: e59d3000 ldr r3, [sp] <== NOT EXECUTED bc78: da000027 ble bd1c <pipe_write+0x1d8> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
bc7c: e5952000 ldr r2, [r5] <== NOT EXECUTED bc80: e0861009 add r1, r6, r9 <== NOT EXECUTED bc84: e0820000 add r0, r2, r0 <== NOT EXECUTED bc88: e1a02008 mov r2, r8 <== NOT EXECUTED bc8c: eb0009ee bl e44c <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
bc90: e0881009 add r1, r8, r9 <== NOT EXECUTED bc94: e0861001 add r1, r6, r1 <== NOT EXECUTED bc98: e068200a rsb r2, r8, sl <== NOT EXECUTED bc9c: e5950000 ldr r0, [r5] <== NOT EXECUTED bca0: eb0009e9 bl e44c <memcpy> <== NOT EXECUTED bca4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
} else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk;
bca8: e595200c ldr r2, [r5, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
bcac: e5951018 ldr r1, [r5, #24] <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk;
bcb0: e082200a add r2, r2, sl <== NOT EXECUTED
if (pipe->waitingReaders > 0)
bcb4: e3510000 cmp r1, #0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk;
bcb8: e585200c str r2, [r5, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
bcbc: 1a00001e bne bd3c <pipe_write+0x1f8> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe); written += chunk;
bcc0: e087700a add r7, r7, sl <== NOT EXECUTED
} /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) {
bcc4: e1540007 cmp r4, r7 <== NOT EXECUTED bcc8: e1a09007 mov r9, r7 <== NOT EXECUTED bccc: 9a000020 bls bd54 <pipe_write+0x210> <== NOT EXECUTED bcd0: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED bcd4: e3a0a001 mov sl, #1 <== NOT EXECUTED bcd8: eaffffb5 b bbb4 <pipe_write+0x70> <== NOT EXECUTED bcdc: e3e0801f mvn r8, #31 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
bce0: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED bce4: ebffe515 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE)
bce8: e3780020 cmn r8, #32 <== NOT EXECUTED bcec: 0a000002 beq bcfc <pipe_write+0x1b8> <== NOT EXECUTED
kill(getpid(), SIGPIPE); #endif if (written > 0)
bcf0: e3570000 cmp r7, #0 <== NOT EXECUTED bcf4: d1a07008 movle r7, r8 <== NOT EXECUTED bcf8: eaffff98 b bb60 <pipe_write+0x1c> <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE);
bcfc: eb000243 bl c610 <getpid> <== NOT EXECUTED bd00: e3a0100d mov r1, #13 <== NOT EXECUTED bd04: eb000289 bl c730 <kill> <== NOT EXECUTED bd08: eafffff8 b bcf0 <pipe_write+0x1ac> <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) {
bd0c: e3e08003 mvn r8, #3 <== NOT EXECUTED bd10: eafffff6 b bcf0 <pipe_write+0x1ac> <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) {
bd14: e3e0800a mvn r8, #10 <== NOT EXECUTED bd18: eafffff0 b bce0 <pipe_write+0x19c> <== NOT EXECUTED
if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
bd1c: e5952000 ldr r2, [r5] <== NOT EXECUTED bd20: e0861009 add r1, r6, r9 <== NOT EXECUTED bd24: e0820000 add r0, r2, r0 <== NOT EXECUTED bd28: e1a0200a mov r2, sl <== NOT EXECUTED bd2c: e58d3000 str r3, [sp] <== NOT EXECUTED bd30: eb0009c5 bl e44c <memcpy> <== NOT EXECUTED bd34: e59d3000 ldr r3, [sp] <== NOT EXECUTED bd38: eaffffda b bca8 <pipe_write+0x164> <== NOT EXECUTED
pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe);
bd3c: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED bd40: e1a0100b mov r1, fp <== NOT EXECUTED bd44: e58d3000 str r3, [sp] <== NOT EXECUTED bd48: eb000358 bl cab0 <rtems_barrier_release> <== NOT EXECUTED bd4c: e59d3000 ldr r3, [sp] <== NOT EXECUTED bd50: eaffffda b bcc0 <pipe_write+0x17c> <== NOT EXECUTED
} /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) {
bd54: e3a08000 mov r8, #0 <== NOT EXECUTED bd58: eaffffe0 b bce0 <pipe_write+0x19c> <== NOT EXECUTED
00006360 <pthread_rwlock_timedrdlock>: int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) {
6360: e92d4030 push {r4, r5, lr}
Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock )
6364: e2505000 subs r5, r0, #0
int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) {
6368: e24dd00c sub sp, sp, #12
Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 636c: 0a00001d beq 63e8 <pthread_rwlock_timedrdlock+0x88> * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
6370: e1a00001 mov r0, r1 6374: e28d1004 add r1, sp, #4 6378: eb001970 bl c940 <_POSIX_Absolute_timeout_to_ticks> 637c: e5951000 ldr r1, [r5] 6380: e1a04000 mov r4, r0 6384: e28d2008 add r2, sp, #8 6388: e59f0090 ldr r0, [pc, #144] ; 6420 <pthread_rwlock_timedrdlock+0xc0> 638c: eb000a84 bl 8da4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
6390: e59dc008 ldr ip, [sp, #8] 6394: e35c0000 cmp ip, #0
6398: 1a000012 bne 63e8 <pthread_rwlock_timedrdlock+0x88> case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading(
639c: e5951000 ldr r1, [r5]
int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock,
63a0: e3540003 cmp r4, #3 63a4: 13a05000 movne r5, #0 63a8: 03a05001 moveq r5, #1 63ac: e2800010 add r0, r0, #16 63b0: e59d3004 ldr r3, [sp, #4] 63b4: e1a02005 mov r2, r5 63b8: e58dc000 str ip, [sp] 63bc: eb000725 bl 8058 <_CORE_RWLock_Obtain_for_reading>
do_wait, ticks, NULL ); _Thread_Enable_dispatch();
63c0: eb000cb2 bl 9690 <_Thread_Enable_dispatch>
if ( !do_wait ) {
63c4: e3550000 cmp r5, #0
63c8: 1a00000f bne 640c <pthread_rwlock_timedrdlock+0xac> if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
63cc: e59f3050 ldr r3, [pc, #80] ; 6424 <pthread_rwlock_timedrdlock+0xc4> 63d0: e5933000 ldr r3, [r3] 63d4: e5930034 ldr r0, [r3, #52] ; 0x34 63d8: e3500002 cmp r0, #2
63dc: 0a000004 beq 63f4 <pthread_rwlock_timedrdlock+0x94> break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code(
63e0: eb000042 bl 64f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> 63e4: ea000000 b 63ec <pthread_rwlock_timedrdlock+0x8c> 63e8: e3a00016 mov r0, #22
case OBJECTS_ERROR: break; } return EINVAL; }
63ec: e28dd00c add sp, sp, #12 63f0: e8bd8030 pop {r4, r5, pc}
); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) {
63f4: e3540000 cmp r4, #0
63f8: 0afffffa beq 63e8 <pthread_rwlock_timedrdlock+0x88>
63fc: e3540002 cmp r4, #2 6400: 93a00074 movls r0, #116 ; 0x74
6404: 9afffff8 bls 63ec <pthread_rwlock_timedrdlock+0x8c>
6408: eafffff4 b 63e0 <pthread_rwlock_timedrdlock+0x80> <== NOT EXECUTED
640c: e59f3010 ldr r3, [pc, #16] ; 6424 <pthread_rwlock_timedrdlock+0xc4> 6410: e5933000 ldr r3, [r3] 6414: e5930034 ldr r0, [r3, #52] ; 0x34
break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code(
6418: eb000034 bl 64f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> 641c: eafffff2 b 63ec <pthread_rwlock_timedrdlock+0x8c> 6420: 0001e3b4 .word 0x0001e3b4 6424: 0001e2a0 .word 0x0001e2a0
00006428 <pthread_rwlock_timedwrlock>: int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) {
6428: e92d4030 push {r4, r5, lr}
Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock )
642c: e2505000 subs r5, r0, #0
int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) {
6430: e24dd00c sub sp, sp, #12
Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 6434: 0a00001d beq 64b0 <pthread_rwlock_timedwrlock+0x88> * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
6438: e1a00001 mov r0, r1 643c: e28d1004 add r1, sp, #4 6440: eb00193e bl c940 <_POSIX_Absolute_timeout_to_ticks> 6444: e5951000 ldr r1, [r5] 6448: e1a04000 mov r4, r0 644c: e28d2008 add r2, sp, #8 6450: e59f0090 ldr r0, [pc, #144] ; 64e8 <pthread_rwlock_timedwrlock+0xc0> 6454: eb000a52 bl 8da4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
6458: e59dc008 ldr ip, [sp, #8] 645c: e35c0000 cmp ip, #0
6460: 1a000012 bne 64b0 <pthread_rwlock_timedwrlock+0x88> case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing(
6464: e5951000 ldr r1, [r5]
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock,
6468: e3540003 cmp r4, #3 646c: 13a05000 movne r5, #0 6470: 03a05001 moveq r5, #1 6474: e2800010 add r0, r0, #16 6478: e59d3004 ldr r3, [sp, #4] 647c: e1a02005 mov r2, r5 6480: e58dc000 str ip, [sp] 6484: eb00072a bl 8134 <_CORE_RWLock_Obtain_for_writing>
do_wait, ticks, NULL ); _Thread_Enable_dispatch();
6488: eb000c80 bl 9690 <_Thread_Enable_dispatch>
if ( !do_wait &&
648c: e3550000 cmp r5, #0
6490: 1a00000f bne 64d4 <pthread_rwlock_timedwrlock+0xac> (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
6494: e59f3050 ldr r3, [pc, #80] ; 64ec <pthread_rwlock_timedwrlock+0xc4> 6498: e5933000 ldr r3, [r3] 649c: e5930034 ldr r0, [r3, #52] ; 0x34
ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait &&
64a0: e3500002 cmp r0, #2
64a4: 0a000004 beq 64bc <pthread_rwlock_timedwrlock+0x94> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code(
64a8: eb000010 bl 64f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> 64ac: ea000000 b 64b4 <pthread_rwlock_timedwrlock+0x8c> 64b0: e3a00016 mov r0, #22
case OBJECTS_ERROR: break; } return EINVAL; }
64b4: e28dd00c add sp, sp, #12 64b8: e8bd8030 pop {r4, r5, pc}
); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) {
64bc: e3540000 cmp r4, #0
64c0: 0afffffa beq 64b0 <pthread_rwlock_timedwrlock+0x88>
64c4: e3540002 cmp r4, #2 64c8: 93a00074 movls r0, #116 ; 0x74
64cc: 9afffff8 bls 64b4 <pthread_rwlock_timedwrlock+0x8c>
64d0: eafffff4 b 64a8 <pthread_rwlock_timedwrlock+0x80> <== NOT EXECUTED
64d4: e59f3010 ldr r3, [pc, #16] ; 64ec <pthread_rwlock_timedwrlock+0xc4> 64d8: e5933000 ldr r3, [r3] 64dc: e5930034 ldr r0, [r3, #52] ; 0x34
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code(
64e0: eb000002 bl 64f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> 64e4: eafffff2 b 64b4 <pthread_rwlock_timedwrlock+0x8c> 64e8: 0001e3b4 .word 0x0001e3b4 64ec: 0001e2a0 .word 0x0001e2a0
00018cdc <read>: ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
18cdc: e59f30bc ldr r3, [pc, #188] ; 18da0 <read+0xc4> 18ce0: e5933000 ldr r3, [r3] 18ce4: e1500003 cmp r0, r3
ssize_t read( int fd, void *buffer, size_t count ) {
18ce8: e92d4810 push {r4, fp, lr}
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 18cec: 2a00001c bcs 18d64 <read+0x88> iop = rtems_libio_iop( fd );
18cf0: e59f40ac ldr r4, [pc, #172] ; 18da4 <read+0xc8> 18cf4: e5944000 ldr r4, [r4] 18cf8: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
18cfc: e5940014 ldr r0, [r4, #20] 18d00: e3100c01 tst r0, #256 ; 0x100
18d04: 0a000016 beq 18d64 <read+0x88> rtems_libio_check_buffer( buffer );
18d08: e3510000 cmp r1, #0
18d0c: 0a000019 beq 18d78 <read+0x9c> rtems_libio_check_count( count );
18d10: e3520000 cmp r2, #0 18d14: 01a00002 moveq r0, r2 18d18: 08bd8810 popeq {r4, fp, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
18d1c: e3100002 tst r0, #2
18d20: 0a000014 beq 18d78 <read+0x9c> /* * Now process the read(). */ if ( !iop->handlers->read_h )
18d24: e594303c ldr r3, [r4, #60] ; 0x3c 18d28: e5933008 ldr r3, [r3, #8] 18d2c: e3530000 cmp r3, #0
18d30: 0a000015 beq 18d8c <read+0xb0> rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count );
18d34: e1a00004 mov r0, r4 18d38: e1a0e00f mov lr, pc 18d3c: e12fff13 bx r3
if ( rc > 0 )
18d40: e3500000 cmp r0, #0 18d44: d8bd8810 pople {r4, fp, pc}
iop->offset += rc;
18d48: e284c00c add ip, r4, #12 18d4c: e89c1800 ldm ip, {fp, ip} 18d50: e09b2000 adds r2, fp, r0 18d54: e0ac3fc0 adc r3, ip, r0, asr #31 18d58: e584200c str r2, [r4, #12] 18d5c: e5843010 str r3, [r4, #16]
return rc; }
18d60: e8bd8810 pop {r4, fp, pc}
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop );
18d64: ebffd3aa bl dc14 <__errno> 18d68: e3a03009 mov r3, #9 18d6c: e5803000 str r3, [r0] 18d70: e3e00000 mvn r0, #0 18d74: e8bd8810 pop {r4, fp, pc}
rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
18d78: ebffd3a5 bl dc14 <__errno> <== NOT EXECUTED 18d7c: e3a03016 mov r3, #22 <== NOT EXECUTED 18d80: e5803000 str r3, [r0] <== NOT EXECUTED 18d84: e3e00000 mvn r0, #0 <== NOT EXECUTED 18d88: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
/* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
18d8c: ebffd3a0 bl dc14 <__errno> <== NOT EXECUTED 18d90: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 18d94: e5803000 str r3, [r0] <== NOT EXECUTED 18d98: e3e00000 mvn r0, #0 <== NOT EXECUTED 18d9c: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
18da0: 000194c0 .word 0x000194c0 18da4: 0001ae8c .word 0x0001ae8c
00026dec <readlink>: ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
26dec: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc; int result; if (!buf)
26df0: e2516000 subs r6, r1, #0
ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
26df4: e24dd018 sub sp, sp, #24 26df8: e1a05002 mov r5, r2 26dfc: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc; int result; if (!buf) 26e00: 0a000032 beq 26ed0 <readlink+0xe4> rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
26e04: eb007aca bl 45934 <strlen> 26e08: e28d4004 add r4, sp, #4 26e0c: e3a0c000 mov ip, #0 26e10: e1a01000 mov r1, r0 26e14: e1a0200c mov r2, ip 26e18: e1a00007 mov r0, r7 26e1c: e1a03004 mov r3, r4 26e20: e58dc000 str ip, [sp] 26e24: ebff7736 bl 4b04 <rtems_filesystem_evaluate_path>
0, &loc, false ); if ( result != 0 )
26e28: e3500000 cmp r0, #0
26e2c: 1a000025 bne 26ec8 <readlink+0xdc> return -1; if ( !loc.ops->node_type_h ){
26e30: e59d2010 ldr r2, [sp, #16] 26e34: e5923010 ldr r3, [r2, #16] 26e38: e3530000 cmp r3, #0
26e3c: 0a000019 beq 26ea8 <readlink+0xbc> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
26e40: e1a00004 mov r0, r4 26e44: e1a0e00f mov lr, pc 26e48: e12fff13 bx r3 26e4c: e3500004 cmp r0, #4
26e50: 1a000023 bne 26ee4 <readlink+0xf8> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){
26e54: e59d2010 ldr r2, [sp, #16] 26e58: e592303c ldr r3, [r2, #60] ; 0x3c 26e5c: e3530000 cmp r3, #0
26e60: 0a00002c beq 26f18 <readlink+0x12c> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
26e64: e1a02005 mov r2, r5 26e68: e1a01006 mov r1, r6 26e6c: e1a00004 mov r0, r4 26e70: e1a0e00f mov lr, pc 26e74: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
26e78: e59d3010 ldr r3, [sp, #16] 26e7c: 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 );
26e80: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 26e84: 0a000004 beq 26e9c <readlink+0xb0>
26e88: e593301c ldr r3, [r3, #28] 26e8c: e3530000 cmp r3, #0 26e90: 11a00004 movne r0, r4 26e94: 11a0e00f movne lr, pc 26e98: 112fff13 bxne r3
return result; }
26e9c: e1a00005 mov r0, r5 26ea0: e28dd018 add sp, sp, #24 26ea4: e8bd80f0 pop {r4, r5, r6, r7, pc}
0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc );
26ea8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 26eac: e3530000 cmp r3, #0 <== NOT EXECUTED 26eb0: 11a00004 movne r0, r4 <== NOT EXECUTED 26eb4: 11a0e00f movne lr, pc <== NOT EXECUTED 26eb8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26ebc: eb006011 bl 3ef08 <__errno> <== NOT EXECUTED 26ec0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26ec4: e5803000 str r3, [r0] <== NOT EXECUTED 26ec8: e3e05000 mvn r5, #0 <== NOT EXECUTED 26ecc: eafffff2 b 26e9c <readlink+0xb0> <== NOT EXECUTED
{ rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT );
26ed0: eb00600c bl 3ef08 <__errno> <== NOT EXECUTED 26ed4: e3a0300e mov r3, #14 <== NOT EXECUTED 26ed8: e5803000 str r3, [r0] <== NOT EXECUTED 26edc: e3e05000 mvn r5, #0 <== NOT EXECUTED 26ee0: eaffffed b 26e9c <readlink+0xb0> <== NOT EXECUTED
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc );
26ee4: e59d3010 ldr r3, [sp, #16] 26ee8: e3530000 cmp r3, #0
26eec: 0a000004 beq 26f04 <readlink+0x118>
26ef0: e593301c ldr r3, [r3, #28] 26ef4: e3530000 cmp r3, #0 26ef8: 11a00004 movne r0, r4 26efc: 11a0e00f movne lr, pc 26f00: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
26f04: eb005fff bl 3ef08 <__errno> 26f08: e3a03016 mov r3, #22 26f0c: e5803000 str r3, [r0] 26f10: e3e05000 mvn r5, #0 26f14: eaffffe0 b 26e9c <readlink+0xb0>
} if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc );
26f18: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 26f1c: e3530000 cmp r3, #0 <== NOT EXECUTED 26f20: 11a00004 movne r0, r4 <== NOT EXECUTED 26f24: 11a0e00f movne lr, pc <== NOT EXECUTED 26f28: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26f2c: eb005ff5 bl 3ef08 <__errno> <== NOT EXECUTED 26f30: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26f34: e5803000 str r3, [r0] <== NOT EXECUTED 26f38: e3e05000 mvn r5, #0 <== NOT EXECUTED 26f3c: eaffffd6 b 26e9c <readlink+0xb0> <== NOT EXECUTED
00003c64 <readv>: int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd );
3c64: e59f3160 ldr r3, [pc, #352] ; 3dcc <readv+0x168> 3c68: e5933000 ldr r3, [r3] 3c6c: e1500003 cmp r0, r3
ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) {
3c70: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3c74: e1a04002 mov r4, r2
int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3c78: 2a000049 bcs 3da4 <readv+0x140> iop = rtems_libio_iop( fd );
3c7c: e59f314c ldr r3, [pc, #332] ; 3dd0 <readv+0x16c> 3c80: e5936000 ldr r6, [r3] 3c84: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
3c88: e5963014 ldr r3, [r6, #20] 3c8c: e3130c01 tst r3, #256 ; 0x100
3c90: 0a000043 beq 3da4 <readv+0x140> rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
3c94: e3130002 tst r3, #2
3c98: 0a00003b beq 3d8c <readv+0x128> /* * Argument validation on IO vector */ if ( !iov )
3c9c: e3510000 cmp r1, #0
3ca0: 0a000039 beq 3d8c <readv+0x128> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
3ca4: e3520000 cmp r2, #0
3ca8: da000037 ble 3d8c <readv+0x128> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
3cac: e3520b01 cmp r2, #1024 ; 0x400
3cb0: ca000035 bgt 3d8c <readv+0x128> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h )
3cb4: e596303c ldr r3, [r6, #60] ; 0x3c 3cb8: e5933008 ldr r3, [r3, #8] 3cbc: e3530000 cmp r3, #0
3cc0: 0a00003c beq 3db8 <readv+0x154> rtems_set_errno_and_return_minus_one( ENOTSUP );
3cc4: e1a05001 mov r5, r1 3cc8: e3a01000 mov r1, #0 3ccc: e1a02005 mov r2, r5 3cd0: e3a07001 mov r7, #1 3cd4: e1a00001 mov r0, r1 3cd8: ea000000 b 3ce0 <readv+0x7c>
* are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3cdc: e1a00008 mov r0, r8
ssize_t old; if ( !iov[v].iov_base )
3ce0: e592c000 ldr ip, [r2] 3ce4: e35c0000 cmp ip, #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++ ) {
3ce8: e2811001 add r1, r1, #1
ssize_t old; if ( !iov[v].iov_base ) 3cec: 0a000026 beq 3d8c <readv+0x128> if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len;
3cf0: e592c004 ldr ip, [r2, #4] 3cf4: e080800c add r8, r0, ip
if ( total < old )
3cf8: e1580000 cmp r8, r0
3cfc: ba000022 blt 3d8c <readv+0x128> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
3d00: e35c0000 cmp ip, #0 3d04: 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++ ) {
3d08: e1540001 cmp r4, r1 3d0c: e2822008 add r2, r2, #8
3d10: cafffff1 bgt 3cdc <readv+0x78> /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) {
3d14: e3570000 cmp r7, #0 3d18: 13a08000 movne r8, #0
3d1c: 1a00001e bne 3d9c <readv+0x138>
3d20: e1a08007 mov r8, r7 3d24: ea00000f b 3d68 <readv+0x104>
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 3d28: 0a000006 beq 3d48 <readv+0xe4> iop->offset += bytes;
3d2c: e286c00c add ip, r6, #12 3d30: e89c1800 ldm ip, {fp, ip} 3d34: e09b2000 adds r2, fp, r0 3d38: e0ac3fc0 adc r3, ip, r0, asr #31 3d3c: e586200c str r2, [r6, #12] 3d40: e5863010 str r3, [r6, #16]
total += bytes;
3d44: e0888000 add r8, r8, r0
} if (bytes != iov[ v ].iov_len)
3d48: e5953004 ldr r3, [r5, #4] 3d4c: e1500003 cmp r0, r3
3d50: 1a000011 bne 3d9c <readv+0x138> } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3d54: e1540007 cmp r4, r7 3d58: e2855008 add r5, r5, #8
3d5c: da00000e ble 3d9c <readv+0x138>
3d60: e596303c ldr r3, [r6, #60] ; 0x3c 3d64: e5933008 ldr r3, [r3, #8]
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
3d68: e8950006 ldm r5, {r1, r2} 3d6c: e1a00006 mov r0, r6 3d70: e1a0e00f mov lr, pc 3d74: e12fff13 bx r3
if ( bytes < 0 )
3d78: e3500000 cmp r0, #0
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3d7c: e2877001 add r7, r7, #1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3d80: aaffffe8 bge 3d28 <readv+0xc4> } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3d84: e3e08000 mvn r8, #0 <== NOT EXECUTED 3d88: ea000003 b 3d9c <readv+0x138> <== NOT EXECUTED
/* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL );
3d8c: eb00318c bl 103c4 <__errno> 3d90: e3a03016 mov r3, #22 3d94: e5803000 str r3, [r0] 3d98: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len) break; } return total; }
3d9c: e1a00008 mov r0, r8 3da0: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop );
3da4: eb003186 bl 103c4 <__errno> <== NOT EXECUTED 3da8: e3a03009 mov r3, #9 <== NOT EXECUTED 3dac: e5803000 str r3, [r0] <== NOT EXECUTED 3db0: e3e08000 mvn r8, #0 <== NOT EXECUTED 3db4: eafffff8 b 3d9c <readv+0x138> <== NOT EXECUTED
if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
3db8: eb003181 bl 103c4 <__errno> <== NOT EXECUTED 3dbc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3dc0: e5803000 str r3, [r0] <== NOT EXECUTED 3dc4: e3e08000 mvn r8, #0 <== NOT EXECUTED 3dc8: eafffff3 b 3d9c <readv+0x138> <== NOT EXECUTED
3dcc: 0001d4d0 .word 0x0001d4d0 3dd0: 000202e0 .word 0x000202e0
00018e00 <realloc>: { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
18e00: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
18e04: e59f3118 ldr r3, [pc, #280] ; 18f24 <realloc+0x124>
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
18e08: e59f5118 ldr r5, [pc, #280] ; 18f28 <realloc+0x128>
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
18e0c: e5932000 ldr r2, [r3]
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
18e10: e5953010 ldr r3, [r5, #16]
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
18e14: e3520003 cmp r2, #3
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
18e18: e2833001 add r3, r3, #1 18e1c: e24dd004 sub sp, sp, #4 18e20: e5853010 str r3, [r5, #16] 18e24: e1a04000 mov r4, r0 18e28: e1a06001 mov r6, r1
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 18e2c: 0a000020 beq 18eb4 <realloc+0xb4> } /* * Continue with realloc(). */ if ( !ptr )
18e30: e3540000 cmp r4, #0
18e34: 0a00001a beq 18ea4 <realloc+0xa4> return malloc( size ); if ( !size ) {
18e38: e3560000 cmp r6, #0
18e3c: 0a00000f beq 18e80 <realloc+0x80> free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
18e40: e59f70e4 ldr r7, [pc, #228] ; 18f2c <realloc+0x12c> 18e44: e1a01004 mov r1, r4 18e48: e5970000 ldr r0, [r7] 18e4c: e1a0200d mov r2, sp 18e50: eb00006b bl 19004 <_Protected_heap_Get_block_size> 18e54: e2508000 subs r8, r0, #0
18e58: 0a00000c beq 18e90 <realloc+0x90> #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) {
18e5c: e5970000 ldr r0, [r7] 18e60: e1a01004 mov r1, r4 18e64: e1a02006 mov r2, r6 18e68: eb000076 bl 19048 <_Protected_heap_Resize_block> 18e6c: e3500000 cmp r0, #0
18e70: 0a00001b beq 18ee4 <realloc+0xe4> memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; }
18e74: e1a00004 mov r0, r4 18e78: e28dd004 add sp, sp, #4 18e7c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
*/ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr );
18e80: e1a00004 mov r0, r4 <== NOT EXECUTED 18e84: ebffa315 bl 1ae0 <free> <== NOT EXECUTED 18e88: e1a04006 mov r4, r6 <== NOT EXECUTED
return (void *) 0;
18e8c: eafffff8 b 18e74 <realloc+0x74> <== NOT EXECUTED
} if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL;
18e90: ebffd35f bl dc14 <__errno> 18e94: e3a03016 mov r3, #22 18e98: e5803000 str r3, [r0] 18e9c: e1a04008 mov r4, r8
return (void *) 0;
18ea0: eafffff3 b 18e74 <realloc+0x74>
/* * Continue with realloc(). */ if ( !ptr ) return malloc( size );
18ea4: e1a00006 mov r0, r6 18ea8: ebffa3c7 bl 1dcc <malloc> 18eac: e1a04000 mov r4, r0 18eb0: eaffffef b 18e74 <realloc+0x74>
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0)
18eb4: e59f3074 ldr r3, [pc, #116] ; 18f30 <realloc+0x130> 18eb8: e5933000 ldr r3, [r3] 18ebc: e3530000 cmp r3, #0
18ec0: 0a000001 beq 18ecc <realloc+0xcc> } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area;
18ec4: e3a04000 mov r4, #0 18ec8: eaffffe9 b 18e74 <realloc+0x74>
if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0)
18ecc: e59f3060 ldr r3, [pc, #96] ; 18f34 <realloc+0x134> 18ed0: e5933000 ldr r3, [r3] 18ed4: e3530000 cmp r3, #0
18ed8: 0affffd4 beq 18e30 <realloc+0x30> } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area;
18edc: e3a04000 mov r4, #0 <== NOT EXECUTED 18ee0: eaffffe3 b 18e74 <realloc+0x74> <== NOT EXECUTED
* There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size );
18ee4: e1a00006 mov r0, r6 18ee8: ebffa3b7 bl 1dcc <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
18eec: e5953004 ldr r3, [r5, #4]
if ( !new_area ) {
18ef0: e2507000 subs r7, r0, #0
* and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
18ef4: e2433001 sub r3, r3, #1 18ef8: e5853004 str r3, [r5, #4]
if ( !new_area ) { 18efc: 0afffff0 beq 18ec4 <realloc+0xc4> return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size );
18f00: e59d2000 ldr r2, [sp] 18f04: e1a01004 mov r1, r4 18f08: e1560002 cmp r6, r2 18f0c: 31a02006 movcc r2, r6 18f10: ebffd54d bl e44c <memcpy>
free( ptr );
18f14: e1a00004 mov r0, r4 18f18: ebffa2f0 bl 1ae0 <free> 18f1c: e1a04007 mov r4, r7
return new_area;
18f20: eaffffd3 b 18e74 <realloc+0x74> 18f24: 0001b1b0 .word 0x0001b1b0 18f28: 0001aea4 .word 0x0001aea4 18f2c: 000194cc .word 0x000194cc 18f30: 0001b00c .word 0x0001b00c 18f34: 0001b09c .word 0x0001b09c
00026f40 <rmdir>: #include <rtems/seterr.h> int rmdir( const char *pathname ) {
26f40: e92d40f0 push {r4, r5, r6, r7, lr} 26f44: e24dd02c sub sp, sp, #44 ; 0x2c 26f48: e1a05000 mov r5, r0
/* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname );
26f4c: ebff7696 bl 49ac <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
26f50: e2507000 subs r7, r0, #0
26f54: 1a000080 bne 2715c <rmdir+0x21c> rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
26f58: e5d53000 ldrb r3, [r5] 26f5c: e353002f cmp r3, #47 ; 0x2f 26f60: 1353005c cmpne r3, #92 ; 0x5c
26f64: 1a000049 bne 27090 <rmdir+0x150>
26f68: e59f328c ldr r3, [pc, #652] ; 271fc <rmdir+0x2bc> 26f6c: e593c000 ldr ip, [r3] 26f70: e28cc018 add ip, ip, #24 26f74: e8bc000f ldm ip!, {r0, r1, r2, r3} 26f78: e28d4018 add r4, sp, #24 26f7c: e1a0e004 mov lr, r4 26f80: e8ae000f stmia lr!, {r0, r1, r2, r3} 26f84: e59c2000 ldr r2, [ip] 26f88: e58e2000 str r2, [lr] 26f8c: e3a06000 mov r6, #0
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
26f90: e1a0e004 mov lr, r4 26f94: e8be000f ldm lr!, {r0, r1, r2, r3} 26f98: e28dc004 add ip, sp, #4 26f9c: e8ac000f stmia ip!, {r0, r1, r2, r3} 26fa0: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
26fa4: e0855007 add r5, r5, r7
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
26fa8: e58c3000 str r3, [ip]
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
26fac: e1a00005 mov r0, r5 26fb0: eb007a5f bl 45934 <strlen> 26fb4: e1a01000 mov r1, r0 26fb8: e1a00005 mov r0, r5 26fbc: ebff7666 bl 495c <rtems_filesystem_prefix_separators> 26fc0: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
26fc4: e1a00007 mov r0, r7 26fc8: eb007a59 bl 45934 <strlen> 26fcc: e28d5004 add r5, sp, #4 26fd0: e3a0c000 mov ip, #0 26fd4: e1a01000 mov r1, r0 26fd8: e1a0200c mov r2, ip 26fdc: e1a00007 mov r0, r7 26fe0: e1a03005 mov r3, r5 26fe4: e58dc000 str ip, [sp] 26fe8: ebff7689 bl 4a14 <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
26fec: e3500000 cmp r0, #0
26ff0: 1a00004a bne 27120 <rmdir+0x1e0> /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){
26ff4: e59d2010 ldr r2, [sp, #16] 26ff8: e5923010 ldr r3, [r2, #16] 26ffc: e3530000 cmp r3, #0
27000: 0a000079 beq 271ec <rmdir+0x2ac> 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 ){
27004: e1a00005 mov r0, r5 27008: e1a0e00f mov lr, pc 2700c: e12fff13 bx r3 27010: e3500001 cmp r0, #1
27014: 1a00002a bne 270c4 <rmdir+0x184> /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){
27018: e59d300c ldr r3, [sp, #12] 2701c: e5933034 ldr r3, [r3, #52] ; 0x34 27020: e3530000 cmp r3, #0
27024: 0a000058 beq 2718c <rmdir+0x24c> if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
27028: e1a00004 mov r0, r4 2702c: e1a01005 mov r1, r5 27030: e1a0e00f mov lr, pc 27034: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
27038: e59d3010 ldr r3, [sp, #16] 2703c: 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 );
27040: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc ); 27044: 0a000004 beq 2705c <rmdir+0x11c>
27048: e593301c ldr r3, [r3, #28] 2704c: e3530000 cmp r3, #0 27050: 11a00005 movne r0, r5 27054: 11a0e00f movne lr, pc 27058: 112fff13 bxne r3
if ( free_parentloc )
2705c: e3560000 cmp r6, #0
27060: 0a000007 beq 27084 <rmdir+0x144> rtems_filesystem_freenode( &parentloc );
27064: e59d3024 ldr r3, [sp, #36] ; 0x24 27068: e3530000 cmp r3, #0
2706c: 0a000004 beq 27084 <rmdir+0x144>
27070: e593301c ldr r3, [r3, #28] 27074: e3530000 cmp r3, #0 27078: 11a00004 movne r0, r4 2707c: 11a0e00f movne lr, pc 27080: 112fff13 bxne r3
return result; }
27084: e1a00007 mov r0, r7 27088: e28dd02c add sp, sp, #44 ; 0x2c 2708c: e8bd80f0 pop {r4, r5, r6, r7, pc}
*/ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
27090: e3530000 cmp r3, #0 <== NOT EXECUTED 27094: 0affffb3 beq 26f68 <rmdir+0x28> <== NOT EXECUTED 27098: e59f315c ldr r3, [pc, #348] ; 271fc <rmdir+0x2bc> <== NOT EXECUTED 2709c: e593c000 ldr ip, [r3] <== NOT EXECUTED 270a0: e28cc004 add ip, ip, #4 <== NOT EXECUTED 270a4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 270a8: e28d4018 add r4, sp, #24 <== NOT EXECUTED 270ac: e1a0e004 mov lr, r4 <== NOT EXECUTED 270b0: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 270b4: e59c2000 ldr r2, [ip] <== NOT EXECUTED 270b8: e1a06007 mov r6, r7 <== NOT EXECUTED 270bc: e58e2000 str r2, [lr] <== NOT EXECUTED 270c0: eaffffb2 b 26f90 <rmdir+0x50> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc );
270c4: e59d3010 ldr r3, [sp, #16] 270c8: e3530000 cmp r3, #0
270cc: 0a000004 beq 270e4 <rmdir+0x1a4>
270d0: e593301c ldr r3, [r3, #28] 270d4: e3530000 cmp r3, #0 270d8: 11a00005 movne r0, r5 270dc: 11a0e00f movne lr, pc 270e0: 112fff13 bxne r3
if ( free_parentloc )
270e4: e3560000 cmp r6, #0
270e8: 0a000007 beq 2710c <rmdir+0x1cc> rtems_filesystem_freenode( &parentloc );
270ec: e59d3024 ldr r3, [sp, #36] ; 0x24 270f0: e3530000 cmp r3, #0
270f4: 0a000004 beq 2710c <rmdir+0x1cc>
270f8: e593301c ldr r3, [r3, #28] 270fc: e3530000 cmp r3, #0 27100: 11a00004 movne r0, r4 27104: 11a0e00f movne lr, pc 27108: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
2710c: eb005f7d bl 3ef08 <__errno> 27110: e3a03014 mov r3, #20 27114: e5803000 str r3, [r0] 27118: e3e07000 mvn r7, #0 2711c: eaffffd8 b 27084 <rmdir+0x144>
name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc )
27120: e3560000 cmp r6, #0
27124: 1a000001 bne 27130 <rmdir+0x1f0> result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc );
27128: e3e07000 mvn r7, #0 2712c: eaffffd4 b 27084 <rmdir+0x144>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc );
27130: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 27134: e3530000 cmp r3, #0 <== NOT EXECUTED 27138: 0afffffa beq 27128 <rmdir+0x1e8> <== NOT EXECUTED 2713c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 27140: e3530000 cmp r3, #0 <== NOT EXECUTED 27144: 0afffff7 beq 27128 <rmdir+0x1e8> <== NOT EXECUTED 27148: e1a00004 mov r0, r4 <== NOT EXECUTED 2714c: e1a0e00f mov lr, pc <== NOT EXECUTED 27150: e12fff13 bx r3 <== NOT EXECUTED 27154: e3e07000 mvn r7, #0 <== NOT EXECUTED 27158: eaffffc9 b 27084 <rmdir+0x144> <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
2715c: e28d4018 add r4, sp, #24 27160: e3a0c000 mov ip, #0 27164: e1a00005 mov r0, r5 27168: e1a01007 mov r1, r7 2716c: e3a02002 mov r2, #2 27170: e1a03004 mov r3, r4 27174: e58dc000 str ip, [sp] 27178: ebff7661 bl 4b04 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
2717c: e3500000 cmp r0, #0
27180: 1affffe8 bne 27128 <rmdir+0x1e8>
27184: e3a06001 mov r6, #1 27188: eaffff80 b 26f90 <rmdir+0x50>
/* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc );
2718c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 27190: e3530000 cmp r3, #0 <== NOT EXECUTED 27194: 0a000005 beq 271b0 <rmdir+0x270> <== NOT EXECUTED 27198: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2719c: e3530000 cmp r3, #0 <== NOT EXECUTED 271a0: 0a000002 beq 271b0 <rmdir+0x270> <== NOT EXECUTED 271a4: e1a00005 mov r0, r5 <== NOT EXECUTED 271a8: e1a0e00f mov lr, pc <== NOT EXECUTED 271ac: e12fff13 bx r3 <== NOT EXECUTED
if ( free_parentloc )
271b0: e3560000 cmp r6, #0 <== NOT EXECUTED 271b4: 0a000007 beq 271d8 <rmdir+0x298> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
271b8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 271bc: e3530000 cmp r3, #0 <== NOT EXECUTED 271c0: 0a000004 beq 271d8 <rmdir+0x298> <== NOT EXECUTED 271c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 271c8: e3530000 cmp r3, #0 <== NOT EXECUTED 271cc: 11a00004 movne r0, r4 <== NOT EXECUTED 271d0: 11a0e00f movne lr, pc <== NOT EXECUTED 271d4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
271d8: eb005f4a bl 3ef08 <__errno> <== NOT EXECUTED 271dc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 271e0: e5803000 str r3, [r0] <== NOT EXECUTED 271e4: e3e07000 mvn r7, #0 <== NOT EXECUTED 271e8: eaffffa5 b 27084 <rmdir+0x144> <== NOT EXECUTED
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc );
271ec: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 271f0: e3530000 cmp r3, #0 <== NOT EXECUTED 271f4: 1affffea bne 271a4 <rmdir+0x264> <== NOT EXECUTED 271f8: eaffffec b 271b0 <rmdir+0x270> <== NOT EXECUTED
271fc: 00059348 .word 0x00059348
00013b94 <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; }
13b94: e59f0000 ldr r0, [pc, #0] ; 13b9c <rtems_assoc_name_bad+0x8><== NOT EXECUTED 13b98: e12fff1e bx lr <== NOT EXECUTED
13b9c: 0002370c .word 0x0002370c
0001027c <rtems_assoc_name_by_local>: const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
1027c: e92d4010 push {r4, lr} 10280: e1a04001 mov r4, r1
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
10284: eb000006 bl 102a4 <rtems_assoc_ptr_by_local>
if (nap)
10288: e3500000 cmp r0, #0
1028c: 0a000001 beq 10298 <rtems_assoc_name_by_local+0x1c> return nap->name; return rtems_assoc_name_bad(local_value); }
10290: e5900000 ldr r0, [r0] 10294: 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);
10298: e1a00004 mov r0, r4 <== NOT EXECUTED
}
1029c: 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);
102a0: ea000e3b b 13b94 <rtems_assoc_name_bad> <== NOT EXECUTED
0000db7c <rtems_assoc_ptr_by_local>: const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
db7c: e92d4030 push {r4, r5, lr} db80: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
db84: e5900000 ldr r0, [r0] db88: e3500000 cmp r0, #0
const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
db8c: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
db90: 01a04000 moveq r4, r0
db94: 0a000013 beq dbe8 <rtems_assoc_ptr_by_local+0x6c>
db98: e59f105c ldr r1, [pc, #92] ; dbfc <rtems_assoc_ptr_by_local+0x80> db9c: eb000345 bl e8b8 <strcmp> dba0: e3500000 cmp r0, #0 dba4: 13a02000 movne r2, #0
dba8: 1a00000b bne dbdc <rtems_assoc_ptr_by_local+0x60> default_ap = ap++; for ( ; ap->name; ap++)
dbac: e594300c ldr r3, [r4, #12] <== NOT EXECUTED dbb0: e3530000 cmp r3, #0 <== NOT EXECUTED
) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++;
dbb4: e284300c add r3, r4, #12 <== NOT EXECUTED
for ( ; ap->name; ap++)
dbb8: 0a00000a beq dbe8 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED dbbc: e1a02004 mov r2, r4 <== NOT EXECUTED dbc0: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->local_value == local_value)
dbc4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED dbc8: e1530005 cmp r3, r5 <== NOT EXECUTED dbcc: 0a000005 beq dbe8 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++)
dbd0: e5b4300c ldr r3, [r4, #12]! dbd4: e3530000 cmp r3, #0
dbd8: 0a000004 beq dbf0 <rtems_assoc_ptr_by_local+0x74> if (ap->local_value == local_value)
dbdc: e5943004 ldr r3, [r4, #4] dbe0: e1530005 cmp r3, r5
dbe4: 1afffff9 bne dbd0 <rtems_assoc_ptr_by_local+0x54> return ap; return default_ap; }
dbe8: e1a00004 mov r0, r4 dbec: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++)
dbf0: e1a04002 mov r4, r2
if (ap->local_value == local_value) return ap; return default_ap; }
dbf4: e1a00004 mov r0, r4 dbf8: e8bd8030 pop {r4, r5, pc} dbfc: 0001a8bc .word 0x0001a8bc
0000c58c <rtems_assoc_ptr_by_remote>: const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) {
c58c: e92d4030 push {r4, r5, lr} c590: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
c594: e5900000 ldr r0, [r0] c598: e3500000 cmp r0, #0
const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) {
c59c: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
c5a0: 01a04000 moveq r4, r0
c5a4: 0a000013 beq c5f8 <rtems_assoc_ptr_by_remote+0x6c>
c5a8: e59f105c ldr r1, [pc, #92] ; c60c <rtems_assoc_ptr_by_remote+0x80> c5ac: eb0008c1 bl e8b8 <strcmp> c5b0: e3500000 cmp r0, #0 c5b4: 13a02000 movne r2, #0
c5b8: 1a00000b bne c5ec <rtems_assoc_ptr_by_remote+0x60> default_ap = ap++; for ( ; ap->name; ap++)
c5bc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED c5c0: e3530000 cmp r3, #0 <== NOT EXECUTED
) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++;
c5c4: e284300c add r3, r4, #12 <== NOT EXECUTED
for ( ; ap->name; ap++)
c5c8: 0a00000a beq c5f8 <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED c5cc: e1a02004 mov r2, r4 <== NOT EXECUTED c5d0: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->remote_value == remote_value)
c5d4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED c5d8: e1530005 cmp r3, r5 <== NOT EXECUTED c5dc: 0a000005 beq c5f8 <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++)
c5e0: e5b4300c ldr r3, [r4, #12]! c5e4: e3530000 cmp r3, #0
c5e8: 0a000004 beq c600 <rtems_assoc_ptr_by_remote+0x74> if (ap->remote_value == remote_value)
c5ec: e5943008 ldr r3, [r4, #8] c5f0: e1530005 cmp r3, r5
c5f4: 1afffff9 bne c5e0 <rtems_assoc_ptr_by_remote+0x54> return ap; return default_ap; }
c5f8: e1a00004 mov r0, r4 c5fc: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++)
c600: e1a04002 mov r4, r2
if (ap->remote_value == remote_value) return ap; return default_ap; }
c604: e1a00004 mov r0, r4 c608: e8bd8030 pop {r4, r5, pc} c60c: 0001a8bc .word 0x0001a8bc
0000d2b4 <rtems_assoc_remote_by_local>: uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
d2b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
d2b8: eb00022f bl db7c <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
d2bc: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
d2c0: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0; }
d2c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000d288 <rtems_deviceio_errno>: { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) {
d288: e92d4010 push {r4, lr} <== NOT EXECUTED d28c: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
d290: e59f0018 ldr r0, [pc, #24] ; d2b0 <rtems_deviceio_errno+0x28><== NOT EXECUTED d294: eb000006 bl d2b4 <rtems_assoc_remote_by_local> <== NOT EXECUTED d298: e2504000 subs r4, r0, #0 <== NOT EXECUTED d29c: 0a000001 beq d2a8 <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{ errno = rc;
d2a0: eb00025b bl dc14 <__errno> <== NOT EXECUTED d2a4: e5804000 str r4, [r0] <== NOT EXECUTED
return -1; } return -1; }
d2a8: e3e00000 mvn r0, #0 <== NOT EXECUTED d2ac: e8bd8010 pop {r4, pc} <== NOT EXECUTED
d2b0: 0001a16c .word 0x0001a16c
00006bc8 <rtems_error>: int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) {
6bc8: e92d000e push {r1, r2, r3} <== NOT EXECUTED 6bcc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 6bd0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
va_list arglist; int chars_written; va_start(arglist, printf_format);
6bd4: e28d300c add r3, sp, #12 <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6bd8: e1a02003 mov r2, r3 <== NOT EXECUTED 6bdc: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
) { va_list arglist; int chars_written; va_start(arglist, printf_format);
6be0: e58d3000 str r3, [sp] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6be4: ebffff81 bl 69f0 <rtems_verror> <== NOT EXECUTED
va_end(arglist); return chars_written; }
6be8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 6bec: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 6bf0: e28dd00c add sp, sp, #12 <== NOT EXECUTED 6bf4: e12fff1e bx lr <== NOT EXECUTED
000018b0 <rtems_filesystem_dirname>: } int rtems_filesystem_dirname( const char *pathname ) {
18b0: e92d4010 push {r4, lr} 18b4: e1a04000 mov r4, r0
int len = strlen( pathname );
18b8: eb0034c6 bl ebd8 <strlen>
while ( len ) {
18bc: e3500000 cmp r0, #0
int rtems_filesystem_dirname( const char *pathname ) { int len = strlen( pathname );
18c0: e1a02000 mov r2, r0
while ( len ) {
18c4: 08bd8010 popeq {r4, pc}
len--;
18c8: e2400001 sub r0, r0, #1
if ( rtems_filesystem_is_separator( pathname[len] ) )
18cc: e7d43000 ldrb r3, [r4, r0] 18d0: e353002f cmp r3, #47 ; 0x2f 18d4: 1353005c cmpne r3, #92 ; 0x5c 18d8: 08bd8010 popeq {r4, pc} 18dc: e3530000 cmp r3, #0 18e0: 10844002 addne r4, r4, r2
18e4: 1a000008 bne 190c <rtems_filesystem_dirname+0x5c>
18e8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
18ec: e5543002 ldrb r3, [r4, #-2] 18f0: e353002f cmp r3, #47 ; 0x2f 18f4: 1353005c cmpne r3, #92 ; 0x5c
) { int len = strlen( pathname ); while ( len ) { len--;
18f8: e2400001 sub r0, r0, #1
if ( rtems_filesystem_is_separator( pathname[len] ) )
18fc: 08bd8010 popeq {r4, pc} 1900: e3530000 cmp r3, #0 1904: e2444001 sub r4, r4, #1 1908: 08bd8010 popeq {r4, pc}
const char *pathname ) { int len = strlen( pathname ); while ( len ) {
190c: e3500000 cmp r0, #0
1910: 1afffff5 bne 18ec <rtems_filesystem_dirname+0x3c> if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; }
1914: e8bd8010 pop {r4, pc}
00001a08 <rtems_filesystem_evaluate_path>: int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
1a08: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/* * Verify Input parameters. */ if ( !pathname )
1a0c: e2505000 subs r5, r0, #0
int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
1a10: e1a07001 mov r7, r1 1a14: e1a06002 mov r6, r2 1a18: e1a0c003 mov ip, r3 1a1c: e59d8020 ldr r8, [sp, #32]
/* * Verify Input parameters. */ if ( !pathname ) 1a20: 0a000029 beq 1acc <rtems_filesystem_evaluate_path+0xc4> rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc )
1a24: e3530000 cmp r3, #0
1a28: 0a000022 beq 1ab8 <rtems_filesystem_evaluate_path+0xb0> /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc );
1a2c: e5d53000 ldrb r3, [r5] 1a30: e353002f cmp r3, #47 ; 0x2f 1a34: 1353005c cmpne r3, #92 ; 0x5c 1a38: 13a04000 movne r4, #0 1a3c: 03a04001 moveq r4, #1
1a40: 1a000010 bne 1a88 <rtems_filesystem_evaluate_path+0x80>
1a44: e59f3090 ldr r3, [pc, #144] ; 1adc <rtems_filesystem_evaluate_path+0xd4> 1a48: e5934000 ldr r4, [r3] 1a4c: e2844018 add r4, r4, #24 1a50: e8b4000f ldm r4!, {r0, r1, r2, r3} 1a54: e1a0900c mov r9, ip 1a58: e8a9000f stmia r9!, {r0, r1, r2, r3} 1a5c: e5942000 ldr r2, [r4] 1a60: e3a04001 mov r4, #1 1a64: e5892000 str r2, [r9] 1a68: e1a01004 mov r1, r4
/* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i],
1a6c: e0850004 add r0, r5, r4 1a70: e0611007 rsb r1, r1, r7 1a74: e1a02006 mov r2, r6 1a78: e1a0300c mov r3, ip 1a7c: e58d8020 str r8, [sp, #32]
pathnamelen - i, flags, pathloc, follow_link ); }
1a80: 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],
1a84: eaffffa3 b 1918 <rtems_filesystem_evaluate_relative_path>
/* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc );
1a88: e3530000 cmp r3, #0
1a8c: 0affffec beq 1a44 <rtems_filesystem_evaluate_path+0x3c>
1a90: e59f3044 ldr r3, [pc, #68] ; 1adc <rtems_filesystem_evaluate_path+0xd4> 1a94: e593a000 ldr sl, [r3] 1a98: e28aa004 add sl, sl, #4 1a9c: e8ba000f ldm sl!, {r0, r1, r2, r3} 1aa0: e1a0900c mov r9, ip 1aa4: e8a9000f stmia r9!, {r0, r1, r2, r3} 1aa8: e59a2000 ldr r2, [sl] 1aac: e1a01004 mov r1, r4 1ab0: e5892000 str r2, [r9] 1ab4: eaffffec b 1a6c <rtems_filesystem_evaluate_path+0x64>
if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
1ab8: eb003055 bl dc14 <__errno> <== NOT EXECUTED 1abc: e3a03005 mov r3, #5 <== NOT EXECUTED 1ac0: e5803000 str r3, [r0] <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); }
1ac4: e3e00000 mvn r0, #0 <== NOT EXECUTED 1ac8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
/* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT );
1acc: eb003050 bl dc14 <__errno> <== NOT EXECUTED 1ad0: e3a0300e mov r3, #14 <== NOT EXECUTED 1ad4: e5803000 str r3, [r0] <== NOT EXECUTED 1ad8: eafffff9 b 1ac4 <rtems_filesystem_evaluate_path+0xbc> <== NOT EXECUTED
1adc: 00019658 .word 0x00019658
00001918 <rtems_filesystem_evaluate_relative_path>: /* * Verify Input parameters. */ if ( !pathname )
1918: e3500000 cmp r0, #0
int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
191c: e92d4030 push {r4, r5, lr} 1920: e1a05002 mov r5, r2 1924: e1a04003 mov r4, r3
/* * Verify Input parameters. */ if ( !pathname ) 1928: 0a00002c beq 19e0 <rtems_filesystem_evaluate_relative_path+0xc8> rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc )
192c: e3530000 cmp r3, #0
1930: 0a00002f beq 19f4 <rtems_filesystem_evaluate_relative_path+0xdc> rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h )
1934: e593c00c ldr ip, [r3, #12] 1938: e59cc000 ldr ip, [ip] 193c: e35c0000 cmp ip, #0
1940: 0a000021 beq 19cc <rtems_filesystem_evaluate_relative_path+0xb4> rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
1944: e1a0e00f mov lr, pc 1948: e12fff1c bx ip
/* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) {
194c: e59d200c ldr r2, [sp, #12] 1950: e2703001 rsbs r3, r0, #1 1954: 33a03000 movcc r3, #0 1958: e3520000 cmp r2, #0 195c: 03a03000 moveq r3, #0 1960: e3530000 cmp r3, #0 1964: 08bd8030 popeq {r4, r5, pc}
if ( !pathloc->ops->node_type_h ){
1968: e594200c ldr r2, [r4, #12] 196c: e5923010 ldr r3, [r2, #16] 1970: e3530000 cmp r3, #0
1974: 0a00000f beq 19b8 <rtems_filesystem_evaluate_relative_path+0xa0> rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc );
1978: e1a00004 mov r0, r4 197c: e1a0e00f mov lr, pc 1980: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1984: e2400003 sub r0, r0, #3 1988: e3500001 cmp r0, #1 198c: 83a00000 movhi r0, #0 1990: 88bd8030 pophi {r4, r5, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){
1994: e594200c ldr r2, [r4, #12] 1998: e5923034 ldr r3, [r2, #52] ; 0x34 199c: e3530000 cmp r3, #0
19a0: 0a000004 beq 19b8 <rtems_filesystem_evaluate_relative_path+0xa0> * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags );
19a4: e1a00004 mov r0, r4 19a8: e1a01005 mov r1, r5 19ac: e1a0e00f mov lr, pc 19b0: e12fff13 bx r3
} } return result; }
19b4: e8bd8030 pop {r4, r5, pc}
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc );
19b8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 19bc: e3530000 cmp r3, #0 <== NOT EXECUTED 19c0: 11a00004 movne r0, r4 <== NOT EXECUTED 19c4: 11a0e00f movne lr, pc <== NOT EXECUTED 19c8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
19cc: eb003090 bl dc14 <__errno> <== NOT EXECUTED 19d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 19d4: e5803000 str r3, [r0] <== NOT EXECUTED 19d8: e3e00000 mvn r0, #0 <== NOT EXECUTED 19dc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT );
19e0: eb00308b bl dc14 <__errno> <== NOT EXECUTED 19e4: e3a0300e mov r3, #14 <== NOT EXECUTED 19e8: e5803000 str r3, [r0] <== NOT EXECUTED 19ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 19f0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
19f4: eb003086 bl dc14 <__errno> <== NOT EXECUTED 19f8: e3a03005 mov r3, #5 <== NOT EXECUTED 19fc: e5803000 str r3, [r0] <== NOT EXECUTED 1a00: e3e00000 mvn r0, #0 <== NOT EXECUTED 1a04: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00001720 <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 ) {
1720: e92d40f0 push {r4, r5, r6, r7, lr}
/* * Set the default umask to "022". */ rtems_filesystem_umask = 022;
1724: e59f6120 ldr r6, [pc, #288] ; 184c <rtems_filesystem_initialize+0x12c> 1728: e5963000 ldr r3, [r6] 172c: e3a02012 mov r2, #18 1730: 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 ) {
1734: e24dd01c sub sp, sp, #28
*/ rtems_filesystem_umask = 022; init_fs_mount_table();
1738: eb000241 bl 2044 <init_fs_mount_table>
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 )
173c: e59f310c ldr r3, [pc, #268] ; 1850 <rtems_filesystem_initialize+0x130> 1740: e5933000 ldr r3, [r3] 1744: e3530000 cmp r3, #0
1748: 0a000033 beq 181c <rtems_filesystem_initialize+0xfc> rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0];
174c: e59f3100 ldr r3, [pc, #256] ; 1854 <rtems_filesystem_initialize+0x134> 1750: e5930000 ldr r0, [r3]
status = mount(
1754: e890100e ldm r0, {r1, r2, r3, ip} 1758: e28d0018 add r0, sp, #24 175c: e58dc000 str ip, [sp] 1760: eb00023e bl 2060 <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 )
1764: e3700001 cmn r0, #1
1768: 0a000033 beq 183c <rtems_filesystem_initialize+0x11c> * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
176c: 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;
1770: 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;
1774: e28ee01c add lr, lr, #28 1778: e8be000f ldm lr!, {r0, r1, r2, r3} 177c: e287c018 add ip, r7, #24 1780: e8ac000f stmia ip!, {r0, r1, r2, r3} 1784: 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;
1788: 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);
178c: 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;
1790: 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;
1794: 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);
1798: e1a03004 mov r3, r4 179c: e3a01001 mov r1, #1 17a0: e1a02005 mov r2, r5 17a4: e59f00ac ldr r0, [pc, #172] ; 1858 <rtems_filesystem_initialize+0x138>
rtems_filesystem_root = loc;
17a8: 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);
17ac: e58d5000 str r5, [sp] 17b0: eb000094 bl 1a08 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
17b4: e596c000 ldr ip, [r6] 17b8: e8b7000f ldm r7!, {r0, r1, r2, r3} 17bc: e28cc018 add ip, ip, #24 17c0: e8ac000f stmia ip!, {r0, r1, r2, r3} 17c4: e5973000 ldr r3, [r7]
/* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
17c8: 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;
17cc: e58c3000 str r3, [ip]
/* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
17d0: e3a01001 mov r1, #1 17d4: e1a03004 mov r3, r4 17d8: e59f0078 ldr r0, [pc, #120] ; 1858 <rtems_filesystem_initialize+0x138> 17dc: e58d5000 str r5, [sp] 17e0: eb000088 bl 1a08 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
17e4: e596c000 ldr ip, [r6] 17e8: e8b4000f ldm r4!, {r0, r1, r2, r3} 17ec: e28cc004 add ip, ip, #4 17f0: e8ac000f stmia ip!, {r0, r1, r2, r3} 17f4: 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);
17f8: e3a01f7f mov r1, #508 ; 0x1fc
/* 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;
17fc: 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);
1800: e2811003 add r1, r1, #3 1804: e59f0050 ldr r0, [pc, #80] ; 185c <rtems_filesystem_initialize+0x13c> 1808: eb0001ae bl 1ec8 <mkdir>
if ( status != 0 )
180c: e1500005 cmp r0, r5
1810: 1a000005 bne 182c <rtems_filesystem_initialize+0x10c> * 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. */ }
1814: e28dd01c add sp, sp, #28 1818: e8bd80f0 pop {r4, r5, r6, r7, pc}
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 );
181c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 1820: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 1824: e2800001 add r0, r0, #1 <== NOT EXECUTED 1828: eb000f9c bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 );
182c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 1830: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 1834: e2800003 add r0, r0, #3 <== NOT EXECUTED 1838: eb000f98 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 );
183c: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 1840: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 1844: e2800002 add r0, r0, #2 <== NOT EXECUTED 1848: eb000f94 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
184c: 00019658 .word 0x00019658 1850: 00019c10 .word 0x00019c10 1854: 000194c8 .word 0x000194c8 1858: 0001a60c .word 0x0001a60c 185c: 0001a610 .word 0x0001a610
0002754c <rtems_filesystem_nodes_equal>: ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){
2754c: e5903000 ldr r3, [r0] <== NOT EXECUTED 27550: e5910000 ldr r0, [r1] <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
27554: e1530000 cmp r3, r0 <== NOT EXECUTED 27558: 13a00000 movne r0, #0 <== NOT EXECUTED 2755c: 03a00001 moveq r0, #1 <== NOT EXECUTED 27560: e12fff1e bx lr <== NOT EXECUTED
000015d4 <rtems_io_lookup_name>: rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) {
15d4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 15d8: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 15dc: e1a06001 mov r6, r1 <== NOT EXECUTED 15e0: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
15e4: eb00357b bl ebd8 <strlen> <== NOT EXECUTED 15e8: e28d4004 add r4, sp, #4 <== NOT EXECUTED 15ec: e1a01000 mov r1, r0 <== NOT EXECUTED 15f0: e3a02000 mov r2, #0 <== NOT EXECUTED 15f4: e1a03004 mov r3, r4 <== NOT EXECUTED 15f8: e3a0c001 mov ip, #1 <== NOT EXECUTED 15fc: e1a00005 mov r0, r5 <== NOT EXECUTED 1600: e58dc000 str ip, [sp] <== NOT EXECUTED 1604: eb0000ff bl 1a08 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) {
1608: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 160c: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 1610: 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 );
1614: e1a07000 mov r7, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
1618: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
161c: 0a000013 beq 1670 <rtems_io_lookup_name+0x9c> <== NOT EXECUTED
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc );
1620: e1a00004 mov r0, r4 <== NOT EXECUTED 1624: e1a0e00f mov lr, pc <== NOT EXECUTED 1628: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
162c: e3570000 cmp r7, #0 <== NOT EXECUTED 1630: 03500002 cmpeq r0, #2 <== NOT EXECUTED 1634: 03a07000 moveq r7, #0 <== NOT EXECUTED 1638: 13a07001 movne r7, #1 <== NOT EXECUTED 163c: 0a000015 beq 1698 <rtems_io_lookup_name+0xc4> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1640: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1644: e3530000 cmp r3, #0 <== NOT EXECUTED 1648: 0a000025 beq 16e4 <rtems_io_lookup_name+0x110> <== NOT EXECUTED 164c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1650: e3530000 cmp r3, #0 <== NOT EXECUTED 1654: 0a000022 beq 16e4 <rtems_io_lookup_name+0x110> <== NOT EXECUTED 1658: e1a00004 mov r0, r4 <== NOT EXECUTED 165c: e1a0e00f mov lr, pc <== NOT EXECUTED 1660: e12fff13 bx r3 <== NOT EXECUTED 1664: e3a0000d mov r0, #13 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; }
1668: e28dd018 add sp, sp, #24 <== NOT EXECUTED 166c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc );
1670: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1674: e3530000 cmp r3, #0 <== NOT EXECUTED 1678: 11a00004 movne r0, r4 <== NOT EXECUTED 167c: 11a0e00f movne lr, pc <== NOT EXECUTED 1680: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1684: eb003162 bl dc14 <__errno> <== NOT EXECUTED 1688: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 168c: e5803000 str r3, [r0] <== NOT EXECUTED 1690: e3e00000 mvn r0, #0 <== NOT EXECUTED 1694: eafffff3 b 1668 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name;
1698: e5865000 str r5, [r6] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
169c: e1a00005 mov r0, r5 <== NOT EXECUTED 16a0: eb00354c bl ebd8 <strlen> <== NOT EXECUTED 16a4: e5860004 str r0, [r6, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
16a8: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED 16ac: e5863008 str r3, [r6, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc );
16b0: e59d3010 ldr r3, [sp, #16] <== 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;
16b4: e5982054 ldr r2, [r8, #84] ; 0x54 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
16b8: e3530000 cmp r3, #0 <== NOT EXECUTED
} device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor;
16bc: e586200c str r2, [r6, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
16c0: 0a000009 beq 16ec <rtems_io_lookup_name+0x118> <== NOT EXECUTED 16c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 16c8: e3530000 cmp r3, #0 <== NOT EXECUTED 16cc: 0a000006 beq 16ec <rtems_io_lookup_name+0x118> <== NOT EXECUTED 16d0: e1a00004 mov r0, r4 <== NOT EXECUTED 16d4: e1a0e00f mov lr, pc <== NOT EXECUTED 16d8: e12fff13 bx r3 <== NOT EXECUTED 16dc: e1a00007 mov r0, r7 <== NOT EXECUTED 16e0: eaffffe0 b 1668 <rtems_io_lookup_name+0x94> <== NOT EXECUTED 16e4: e3a0000d mov r0, #13 <== NOT EXECUTED 16e8: eaffffde b 1668 <rtems_io_lookup_name+0x94> <== NOT EXECUTED 16ec: e3a00000 mov r0, #0 <== NOT EXECUTED 16f0: eaffffdc b 1668 <rtems_io_lookup_name+0x94> <== NOT EXECUTED
000070ec <rtems_io_register_driver>: rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
70ec: e59f3144 ldr r3, [pc, #324] ; 7238 <rtems_io_register_driver+0x14c> 70f0: e593c000 ldr ip, [r3]
rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers;
70f4: e59f3140 ldr r3, [pc, #320] ; 723c <rtems_io_register_driver+0x150>
if ( rtems_interrupt_is_in_progress() )
70f8: e35c0000 cmp ip, #0
rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) {
70fc: e92d4010 push {r4, lr} 7100: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
7104: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
7108: 13a00012 movne r0, #18 710c: 18bd8010 popne {r4, pc}
return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL )
7110: e3520000 cmp r2, #0
7114: 0a00003c beq 720c <rtems_io_register_driver+0x120> return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL )
7118: e3510000 cmp r1, #0
if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit;
711c: e5820000 str r0, [r2]
if ( driver_table == NULL ) 7120: 0a000039 beq 720c <rtems_io_register_driver+0x120> static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
7124: e591c000 ldr ip, [r1] 7128: e35c0000 cmp ip, #0
712c: 0a000033 beq 7200 <rtems_io_register_driver+0x114> return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit )
7130: e1500004 cmp r0, r4 7134: 93a0000a movls r0, #10 7138: 98bd8010 popls {r4, pc}
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
713c: e59f00fc ldr r0, [pc, #252] ; 7240 <rtems_io_register_driver+0x154> 7140: e590c000 ldr ip, [r0] 7144: e28cc001 add ip, ip, #1 7148: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) {
714c: e3540000 cmp r4, #0
7150: 1a000020 bne 71d8 <rtems_io_register_driver+0xec> static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers;
7154: e593e000 ldr lr, [r3]
rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) {
7158: e35e0000 cmp lr, #0
715c: 0a00002c beq 7214 <rtems_io_register_driver+0x128>
7160: e59f30dc ldr r3, [pc, #220] ; 7244 <rtems_io_register_driver+0x158> 7164: e593c000 ldr ip, [r3] 7168: e1a0300c mov r3, ip 716c: ea000003 b 7180 <rtems_io_register_driver+0x94> 7170: e2844001 add r4, r4, #1 7174: e15e0004 cmp lr, r4 7178: e2833018 add r3, r3, #24
717c: 9a000005 bls 7198 <rtems_io_register_driver+0xac> static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
7180: e5930000 ldr r0, [r3] 7184: e3500000 cmp r0, #0
7188: 1afffff8 bne 7170 <rtems_io_register_driver+0x84>
718c: e5930004 ldr r0, [r3, #4] 7190: e3500000 cmp r0, #0
7194: 1afffff5 bne 7170 <rtems_io_register_driver+0x84> } /* Assigns invalid value in case of failure */ *major = m; if ( m != n )
7198: e15e0004 cmp lr, r4 719c: 10843084 addne r3, r4, r4, lsl #1
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
71a0: e5824000 str r4, [r2]
if ( m != n )
71a4: 108cc183 addne ip, ip, r3, lsl #3
71a8: 0a00001a beq 7218 <rtems_io_register_driver+0x12c> } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table;
71ac: e1a0e001 mov lr, r1 71b0: e8be000f ldm lr!, {r0, r1, r2, r3} 71b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 71b8: e89e0003 ldm lr, {r0, r1} 71bc: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
71c0: eb00069b bl 8c34 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
71c4: e3a01000 mov r1, #0 71c8: e1a00004 mov r0, r4 71cc: e1a02001 mov r2, r1
}
71d0: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
71d4: ea002377 b ffb8 <rtems_io_initialize>
_Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major;
71d8: e59f3064 ldr r3, [pc, #100] ; 7244 <rtems_io_register_driver+0x158> 71dc: e5933000 ldr r3, [r3] 71e0: e084c084 add ip, r4, r4, lsl #1
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
71e4: e793018c ldr r0, [r3, ip, lsl #3] 71e8: e3500000 cmp r0, #0
_Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major;
71ec: e083c18c add ip, r3, ip, lsl #3
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 71f0: 0a00000b beq 7224 <rtems_io_register_driver+0x138> major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch();
71f4: eb00068e bl 8c34 <_Thread_Enable_dispatch> 71f8: e3a0000c mov r0, #12
return RTEMS_RESOURCE_IN_USE;
71fc: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
7200: e591c004 ldr ip, [r1, #4] 7204: e35c0000 cmp ip, #0
7208: 1affffc8 bne 7130 <rtems_io_register_driver+0x44> _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
720c: e3a00009 mov r0, #9
}
7210: e8bd8010 pop {r4, pc}
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
7214: e5824000 str r4, [r2] <== NOT EXECUTED
if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch();
7218: eb000685 bl 8c34 <_Thread_Enable_dispatch> 721c: e3a00005 mov r0, #5
return sc;
7220: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
7224: e59c3004 ldr r3, [ip, #4] 7228: e3530000 cmp r3, #0
722c: 1afffff0 bne 71f4 <rtems_io_register_driver+0x108> if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major;
7230: e5824000 str r4, [r2] 7234: eaffffdc b 71ac <rtems_io_register_driver+0xc0> 7238: 00020f3c .word 0x00020f3c 723c: 000217d0 .word 0x000217d0 7240: 00020eac .word 0x00020eac 7244: 000217d4 .word 0x000217d4
00001b84 <rtems_libio_init>: * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) {
1b84: e92d4010 push {r4, lr}
rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0)
1b88: e59f40b4 ldr r4, [pc, #180] ; 1c44 <rtems_libio_init+0xc0> 1b8c: e5940000 ldr r0, [r4] 1b90: e3500000 cmp r0, #0
* * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) {
1b94: e24dd004 sub sp, sp, #4
rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1b98: 0a000016 beq 1bf8 <rtems_libio_init+0x74> { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1b9c: e3a01040 mov r1, #64 ; 0x40 1ba0: eb001f63 bl 9934 <calloc> 1ba4: e59f309c ldr r3, [pc, #156] ; 1c48 <rtems_libio_init+0xc4>
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL)
1ba8: 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,
1bac: e5830000 str r0, [r3] 1bb0: e1a02000 mov r2, r0
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1bb4: 0a000020 beq 1c3c <rtems_libio_init+0xb8> rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1bb8: 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;
1bbc: e59f3088 ldr r3, [pc, #136] ; 1c4c <rtems_libio_init+0xc8>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1bc0: e3510001 cmp r1, #1
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops;
1bc4: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1bc8: 9a000008 bls 1bf0 <rtems_libio_init+0x6c>
1bcc: e2803040 add r3, r0, #64 ; 0x40 1bd0: e3a02001 mov r2, #1
iop->data1 = iop + 1;
1bd4: e2822001 add r2, r2, #1
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1bd8: e1520001 cmp r2, r1
iop->data1 = iop + 1;
1bdc: e503300c str r3, [r3, #-12] 1be0: e2833040 add r3, r3, #64 ; 0x40
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1be4: 1afffffa bne 1bd4 <rtems_libio_init+0x50>
1be8: e2422001 sub r2, r2, #1 1bec: e0802302 add r2, r0, r2, lsl #6
iop->data1 = iop + 1; iop->data1 = NULL;
1bf0: e3a03000 mov r3, #0 1bf4: e5823034 str r3, [r2, #52] ; 0x34
/* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create(
1bf8: e59fc050 ldr ip, [pc, #80] ; 1c50 <rtems_libio_init+0xcc> 1bfc: e59f0050 ldr r0, [pc, #80] ; 1c54 <rtems_libio_init+0xd0> 1c00: e3a01001 mov r1, #1 1c04: e3a02054 mov r2, #84 ; 0x54 1c08: e3a03000 mov r3, #0 1c0c: e58dc000 str ip, [sp] 1c10: eb000c67 bl 4db4 <rtems_semaphore_create>
1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL )
1c14: e3500000 cmp r0, #0
1c18: 1a000006 bne 1c38 <rtems_libio_init+0xb4> /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper)
1c1c: e59f3034 ldr r3, [pc, #52] ; 1c58 <rtems_libio_init+0xd4> 1c20: e5933000 ldr r3, [r3] 1c24: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
1c28: 11a0e00f movne lr, pc 1c2c: 112fff13 bxne r3
}
1c30: e28dd004 add sp, sp, #4 1c34: e8bd8010 pop {r4, pc}
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc );
1c38: eb000e98 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
1c3c: e280001a add r0, r0, #26 <== NOT EXECUTED 1c40: eb000e96 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
1c44: 000194c0 .word 0x000194c0 1c48: 0001ae8c .word 0x0001ae8c 1c4c: 0001ae90 .word 0x0001ae90 1c50: 0001ae94 .word 0x0001ae94 1c54: 4c42494f .word 0x4c42494f 1c58: 000194bc .word 0x000194bc
00026cb8 <rtems_libio_set_private_env>: rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
26cb8: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
26cbc: e3a00000 mov r0, #0
rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
26cc0: 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);
26cc4: e1a01000 mov r1, r0 26cc8: e28d2018 add r2, sp, #24 26ccc: eb0007b7 bl 28bb0 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
26cd0: e2505000 subs r5, r0, #0
26cd4: 1a00002d bne 26d90 <rtems_libio_set_private_env+0xd8> /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) {
26cd8: e59f70f8 ldr r7, [pc, #248] ; 26dd8 <rtems_libio_set_private_env+0x120> 26cdc: e59f30f8 ldr r3, [pc, #248] ; 26ddc <rtems_libio_set_private_env+0x124> 26ce0: e5974000 ldr r4, [r7] 26ce4: e1540003 cmp r4, r3
26ce8: 0a00002b beq 26d9c <rtems_libio_set_private_env+0xe4> return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
26cec: e59f10e8 ldr r1, [pc, #232] ; 26ddc <rtems_libio_set_private_env+0x124> 26cf0: e3a02048 mov r2, #72 ; 0x48 26cf4: e1a00004 mov r0, r4 26cf8: eb006cb3 bl 41fcc <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
26cfc: e59f30dc ldr r3, [pc, #220] ; 26de0 <rtems_libio_set_private_env+0x128> 26d00: 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*/
26d04: e59d3018 ldr r3, [sp, #24] 26d08: e1a0c004 mov ip, r4
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
26d0c: 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*/
26d10: e48c3018 str r3, [ip], #24
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
26d14: e8be000f ldm lr!, {r0, r1, r2, r3} 26d18: e8ac000f stmia ip!, {r0, r1, r2, r3} 26d1c: 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);
26d20: e3a05000 mov r5, #0 26d24: e28d4004 add r4, sp, #4
*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;
26d28: 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);
26d2c: e3a01001 mov r1, #1 26d30: e1a03004 mov r3, r4 26d34: e1a02005 mov r2, r5 26d38: e59f00a4 ldr r0, [pc, #164] ; 26de4 <rtems_libio_set_private_env+0x12c>
rtems_filesystem_root = loc;
26d3c: e1a06004 mov r6, 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);
26d40: e58d5000 str r5, [sp] 26d44: ebff776e bl 4b04 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
26d48: e597c000 ldr ip, [r7] 26d4c: e8b6000f ldm r6!, {r0, r1, r2, r3} 26d50: e28cc018 add ip, ip, #24 26d54: e8ac000f stmia ip!, {r0, r1, r2, r3} 26d58: e5963000 ldr r3, [r6]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
26d5c: e3a01001 mov r1, #1
* what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc;
26d60: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
26d64: e1a02005 mov r2, r5 26d68: e1a03004 mov r3, r4 26d6c: e59f0070 ldr r0, [pc, #112] ; 26de4 <rtems_libio_set_private_env+0x12c> 26d70: e58d5000 str r5, [sp] 26d74: ebff7762 bl 4b04 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
26d78: e597c000 ldr ip, [r7] 26d7c: e8b4000f ldm r4!, {r0, r1, r2, r3} 26d80: e28cc004 add ip, ip, #4 26d84: e8ac000f stmia ip!, {r0, r1, r2, r3} 26d88: e5963000 ldr r3, [r6] 26d8c: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL; }
26d90: e1a00005 mov r0, r5 26d94: e28dd01c add sp, sp, #28 26d98: e8bd80f0 pop {r4, r5, r6, r7, pc}
sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
26d9c: e3a00048 mov r0, #72 ; 0x48 26da0: ebff7928 bl 5248 <malloc>
if (!tmp)
26da4: e2504000 subs r4, r0, #0 26da8: 03a0501a moveq r5, #26
26dac: 0afffff7 beq 26d90 <rtems_libio_set_private_env+0xd8> #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|
26db0: e1a00005 mov r0, r5 26db4: e1a01007 mov r1, r7 26db8: e59f2028 ldr r2, [pc, #40] ; 26de8 <rtems_libio_set_private_env+0x130> 26dbc: eb000881 bl 28fc8 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
26dc0: e2505000 subs r5, r0, #0
* not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp;
26dc4: 05874000 streq r4, [r7]
#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) { 26dc8: 0affffc7 beq 26cec <rtems_libio_set_private_env+0x34> /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp);
26dcc: e1a00004 mov r0, r4 <== NOT EXECUTED 26dd0: ebff7781 bl 4bdc <free> <== NOT EXECUTED
return sc;
26dd4: eaffffed b 26d90 <rtems_libio_set_private_env+0xd8> <== NOT EXECUTED
26dd8: 00059348 .word 0x00059348 26ddc: 00067428 .word 0x00067428 26de0: 00067410 .word 0x00067410 26de4: 00064500 .word 0x00064500 26de8: 00026ba4 .word 0x00026ba4
00026c08 <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) {
26c08: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 26c0c: e1a05000 mov r5, r0 <== NOT EXECUTED 26c10: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
26c14: e3a00000 mov r0, #0 <== NOT EXECUTED 26c18: e1a01000 mov r1, r0 <== NOT EXECUTED 26c1c: e1a0200d mov r2, sp <== NOT EXECUTED 26c20: eb0007e2 bl 28bb0 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
26c24: e2503000 subs r3, r0, #0 <== NOT EXECUTED 26c28: 1a00000d bne 26c64 <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
26c2c: e59f4078 ldr r4, [pc, #120] ; 26cac <rtems_libio_share_private_env+0xa4><== NOT EXECUTED 26c30: e5946000 ldr r6, [r4] <== NOT EXECUTED 26c34: e59d3000 ldr r3, [sp] <== NOT EXECUTED 26c38: e5962000 ldr r2, [r6] <== NOT EXECUTED 26c3c: e1520003 cmp r2, r3 <== NOT EXECUTED 26c40: 0a00000a beq 26c70 <rtems_libio_share_private_env+0x68> <== NOT EXECUTED
free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
26c44: e1a00005 mov r0, r5 <== NOT EXECUTED 26c48: e59f105c ldr r1, [pc, #92] ; 26cac <rtems_libio_share_private_env+0xa4><== NOT EXECUTED 26c4c: e28d2004 add r2, sp, #4 <== NOT EXECUTED 26c50: eb00092f bl 29114 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
26c54: e2503000 subs r3, r0, #0 <== NOT EXECUTED 26c58: 0a00000b beq 26c8c <rtems_libio_share_private_env+0x84> <== NOT EXECUTED
return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env;
26c5c: e59f204c ldr r2, [pc, #76] ; 26cb0 <rtems_libio_share_private_env+0xa8><== NOT EXECUTED 26c60: e5842000 str r2, [r4] <== NOT EXECUTED
return sc; }
26c64: e1a00003 mov r0, r3 <== NOT EXECUTED 26c68: e28dd008 add sp, sp, #8 <== NOT EXECUTED 26c6c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
26c70: e1a01004 mov r1, r4 <== NOT EXECUTED 26c74: eb000900 bl 2907c <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
26c78: e2503000 subs r3, r0, #0 <== NOT EXECUTED 26c7c: 1afffff8 bne 26c64 <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
free_user_env(tmp);
26c80: e1a00006 mov r0, r6 <== NOT EXECUTED 26c84: ebffffc6 bl 26ba4 <free_user_env> <== NOT EXECUTED 26c88: eaffffed b 26c44 <rtems_libio_share_private_env+0x3c> <== NOT EXECUTED
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
26c8c: e59f1018 ldr r1, [pc, #24] ; 26cac <rtems_libio_share_private_env+0xa4><== NOT EXECUTED 26c90: e59f201c ldr r2, [pc, #28] ; 26cb4 <rtems_libio_share_private_env+0xac><== NOT EXECUTED 26c94: eb0008cb bl 28fc8 <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
26c98: e2503000 subs r3, r0, #0 <== NOT EXECUTED 26c9c: 1affffee bne 26c5c <rtems_libio_share_private_env+0x54> <== NOT EXECUTED
goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env;
26ca0: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 26ca4: e5842000 str r2, [r4] <== NOT EXECUTED
/* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL;
26ca8: eaffffed b 26c64 <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
26cac: 00059348 .word 0x00059348 26cb0: 00067428 .word 0x00067428 26cb4: 00026ba4 .word 0x00026ba4
00005344 <rtems_malloc_statistics_at_free>: * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) {
5344: e92d4800 push {fp, lr} <== NOT EXECUTED
uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
5348: e59f3040 ldr r3, [pc, #64] ; 5390 <rtems_malloc_statistics_at_free+0x4c><== NOT EXECUTED
* size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) {
534c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 5350: e1a01000 mov r1, r0 <== NOT EXECUTED
uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
5354: e1a0200d mov r2, sp <== NOT EXECUTED 5358: e5930000 ldr r0, [r3] <== NOT EXECUTED 535c: eb0015c2 bl aa6c <_Protected_heap_Get_block_size> <== NOT EXECUTED 5360: e3500000 cmp r0, #0 <== NOT EXECUTED 5364: 0a000007 beq 5388 <rtems_malloc_statistics_at_free+0x44> <== NOT EXECUTED
MSBUMP(lifetime_freed, size);
5368: e59f3024 ldr r3, [pc, #36] ; 5394 <rtems_malloc_statistics_at_free+0x50><== NOT EXECUTED 536c: e59d0000 ldr r0, [sp] <== NOT EXECUTED 5370: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 5374: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 5378: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 537c: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 5380: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 5384: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED
} }
5388: e28dd004 add sp, sp, #4 <== NOT EXECUTED 538c: e8bd8800 pop {fp, pc} <== NOT EXECUTED
5390: 0005907c .word 0x0005907c 5394: 000673e4 .word 0x000673e4
00005398 <rtems_malloc_statistics_at_malloc>: } static void rtems_malloc_statistics_at_malloc( void *pointer ) {
5398: e92d4810 push {r4, fp, lr} <== NOT EXECUTED
uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer )
539c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
} static void rtems_malloc_statistics_at_malloc( void *pointer ) {
53a0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer )
53a4: 0a000013 beq 53f8 <rtems_malloc_statistics_at_malloc+0x60> <== NOT EXECUTED
static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0;
53a8: e28d2004 add r2, sp, #4 <== NOT EXECUTED 53ac: e3a03000 mov r3, #0 <== NOT EXECUTED 53b0: 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);
53b4: e59f3044 ldr r3, [pc, #68] ; 5400 <rtems_malloc_statistics_at_malloc+0x68><== NOT EXECUTED 53b8: e1a0200d mov r2, sp <== NOT EXECUTED 53bc: e5930000 ldr r0, [r3] <== NOT EXECUTED 53c0: eb0015a9 bl aa6c <_Protected_heap_Get_block_size> <== NOT EXECUTED
MSBUMP(lifetime_allocated, actual_size);
53c4: e59f3038 ldr r3, [pc, #56] ; 5404 <rtems_malloc_statistics_at_malloc+0x6c><== NOT EXECUTED 53c8: e59d4000 ldr r4, [sp] <== NOT EXECUTED 53cc: e283c01c add ip, r3, #28 <== NOT EXECUTED 53d0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
53d4: e5930024 ldr r0, [r3, #36] ; 0x24 <== NOT EXECUTED
if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size);
53d8: e09b1004 adds r1, fp, r4 <== NOT EXECUTED 53dc: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth)
53e0: 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);
53e4: e0600001 rsb r0, r0, r1 <== NOT EXECUTED
if (current_depth > s->max_depth)
53e8: e150000c cmp r0, ip <== NOT EXECUTED
if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size);
53ec: e583101c str r1, [r3, #28] <== NOT EXECUTED 53f0: e5832020 str r2, [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;
53f4: 85830018 strhi r0, [r3, #24] <== NOT EXECUTED
}
53f8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 53fc: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
5400: 0005907c .word 0x0005907c 5404: 000673e4 .word 0x000673e4
00005408 <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));
5408: e59f1038 ldr r1, [pc, #56] ; 5448 <rtems_malloc_statistics_initialize+0x40><== NOT EXECUTED 540c: e3a02000 mov r2, #0 <== NOT EXECUTED 5410: e1a03001 mov r3, r1 <== NOT EXECUTED 5414: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5418: e2833004 add r3, r3, #4 <== NOT EXECUTED 541c: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5420: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5424: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5428: e4832004 str r2, [r3], #4 <== NOT EXECUTED 542c: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5430: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5434: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5438: e4832004 str r2, [r3], #4 <== NOT EXECUTED 543c: e5812004 str r2, [r1, #4] <== NOT EXECUTED 5440: e5832000 str r2, [r3] <== NOT EXECUTED
}
5444: e12fff1e bx lr <== NOT EXECUTED
5448: 000673e4 .word 0x000673e4
00006b94 <rtems_panic>: void rtems_panic( const char *printf_format, ... ) {
6b94: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 6b98: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 6b9c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
va_list arglist; va_start(arglist, printf_format);
6ba0: e28d300c add r3, sp, #12 <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6ba4: e1a02003 mov r2, r3 <== NOT EXECUTED 6ba8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 6bac: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
... ) { va_list arglist; va_start(arglist, printf_format);
6bb0: e58d3000 str r3, [sp] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6bb4: ebffff8d bl 69f0 <rtems_verror> <== NOT EXECUTED
va_end(arglist); }
6bb8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 6bbc: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 6bc0: e28dd010 add sp, sp, #16 <== NOT EXECUTED 6bc4: e12fff1e bx lr <== NOT EXECUTED
0000b8b8 <rtems_pipe_initialize>: /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) {
b8b8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if (!rtems_pipe_configured)
b8bc: e59f3054 ldr r3, [pc, #84] ; b918 <rtems_pipe_initialize+0x60> b8c0: e5d33000 ldrb r3, [r3] b8c4: e3530000 cmp r3, #0
/* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) {
b8c8: e24dd004 sub sp, sp, #4
if (!rtems_pipe_configured) b8cc: 0a000003 beq b8e0 <rtems_pipe_initialize+0x28> return; if (rtems_pipe_semaphore)
b8d0: e59fc044 ldr ip, [pc, #68] ; b91c <rtems_pipe_initialize+0x64><== NOT EXECUTED b8d4: e59c3000 ldr r3, [ip] <== NOT EXECUTED b8d8: e3530000 cmp r3, #0 <== NOT EXECUTED b8dc: 0a000001 beq b8e8 <rtems_pipe_initialize+0x30> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; }
b8e0: e28dd004 add sp, sp, #4 b8e4: e8bd8000 pop {pc}
if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create(
b8e8: e59f0030 ldr r0, [pc, #48] ; b920 <rtems_pipe_initialize+0x68><== NOT EXECUTED b8ec: e3a01001 mov r1, #1 <== NOT EXECUTED b8f0: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED b8f4: e58dc000 str ip, [sp] <== NOT EXECUTED b8f8: ebffe52d bl 4db4 <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)
b8fc: e3500000 cmp r0, #0 <== NOT EXECUTED b900: 1a000003 bne b914 <rtems_pipe_initialize+0x5c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot();
b904: ebffe41d bl 4980 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
rtems_pipe_no = now;
b908: e59f3014 ldr r3, [pc, #20] ; b924 <rtems_pipe_initialize+0x6c><== NOT EXECUTED b90c: e1c300b0 strh r0, [r3] <== NOT EXECUTED b910: eafffff2 b b8e0 <rtems_pipe_initialize+0x28> <== NOT EXECUTED
sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
b914: ebffe761 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
b918: 0001ab44 .word 0x0001ab44 b91c: 0001aca8 .word 0x0001aca8 b920: 50495045 .word 0x50495045 b924: 0001acae .word 0x0001acae
000031a4 <rtems_stack_checker_is_blown>: /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
31a4: e92d4830 push {r4, r5, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
31a8: e59f4078 ldr r4, [pc, #120] ; 3228 <rtems_stack_checker_is_blown+0x84> 31ac: e5943000 ldr r3, [r4]
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
31b0: e59300c8 ldr r0, [r3, #200] ; 0xc8
/* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
31b4: e28db00c add fp, sp, #12
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
31b8: e15b0000 cmp fp, r0 31bc: 33a05000 movcc r5, #0
31c0: 3a000004 bcc 31d8 <rtems_stack_checker_is_blown+0x34> } /* * Check if blown */ bool rtems_stack_checker_is_blown( void )
31c4: e59350c4 ldr r5, [r3, #196] ; 0xc4 31c8: e0805005 add r5, r0, r5 31cc: e15b0005 cmp fp, r5 31d0: 83a05000 movhi r5, #0 31d4: 93a05001 movls r5, #1
/* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) {
31d8: e59f304c ldr r3, [pc, #76] ; 322c <rtems_stack_checker_is_blown+0x88> 31dc: e5933000 ldr r3, [r3] 31e0: e3530000 cmp r3, #0 31e4: 03a01001 moveq r1, #1
31e8: 0a000005 beq 3204 <rtems_stack_checker_is_blown+0x60> pattern_ok = (!memcmp(
31ec: e59f103c ldr r1, [pc, #60] ; 3230 <rtems_stack_checker_is_blown+0x8c> 31f0: e2800008 add r0, r0, #8 31f4: e3a02010 mov r2, #16 31f8: eb00fb49 bl 41f24 <memcmp> 31fc: e2701001 rsbs r1, r0, #1 3200: 33a01000 movcc r1, #0
} /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok )
3204: e3550000 cmp r5, #0
3208: 0a000002 beq 3218 <rtems_stack_checker_is_blown+0x74>
320c: e3510000 cmp r1, #0 3210: 13a00000 movne r0, #0 3214: 18bd8830 popne {r4, r5, fp, pc}
return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
3218: e5940000 ldr r0, [r4] <== NOT EXECUTED 321c: ebffffb3 bl 30f0 <Stack_check_report_blown_task> <== NOT EXECUTED 3220: e3a00001 mov r0, #1 <== NOT EXECUTED
return true; }
3224: e8bd8830 pop {r4, r5, fp, pc} <== NOT EXECUTED
3228: 00067600 .word 0x00067600 322c: 00064778 .word 0x00064778 3230: 000673b4 .word 0x000673b4
000030e0 <rtems_stack_checker_report_usage>: void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
30e0: e59f1004 ldr r1, [pc, #4] ; 30ec <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED 30e4: e3a00000 mov r0, #0 <== NOT EXECUTED 30e8: eaffffe3 b 307c <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
30ec: 00005e28 .word 0x00005e28
0000307c <rtems_stack_checker_report_usage_with_plugin>: void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) {
307c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
print_context = context;
3080: e59f4048 ldr r4, [pc, #72] ; 30d0 <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 ) {
3084: e1a05001 mov r5, r1 <== NOT EXECUTED 3088: e1a06000 mov r6, r0 <== NOT EXECUTED
print_context = context; print_handler = print;
308c: 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;
3090: e5840008 str r0, [r4, #8] <== NOT EXECUTED
print_handler = print; (*print)( context, "Stack usage by thread\n");
3094: e59f1038 ldr r1, [pc, #56] ; 30d4 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED 3098: e1a0e00f mov lr, pc <== NOT EXECUTED 309c: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
30a0: e59f1030 ldr r1, [pc, #48] ; 30d8 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED 30a4: e1a00006 mov r0, r6 <== NOT EXECUTED 30a8: e1a0e00f mov lr, pc <== NOT EXECUTED 30ac: 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 );
30b0: e59f0024 ldr r0, [pc, #36] ; 30dc <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED 30b4: eb001c20 bl a13c <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1);
30b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 30bc: ebffff9d bl 2f38 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
30c0: e3a03000 mov r3, #0 <== NOT EXECUTED
print_handler = NULL;
30c4: 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;
30c8: e5843008 str r3, [r4, #8] <== NOT EXECUTED
print_handler = NULL; }
30cc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
30d0: 00064778 .word 0x00064778 30d4: 0005d8c4 .word 0x0005d8c4 30d8: 0005d8dc .word 0x0005d8dc 30dc: 00002f38 .word 0x00002f38
00003234 <rtems_stack_checker_switch_extension>: */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) {
3234: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
3238: e59030c8 ldr r3, [r0, #200] ; 0xc8
*/ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) {
323c: e28db008 add fp, sp, #8
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
3240: e15b0003 cmp fp, r3
*/ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) {
3244: e1a04000 mov r4, r0
Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
3248: e2830008 add r0, r3, #8
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 324c: 3a000003 bcc 3260 <rtems_stack_checker_switch_extension+0x2c> void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack;
3250: e59420c4 ldr r2, [r4, #196] ; 0xc4 3254: e0833002 add r3, r3, r2 3258: e15b0003 cmp fp, r3
325c: 9a000007 bls 3280 <rtems_stack_checker_switch_extension+0x4c> /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern,
3260: e59f1034 ldr r1, [pc, #52] ; 329c <rtems_stack_checker_switch_extension+0x68><== NOT EXECUTED 3264: e3a02010 mov r2, #16 <== NOT EXECUTED 3268: eb00fb2d bl 41f24 <memcmp> <== NOT EXECUTED 326c: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED 3270: 33a01000 movcc r1, #0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok );
3274: e1a00004 mov r0, r4
} }
3278: e8bd4810 pop {r4, fp, lr}
pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok );
327c: eaffff9b b 30f0 <Stack_check_report_blown_task>
/* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern,
3280: e59f1014 ldr r1, [pc, #20] ; 329c <rtems_stack_checker_switch_extension+0x68> 3284: e3a02010 mov r2, #16 3288: eb00fb25 bl 41f24 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) {
328c: e3500000 cmp r0, #0 3290: 13a01000 movne r1, #0
3294: 1afffff6 bne 3274 <rtems_stack_checker_switch_extension+0x40>
3298: e8bd8810 pop {r4, fp, pc} 329c: 000673b4 .word 0x000673b4
0001b8a8 <rtems_string_to_pointer>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
1b8a8: e92d40f0 push {r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
1b8ac: e2515000 subs r5, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
1b8b0: e1a04000 mov r4, r0 1b8b4: e24dd004 sub sp, sp, #4 1b8b8: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
1b8bc: 03a00009 moveq r0, #9
1b8c0: 0a000013 beq 1b914 <rtems_string_to_pointer+0x6c> return RTEMS_INVALID_ADDRESS; errno = 0;
1b8c4: eb008d8f bl 3ef08 <__errno> 1b8c8: e3a03000 mov r3, #0 1b8cc: e5803000 str r3, [r0]
*n = 0;
1b8d0: e5853000 str r3, [r5]
#ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 );
1b8d4: e1a00004 mov r0, r4 1b8d8: e1a0100d mov r1, sp 1b8dc: e3a02010 mov r2, #16 1b8e0: eb00ad2f bl 46da4 <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 )
1b8e4: e3560000 cmp r6, #0
*endptr = end;
1b8e8: 159d3000 ldrne r3, [sp] 1b8ec: 059d3000 ldreq r3, [sp] 1b8f0: 15863000 strne r3, [r6]
/* nothing was converted */ if ( end == s )
1b8f4: e1530004 cmp r3, r4
*n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 );
1b8f8: 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 )
1b8fc: 03a0000b moveq r0, #11
1b900: 0a000003 beq 1b914 <rtems_string_to_pointer+0x6c> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
1b904: e3770001 cmn r7, #1
1b908: 0a000003 beq 1b91c <rtems_string_to_pointer+0x74> if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result;
1b90c: e5857000 str r7, [r5] 1b910: e3a00000 mov r0, #0
#else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
1b914: e28dd004 add sp, sp, #4 1b918: e8bd80f0 pop {r4, r5, r6, r7, pc}
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
1b91c: eb008d79 bl 3ef08 <__errno> <== NOT EXECUTED 1b920: e5903000 ldr r3, [r0] <== NOT EXECUTED 1b924: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 1b928: 03a0000a moveq r0, #10 <== NOT EXECUTED 1b92c: 1afffff6 bne 1b90c <rtems_string_to_pointer+0x64> <== NOT EXECUTED 1b930: eafffff7 b 1b914 <rtems_string_to_pointer+0x6c> <== NOT EXECUTED
00003ed4 <rtems_termios_baud_to_index>: rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3ed4: e3500009 cmp r0, #9 3ed8: 012fff1e bxeq lr
3edc: da000013 ble 3f30 <rtems_termios_baud_to_index+0x5c>
3ee0: e350000e cmp r0, #14 <== NOT EXECUTED 3ee4: 012fff1e bxeq lr <== NOT EXECUTED 3ee8: da00001b ble 3f5c <rtems_termios_baud_to_index+0x88> <== NOT EXECUTED 3eec: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3ef0: e2833002 add r3, r3, #2 <== NOT EXECUTED 3ef4: 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;
3ef8: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3efc: 012fff1e bxeq lr <== NOT EXECUTED 3f00: da000028 ble 3fa8 <rtems_termios_baud_to_index+0xd4> <== NOT EXECUTED 3f04: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3f08: e2833003 add r3, r3, #3 <== NOT EXECUTED 3f0c: 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;
3f10: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3f14: 012fff1e bxeq lr <== NOT EXECUTED 3f18: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3f1c: e2833004 add r3, r3, #4 <== NOT EXECUTED 3f20: e1500003 cmp r0, r3 <== NOT EXECUTED 3f24: 1a00001d bne 3fa0 <rtems_termios_baud_to_index+0xcc> <== NOT EXECUTED
case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break;
3f28: e3a00013 mov r0, #19 <== NOT EXECUTED
case B460800: baud_index = 19; break;
3f2c: e12fff1e bx lr <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3f30: e3500004 cmp r0, #4 3f34: 012fff1e bxeq lr
3f38: ca000010 bgt 3f80 <rtems_termios_baud_to_index+0xac>
3f3c: e3500001 cmp r0, #1 3f40: 012fff1e bxeq lr
3f44: da00001f ble 3fc8 <rtems_termios_baud_to_index+0xf4>
3f48: e3500002 cmp r0, #2 <== NOT EXECUTED 3f4c: 012fff1e bxeq lr <== NOT EXECUTED 3f50: e3500003 cmp r0, #3 <== NOT EXECUTED 3f54: 1a000011 bne 3fa0 <rtems_termios_baud_to_index+0xcc> <== NOT EXECUTED 3f58: e12fff1e bx lr <== NOT EXECUTED 3f5c: e350000b cmp r0, #11 <== NOT EXECUTED 3f60: 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;
3f64: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3f68: b12fff1e bxlt lr <== NOT EXECUTED 3f6c: e350000c cmp r0, #12 <== NOT EXECUTED 3f70: 012fff1e bxeq lr <== NOT EXECUTED 3f74: e350000d cmp r0, #13 <== NOT EXECUTED 3f78: 1a000008 bne 3fa0 <rtems_termios_baud_to_index+0xcc> <== NOT EXECUTED 3f7c: e12fff1e bx lr <== NOT EXECUTED 3f80: e3500006 cmp r0, #6 <== NOT EXECUTED 3f84: 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;
3f88: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3f8c: b12fff1e bxlt lr <== NOT EXECUTED 3f90: e3500007 cmp r0, #7 <== NOT EXECUTED 3f94: 012fff1e bxeq lr <== NOT EXECUTED 3f98: e3500008 cmp r0, #8 <== NOT EXECUTED 3f9c: 012fff1e bxeq lr <== NOT EXECUTED
case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break;
3fa0: e3e00000 mvn r0, #0
default: baud_index = -1; break; } return baud_index; }
3fa4: e12fff1e bx lr
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3fa8: e350000f cmp r0, #15 <== NOT EXECUTED 3fac: 012fff1e bxeq lr <== NOT EXECUTED 3fb0: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3fb4: e2833001 add r3, r3, #1 <== NOT EXECUTED 3fb8: e1500003 cmp r0, r3 <== NOT EXECUTED 3fbc: 1afffff7 bne 3fa0 <rtems_termios_baud_to_index+0xcc> <== 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;
3fc0: e3a00010 mov r0, #16 <== NOT EXECUTED
case B57600: baud_index = 16; break;
3fc4: e12fff1e bx lr <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3fc8: e3500000 cmp r0, #0 3fcc: 012fff1e bxeq lr 3fd0: eafffff2 b 3fa0 <rtems_termios_baud_to_index+0xcc>
000028ec <rtems_termios_bufsize>: int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize;
28ec: e59f3008 ldr r3, [pc, #8] ; 28fc <rtems_termios_bufsize+0x10><== NOT EXECUTED 28f0: 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; }
28f4: e3a00000 mov r0, #0 <== NOT EXECUTED 28f8: e12fff1e bx lr <== NOT EXECUTED
28fc: 00019644 .word 0x00019644
00003e9c <rtems_termios_close>: } } rtems_status_code rtems_termios_close (void *arg) {
3e9c: e92d4070 push {r4, r5, r6, lr}
rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ea0: e59f51b0 ldr r5, [pc, #432] ; 4058 <rtems_termios_close+0x1bc>
rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
3ea4: e5903000 ldr r3, [r0]
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ea8: e3a01000 mov r1, #0
} } rtems_status_code rtems_termios_close (void *arg) {
3eac: e1a06000 mov r6, r0
rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3eb0: e1a02001 mov r2, r1 3eb4: e5950000 ldr r0, [r5]
rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
3eb8: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ebc: eb000457 bl 5020 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3ec0: e3500000 cmp r0, #0
3ec4: 1a00005f bne 4048 <rtems_termios_close+0x1ac> rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) {
3ec8: e5943008 ldr r3, [r4, #8] 3ecc: e2433001 sub r3, r3, #1 3ed0: e3530000 cmp r3, #0 3ed4: e5843008 str r3, [r4, #8]
3ed8: 1a00002f bne 3f9c <rtems_termios_close+0x100> if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3edc: e59420cc ldr r2, [r4, #204] ; 0xcc 3ee0: e59f3174 ldr r3, [pc, #372] ; 405c <rtems_termios_close+0x1c0> 3ee4: e0833282 add r3, r3, r2, lsl #5 3ee8: e5931004 ldr r1, [r3, #4] 3eec: e3510000 cmp r1, #0
3ef0: 0a000040 beq 3ff8 <rtems_termios_close+0x15c> /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3ef4: e1a00004 mov r0, r4 <== NOT EXECUTED 3ef8: e1a0e00f mov lr, pc <== NOT EXECUTED 3efc: e12fff11 bx r1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts
3f00: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 3f04: e3530002 cmp r3, #2 <== NOT EXECUTED 3f08: 0a000044 beq 4020 <rtems_termios_close+0x184> <== NOT EXECUTED
tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose)
3f0c: e594309c ldr r3, [r4, #156] ; 0x9c 3f10: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
3f14: 11a02006 movne r2, r6 3f18: 1284000c addne r0, r4, #12 3f1c: 18900003 ldmne r0, {r0, r1} 3f20: 11a0e00f movne lr, pc 3f24: 112fff13 bxne r3
if (tty->forw == NULL) {
3f28: e5943000 ldr r3, [r4] 3f2c: e3530000 cmp r3, #0
3f30: 0a000020 beq 3fb8 <rtems_termios_close+0x11c> if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back;
3f34: e5942004 ldr r2, [r4, #4] 3f38: e5832004 str r2, [r3, #4]
} if (tty->back == NULL) {
3f3c: e5942004 ldr r2, [r4, #4] 3f40: e3520000 cmp r2, #0
if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw;
3f44: 15823000 strne r3, [r2]
} } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3f48: 0a000025 beq 3fe4 <rtems_termios_close+0x148> } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem);
3f4c: e5940014 ldr r0, [r4, #20] 3f50: eb000409 bl 4f7c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
3f54: e5940018 ldr r0, [r4, #24] 3f58: eb000407 bl 4f7c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
3f5c: e594008c ldr r0, [r4, #140] ; 0x8c 3f60: eb000405 bl 4f7c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
3f64: e59430a0 ldr r3, [r4, #160] ; 0xa0 3f68: e3530000 cmp r3, #0
3f6c: 0a00000e beq 3fac <rtems_termios_close+0x110> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
3f70: e59430b4 ldr r3, [r4, #180] ; 0xb4 3f74: e3530002 cmp r3, #2
3f78: 0a00000b beq 3fac <rtems_termios_close+0x110> rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf);
3f7c: e5940058 ldr r0, [r4, #88] ; 0x58 3f80: ebfff6d6 bl 1ae0 <free>
free (tty->rawOutBuf.theBuf);
3f84: e594007c ldr r0, [r4, #124] ; 0x7c 3f88: ebfff6d4 bl 1ae0 <free>
free (tty->cbuf);
3f8c: e594001c ldr r0, [r4, #28] 3f90: ebfff6d2 bl 1ae0 <free>
free (tty);
3f94: e1a00004 mov r0, r4 3f98: ebfff6d0 bl 1ae0 <free>
} rtems_semaphore_release (rtems_termios_ttyMutex);
3f9c: e5950000 ldr r0, [r5] 3fa0: eb000466 bl 5140 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
3fa4: e3a00000 mov r0, #0 3fa8: e8bd8070 pop {r4, r5, r6, pc}
rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3fac: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 3fb0: eb0003f1 bl 4f7c <rtems_semaphore_delete> <== NOT EXECUTED 3fb4: eafffff0 b 3f7c <rtems_termios_close+0xe0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back;
3fb8: e5942004 ldr r2, [r4, #4] 3fbc: e59f109c ldr r1, [pc, #156] ; 4060 <rtems_termios_close+0x1c4>
if ( rtems_termios_ttyTail != NULL ) {
3fc0: e3520000 cmp r2, #0
rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back;
3fc4: e5812000 str r2, [r1]
if ( rtems_termios_ttyTail != NULL ) { 3fc8: 0a00001f beq 404c <rtems_termios_close+0x1b0> rtems_termios_ttyTail->forw = NULL;
3fcc: e5823000 str r3, [r2] <== NOT EXECUTED
} } else { tty->forw->back = tty->back; } if (tty->back == NULL) {
3fd0: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3fd4: e5943000 ldr r3, [r4] <== NOT EXECUTED 3fd8: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw;
3fdc: 15823000 strne r3, [r2] <== NOT EXECUTED
} } else { tty->forw->back = tty->back; } if (tty->back == NULL) {
3fe0: 1affffd9 bne 3f4c <rtems_termios_close+0xb0> <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
3fe4: e59f1078 ldr r1, [pc, #120] ; 4064 <rtems_termios_close+0x1c8>
if ( rtems_termios_ttyHead != NULL ) {
3fe8: e3530000 cmp r3, #0
} else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw;
3fec: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL;
3ff0: 15832004 strne r2, [r3, #4] 3ff4: eaffffd4 b 3f4c <rtems_termios_close+0xb0>
} else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ff8: e5940018 ldr r0, [r4, #24] 3ffc: e1a02001 mov r2, r1 4000: eb000406 bl 5020 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
4004: e3500000 cmp r0, #0
4008: 1a00000e bne 4048 <rtems_termios_close+0x1ac> rtems_fatal_error_occurred (sc); } drainOutput (tty);
400c: e1a00004 mov r0, r4 4010: ebfffda4 bl 36a8 <drainOutput>
} if (tty->device.outputUsesInterrupts
4014: e59430b4 ldr r3, [r4, #180] ; 0xb4 4018: e3530002 cmp r3, #2
401c: 1affffba bne 3f0c <rtems_termios_close+0x70> == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send(
4020: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 4024: e3a01001 mov r1, #1 <== NOT EXECUTED 4028: eb0002d2 bl 4b78 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
402c: e3500000 cmp r0, #0 <== NOT EXECUTED 4030: 1a000004 bne 4048 <rtems_termios_close+0x1ac> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
4034: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 4038: e3a01001 mov r1, #1 <== NOT EXECUTED 403c: eb0002cd bl 4b78 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
4040: e3500000 cmp r0, #0 <== NOT EXECUTED 4044: 0affffb0 beq 3f0c <rtems_termios_close+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
4048: eb000594 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
} else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw;
404c: e59f3010 ldr r3, [pc, #16] ; 4064 <rtems_termios_close+0x1c8> 4050: e5832000 str r2, [r3] 4054: eaffffbc b 3f4c <rtems_termios_close+0xb0> 4058: 0001aedc .word 0x0001aedc 405c: 0001ab9c .word 0x0001ab9c 4060: 0001aee0 .word 0x0001aee0 4064: 0001aee4 .word 0x0001aee4
00002b1c <rtems_termios_dequeue_characters>: rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
2b1c: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2b20: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
2b24: e08c1001 add r1, ip, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2b28: 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) {
2b2c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
2b30: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2b34: 0a00000b beq 2b68 <rtems_termios_dequeue_characters+0x4c> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) {
2b38: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 2b3c: e3530005 cmp r3, #5 <== NOT EXECUTED 2b40: 0a000001 beq 2b4c <rtems_termios_dequeue_characters+0x30> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } }
2b44: 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);
2b48: eaffff6f b 290c <rtems_termios_refill_transmitter> <== NOT EXECUTED
} else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2b4c: e59f302c ldr r3, [pc, #44] ; 2b80 <rtems_termios_dequeue_characters+0x64><== NOT EXECUTED 2b50: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 2b54: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2b58: 11a0e00f movne lr, pc <== NOT EXECUTED 2b5c: 112fff13 bxne r3 <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } }
2b60: e3a00000 mov r0, #0 <== NOT EXECUTED 2b64: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId,
2b68: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 2b6c: e1a01002 mov r1, r2 <== NOT EXECUTED 2b70: eb000800 bl 4b78 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
2b74: e3500000 cmp r0, #0 <== NOT EXECUTED 2b78: 0afffff8 beq 2b60 <rtems_termios_dequeue_characters+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2b7c: eb000ac7 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
2b80: 0001ab9c .word 0x0001ab9c
00002b84 <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) {
2b84: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
2b88: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 2b8c: e59f82f0 ldr r8, [pc, #752] ; 2e84 <rtems_termios_enqueue_raw_characters+0x300><== NOT EXECUTED 2b90: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 2b94: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED 2b98: 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) {
2b9c: e24dd00c sub sp, sp, #12 <== NOT EXECUTED 2ba0: e1a04000 mov r4, r0 <== NOT EXECUTED 2ba4: e1a05001 mov r5, r1 <== NOT EXECUTED 2ba8: e1a07002 mov r7, r2 <== NOT EXECUTED
char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
2bac: 0a00001e beq 2c2c <rtems_termios_enqueue_raw_characters+0xa8><== NOT EXECUTED
while (len--) {
2bb0: e3520000 cmp r2, #0 <== NOT EXECUTED 2bb4: 0a00000b beq 2be8 <rtems_termios_enqueue_raw_characters+0x64><== NOT EXECUTED 2bb8: e3a0a000 mov sl, #0 <== NOT EXECUTED 2bbc: ea000002 b 2bcc <rtems_termios_enqueue_raw_characters+0x48><== NOT EXECUTED 2bc0: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2bc4: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 2bc8: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
2bcc: e7d5000a ldrb r0, [r5, sl] <== NOT EXECUTED 2bd0: e1a01004 mov r1, r4 <== NOT EXECUTED 2bd4: e28aa001 add sl, sl, #1 <== NOT EXECUTED 2bd8: e1a0e00f mov lr, pc <== NOT EXECUTED 2bdc: e12fff16 bx r6 <== NOT EXECUTED
int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) {
2be0: e157000a cmp r7, sl <== NOT EXECUTED 2be4: 1afffff5 bne 2bc0 <rtems_termios_enqueue_raw_characters+0x3c><== NOT EXECUTED
} /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2be8: e59490e4 ldr r9, [r4, #228] ; 0xe4 <== NOT EXECUTED 2bec: e3590000 cmp r9, #0 <== NOT EXECUTED 2bf0: 1a00000b bne 2c24 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED 2bf4: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2bf8: e3530000 cmp r3, #0 <== NOT EXECUTED 2bfc: 0a000008 beq 2c24 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2c00: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2c04: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2c08: e1a0e00f mov lr, pc <== NOT EXECUTED 2c0c: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2c10: e3a03001 mov r3, #1 <== NOT EXECUTED 2c14: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
} } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; }
2c18: e1a00009 mov r0, r9 <== NOT EXECUTED 2c1c: e28dd00c add sp, sp, #12 <== NOT EXECUTED 2c20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
2c24: e3a09000 mov r9, #0 <== NOT EXECUTED 2c28: eafffffa b 2c18 <rtems_termios_enqueue_raw_characters+0x94><== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor,
2c2c: e280304a add r3, r0, #74 ; 0x4a <== NOT EXECUTED 2c30: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
/* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2c34: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED 2c38: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2c3c: e1a0b006 mov fp, r6 <== NOT EXECUTED 2c40: e58d6000 str r6, [sp] <== NOT EXECUTED 2c44: ea000036 b 2d24 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
/* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
2c48: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2c4c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2c50: e2800001 add r0, r0, #1 <== NOT EXECUTED 2c54: eb0051a5 bl 172f0 <__umodsi3> <== NOT EXECUTED 2c58: e1a08000 mov r8, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2c5c: e10f9000 mrs r9, CPSR <== NOT EXECUTED 2c60: e3893080 orr r3, r9, #128 ; 0x80 <== NOT EXECUTED 2c64: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2c68: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2c6c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 2c70: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 2c74: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2c78: e0800008 add r0, r0, r8 <== NOT EXECUTED 2c7c: eb00519b bl 172f0 <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
2c80: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 2c84: e1500003 cmp r0, r3 <== NOT EXECUTED 2c88: 9a000010 bls 2cd0 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
2c8c: 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)
2c90: e3130001 tst r3, #1 <== NOT EXECUTED 2c94: 1a00000d bne 2cd0 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF;
2c98: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2c9c: e3833001 orr r3, r3, #1 <== NOT EXECUTED 2ca0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2ca4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ca8: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 2cac: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 2cb0: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2cb4: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 2cb8: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 2cbc: 0a000057 beq 2e20 <rtems_termios_enqueue_raw_characters+0x29c><== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
2cc0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2cc4: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2cc8: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2ccc: 0a000062 beq 2e5c <rtems_termios_enqueue_raw_characters+0x2d8><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2cd0: e129f009 msr CPSR_fc, r9 <== NOT EXECUTED
} } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) {
2cd4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2cd8: e1530008 cmp r3, r8 <== NOT EXECUTED 2cdc: 0a00002d beq 2d98 <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
dropped++; } else { tty->rawInBuf.theBuf[newTail] = c;
2ce0: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2ce4: e7c3a008 strb sl, [r3, r8] <== NOT EXECUTED
tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2ce8: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2cec: e3530000 cmp r3, #0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail;
2cf0: e5848060 str r8, [r4, #96] ; 0x60 <== NOT EXECUTED
/* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2cf4: 1a000008 bne 2d1c <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED 2cf8: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2cfc: e3530000 cmp r3, #0 <== NOT EXECUTED 2d00: 0a000005 beq 2d1c <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2d04: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 2d08: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2d0c: e1a0e00f mov lr, pc <== NOT EXECUTED 2d10: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2d14: e3a03001 mov r3, #1 <== NOT EXECUTED 2d18: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2d1c: e2866001 add r6, r6, #1 <== NOT EXECUTED 2d20: e2477001 sub r7, r7, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } return 0; } while (len--) {
2d24: e3570000 cmp r7, #0 <== NOT EXECUTED 2d28: 0a00002d beq 2de4 <rtems_termios_enqueue_raw_characters+0x260><== NOT EXECUTED
c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) {
2d2c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d30: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
} return 0; } while (len--) { c = *buf++;
2d34: e7d5a006 ldrb sl, [r5, r6] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) {
2d38: 0a000005 beq 2d54 <rtems_termios_enqueue_raw_characters+0x1d0><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) {
2d3c: e5d4304a ldrb r3, [r4, #74] ; 0x4a <== NOT EXECUTED 2d40: e153000a cmp r3, sl <== NOT EXECUTED 2d44: 0a000017 beq 2da8 <rtems_termios_enqueue_raw_characters+0x224><== NOT EXECUTED
/* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) {
2d48: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 2d4c: e153000a cmp r3, sl <== NOT EXECUTED 2d50: 0a00001e beq 2dd0 <rtems_termios_enqueue_raw_characters+0x24c><== NOT EXECUTED
/* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) {
2d54: e35b0000 cmp fp, #0 <== NOT EXECUTED 2d58: 0affffba beq 2c48 <rtems_termios_enqueue_raw_characters+0xc4><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
2d5c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d60: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 2d64: e3530020 cmp r3, #32 <== NOT EXECUTED 2d68: 1affffeb bne 2d1c <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2d6c: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2d70: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2d74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
2d78: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2d7c: 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;
2d80: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2d84: 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;
2d88: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2d8c: 1a00001b bne 2e00 <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2d90: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 2d94: eaffffe0 b 2d1c <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
} /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++;
2d98: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2d9c: e2833001 add r3, r3, #1 <== NOT EXECUTED 2da0: e58d3000 str r3, [sp] <== NOT EXECUTED 2da4: eaffffdc b 2d1c <rtems_termios_enqueue_raw_characters+0x198><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) {
2da8: e5d42049 ldrb r2, [r4, #73] ; 0x49 <== NOT EXECUTED 2dac: e1520003 cmp r2, r3 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2db0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
2db4: 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;
2db8: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
2dbc: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2dc0: 058430b8 streq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
2dc4: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
2dc8: e3a0b001 mov fp, #1 <== NOT EXECUTED 2dcc: eaffffe2 b 2d5c <rtems_termios_enqueue_raw_characters+0x1d8><== NOT EXECUTED
flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF;
2dd0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2dd4: e3c33010 bic r3, r3, #16 <== NOT EXECUTED 2dd8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
2ddc: e3a0b001 mov fp, #1 <== NOT EXECUTED 2de0: eaffffdd b 2d5c <rtems_termios_enqueue_raw_characters+0x1d8><== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
2de4: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 2de8: e59d9000 ldr r9, [sp] <== NOT EXECUTED 2dec: e0833009 add r3, r3, r9 <== NOT EXECUTED 2df0: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2df4: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 2df8: eb0008d0 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
2dfc: eaffff85 b 2c18 <rtems_termios_enqueue_raw_characters+0x94><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
2e00: 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,
2e04: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2e08: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2e0c: e0811003 add r1, r1, r3 <== NOT EXECUTED 2e10: e3a02001 mov r2, #1 <== NOT EXECUTED 2e14: e1a0e00f mov lr, pc <== NOT EXECUTED 2e18: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2e1c: eaffffdb b 2d90 <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) ||
2e20: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2e24: e3130020 tst r3, #32 <== NOT EXECUTED 2e28: 1a000002 bne 2e38 <rtems_termios_enqueue_raw_characters+0x2b4><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
2e2c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2e30: e3530000 cmp r3, #0 <== NOT EXECUTED 2e34: 1affffa5 bne 2cd0 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF;
2e38: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2e3c: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2e40: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2e44: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2e48: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2e4c: e3a02001 mov r2, #1 <== NOT EXECUTED 2e50: e1a0e00f mov lr, pc <== NOT EXECUTED 2e54: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2e58: eaffff9c b 2cd0 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
2e5c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
2e60: 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;
2e64: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
2e68: e3530000 cmp r3, #0 <== NOT EXECUTED
1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
2e6c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
2e70: 0affff96 beq 2cd0 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
2e74: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2e78: e1a0e00f mov lr, pc <== NOT EXECUTED 2e7c: e12fff13 bx r3 <== NOT EXECUTED 2e80: eaffff92 b 2cd0 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
2e84: 0001ab9c .word 0x0001ab9c
000028a4 <rtems_termios_initialize>: struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) {
28a4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) {
28a8: e59fc034 ldr ip, [pc, #52] ; 28e4 <rtems_termios_initialize+0x40> 28ac: e59c3000 ldr r3, [ip] 28b0: e3530000 cmp r3, #0
struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) {
28b4: e24dd004 sub sp, sp, #4
rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 28b8: 0a000001 beq 28c4 <rtems_termios_initialize+0x20> RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } }
28bc: e28dd004 add sp, sp, #4 28c0: e8bd8000 pop {pc}
/* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create (
28c4: e59f001c ldr r0, [pc, #28] ; 28e8 <rtems_termios_initialize+0x44> 28c8: e3a01001 mov r1, #1 28cc: e3a02054 mov r2, #84 ; 0x54 28d0: e58dc000 str ip, [sp] 28d4: eb000936 bl 4db4 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL)
28d8: e3500000 cmp r0, #0
28dc: 0afffff6 beq 28bc <rtems_termios_initialize+0x18> rtems_fatal_error_occurred (sc);
28e0: eb000b6e bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
28e4: 0001aedc .word 0x0001aedc 28e8: 54526d69 .word 0x54526d69
00003abc <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;
3abc: e5903000 ldr r3, [r0]
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0;
3ac0: e3a01000 mov r1, #0
} } rtems_status_code rtems_termios_ioctl (void *arg) {
3ac4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0;
3ac8: 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;
3acc: e5935034 ldr r5, [r3, #52] ; 0x34
} } rtems_status_code rtems_termios_ioctl (void *arg) {
3ad0: e1a04000 mov r4, r0
struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ad4: e1a02001 mov r2, r1 3ad8: e5950018 ldr r0, [r5, #24]
rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
3adc: e5947008 ldr r7, [r4, #8]
rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ae0: eb00054e bl 5020 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3ae4: e2506000 subs r6, r0, #0
3ae8: 1a00000e bne 3b28 <rtems_termios_ioctl+0x6c> args->ioctl_return = sc; return sc; } switch (args->command) {
3aec: e5943004 ldr r3, [r4, #4] 3af0: e3530004 cmp r3, #4
3af4: 0a000006 beq 3b14 <rtems_termios_ioctl+0x58> 3af8: 8a00000d bhi 3b34 <rtems_termios_ioctl+0x78>
3afc: e3530002 cmp r3, #2
3b00: 0a000020 beq 3b88 <rtems_termios_ioctl+0xcc> 3b04: 9a000087 bls 3d28 <rtems_termios_ioctl+0x26c> if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty);
3b08: e1a00005 mov r0, r5 3b0c: ebfffee5 bl 36a8 <drainOutput>
break;
3b10: ea000002 b 3b20 <rtems_termios_ioctl+0x64>
case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup;
3b14: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3b18: e58520dc str r2, [r5, #220] ; 0xdc <== NOT EXECUTED 3b1c: e58530e0 str r3, [r5, #224] ; 0xe0 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
3b20: e5950018 ldr r0, [r5, #24] 3b24: eb000585 bl 5140 <rtems_semaphore_release>
args->ioctl_return = sc;
3b28: e584600c str r6, [r4, #12]
return sc; }
3b2c: e1a00006 mov r0, r6 3b30: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) {
3b34: e3a02a46 mov r2, #286720 ; 0x46000 <== NOT EXECUTED 3b38: e2822e67 add r2, r2, #1648 ; 0x670 <== NOT EXECUTED 3b3c: e282213d add r2, r2, #1073741839 ; 0x4000000f <== NOT EXECUTED 3b40: e1530002 cmp r3, r2 <== NOT EXECUTED 3b44: 0a00006b beq 3cf8 <rtems_termios_ioctl+0x23c> <== NOT EXECUTED 3b48: 8a000082 bhi 3d58 <rtems_termios_ioctl+0x29c> <== NOT EXECUTED 3b4c: e3530005 cmp r3, #5 <== NOT EXECUTED 3b50: 0a0000a5 beq 3dec <rtems_termios_ioctl+0x330> <== NOT EXECUTED
default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
3b54: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 3b58: e59f3334 ldr r3, [pc, #820] ; 3e94 <rtems_termios_ioctl+0x3d8><== NOT EXECUTED 3b5c: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3b60: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 3b64: e3530000 cmp r3, #0 <== NOT EXECUTED 3b68: 03a0600a moveq r6, #10 <== NOT EXECUTED 3b6c: 0affffeb beq 3b20 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
3b70: e1a00005 mov r0, r5 <== NOT EXECUTED 3b74: e1a01004 mov r1, r4 <== NOT EXECUTED 3b78: e1a0e00f mov lr, pc <== NOT EXECUTED 3b7c: e12fff13 bx r3 <== NOT EXECUTED 3b80: e1a06000 mov r6, r0 <== NOT EXECUTED 3b84: eaffffe5 b 3b20 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer;
3b88: e594e008 ldr lr, [r4, #8] 3b8c: e2857030 add r7, r5, #48 ; 0x30 3b90: e8be000f ldm lr!, {r0, r1, r2, r3} 3b94: e1a0c007 mov ip, r7 3b98: e8ac000f stmia ip!, {r0, r1, r2, r3} 3b9c: e8be000f ldm lr!, {r0, r1, r2, r3} 3ba0: 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) &&
3ba4: e59520b8 ldr r2, [r5, #184] ; 0xb8
case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer;
3ba8: 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) &&
3bac: 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;
3bb0: 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) && 3bb4: 0a000012 beq 3c04 <rtems_termios_ioctl+0x148>
3bb8: e5953030 ldr r3, [r5, #48] ; 0x30 3bbc: e3130b01 tst r3, #1024 ; 0x400
3bc0: 1a00000f bne 3c04 <rtems_termios_ioctl+0x148> !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
3bc4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3bc8: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3bcc: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) {
3bd0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3bd4: e3130020 tst r3, #32 <== NOT EXECUTED 3bd8: 0a000009 beq 3c04 <rtems_termios_ioctl+0x148> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
3bdc: e10f8000 mrs r8, CPSR <== NOT EXECUTED 3be0: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 3be4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
3be8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
3bec: e5952094 ldr r2, [r5, #148] ; 0x94 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
3bf0: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
3bf4: 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;
3bf8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
3bfc: 1a00009c bne 3e74 <rtems_termios_ioctl+0x3b8> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
3c00: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
/* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) &&
3c04: e59530b8 ldr r3, [r5, #184] ; 0xb8 3c08: e3130b01 tst r3, #1024 ; 0x400
3c0c: 0a000008 beq 3c34 <rtems_termios_ioctl+0x178>
3c10: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED 3c14: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 3c18: 1a000005 bne 3c34 <rtems_termios_ioctl+0x178> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF);
3c1c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c20: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3c24: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF);
3c28: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c2c: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 3c30: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
} /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) &&
3c34: e59530b8 ldr r3, [r5, #184] ; 0xb8 3c38: e3130c01 tst r3, #256 ; 0x100 3c3c: 05952038 ldreq r2, [r5, #56] ; 0x38
3c40: 0a000012 beq 3c90 <rtems_termios_ioctl+0x1d4>
3c44: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED 3c48: e3520000 cmp r2, #0 <== NOT EXECUTED 3c4c: ba00007c blt 3e44 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS);
3c50: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c54: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 3c58: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) &&
3c5c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c60: e3130004 tst r3, #4 <== NOT EXECUTED 3c64: 0a000006 beq 3c84 <rtems_termios_ioctl+0x1c8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
3c68: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) &&
3c6c: e3530000 cmp r3, #0 <== NOT EXECUTED 3c70: 0a000003 beq 3c84 <rtems_termios_ioctl+0x1c8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor);
3c74: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3c78: e1a0e00f mov lr, pc <== NOT EXECUTED 3c7c: e12fff13 bx r3 <== NOT EXECUTED 3c80: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
} tty->flow_ctrl &= ~(FL_IRTSOFF);
3c84: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3c88: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3c8c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) {
3c90: e3520000 cmp r2, #0
3c94: ba00006a blt 3e44 <rtems_termios_ioctl+0x388> tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) {
3c98: e5953030 ldr r3, [r5, #48] ; 0x30 3c9c: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
3ca0: 159520b8 ldrne r2, [r5, #184] ; 0xb8 3ca4: 13822b01 orrne r2, r2, #1024 ; 0x400 3ca8: 158520b8 strne r2, [r5, #184] ; 0xb8
} /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) {
3cac: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
3cb0: 159530b8 ldrne r3, [r5, #184] ; 0xb8
tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) {
3cb4: e595803c ldr r8, [r5, #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;
3cb8: 13833c02 orrne r3, r3, #512 ; 0x200 3cbc: 158530b8 strne r3, [r5, #184] ; 0xb8
tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) {
3cc0: e2188002 ands r8, r8, #2
3cc4: 0a00004c beq 3dfc <rtems_termios_ioctl+0x340> tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
3cc8: e3a03000 mov r3, #0
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3ccc: e5853074 str r3, [r5, #116] ; 0x74
/* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
3cd0: e585306c str r3, [r5, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
3cd4: e5853070 str r3, [r5, #112] ; 0x70
else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes)
3cd8: e59530a8 ldr r3, [r5, #168] ; 0xa8 3cdc: e3530000 cmp r3, #0
3ce0: 0affff8e beq 3b20 <rtems_termios_ioctl+0x64> (*tty->device.setAttributes)(tty->minor, &tty->termios);
3ce4: e1a01007 mov r1, r7 3ce8: e5950010 ldr r0, [r5, #16] 3cec: e1a0e00f mov lr, pc 3cf0: e12fff13 bx r3 3cf4: eaffff89 b 3b20 <rtems_termios_ioctl+0x64>
*(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
3cf8: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED 3cfc: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
3d00: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
3d04: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED 3d08: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3d0c: e2851020 add r1, r5, #32 <== NOT EXECUTED 3d10: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 3d14: e0412002 sub r2, r1, r2 <== NOT EXECUTED 3d18: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 3d1c: e0823003 add r3, r2, r3 <== NOT EXECUTED 3d20: e5813000 str r3, [r1] <== NOT EXECUTED 3d24: eaffff7d b 3b20 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) {
3d28: e3530001 cmp r3, #1
3d2c: 1affff88 bne 3b54 <rtems_termios_ioctl+0x98> sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios;
3d30: e5947008 ldr r7, [r4, #8] 3d34: e285c030 add ip, r5, #48 ; 0x30 3d38: e8bc000f ldm ip!, {r0, r1, r2, r3} 3d3c: e1a0e007 mov lr, r7 3d40: e8ae000f stmia lr!, {r0, r1, r2, r3} 3d44: e8bc000f ldm ip!, {r0, r1, r2, r3} 3d48: e8ae000f stmia lr!, {r0, r1, r2, r3} 3d4c: e59c3000 ldr r3, [ip] 3d50: e58e3000 str r3, [lr]
break;
3d54: eaffff71 b 3b20 <rtems_termios_ioctl+0x64>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) {
3d58: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED 3d5c: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED 3d60: e2822129 add r2, r2, #1073741834 ; 0x4000000a <== NOT EXECUTED 3d64: e1530002 cmp r3, r2 <== NOT EXECUTED 3d68: 0a00001b beq 3ddc <rtems_termios_ioctl+0x320> <== NOT EXECUTED 3d6c: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED 3d70: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED 3d74: e282212e add r2, r2, #-2147483637 ; 0x8000000b <== NOT EXECUTED 3d78: e1530002 cmp r3, r2 <== NOT EXECUTED 3d7c: 1affff74 bne 3b54 <rtems_termios_ioctl+0x98> <== NOT EXECUTED
#if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3d80: e59f710c ldr r7, [pc, #268] ; 3e94 <rtems_termios_ioctl+0x3d8><== NOT EXECUTED 3d84: e59530cc ldr r3, [r5, #204] ; 0xcc <== NOT EXECUTED 3d88: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 3d8c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3d90: e3530000 cmp r3, #0 <== NOT EXECUTED 3d94: 0a000003 beq 3da8 <rtems_termios_ioctl+0x2ec> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3d98: e1a00005 mov r0, r5 <== NOT EXECUTED 3d9c: e1a0e00f mov lr, pc <== NOT EXECUTED 3da0: e12fff13 bx r3 <== NOT EXECUTED 3da4: e1a06000 mov r6, r0 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
3da8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3dac: 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) {
3db0: e7973282 ldr r3, [r7, 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 */
3db4: e3a01000 mov r1, #0 <== NOT EXECUTED
/* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
3db8: 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 */
3dbc: e58510d0 str r1, [r5, #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);
3dc0: e58520cc str r2, [r5, #204] ; 0xcc <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
3dc4: 0affff55 beq 3b20 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
3dc8: e1a00005 mov r0, r5 <== NOT EXECUTED 3dcc: e1a0e00f mov lr, pc <== NOT EXECUTED 3dd0: e12fff13 bx r3 <== NOT EXECUTED 3dd4: e1a06000 mov r6, r0 <== NOT EXECUTED 3dd8: eaffff50 b 3b20 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
} break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line;
3ddc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3de0: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 3de4: e5832000 str r2, [r3] <== NOT EXECUTED
break;
3de8: eaffff4c b 3b20 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup;
3dec: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3df0: e58520d4 str r2, [r5, #212] ; 0xd4 <== NOT EXECUTED 3df4: e58530d8 str r3, [r5, #216] ; 0xd8 <== NOT EXECUTED
break;
3df8: eaffff48 b 3b20 <rtems_termios_ioctl+0x64> <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10;
3dfc: e5d5a046 ldrb sl, [r5, #70] ; 0x46 <== NOT EXECUTED 3e00: eb0002d6 bl 4960 <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] *
3e04: e000009a mul r0, sl, r0 <== NOT EXECUTED 3e08: e59f2088 ldr r2, [pc, #136] ; 3e98 <rtems_termios_ioctl+0x3dc><== NOT EXECUTED 3e0c: e0831092 umull r1, r3, r2, r0 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
3e10: e5d52046 ldrb r2, [r5, #70] ; 0x46 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] *
3e14: e1a031a3 lsr r3, r3, #3 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
3e18: e3520000 cmp r2, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] *
3e1c: e5853054 str r3, [r5, #84] ; 0x54 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
3e20: 0a00000b beq 3e54 <rtems_termios_ioctl+0x398> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN])
3e24: e5d52047 ldrb r2, [r5, #71] ; 0x47 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3e28: e3520000 cmp r2, #0 <== NOT EXECUTED 3e2c: 01a02003 moveq r2, r3 <== NOT EXECUTED 3e30: 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;
3e34: e585806c str r8, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3e38: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED
else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
3e3c: e5853070 str r3, [r5, #112] ; 0x70 <== NOT EXECUTED 3e40: eaffffa4 b 3cd8 <rtems_termios_ioctl+0x21c> <== NOT EXECUTED
/* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS;
3e44: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3e48: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 3e4c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3e50: eaffff90 b 3c98 <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) {
3e54: e5d53047 ldrb r3, [r5, #71] ; 0x47 <== NOT EXECUTED 3e58: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
3e5c: 03a03001 moveq r3, #1 <== NOT EXECUTED
} else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3e60: 15852074 strne r2, [r5, #116] ; 0x74 <== NOT EXECUTED
else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
3e64: 1585206c strne r2, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
3e68: 15852070 strne r2, [r5, #112] ; 0x70 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
3e6c: 0585306c streq r3, [r5, #108] ; 0x6c <== NOT EXECUTED 3e70: eaffff98 b 3cd8 <rtems_termios_ioctl+0x21c> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3e74: e5953084 ldr r3, [r5, #132] ; 0x84 <== NOT EXECUTED
rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor,
3e78: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED 3e7c: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3e80: e0811003 add r1, r1, r3 <== NOT EXECUTED 3e84: e3a02001 mov r2, #1 <== NOT EXECUTED 3e88: e1a0e00f mov lr, pc <== NOT EXECUTED 3e8c: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED 3e90: eaffff5a b 3c00 <rtems_termios_ioctl+0x144> <== NOT EXECUTED
3e94: 0001ab9c .word 0x0001ab9c 3e98: cccccccd .word 0xcccccccd
00004068 <rtems_termios_open>: rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
4068: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
406c: e59f7490 ldr r7, [pc, #1168] ; 4504 <rtems_termios_open+0x49c>
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
4070: e1a06001 mov r6, r1
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4074: e3a01000 mov r1, #0
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
4078: e24dd014 sub sp, sp, #20 407c: e1a05000 mov r5, r0 4080: e1a08002 mov r8, r2
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4084: e5970000 ldr r0, [r7] 4088: e1a02001 mov r2, r1
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
408c: e1a09003 mov r9, r3
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
4090: eb0003e2 bl 5020 <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
4094: e250a000 subs sl, r0, #0
4098: 1a000020 bne 4120 <rtems_termios_open+0xb8> return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
409c: e59fb464 ldr fp, [pc, #1124] ; 4508 <rtems_termios_open+0x4a0> 40a0: e59b4000 ldr r4, [fp] 40a4: e3540000 cmp r4, #0
40a8: 1a000003 bne 40bc <rtems_termios_open+0x54>
40ac: ea00002b b 4160 <rtems_termios_open+0xf8> 40b0: e5944000 ldr r4, [r4] 40b4: e3540000 cmp r4, #0
40b8: 0a000028 beq 4160 <rtems_termios_open+0xf8> if ((tty->major == major) && (tty->minor == minor))
40bc: e594300c ldr r3, [r4, #12] 40c0: e1530005 cmp r3, r5
40c4: 1afffff9 bne 40b0 <rtems_termios_open+0x48>
40c8: e5943010 ldr r3, [r4, #16] 40cc: e1530006 cmp r3, r6
40d0: 1afffff6 bne 40b0 <rtems_termios_open+0x48> if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) {
40d4: e5943008 ldr r3, [r4, #8]
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
40d8: e5982000 ldr r2, [r8]
if (!tty->refcount++) {
40dc: e3530000 cmp r3, #0 40e0: e2833001 add r3, r3, #1
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
40e4: e5824034 str r4, [r2, #52] ; 0x34
if (!tty->refcount++) {
40e8: e5843008 str r3, [r4, #8]
40ec: 1a000009 bne 4118 <rtems_termios_open+0xb0> if (tty->device.firstOpen)
40f0: e5943098 ldr r3, [r4, #152] ; 0x98 40f4: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
40f8: 11a00005 movne r0, r5 40fc: 11a01006 movne r1, r6 4100: 11a02008 movne r2, r8 4104: 11a0e00f movne lr, pc 4108: 112fff13 bxne r3
/* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
410c: e59430b4 ldr r3, [r4, #180] ; 0xb4 4110: e3530002 cmp r3, #2
4114: 0a000004 beq 412c <rtems_termios_open+0xc4> (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex);
4118: e5970000 ldr r0, [r7] 411c: eb000407 bl 5140 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
4120: e1a0000a mov r0, sl 4124: e28dd014 add sp, sp, #20 4128: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
(*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId,
412c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 4130: e59f13d4 ldr r1, [pc, #980] ; 450c <rtems_termios_open+0x4a4><== NOT EXECUTED 4134: e1a02004 mov r2, r4 <== NOT EXECUTED 4138: eb0004d1 bl 5484 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
413c: e3500000 cmp r0, #0 <== NOT EXECUTED 4140: 1a0000d2 bne 4490 <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId,
4144: e1a02004 mov r2, r4 <== NOT EXECUTED 4148: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 414c: e59f13bc ldr r1, [pc, #956] ; 4510 <rtems_termios_open+0x4a8><== NOT EXECUTED 4150: eb0004cb bl 5484 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
4154: e3500000 cmp r0, #0 <== NOT EXECUTED 4158: 0affffee beq 4118 <rtems_termios_open+0xb0> <== NOT EXECUTED 415c: ea0000cb b 4490 <rtems_termios_open+0x428> <== NOT EXECUTED
static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty));
4160: e3a00001 mov r0, #1 4164: e3a010e8 mov r1, #232 ; 0xe8 4168: eb0015f1 bl 9934 <calloc>
if (tty == NULL) {
416c: e3500000 cmp r0, #0
static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty));
4170: e58d0010 str r0, [sp, #16] 4174: e1a04000 mov r4, r0
if (tty == NULL) { 4178: 0a0000af beq 443c <rtems_termios_open+0x3d4> return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
417c: e59f0390 ldr r0, [pc, #912] ; 4514 <rtems_termios_open+0x4ac> 4180: e59d1010 ldr r1, [sp, #16] 4184: e5903004 ldr r3, [r0, #4] 4188: e5813064 str r3, [r1, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
418c: e5910064 ldr r0, [r1, #100] ; 0x64 4190: ebfff70d bl 1dcc <malloc> 4194: e59d2010 ldr r2, [sp, #16]
if (tty->rawInBuf.theBuf == NULL) {
4198: e3500000 cmp r0, #0
} /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
419c: e5820058 str r0, [r2, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) { 41a0: 0a0000a9 beq 444c <rtems_termios_open+0x3e4> return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
41a4: e59fc368 ldr ip, [pc, #872] ; 4514 <rtems_termios_open+0x4ac> 41a8: e59de010 ldr lr, [sp, #16] 41ac: e59c3008 ldr r3, [ip, #8] 41b0: e58e3088 str r3, [lr, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
41b4: e59e0088 ldr r0, [lr, #136] ; 0x88 41b8: ebfff703 bl 1dcc <malloc> 41bc: e59d1010 ldr r1, [sp, #16]
if (tty->rawOutBuf.theBuf == NULL) {
41c0: e3500000 cmp r0, #0
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
41c4: e581007c str r0, [r1, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf));
41c8: 05910058 ldreq r0, [r1, #88] ; 0x58
/* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { 41cc: 0a000097 beq 4430 <rtems_termios_open+0x3c8> return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
41d0: e59f233c ldr r2, [pc, #828] ; 4514 <rtems_termios_open+0x4ac> 41d4: e5920000 ldr r0, [r2] 41d8: ebfff6fb bl 1dcc <malloc> 41dc: e59d3010 ldr r3, [sp, #16]
if (tty->cbuf == NULL) {
41e0: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
41e4: e583001c str r0, [r3, #28]
if (tty->cbuf == NULL) { 41e8: 0a00008c beq 4420 <rtems_termios_open+0x3b8> tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead;
41ec: e59b2000 ldr r2, [fp]
tty->back = NULL;
41f0: e59dc010 ldr ip, [sp, #16]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
41f4: e3a03000 mov r3, #0
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL)
41f8: e3520000 cmp r2, #0
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL;
41fc: e88c000c stm ip, {r2, r3}
if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty;
4200: 1582c004 strne ip, [r2, #4]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
4204: e58c30d4 str r3, [ip, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
4208: e58c30d8 str r3, [ip, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
420c: e58c30dc str r3, [ip, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
4210: e58c30e0 str r3, [ip, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
4214: e58c30e4 str r3, [ip, #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)
4218: e59f32f8 ldr r3, [pc, #760] ; 4518 <rtems_termios_open+0x4b0> 421c: e5932000 ldr r2, [r3]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
4220: e59f12ec ldr r1, [pc, #748] ; 4514 <rtems_termios_open+0x4ac>
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)
4224: e3520000 cmp r2, #0
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
4228: e59d2010 ldr r2, [sp, #16] 422c: e5d1000c ldrb r0, [r1, #12]
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
4230: e59de010 ldr lr, [sp, #16]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
4234: e282c014 add ip, r2, #20
tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty;
4238: 0583e000 streq lr, [r3]
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
423c: e58be000 str lr, [fp]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
4240: e3800315 orr r0, r0, #1409286144 ; 0x54000000 4244: e58dc000 str ip, [sp]
rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor;
4248: e59dc010 ldr ip, [sp, #16]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
424c: e3800852 orr r0, r0, #5373952 ; 0x520000 4250: e3a03000 mov r3, #0 4254: e3800c69 orr r0, r0, #26880 ; 0x6900 4258: e3a01001 mov r1, #1 425c: e3a02054 mov r2, #84 ; 0x54
rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor;
4260: e58c6010 str r6, [ip, #16]
tty->major = major;
4264: e58c500c str r5, [ip, #12]
/* * Set up mutex semaphores */ sc = rtems_semaphore_create (
4268: eb0002d1 bl 4db4 <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)
426c: e2503000 subs r3, r0, #0
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
4270: e59fb29c ldr fp, [pc, #668] ; 4514 <rtems_termios_open+0x4ac>
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) 4274: 1a000085 bne 4490 <rtems_termios_open+0x428> rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
4278: e5db000c ldrb r0, [fp, #12] 427c: e59de010 ldr lr, [sp, #16] 4280: e3800315 orr r0, r0, #1409286144 ; 0x54000000 4284: e3800852 orr r0, r0, #5373952 ; 0x520000 4288: e28ec018 add ip, lr, #24 428c: e3a01001 mov r1, #1 4290: e3800c6f orr r0, r0, #28416 ; 0x6f00 4294: e3a02054 mov r2, #84 ; 0x54 4298: e58dc000 str ip, [sp] 429c: eb0002c4 bl 4db4 <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)
42a0: e2501000 subs r1, r0, #0
42a4: 1a000079 bne 4490 <rtems_termios_open+0x428> rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
42a8: e5db000c ldrb r0, [fp, #12] 42ac: e59d2010 ldr r2, [sp, #16] 42b0: e3800315 orr r0, r0, #1409286144 ; 0x54000000 42b4: e3800852 orr r0, r0, #5373952 ; 0x520000 42b8: e282c08c add ip, r2, #140 ; 0x8c 42bc: e3800b1e orr r0, r0, #30720 ; 0x7800 42c0: e3a02020 mov r2, #32 42c4: e1a03001 mov r3, r1 42c8: e58dc000 str ip, [sp] 42cc: eb0002b8 bl 4db4 <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)
42d0: e250e000 subs lr, r0, #0
42d4: 1a00006d bne 4490 <rtems_termios_open+0x428> tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks;
42d8: e8b9000f ldm r9!, {r0, r1, r2, r3} 42dc: e58d900c str r9, [sp, #12] 42e0: e59d9010 ldr r9, [sp, #16] 42e4: e289c098 add ip, r9, #152 ; 0x98 42e8: e8ac000f stmia ip!, {r0, r1, r2, r3} 42ec: e59d900c ldr r9, [sp, #12] 42f0: e899000f ldm r9, {r0, r1, r2, r3} 42f4: e88c000f stm ip, {r0, r1, r2, r3}
/* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
42f8: e59dc010 ldr ip, [sp, #16] 42fc: e59c30b4 ldr r3, [ip, #180] ; 0xb4 4300: 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;
4304: e58ce094 str lr, [ip, #148] ; 0x94
tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4308: 0a000061 beq 4494 <rtems_termios_open+0x42c> &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) ||
430c: e59d9010 ldr r9, [sp, #16] 4310: e59930a0 ldr r3, [r9, #160] ; 0xa0 4314: e3530000 cmp r3, #0
4318: 0a00004e beq 4458 <rtems_termios_open+0x3f0> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
431c: e59930b4 ldr r3, [r9, #180] ; 0xb4 4320: e3530002 cmp r3, #2
4324: 0a00004b beq 4458 <rtems_termios_open+0x3f0> 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;
4328: e59d0010 ldr r0, [sp, #16]
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';
432c: 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;
4330: e58030b8 str r3, [r0, #184] ; 0xb8
/* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
4334: e5909064 ldr r9, [r0, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
4338: e590b064 ldr fp, [r0, #100] ; 0x64
/* * Bump name characer */ if (c++ == 'z')
433c: e59f11d0 ldr r1, [pc, #464] ; 4514 <rtems_termios_open+0x4ac>
/* 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;
4340: e1a090a9 lsr r9, r9, #1 4344: e58d9008 str r9, [sp, #8]
tty->highwater = tty->rawInBuf.Size * 3/4;
4348: e08bb08b add fp, fp, fp, lsl #1 434c: e59d9010 ldr r9, [sp, #16]
/* * Bump name characer */ if (c++ == 'z')
4350: e5d1e00c ldrb lr, [r1, #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;
4354: e1a0b12b lsr fp, fp, #2 4358: e589b0c0 str fp, [r9, #192] ; 0xc0
/* * Bump name characer */ if (c++ == 'z')
435c: e59f91b0 ldr r9, [pc, #432] ; 4514 <rtems_termios_open+0x4ac> 4360: e35e007a cmp lr, #122 ; 0x7a 4364: e28ee001 add lr, lr, #1 4368: e5c9e00c strb lr, [r9, #12]
* 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;
436c: e3a02c82 mov r2, #33280 ; 0x8200
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
4370: e59de010 ldr lr, [sp, #16]
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;
4374: e282203b add r2, r2, #59 ; 0x3b 4378: e58e203c str r2, [lr, #60] ; 0x3c
tty->termios.c_cc[VINTR] = '\003';
437c: e3a02003 mov r2, #3 4380: e5ce2041 strb r2, [lr, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
4384: e3a0201c mov r2, #28 4388: e5ce2042 strb r2, [lr, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
438c: e3a0207f mov r2, #127 ; 0x7f 4390: e5ce2043 strb r2, [lr, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
4394: e3a02015 mov r2, #21 4398: e5ce2044 strb r2, [lr, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
439c: e3a02004 mov r2, #4 43a0: e5ce2045 strb r2, [lr, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
43a4: e3a02011 mov r2, #17 43a8: e5ce2049 strb r2, [lr, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
43ac: e3a02013 mov r2, #19 43b0: e5ce204a strb r2, [lr, #74] ; 0x4a
tty->termios.c_cc[VSUSP] = '\032';
43b4: e3a0201a mov r2, #26 43b8: e5ce204b strb r2, [lr, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
43bc: e3a02012 mov r2, #18 43c0: e5ce204d strb r2, [lr, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
43c4: e3a0200f mov r2, #15 43c8: e5ce204e strb r2, [lr, #78] ; 0x4e
tty->termios.c_cc[VWERASE] = '\027';
43cc: e3a02017 mov r2, #23 43d0: e5ce204f strb r2, [lr, #79] ; 0x4f
/* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS;
43d4: e3a00b06 mov r0, #6144 ; 0x1800
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';
43d8: e3a02016 mov r2, #22 43dc: e5ce2050 strb r2, [lr, #80] ; 0x50
/* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS;
43e0: e2800005 add r0, r0, #5 43e4: e58e0034 str r0, [lr, #52] ; 0x34
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
43e8: e3a0cc25 mov ip, #9472 ; 0x2500
/* 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;
43ec: e59d0008 ldr r0, [sp, #8]
/* * 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;
43f0: e3a01e8b mov r1, #2224 ; 0x8b0
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';
43f4: e5ce304c strb r3, [lr, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
43f8: e5ce3051 strb r3, [lr, #81] ; 0x51
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
43fc: e28cc002 add ip, ip, #2
tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4400: e281100d add r1, r1, #13
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a';
4404: 0282204b addeq r2, r2, #75 ; 0x4b 4408: 01a03009 moveq r3, r9
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
440c: e58ec030 str ip, [lr, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4410: e58e1038 str r1, [lr, #56] ; 0x38
/* 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;
4414: e58e00bc str r0, [lr, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a';
4418: 05c3200c strbeq r2, [r3, #12] 441c: eaffff2c b 40d4 <rtems_termios_open+0x6c>
/* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf));
4420: e593007c ldr r0, [r3, #124] ; 0x7c <== NOT EXECUTED 4424: ebfff5ad bl 1ae0 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
4428: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED 442c: e5990058 ldr r0, [r9, #88] ; 0x58 <== NOT EXECUTED 4430: ebfff5aa bl 1ae0 <free> <== NOT EXECUTED
free(tty);
4434: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 4438: ebfff5a8 bl 1ae0 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
443c: e5970000 ldr r0, [r7] <== NOT EXECUTED 4440: eb00033e bl 5140 <rtems_semaphore_release> <== NOT EXECUTED 4444: e3a0a01a mov sl, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
4448: eaffff34 b 4120 <rtems_termios_open+0xb8> <== NOT EXECUTED
* allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty);
444c: e1a00002 mov r0, r2 <== NOT EXECUTED 4450: ebfff5a2 bl 1ae0 <free> <== NOT EXECUTED 4454: eafffff8 b 443c <rtems_termios_open+0x3d4> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create (
4458: e59fc0b4 ldr ip, [pc, #180] ; 4514 <rtems_termios_open+0x4ac><== NOT EXECUTED 445c: e5dc000c ldrb r0, [ip, #12] <== NOT EXECUTED 4460: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED 4464: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 4468: e3a01000 mov r1, #0 <== NOT EXECUTED 446c: e3800852 orr r0, r0, #5373952 ; 0x520000 <== NOT EXECUTED 4470: e28ec068 add ip, lr, #104 ; 0x68 <== NOT EXECUTED 4474: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED 4478: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 447c: e1a03001 mov r3, r1 <== NOT EXECUTED 4480: e58dc000 str ip, [sp] <== NOT EXECUTED 4484: eb00024a bl 4db4 <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)
4488: e3500000 cmp r0, #0 <== NOT EXECUTED 448c: 0affffa5 beq 4328 <rtems_termios_open+0x2c0> <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
4490: eb000482 bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create (
4494: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED 4498: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 449c: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 44a0: e28cc0c8 add ip, ip, #200 ; 0xc8 <== NOT EXECUTED 44a4: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 44a8: e3a0100a mov r1, #10 <== NOT EXECUTED 44ac: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 44b0: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 44b4: e58de000 str lr, [sp] <== NOT EXECUTED 44b8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 44bc: eb000349 bl 51e8 <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)
44c0: e250e000 subs lr, r0, #0 <== NOT EXECUTED 44c4: 1afffff1 bne 4490 <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
44c8: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED 44cc: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 44d0: e3800452 orr r0, r0, #1375731712 ; 0x52000000 <== NOT EXECUTED 44d4: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 44d8: e282c0c4 add ip, r2, #196 ; 0xc4 <== NOT EXECUTED 44dc: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 44e0: e3a01009 mov r1, #9 <== NOT EXECUTED 44e4: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 44e8: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 44ec: e58de000 str lr, [sp] <== NOT EXECUTED 44f0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 44f4: eb00033b bl 51e8 <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)
44f8: e3500000 cmp r0, #0 <== NOT EXECUTED 44fc: 0affff82 beq 430c <rtems_termios_open+0x2a4> <== NOT EXECUTED 4500: eaffffe2 b 4490 <rtems_termios_open+0x428> <== NOT EXECUTED
4504: 0001aedc .word 0x0001aedc 4508: 0001aee4 .word 0x0001aee4 450c: 0000458c .word 0x0000458c 4510: 0000451c .word 0x0000451c 4514: 00019644 .word 0x00019644 4518: 0001aee0 .word 0x0001aee0
00002e88 <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) {
2e88: e59230b4 ldr r3, [r2, #180] ; 0xb4 2e8c: e3530000 cmp r3, #0
* Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) {
2e90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2e94: e1a04002 mov r4, r2 2e98: e1a0b000 mov fp, r0 2e9c: e1a09001 mov r9, r1
const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 2ea0: 0a000039 beq 2f8c <rtems_termios_puts+0x104> (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) {
2ea4: e3510000 cmp r1, #0 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head;
2ea8: e5928080 ldr r8, [r2, #128] ; 0x80 <== NOT EXECUTED
while (len) {
2eac: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2eb0: e3a0a000 mov sl, #0 <== NOT EXECUTED
* with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait;
2eb4: e3a07002 mov r7, #2 <== NOT EXECUTED
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
2eb8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2ebc: e2880001 add r0, r8, #1 <== NOT EXECUTED 2ec0: eb00510a bl 172f0 <__umodsi3> <== NOT EXECUTED 2ec4: e1a08000 mov r8, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2ec8: e10f5000 mrs r5, CPSR <== NOT EXECUTED 2ecc: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 2ed0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) {
2ed4: e5946084 ldr r6, [r4, #132] ; 0x84 <== NOT EXECUTED 2ed8: e1560000 cmp r6, r0 <== NOT EXECUTED 2edc: 1a00000d bne 2f18 <rtems_termios_puts+0x90> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
2ee0: e5847094 str r7, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2ee4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2ee8: e3a01000 mov r1, #0 <== NOT EXECUTED 2eec: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2ef0: e1a02001 mov r2, r1 <== NOT EXECUTED 2ef4: eb000849 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
2ef8: e3500000 cmp r0, #0 <== NOT EXECUTED 2efc: 1a000028 bne 2fa4 <rtems_termios_puts+0x11c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2f00: e10f5000 mrs r5, CPSR <== NOT EXECUTED 2f04: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 2f08: 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) {
2f0c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2f10: e1530006 cmp r3, r6 <== NOT EXECUTED 2f14: 0afffff1 beq 2ee0 <rtems_termios_puts+0x58> <== NOT EXECUTED
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
2f18: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2f1c: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED 2f20: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2f24: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) {
2f28: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2f2c: 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;
2f30: e5848080 str r8, [r4, #128] ; 0x80 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
2f34: 1a000007 bne 2f58 <rtems_termios_puts+0xd0> <== NOT EXECUTED
/* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2f38: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2f3c: e3130010 tst r3, #16 <== NOT EXECUTED 2f40: 0a000009 beq 2f6c <rtems_termios_puts+0xe4> <== NOT EXECUTED
(*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP;
2f44: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2f48: e3833020 orr r3, r3, #32 <== NOT EXECUTED 2f4c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} tty->rawOutBufState = rob_busy;
2f50: e3a03001 mov r3, #1 <== NOT EXECUTED 2f54: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2f58: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) {
2f5c: e2599001 subs r9, r9, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--;
2f60: e28aa001 add sl, sl, #1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) {
2f64: 1affffd3 bne 2eb8 <rtems_termios_puts+0x30> <== NOT EXECUTED 2f68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2f6c: 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,
2f70: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2f74: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2f78: e0811003 add r1, r1, r3 <== NOT EXECUTED 2f7c: e3a02001 mov r2, #1 <== NOT EXECUTED 2f80: e1a0e00f mov lr, pc <== NOT EXECUTED 2f84: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2f88: eafffff0 b 2f50 <rtems_termios_puts+0xc8> <== NOT EXECUTED
unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len);
2f8c: e1a01000 mov r1, r0 2f90: e1a02009 mov r2, r9 2f94: e5940010 ldr r0, [r4, #16] 2f98: e1a0e00f mov lr, pc 2f9c: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
2fa0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
2fa4: eb0009bd bl 56a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
00003724 <rtems_termios_read>: return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
3724: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
3728: e5903000 ldr r3, [r0] <== NOT EXECUTED
return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
372c: e1a0a000 mov sl, r0 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
3730: 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);
3734: 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;
3738: e59a300c ldr r3, [sl, #12] <== NOT EXECUTED
return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
373c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3740: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3744: 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;
3748: e59a7010 ldr r7, [sl, #16] <== NOT EXECUTED
char *buffer = args->buffer;
374c: e58d3000 str r3, [sp] <== NOT EXECUTED
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3750: eb000632 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
3754: e250b000 subs fp, r0, #0 <== NOT EXECUTED 3758: 1a00000e bne 3798 <rtems_termios_read+0x74> <== NOT EXECUTED
return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
375c: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3760: e59f334c ldr r3, [pc, #844] ; 3ab4 <rtems_termios_read+0x390><== NOT EXECUTED 3764: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3768: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 376c: e3530000 cmp r3, #0 <== NOT EXECUTED 3770: 0a00000b beq 37a4 <rtems_termios_read+0x80> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3774: e1a0100a mov r1, sl <== NOT EXECUTED 3778: e1a00004 mov r0, r4 <== NOT EXECUTED 377c: e1a0e00f mov lr, pc <== NOT EXECUTED 3780: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3784: e3a03000 mov r3, #0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3788: e1a0b000 mov fp, r0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
378c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3790: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3794: eb000669 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
} args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; }
3798: e1a0000b mov r0, fp <== NOT EXECUTED 379c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 37a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) {
37a4: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 37a8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 37ac: e1520003 cmp r2, r3 <== NOT EXECUTED 37b0: 0a00001a beq 3820 <rtems_termios_read+0xfc> <== NOT EXECUTED
else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) {
37b4: e3570000 cmp r7, #0 <== NOT EXECUTED 37b8: 0a000010 beq 3800 <rtems_termios_read+0xdc> <== NOT EXECUTED 37bc: e2842020 add r2, r4, #32 <== NOT EXECUTED 37c0: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 37c4: e1530002 cmp r3, r2 <== NOT EXECUTED 37c8: aa00000c bge 3800 <rtems_termios_read+0xdc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
37cc: e59d2000 ldr r2, [sp] <== NOT EXECUTED 37d0: e0631002 rsb r1, r3, r2 <== NOT EXECUTED 37d4: ea000002 b 37e4 <rtems_termios_read+0xc0> <== NOT EXECUTED
else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) {
37d8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 37dc: e1520003 cmp r2, r3 <== NOT EXECUTED 37e0: da000006 ble 3800 <rtems_termios_read+0xdc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
37e4: e594201c ldr r2, [r4, #28] <== NOT EXECUTED 37e8: e7d22003 ldrb r2, [r2, r3] <== NOT EXECUTED
else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) {
37ec: e2577001 subs r7, r7, #1 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
37f0: e7c12003 strb r2, [r1, r3] <== NOT EXECUTED 37f4: e2833001 add r3, r3, #1 <== NOT EXECUTED 37f8: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) {
37fc: 1afffff5 bne 37d8 <rtems_termios_read+0xb4> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
3800: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED 3804: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 3808: e58a7018 str r7, [sl, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
380c: e3a03000 mov r3, #0 <== NOT EXECUTED 3810: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3814: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3818: eb000648 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
381c: eaffffdd b 3798 <rtems_termios_read+0x74> <== NOT EXECUTED
} if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED)
3820: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column;
3824: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
if (tty->device.pollRead != NULL
3828: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column;
382c: e584202c str r2, [r4, #44] ; 0x2c <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0;
3830: e584b020 str fp, [r4, #32] <== NOT EXECUTED 3834: e584b024 str fp, [r4, #36] ; 0x24 <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
3838: 0a000002 beq 3848 <rtems_termios_read+0x124> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
383c: e59420b4 ldr r2, [r4, #180] ; 0xb4 <== NOT EXECUTED 3840: e3520000 cmp r2, #0 <== NOT EXECUTED 3844: 0a00005e beq 39c4 <rtems_termios_read+0x2a0> <== 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,
3848: e2842049 add r2, r4, #73 ; 0x49 <== 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))
384c: e3a09c02 mov r9, #512 ; 0x200 <== 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;
3850: e5945074 ldr r5, [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,
3854: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3858: e59f6258 ldr r6, [pc, #600] ; 3ab8 <rtems_termios_read+0x394><== 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))
385c: e2899002 add r9, r9, #2 <== 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,
3860: e3a08001 mov r8, #1 <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3864: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 3868: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 386c: e1520003 cmp r2, r3 <== NOT EXECUTED 3870: 0a000036 beq 3950 <rtems_termios_read+0x22c> <== NOT EXECUTED 3874: e5963000 ldr r3, [r6] <== NOT EXECUTED 3878: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 387c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3880: e1520003 cmp r2, r3 <== NOT EXECUTED 3884: aa000031 bge 3950 <rtems_termios_read+0x22c> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
3888: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 388c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3890: e2800001 add r0, r0, #1 <== NOT EXECUTED 3894: eb004e95 bl 172f0 <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
3898: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 389c: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
38a0: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
38a4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 38a8: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 38ac: e0823003 add r3, r2, r3 <== NOT EXECUTED 38b0: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 38b4: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 38b8: eb004e8c bl 172f0 <__umodsi3> <== NOT EXECUTED 38bc: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 38c0: e1500003 cmp r0, r3 <== NOT EXECUTED 38c4: 2a000014 bcs 391c <rtems_termios_read+0x1f8> <== NOT EXECUTED
% tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF;
38c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38cc: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 38d0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
38d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38d8: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED 38dc: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 38e0: e1a03b03 lsl r3, r3, #22 <== NOT EXECUTED 38e4: e1a03b23 lsr r3, r3, #22 <== NOT EXECUTED 38e8: e1530009 cmp r3, r9 <== NOT EXECUTED 38ec: 0a000028 beq 3994 <rtems_termios_read+0x270> <== NOT EXECUTED
/* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) {
38f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38f4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 38f8: 0a000007 beq 391c <rtems_termios_read+0x1f8> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
38fc: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
3900: 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;
3904: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
3908: 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;
390c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */ if (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
} } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) {
391c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3920: e3130002 tst r3, #2 <== NOT EXECUTED 3924: 0a000012 beq 3974 <rtems_termios_read+0x250> <== NOT EXECUTED
if (siproc (c, tty))
3928: e1a00005 mov r0, r5 <== NOT EXECUTED 392c: e1a01004 mov r1, r4 <== NOT EXECUTED 3930: ebffff0f bl 3574 <siproc> <== NOT EXECUTED 3934: e3500000 cmp r0, #0 <== NOT EXECUTED
wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN])
3938: 13a08000 movne r8, #0 <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
393c: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 3940: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3944: e1520003 cmp r2, r3 <== NOT EXECUTED
else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout;
3948: e5945070 ldr r5, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
394c: 1affffc8 bne 3874 <rtems_termios_read+0x150> <== NOT EXECUTED
} /* * Wait for characters */ if ( wait ) {
3950: e3580000 cmp r8, #0 <== NOT EXECUTED 3954: 0affff96 beq 37b4 <rtems_termios_read+0x90> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
3958: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 395c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3960: e1a02005 mov r2, r5 <== NOT EXECUTED 3964: eb0005ad bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
3968: e3500000 cmp r0, #0 <== NOT EXECUTED 396c: 0affffbc beq 3864 <rtems_termios_read+0x140> <== NOT EXECUTED 3970: eaffff8f b 37b4 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty);
3974: e1a00005 mov r0, r5 <== NOT EXECUTED 3978: e1a01004 mov r1, r4 <== NOT EXECUTED 397c: ebfffefc bl 3574 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3980: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3984: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3988: e1520003 cmp r2, r3 <== NOT EXECUTED 398c: a3a08000 movge r8, #0 <== NOT EXECUTED 3990: eaffffe9 b 393c <rtems_termios_read+0x218> <== 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))
3994: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3998: e3530000 cmp r3, #0 <== NOT EXECUTED 399c: 0a000002 beq 39ac <rtems_termios_read+0x288> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) {
39a0: 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))
39a4: e3130020 tst r3, #32 <== NOT EXECUTED 39a8: 0affffd0 beq 38f0 <rtems_termios_read+0x1cc> <== 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,
39ac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 39b0: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 39b4: e3a02001 mov r2, #1 <== NOT EXECUTED 39b8: e1a0e00f mov lr, pc <== NOT EXECUTED 39bc: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 39c0: eaffffd5 b 391c <rtems_termios_read+0x1f8> <== NOT EXECUTED
static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) {
39c4: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 39c8: e3120002 tst r2, #2 <== NOT EXECUTED 39cc: 0a00000b beq 3a00 <rtems_termios_read+0x2dc> <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
39d0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 39d4: e1a0e00f mov lr, pc <== NOT EXECUTED 39d8: e12fff13 bx r3 <== NOT EXECUTED
if (n < 0) {
39dc: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_task_wake_after (1); } else { if (siproc (n, tty))
39e0: e1a01004 mov r1, r4 <== NOT EXECUTED 39e4: 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) {
39e8: ba00002d blt 3aa4 <rtems_termios_read+0x380> <== NOT EXECUTED
rtems_task_wake_after (1); } else { if (siproc (n, tty))
39ec: ebfffee0 bl 3574 <siproc> <== NOT EXECUTED 39f0: e3500000 cmp r0, #0 <== NOT EXECUTED 39f4: 1affff6e bne 37b4 <rtems_termios_read+0x90> <== NOT EXECUTED
static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) {
39f8: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 39fc: eafffff3 b 39d0 <rtems_termios_read+0x2ac> <== NOT EXECUTED
} } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot();
3a00: eb0003de bl 4980 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED 3a04: e1a05000 mov r5, r0 <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
3a08: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3a0c: e1a0e00f mov lr, pc <== NOT EXECUTED 3a10: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
3a14: e3500000 cmp r0, #0 <== NOT EXECUTED 3a18: ba00000c blt 3a50 <rtems_termios_read+0x32c> <== NOT EXECUTED
} } rtems_task_wake_after (1); } else { siproc (n, tty);
3a1c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 3a20: e1a01004 mov r1, r4 <== NOT EXECUTED 3a24: ebfffed2 bl 3574 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3a28: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3a2c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3a30: e1520003 cmp r2, r3 <== NOT EXECUTED 3a34: aaffff5e bge 37b4 <rtems_termios_read+0x90> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
3a38: e3530000 cmp r3, #0 <== NOT EXECUTED 3a3c: 0afffff1 beq 3a08 <rtems_termios_read+0x2e4> <== NOT EXECUTED 3a40: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3a44: e3530000 cmp r3, #0 <== NOT EXECUTED 3a48: 0affffee beq 3a08 <rtems_termios_read+0x2e4> <== NOT EXECUTED 3a4c: eaffffeb b 3a00 <rtems_termios_read+0x2dc> <== NOT EXECUTED
rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) {
3a50: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3a54: e3530000 cmp r3, #0 <== NOT EXECUTED 3a58: 0a000008 beq 3a80 <rtems_termios_read+0x35c> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
3a5c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3a60: e3530000 cmp r3, #0 <== NOT EXECUTED 3a64: 0a000002 beq 3a74 <rtems_termios_read+0x350> <== NOT EXECUTED 3a68: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3a6c: e3530000 cmp r3, #0 <== NOT EXECUTED 3a70: 1a000005 bne 3a8c <rtems_termios_read+0x368> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1);
3a74: e3a00001 mov r0, #1 <== NOT EXECUTED 3a78: eb00069b bl 54ec <rtems_task_wake_after> <== NOT EXECUTED 3a7c: eaffffe1 b 3a08 <rtems_termios_read+0x2e4> <== NOT EXECUTED
break; } } } else { if (!tty->termios.c_cc[VTIME])
3a80: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3a84: e3530000 cmp r3, #0 <== NOT EXECUTED 3a88: 0affff49 beq 37b4 <rtems_termios_read+0x90> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
3a8c: eb0003bb bl 4980 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
3a90: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 3a94: e0650000 rsb r0, r5, r0 <== NOT EXECUTED 3a98: e1500003 cmp r0, r3 <== NOT EXECUTED 3a9c: 9afffff4 bls 3a74 <rtems_termios_read+0x350> <== NOT EXECUTED 3aa0: eaffff43 b 37b4 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1);
3aa4: e3a00001 mov r0, #1 <== NOT EXECUTED 3aa8: eb00068f bl 54ec <rtems_task_wake_after> <== NOT EXECUTED
static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) {
3aac: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 3ab0: eaffffc6 b 39d0 <rtems_termios_read+0x2ac> <== NOT EXECUTED
3ab4: 0001ab9c .word 0x0001ab9c 3ab8: 00019644 .word 0x00019644
0000290c <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))
290c: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2910: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 2914: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2918: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 291c: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 2920: e2822001 add r2, r2, #1 <== NOT EXECUTED 2924: 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) {
2928: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 292c: 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))
2930: 0a000046 beq 2a50 <rtems_termios_refill_transmitter+0x144> <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
2934: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2938: e2033003 and r3, r3, #3 <== NOT EXECUTED 293c: e3530002 cmp r3, #2 <== NOT EXECUTED 2940: 0a000054 beq 2a98 <rtems_termios_refill_transmitter+0x18c> <== NOT EXECUTED
rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2944: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 2948: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 294c: e1520003 cmp r2, r3 <== NOT EXECUTED 2950: 0a00002a beq 2a00 <rtems_termios_refill_transmitter+0xf4> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2954: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2958: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 295c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0;
2960: e3a02000 mov r2, #0 <== NOT EXECUTED
} return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen;
2964: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
2968: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
296c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
2970: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2974: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2978: e0800003 add r0, r0, r3 <== NOT EXECUTED 297c: eb00525b bl 172f0 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) {
2980: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2984: 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;
2988: e1a05000 mov r5, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
298c: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
2990: 0a00002b beq 2a44 <rtems_termios_refill_transmitter+0x138> <== NOT EXECUTED
/* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) {
2994: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2998: e1530005 cmp r3, r5 <== NOT EXECUTED 299c: 0a00001d beq 2a18 <rtems_termios_refill_transmitter+0x10c> <== NOT EXECUTED
if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
29a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 29a4: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 29a8: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 29ac: 0a00004b beq 2ae0 <rtems_termios_refill_transmitter+0x1d4> <== NOT EXECUTED
} else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head)
29b0: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 29b4: e1550003 cmp r5, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
29b8: 85946088 ldrhi r6, [r4, #136] ; 0x88 <== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
29bc: 95946080 ldrls r6, [r4, #128] ; 0x80 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
29c0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail;
29c4: 80656006 rsbhi r6, r5, r6 <== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
29c8: 90656006 rsbls r6, r5, r6 <== NOT EXECUTED
/* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor,
29cc: 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)) {
29d0: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 29d4: 13a06001 movne r6, #1 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
29d8: e3a03001 mov r3, #1 <== NOT EXECUTED 29dc: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
29e0: e0811005 add r1, r1, r5 <== NOT EXECUTED 29e4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 29e8: e1a02006 mov r2, r6 <== NOT EXECUTED 29ec: e1a0e00f mov lr, pc <== NOT EXECUTED 29f0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
29f4: e5845084 str r5, [r4, #132] ; 0x84 <== NOT EXECUTED
} return nToSend; }
29f8: e1a00006 mov r0, r6 <== NOT EXECUTED 29fc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) {
2a00: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 2a04: e3530002 cmp r3, #2 <== NOT EXECUTED 2a08: 0a00003f beq 2b0c <rtems_termios_refill_transmitter+0x200> <== NOT EXECUTED
/* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2a0c: e3a06000 mov r6, #0 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
2a10: e1a00006 mov r0, r6 <== NOT EXECUTED 2a14: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) {
2a18: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle;
2a1c: e3a06000 mov r6, #0 <== NOT EXECUTED
nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) {
2a20: e3530000 cmp r3, #0 <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle;
2a24: e5846094 str r6, [r4, #148] ; 0x94 <== NOT EXECUTED
nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) {
2a28: 01a06003 moveq r6, r3 <== NOT EXECUTED 2a2c: 0afffff0 beq 29f4 <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2a30: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2a34: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2a38: e1a0e00f mov lr, pc <== NOT EXECUTED 2a3c: e12fff13 bx r3 <== NOT EXECUTED 2a40: eaffffeb b 29f4 <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2a44: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2a48: eb0009bc bl 5140 <rtems_semaphore_release> <== NOT EXECUTED 2a4c: eaffffd0 b 2994 <rtems_termios_refill_transmitter+0x88> <== NOT EXECUTED
/* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor,
2a50: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 2a54: e3a02001 mov r2, #1 <== NOT EXECUTED 2a58: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2a5c: e1a0e00f mov lr, pc <== NOT EXECUTED 2a60: 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 (
2a64: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2a68: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2a6c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--;
2a70: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2a74: 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--;
2a78: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2a7c: e3811002 orr r1, r1, #2 <== NOT EXECUTED 2a80: 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--;
2a84: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2a88: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2a8c: e3a06001 mov r6, #1 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
2a90: e1a00006 mov r0, r6 <== NOT EXECUTED 2a94: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor,
2a98: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 2a9c: e3a02001 mov r2, #1 <== NOT EXECUTED 2aa0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2aa4: e1a0e00f mov lr, pc <== NOT EXECUTED 2aa8: 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 (
2aac: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ab0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ab4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--;
2ab8: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2abc: 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--;
2ac0: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2ac4: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 2ac8: 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--;
2acc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2ad0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2ad4: e3a06001 mov r6, #1 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
2ad8: e1a00006 mov r0, r6 <== NOT EXECUTED 2adc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2ae0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ae4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ae8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP;
2aec: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2af0: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2af4: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2af8: e3a02001 mov r2, #1 <== NOT EXECUTED 2afc: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2b00: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2b04: e3a06000 mov r6, #0 <== NOT EXECUTED 2b08: eaffffb9 b 29f4 <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
*/ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2b0c: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 2b10: eb00098a bl 5140 <rtems_semaphore_release> <== NOT EXECUTED 2b14: e3a06000 mov r6, #0 <== NOT EXECUTED 2b18: eaffffbc b 2a10 <rtems_termios_refill_transmitter+0x104> <== NOT EXECUTED
0000458c <rtems_termios_rxdaemon>: /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) {
458c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 4590: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 4594: e1a04000 mov r4, r0 <== NOT EXECUTED 4598: e28d7007 add r7, sp, #7 <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
459c: e3a06000 mov r6, #0 <== NOT EXECUTED 45a0: e1a0300d mov r3, sp <== NOT EXECUTED 45a4: e3a01002 mov r1, #2 <== NOT EXECUTED 45a8: e3a02000 mov r2, #0 <== NOT EXECUTED 45ac: e3a00003 mov r0, #3 <== NOT EXECUTED 45b0: eb000112 bl 4a00 <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) {
45b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 45b8: e3130001 tst r3, #1 <== NOT EXECUTED 45bc: 1a000012 bne 460c <rtems_termios_rxdaemon+0x80> <== NOT EXECUTED
} else { /* * do something */ c = tty->device.pollRead(tty->minor);
45c0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 45c4: e1a0e00f mov lr, pc <== NOT EXECUTED 45c8: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
45cc: e3700001 cmn r0, #1 <== NOT EXECUTED
} else { /* * do something */ c = tty->device.pollRead(tty->minor);
45d0: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
45d4: 0afffff1 beq 45a0 <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
45d8: e1a01007 mov r1, r7 <== NOT EXECUTED 45dc: e3a02001 mov r2, #1 <== NOT EXECUTED 45e0: e1a00004 mov r0, r4 <== NOT EXECUTED
c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c;
45e4: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
45e8: ebfff965 bl 2b84 <rtems_termios_enqueue_raw_characters> <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
45ec: e1a0300d mov r3, sp <== NOT EXECUTED 45f0: e3a01002 mov r1, #2 <== NOT EXECUTED 45f4: e3a02000 mov r2, #0 <== NOT EXECUTED 45f8: e3a00003 mov r0, #3 <== NOT EXECUTED 45fc: eb0000ff bl 4a00 <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) {
4600: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4604: e3130001 tst r3, #1 <== NOT EXECUTED 4608: 0affffec beq 45c0 <rtems_termios_rxdaemon+0x34> <== NOT EXECUTED
tty->rxTaskId = 0;
460c: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
4610: e1a00006 mov r0, r6 <== NOT EXECUTED 4614: eb000341 bl 5320 <rtems_task_delete> <== NOT EXECUTED 4618: eaffffe0 b 45a0 <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
00002900 <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);
2900: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 2904: e3a01002 mov r1, #2 <== NOT EXECUTED 2908: ea00089a b 4b78 <rtems_event_send> <== NOT EXECUTED
0000451c <rtems_termios_txdaemon>: /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) {
451c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 4520: e59f6060 ldr r6, [pc, #96] ; 4588 <rtems_termios_txdaemon+0x6c><== NOT EXECUTED 4524: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 4528: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT |
452c: e3a07000 mov r7, #0 <== NOT EXECUTED 4530: e1a0300d mov r3, sp <== NOT EXECUTED 4534: e3a01002 mov r1, #2 <== NOT EXECUTED 4538: e3a02000 mov r2, #0 <== NOT EXECUTED 453c: e3a00003 mov r0, #3 <== NOT EXECUTED 4540: eb00012e bl 4a00 <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) {
4544: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4548: 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);
454c: 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) {
4550: 1a000008 bne 4578 <rtems_termios_txdaemon+0x5c> <== NOT EXECUTED
} else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4554: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 4558: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED 455c: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 4560: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
4564: 11a0e00f movne lr, pc <== NOT EXECUTED 4568: 112fff13 bxne r3 <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
456c: e1a00004 mov r0, r4 <== NOT EXECUTED 4570: ebfff8e5 bl 290c <rtems_termios_refill_transmitter> <== NOT EXECUTED 4574: eaffffed b 4530 <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0;
4578: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
457c: e1a00007 mov r0, r7 <== NOT EXECUTED 4580: eb000366 bl 5320 <rtems_task_delete> <== NOT EXECUTED 4584: eaffffe9 b 4530 <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
4588: 0001ab9c .word 0x0001ab9c
000035d8 <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;
35d8: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) {
35dc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
35e0: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
35e4: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) {
35e8: e1a05000 mov r5, r0
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
35ec: e1a02001 mov r2, r1 35f0: e5940018 ldr r0, [r4, #24] 35f4: eb000689 bl 5020 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
35f8: e2506000 subs r6, r0, #0
35fc: 1a00000c bne 3634 <rtems_termios_write+0x5c> return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
3600: e59420cc ldr r2, [r4, #204] ; 0xcc 3604: e59f3098 ldr r3, [pc, #152] ; 36a4 <rtems_termios_write+0xcc> 3608: e0833282 add r3, r3, r2, lsl #5 360c: e593300c ldr r3, [r3, #12] 3610: e3530000 cmp r3, #0
3614: 0a000008 beq 363c <rtems_termios_write+0x64> sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
3618: e1a01005 mov r1, r5 <== NOT EXECUTED 361c: e1a00004 mov r0, r4 <== NOT EXECUTED 3620: e1a0e00f mov lr, pc <== NOT EXECUTED 3624: e12fff13 bx r3 <== NOT EXECUTED 3628: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
362c: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 3630: eb0006c2 bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; }
3634: e1a00006 mov r0, r6 <== NOT EXECUTED 3638: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) {
363c: e5943034 ldr r3, [r4, #52] ; 0x34 3640: e3130001 tst r3, #1
3644: 0a000011 beq 3690 <rtems_termios_write+0xb8> uint32_t count = args->count;
3648: e5958010 ldr r8, [r5, #16]
char *buffer = args->buffer; while (count--)
364c: e3580000 cmp r8, #0
rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer;
3650: e595a00c ldr sl, [r5, #12]
while (count--)
3654: 01a03006 moveq r3, r6
3658: 0a000007 beq 367c <rtems_termios_write+0xa4>
365c: e1a07006 mov r7, r6
oproc (*buffer++, tty);
3660: e7da0007 ldrb r0, [sl, r7] 3664: e1a01004 mov r1, r4 3668: e2877001 add r7, r7, #1 366c: ebfffe4d bl 2fa8 <oproc>
return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--)
3670: e1580007 cmp r8, r7
3674: 1afffff9 bne 3660 <rtems_termios_write+0x88> oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count;
3678: e5953010 ldr r3, [r5, #16] 367c: e5853018 str r3, [r5, #24]
} rtems_semaphore_release (tty->osem);
3680: e5940018 ldr r0, [r4, #24] 3684: eb0006ad bl 5140 <rtems_semaphore_release>
return sc; }
3688: e1a00006 mov r0, r6 368c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty);
3690: e285000c add r0, r5, #12 <== NOT EXECUTED 3694: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3698: e1a02004 mov r2, r4 <== NOT EXECUTED 369c: ebfffdf9 bl 2e88 <rtems_termios_puts> <== NOT EXECUTED 36a0: eafffff4 b 3678 <rtems_termios_write+0xa0> <== NOT EXECUTED
36a4: 0001ab9c .word 0x0001ab9c
000069f0 <rtems_verror>: static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) {
69f0: 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)
69f4: e2108202 ands r8, r0, #536870912 ; 0x20000000 <== NOT EXECUTED
static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) {
69f8: e1a04000 mov r4, r0 <== NOT EXECUTED 69fc: e1a09001 mov r9, r1 <== NOT EXECUTED 6a00: e1a07002 mov r7, r2 <== NOT EXECUTED
int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC)
6a04: 0a00000c beq 6a3c <rtems_verror+0x4c> <== NOT EXECUTED
{ if (rtems_panic_in_progress++)
6a08: e59f2160 ldr r2, [pc, #352] ; 6b70 <rtems_verror+0x180> <== NOT EXECUTED 6a0c: e5923000 ldr r3, [r2] <== NOT EXECUTED 6a10: e3530000 cmp r3, #0 <== NOT EXECUTED 6a14: e2833001 add r3, r3, #1 <== NOT EXECUTED 6a18: e5823000 str r3, [r2] <== NOT EXECUTED 6a1c: 0a000004 beq 6a34 <rtems_verror+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
6a20: e59f314c ldr r3, [pc, #332] ; 6b74 <rtems_verror+0x184> <== NOT EXECUTED 6a24: e5931000 ldr r1, [r3] <== NOT EXECUTED 6a28: e2811001 add r1, r1, #1 <== NOT EXECUTED 6a2c: e5831000 str r1, [r3] <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
6a30: e5923000 ldr r3, [r2] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2)
6a34: e3530002 cmp r3, #2 <== NOT EXECUTED 6a38: ca00002e bgt 6af8 <rtems_verror+0x108> <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */
6a3c: e59f5134 ldr r5, [pc, #308] ; 6b78 <rtems_verror+0x188> <== NOT EXECUTED 6a40: e5953000 ldr r3, [r5] <== NOT EXECUTED 6a44: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 6a48: eb003894 bl 14ca0 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
6a4c: e2146101 ands r6, r4, #1073741824 ; 0x40000000 <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK;
6a50: e3c4a207 bic sl, r4, #1879048192 ; 0x70000000 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
6a54: 1a000038 bne 6b3c <rtems_verror+0x14c> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist);
6a58: e5953000 ldr r3, [r5] <== NOT EXECUTED 6a5c: e1a02007 mov r2, r7 <== NOT EXECUTED 6a60: e1a01009 mov r1, r9 <== NOT EXECUTED 6a64: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6a68: eb0050ad bl 1ad24 <vfprintf> <== NOT EXECUTED
if (status)
6a6c: e35a0000 cmp sl, #0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist);
6a70: e1a07000 mov r7, r0 <== NOT EXECUTED
if (status)
6a74: 1a000025 bne 6b10 <rtems_verror+0x120> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno)
6a78: e3560000 cmp r6, #0 <== NOT EXECUTED 6a7c: 0a00000b beq 6ab0 <rtems_verror+0xc0> <== NOT EXECUTED
{ if ((local_errno > 0) && *strerror(local_errno))
6a80: da000004 ble 6a98 <rtems_verror+0xa8> <== NOT EXECUTED 6a84: e1a00006 mov r0, r6 <== NOT EXECUTED 6a88: eb003c55 bl 15be4 <strerror> <== NOT EXECUTED 6a8c: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 6a90: e3530000 cmp r3, #0 <== NOT EXECUTED 6a94: 1a00002b bne 6b48 <rtems_verror+0x158> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
6a98: e5953000 ldr r3, [r5] <== NOT EXECUTED 6a9c: e59f10d8 ldr r1, [pc, #216] ; 6b7c <rtems_verror+0x18c> <== NOT EXECUTED 6aa0: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6aa4: e1a02006 mov r2, r6 <== NOT EXECUTED 6aa8: eb00393a bl 14f98 <fprintf> <== NOT EXECUTED 6aac: e0877000 add r7, r7, r0 <== NOT EXECUTED
} chars_written += fprintf(stderr, "\n");
6ab0: e5953000 ldr r3, [r5] <== NOT EXECUTED 6ab4: e59f10c4 ldr r1, [pc, #196] ; 6b80 <rtems_verror+0x190> <== NOT EXECUTED 6ab8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6abc: eb003935 bl 14f98 <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
6ac0: e5953000 ldr r3, [r5] <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n");
6ac4: e1a0a000 mov sl, r0 <== NOT EXECUTED
(void) fflush(stderr);
6ac8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6acc: eb003873 bl 14ca0 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
6ad0: e3140203 tst r4, #805306368 ; 0x30000000 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n");
6ad4: 008a0007 addeq r0, sl, r7 <== NOT EXECUTED
(void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
6ad8: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{ if (error_flag & RTEMS_ERROR_PANIC)
6adc: e3580000 cmp r8, #0 <== NOT EXECUTED 6ae0: 0a000006 beq 6b00 <rtems_verror+0x110> <== NOT EXECUTED
{ rtems_error(0, "fatal error, exiting");
6ae4: e3a00000 mov r0, #0 <== NOT EXECUTED 6ae8: e59f1094 ldr r1, [pc, #148] ; 6b84 <rtems_verror+0x194> <== NOT EXECUTED 6aec: eb000035 bl 6bc8 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
6af0: e1a00006 mov r0, r6 <== NOT EXECUTED 6af4: eb00031f bl 7778 <_exit> <== NOT EXECUTED
} else { rtems_error(0, "fatal error, aborting"); abort();
6af8: e3a00000 mov r0, #0 <== NOT EXECUTED
} } return chars_written; }
6afc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting");
6b00: e59f1080 ldr r1, [pc, #128] ; 6b88 <rtems_verror+0x198> <== NOT EXECUTED 6b04: e1a00008 mov r0, r8 <== NOT EXECUTED 6b08: eb00002e bl 6bc8 <rtems_error> <== NOT EXECUTED
abort();
6b0c: eb003767 bl 148b0 <abort> <== NOT EXECUTED
#endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
6b10: e59f3060 ldr r3, [pc, #96] ; 6b78 <rtems_verror+0x188> <== NOT EXECUTED 6b14: e5933000 ldr r3, [r3] <== NOT EXECUTED 6b18: e1a0000a mov r0, sl <== NOT EXECUTED 6b1c: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 6b20: ebffffae bl 69e0 <rtems_status_text> <== NOT EXECUTED 6b24: e59f1060 ldr r1, [pc, #96] ; 6b8c <rtems_verror+0x19c> <== NOT EXECUTED 6b28: e1a02000 mov r2, r0 <== NOT EXECUTED 6b2c: e1a0000a mov r0, sl <== NOT EXECUTED 6b30: eb003918 bl 14f98 <fprintf> <== NOT EXECUTED 6b34: e0877000 add r7, r7, r0 <== NOT EXECUTED 6b38: eaffffce b 6a78 <rtems_verror+0x88> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno;
6b3c: eb003764 bl 148d4 <__errno> <== NOT EXECUTED 6b40: e5906000 ldr r6, [r0] <== NOT EXECUTED 6b44: eaffffc3 b 6a58 <rtems_verror+0x68> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
6b48: e5953000 ldr r3, [r5] <== NOT EXECUTED 6b4c: e1a00006 mov r0, r6 <== NOT EXECUTED 6b50: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 6b54: eb003c22 bl 15be4 <strerror> <== NOT EXECUTED 6b58: e59f1030 ldr r1, [pc, #48] ; 6b90 <rtems_verror+0x1a0> <== NOT EXECUTED 6b5c: e1a02000 mov r2, r0 <== NOT EXECUTED 6b60: e1a0000a mov r0, sl <== NOT EXECUTED 6b64: eb00390b bl 14f98 <fprintf> <== NOT EXECUTED 6b68: e0877000 add r7, r7, r0 <== NOT EXECUTED
if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno))
6b6c: eaffffcf b 6ab0 <rtems_verror+0xc0> <== NOT EXECUTED
6b70: 000264c4 .word 0x000264c4 6b74: 0002664c .word 0x0002664c 6b78: 00023748 .word 0x00023748 6b7c: 00025138 .word 0x00025138 6b80: 00024c44 .word 0x00024c44 6b84: 0002514c .word 0x0002514c 6b88: 00025164 .word 0x00025164 6b8c: 00025118 .word 0x00025118 6b90: 00025128 .word 0x00025128
00025ad0 <scanInt>: /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
25ad0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 25ad4: e3a06000 mov r6, #0
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
25ad8: e59f90e8 ldr r9, [pc, #232] ; 25bc8 <scanInt+0xf8>
limit++; continue; } sign = 1; } if (!isdigit(c))
25adc: e59f80e8 ldr r8, [pc, #232] ; 25bcc <scanInt+0xfc>
return 0; d = c - '0'; if ((i > (limit / 10))
25ae0: e59fa0e8 ldr sl, [pc, #232] ; 25bd0 <scanInt+0x100>
/* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
25ae4: e1a04000 mov r4, r0 25ae8: e1a0b001 mov fp, r1 25aec: e3e07102 mvn r7, #-2147483648 ; 0x80000000 25af0: e1a05006 mov r5, r6
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
25af4: e5943004 ldr r3, [r4, #4] 25af8: e2433001 sub r3, r3, #1 25afc: e3530000 cmp r3, #0 25b00: e5843004 str r3, [r4, #4]
25b04: ba00001d blt 25b80 <scanInt+0xb0>
25b08: e5943000 ldr r3, [r4] 25b0c: e4d30001 ldrb r0, [r3], #1
if (c == ':')
25b10: e350003a cmp r0, #58 ; 0x3a
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
25b14: e5843000 str r3, [r4]
if (c == ':') 25b18: 0a00001d beq 25b94 <scanInt+0xc4> break; if (sign == 0) {
25b1c: e3560000 cmp r6, #0
25b20: 1a000004 bne 25b38 <scanInt+0x68> if (c == '-') {
25b24: e350002d cmp r0, #45 ; 0x2d
sign = -1; limit++;
25b28: 02877001 addeq r7, r7, #1 25b2c: 03e06000 mvneq r6, #0
for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 25b30: 0affffef beq 25af4 <scanInt+0x24> sign = -1; limit++; continue;
25b34: e3a06001 mov r6, #1
} sign = 1; } if (!isdigit(c))
25b38: e5983000 ldr r3, [r8] 25b3c: e0833000 add r3, r3, r0 25b40: e5d33001 ldrb r3, [r3, #1] 25b44: e3130004 tst r3, #4
25b48: 0a00001c beq 25bc0 <scanInt+0xf0> return 0; d = c - '0'; if ((i > (limit / 10))
25b4c: e083279a umull r2, r3, sl, r7 25b50: e15501a3 cmp r5, r3, lsr #3
25b54: 8a000019 bhi 25bc0 <scanInt+0xf0> } sign = 1; } if (!isdigit(c)) return 0; d = c - '0';
25b58: e2400030 sub r0, r0, #48 ; 0x30 25b5c: 11a03105 lslne r3, r5, #2
if ((i > (limit / 10)) 25b60: 0a000011 beq 25bac <scanInt+0xdc> || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d;
25b64: e0835005 add r5, r3, r5
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
25b68: e5943004 ldr r3, [r4, #4] 25b6c: e2433001 sub r3, r3, #1 25b70: e3530000 cmp r3, #0
return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d;
25b74: e0805085 add r5, r0, r5, lsl #1
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
25b78: e5843004 str r3, [r4, #4]
25b7c: aaffffe1 bge 25b08 <scanInt+0x38>
25b80: e5990000 ldr r0, [r9] <== NOT EXECUTED 25b84: e1a01004 mov r1, r4 <== NOT EXECUTED 25b88: eb0079dd bl 44304 <__srget_r> <== NOT EXECUTED
if (c == ':')
25b8c: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 25b90: 1affffe1 bne 25b1c <scanInt+0x4c> <== NOT EXECUTED
if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0)
25b94: e3560000 cmp r6, #0
25b98: 0a000008 beq 25bc0 <scanInt+0xf0> return 0; *val = i * sign;
25b9c: e0030695 mul r3, r5, r6 25ba0: e3a00001 mov r0, #1 25ba4: e58b3000 str r3, [fp]
return 1;
25ba8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10))
25bac: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED 25bb0: e0832005 add r2, r3, r5 <== NOT EXECUTED 25bb4: e0472082 sub r2, r7, r2, lsl #1 <== NOT EXECUTED 25bb8: e1500002 cmp r0, r2 <== NOT EXECUTED 25bbc: 9affffe8 bls 25b64 <scanInt+0x94> <== NOT EXECUTED
i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1;
25bc0: e3a00000 mov r0, #0 <== NOT EXECUTED
}
25bc4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
25bc8: 00059b60 .word 0x00059b60 25bcc: 00059b54 .word 0x00059b54 25bd0: cccccccd .word 0xcccccccd
00025bd4 <scanString>: /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
25bd4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 25bd8: e1a05002 mov r5, r2
int c; *name = *bufp;
25bdc: 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) {
25be0: e59d7018 ldr r7, [sp, #24]
int c; *name = *bufp;
25be4: e5812000 str r2, [r1]
for (;;) { c = getc(fp);
25be8: e59f60c4 ldr r6, [pc, #196] ; 25cb4 <scanString+0xe0>
/* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
25bec: e1a04000 mov r4, r0 25bf0: e1a08003 mov r8, r3 25bf4: ea000013 b 25c48 <scanString+0x74>
int c; *name = *bufp; for (;;) { c = getc(fp);
25bf8: e5943000 ldr r3, [r4] 25bfc: e4d30001 ldrb r0, [r3], #1
if (c == ':') {
25c00: e350003a cmp r0, #58 ; 0x3a
{ int c; *name = *bufp; for (;;) { c = getc(fp);
25c04: e5843000 str r3, [r4]
if (c == ':') { 25c08: 0a000018 beq 25c70 <scanString+0x9c> if (nlFlag) return 0; break; } if (c == '\n') {
25c0c: e350000a cmp r0, #10
25c10: 0a000023 beq 25ca4 <scanString+0xd0> if (!nlFlag) return 0; break; } if (c == EOF)
25c14: e3700001 cmn r0, #1
25c18: 0a000023 beq 25cac <scanString+0xd8> return 0; if (*nleft < 2)
25c1c: e5983000 ldr r3, [r8] 25c20: e3530001 cmp r3, #1
25c24: 9a000020 bls 25cac <scanString+0xd8> return 0; **bufp = c;
25c28: e5953000 ldr r3, [r5] 25c2c: e5c30000 strb r0, [r3]
++(*bufp);
25c30: e5952000 ldr r2, [r5]
--(*nleft);
25c34: e5983000 ldr r3, [r8]
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
25c38: e2822001 add r2, r2, #1
--(*nleft);
25c3c: e2433001 sub r3, r3, #1
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
25c40: e5852000 str r2, [r5]
--(*nleft);
25c44: e5883000 str r3, [r8]
{ int c; *name = *bufp; for (;;) { c = getc(fp);
25c48: e5943004 ldr r3, [r4, #4] 25c4c: e2433001 sub r3, r3, #1 25c50: e3530000 cmp r3, #0 25c54: e5843004 str r3, [r4, #4]
25c58: aaffffe6 bge 25bf8 <scanString+0x24>
25c5c: e5960000 ldr r0, [r6] 25c60: e1a01004 mov r1, r4 25c64: eb0079a6 bl 44304 <__srget_r>
if (c == ':') {
25c68: e350003a cmp r0, #58 ; 0x3a
25c6c: 1affffe6 bne 25c0c <scanString+0x38> if (nlFlag)
25c70: e3570000 cmp r7, #0
25c74: 1a00000c bne 25cac <scanString+0xd8> return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0';
25c78: e5953000 ldr r3, [r5] 25c7c: e3a02000 mov r2, #0 25c80: e5c32000 strb r2, [r3]
++(*bufp);
25c84: e5952000 ldr r2, [r5]
--(*nleft);
25c88: e5983000 ldr r3, [r8]
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
25c8c: e2822001 add r2, r2, #1
--(*nleft);
25c90: e2433001 sub r3, r3, #1
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
25c94: e5852000 str r2, [r5]
--(*nleft);
25c98: e5883000 str r3, [r8] 25c9c: e3a00001 mov r0, #1
return 1;
25ca0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag)
25ca4: e3570000 cmp r7, #0
25ca8: 1afffff2 bne 25c78 <scanString+0xa4> --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1;
25cac: e3a00000 mov r0, #0 <== NOT EXECUTED
}
25cb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
25cb4: 00059b60 .word 0x00059b60
00025cb8 <scangr>: FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
25cb8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 25cbc: e24dd014 sub sp, sp, #20
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25cc0: e28d5008 add r5, sp, #8 25cc4: e28d4004 add r4, sp, #4
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
25cc8: e58d2008 str r2, [sp, #8] 25ccc: e58d3004 str r3, [sp, #4]
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25cd0: e3a06000 mov r6, #0 25cd4: e1a02005 mov r2, r5 25cd8: e1a03004 mov r3, r4 25cdc: e58d6000 str r6, [sp]
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
25ce0: e1a07000 mov r7, r0 25ce4: e1a08001 mov r8, r1
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25ce8: ebffffb9 bl 25bd4 <scanString> 25cec: e1500006 cmp r0, r6
25cf0: 1a000002 bne 25d00 <scangr+0x48> *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1;
25cf4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
25cf8: e28dd014 add sp, sp, #20 25cfc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
25d00: e1a00007 mov r0, r7 25d04: e2881004 add r1, r8, #4 25d08: e1a02005 mov r2, r5 25d0c: e1a03004 mov r3, r4 25d10: e58d6000 str r6, [sp] 25d14: ebffffae bl 25bd4 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25d18: e1500006 cmp r0, r6
25d1c: 0afffff4 beq 25cf4 <scangr+0x3c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
25d20: e1a00007 mov r0, r7 25d24: e28d1010 add r1, sp, #16 25d28: ebffff68 bl 25ad0 <scanInt>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25d2c: e1500006 cmp r0, r6
25d30: 0affffef beq 25cf4 <scangr+0x3c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
25d34: e1a03004 mov r3, r4 25d38: e1a00007 mov r0, r7 25d3c: e1a02005 mov r2, r5 25d40: e3a04001 mov r4, #1 25d44: e28d100c add r1, sp, #12 25d48: e58d4000 str r4, [sp] 25d4c: ebffffa0 bl 25bd4 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25d50: e1500006 cmp r0, r6
25d54: 0affffe6 beq 25cf4 <scangr+0x3c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid;
25d58: e1dd31b0 ldrh r3, [sp, #16]
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25d5c: e59d100c ldr r1, [sp, #12]
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid;
25d60: e1c830b8 strh r3, [r8, #8]
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25d64: e5d13000 ldrb r3, [r1] 25d68: e1530006 cmp r3, r6 25d6c: 03a04017 moveq r4, #23
25d70: 0a000007 beq 25d94 <scangr+0xdc>
25d74: e1a02001 mov r2, r1
if(*cp == ',')
25d78: e353002c cmp r3, #44 ; 0x2c
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25d7c: e5f23001 ldrb r3, [r2, #1]!
if(*cp == ',') memcount++;
25d80: 02844001 addeq r4, r4, #1
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25d84: e3530000 cmp r3, #0
25d88: 1afffffa bne 25d78 <scangr+0xc0>
25d8c: e1a04104 lsl r4, r4, #2 25d90: e2844013 add r4, r4, #19
} /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
25d94: e59d3004 ldr r3, [sp, #4] 25d98: e1530004 cmp r3, r4
25d9c: 3affffd4 bcc 25cf4 <scangr+0x3c> return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
25da0: e59d3008 ldr r3, [sp, #8] 25da4: e283300f add r3, r3, #15 25da8: e3c3300f bic r3, r3, #15
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
25dac: 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);
25db0: e588300c str r3, [r8, #12]
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25db4: e59d200c ldr r2, [sp, #12] 25db8: e5d23000 ldrb r3, [r2] 25dbc: e3530000 cmp r3, #0 25dc0: 03a01004 moveq r1, #4
25dc4: 0a00000b beq 25df8 <scangr+0x140>
25dc8: e2822001 add r2, r2, #1 25dcc: e3a01001 mov r1, #1
if(*cp == ',') { *cp = '\0';
25dd0: e3a00000 mov r0, #0
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') {
25dd4: e353002c cmp r3, #44 ; 0x2c
*cp = '\0';
25dd8: 05420001 strbeq r0, [r2, #-1]
grp->gr_mem[memcount++] = cp + 1;
25ddc: 0598300c ldreq r3, [r8, #12] 25de0: 07832101 streq r2, [r3, r1, lsl #2]
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25de4: e4d23001 ldrb r3, [r2], #1
if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1;
25de8: 02811001 addeq r1, r1, #1
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25dec: e3530000 cmp r3, #0
25df0: 1afffff7 bne 25dd4 <scangr+0x11c>
25df4: e1a01101 lsl r1, r1, #2
if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
25df8: e598300c ldr r3, [r8, #12] 25dfc: e3a02000 mov r2, #0 25e00: e7832001 str r2, [r3, r1] 25e04: e3a00001 mov r0, #1
return 1;
25e08: eaffffba b 25cf8 <scangr+0x40>
00025e4c <scanpw>: FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
25e4c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 25e50: e24dd014 sub sp, sp, #20
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25e54: e28d5008 add r5, sp, #8 25e58: e28d4004 add r4, sp, #4
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
25e5c: e58d2008 str r2, [sp, #8] 25e60: e58d3004 str r3, [sp, #4]
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25e64: e3a06000 mov r6, #0 25e68: e1a02005 mov r2, r5 25e6c: e1a03004 mov r3, r4 25e70: e58d6000 str r6, [sp]
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
25e74: e1a07000 mov r7, r0 25e78: e1a08001 mov r8, r1
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25e7c: ebffff54 bl 25bd4 <scanString> 25e80: e1500006 cmp r0, r6
25e84: 1a000002 bne 25e94 <scanpw+0x48> || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1;
25e88: e3a00000 mov r0, #0 <== NOT EXECUTED
}
25e8c: e28dd014 add sp, sp, #20 25e90: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
25e94: e1a00007 mov r0, r7 25e98: e2881004 add r1, r8, #4 25e9c: e1a02005 mov r2, r5 25ea0: e1a03004 mov r3, r4 25ea4: e58d6000 str r6, [sp] 25ea8: ebffff49 bl 25bd4 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25eac: e1500006 cmp r0, r6
25eb0: 0afffff4 beq 25e88 <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
25eb4: e1a00007 mov r0, r7 25eb8: e28d1010 add r1, sp, #16 25ebc: ebffff03 bl 25ad0 <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25ec0: e1500006 cmp r0, r6
25ec4: 0affffef beq 25e88 <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
25ec8: e1a00007 mov r0, r7 25ecc: e28d100c add r1, sp, #12 25ed0: ebfffefe bl 25ad0 <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25ed4: e1500006 cmp r0, r6
25ed8: 0affffea beq 25e88 <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
25edc: e1a00007 mov r0, r7 25ee0: e288100c add r1, r8, #12 25ee4: e1a02005 mov r2, r5 25ee8: e1a03004 mov r3, r4 25eec: e58d6000 str r6, [sp] 25ef0: ebffff37 bl 25bd4 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25ef4: e1500006 cmp r0, r6
25ef8: 0affffe2 beq 25e88 <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
25efc: e1a00007 mov r0, r7 25f00: e2881010 add r1, r8, #16 25f04: e1a02005 mov r2, r5 25f08: e1a03004 mov r3, r4 25f0c: e58d6000 str r6, [sp] 25f10: ebffff2f bl 25bd4 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25f14: e1500006 cmp r0, r6
25f18: 0affffda beq 25e88 <scanpw+0x3c> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
25f1c: e1a00007 mov r0, r7 25f20: e2881014 add r1, r8, #20 25f24: e1a02005 mov r2, r5 25f28: e1a03004 mov r3, r4 25f2c: e58d6000 str r6, [sp] 25f30: ebffff27 bl 25bd4 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25f34: e1500006 cmp r0, r6
25f38: 0affffd2 beq 25e88 <scanpw+0x3c> || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
25f3c: e1a03004 mov r3, r4 25f40: e1a00007 mov r0, r7 25f44: e1a02005 mov r2, r5 25f48: e3a04001 mov r4, #1 25f4c: e2881018 add r1, r8, #24 25f50: e58d4000 str r4, [sp] 25f54: ebffff1e bl 25bd4 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25f58: e1500006 cmp r0, r6
25f5c: 0affffc9 beq 25e88 <scanpw+0x3c> || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid;
25f60: e1dd30bc ldrh r3, [sp, #12] 25f64: e1c830ba strh r3, [r8, #10]
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid;
25f68: e1dd31b0 ldrh r3, [sp, #16]
pwd->pw_gid = pwgid;
25f6c: e1a00004 mov r0, r4
|| !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;
25f70: e1c830b8 strh r3, [r8, #8]
pwd->pw_gid = pwgid; return 1;
25f74: eaffffc4 b 25e8c <scanpw+0x40>
00005a54 <sched_get_priority_min>: int sched_get_priority_min( int policy ) { switch ( policy ) {
5a54: e3500004 cmp r0, #4
#include <rtems/posix/priority.h> int sched_get_priority_min( int policy ) {
5a58: e52de004 push {lr} ; (str lr, [sp, #-4]!)
switch ( policy ) { 5a5c: 9a000004 bls 5a74 <sched_get_priority_min+0x20> case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
5a60: eb00242c bl eb18 <__errno> 5a64: e3a03016 mov r3, #22 5a68: e5803000 str r3, [r0] 5a6c: e3e00000 mvn r0, #0
} return POSIX_SCHEDULER_MINIMUM_PRIORITY; }
5a70: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sched_get_priority_min( int policy ) { switch ( policy ) {
5a74: e3a03001 mov r3, #1 5a78: e1a00013 lsl r0, r3, r0 5a7c: e3100017 tst r0, #23 5a80: 11a00003 movne r0, r3 5a84: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
5a88: eb002422 bl eb18 <__errno> <== NOT EXECUTED 5a8c: e3a03016 mov r3, #22 <== NOT EXECUTED 5a90: e5803000 str r3, [r0] <== NOT EXECUTED 5a94: e3e00000 mvn r0, #0 <== NOT EXECUTED
} return POSIX_SCHEDULER_MINIMUM_PRIORITY; }
5a98: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000809c <sem_timedwait>: int sem_timedwait( sem_t *sem, const struct timespec *abstime ) {
809c: e92d4010 push {r4, lr} 80a0: e24dd004 sub sp, sp, #4 80a4: e1a04000 mov r4, r0
* * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
80a8: e1a00001 mov r0, r1 80ac: e1a0100d mov r1, sp 80b0: eb0015ba bl d7a0 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
80b4: e3500003 cmp r0, #3
80b8: 0a000005 beq 80d4 <sem_timedwait+0x38> do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
80bc: e1a00004 mov r0, r4 <== NOT EXECUTED 80c0: e3a01000 mov r1, #0 <== NOT EXECUTED 80c4: e59d2000 ldr r2, [sp] <== NOT EXECUTED 80c8: eb001875 bl e2a4 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break; } } return lock_status; }
80cc: e28dd004 add sp, sp, #4 80d0: e8bd8010 pop {r4, pc}
*/ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
80d4: e1a00004 mov r0, r4 80d8: e3a01001 mov r1, #1 80dc: e59d2000 ldr r2, [sp] 80e0: eb00186f bl e2a4 <_POSIX_Semaphore_Wait_support> 80e4: eafffff8 b 80cc <sem_timedwait+0x30>
00025a78 <setgid>: int setgid( gid_t gid ) { _POSIX_types_Gid = gid;
25a78: e59f300c ldr r3, [pc, #12] ; 25a8c <setgid+0x14> <== NOT EXECUTED 25a7c: e5933000 ldr r3, [r3] <== NOT EXECUTED 25a80: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED
return 0; }
25a84: e3a00000 mov r0, #0 <== NOT EXECUTED 25a88: e12fff1e bx lr <== NOT EXECUTED
25a8c: 00059348 .word 0x00059348
00026098 <setgrent>: return NULL; return &grent; } void setgrent(void) {
26098: e92d4010 push {r4, lr} <== NOT EXECUTED
init_etc_passwd_group(); if (group_fp != NULL)
2609c: e59f4020 ldr r4, [pc, #32] ; 260c4 <setgrent+0x2c> <== NOT EXECUTED
return &grent; } void setgrent(void) { init_etc_passwd_group();
260a0: ebffffc4 bl 25fb8 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
260a4: e5940000 ldr r0, [r4] <== NOT EXECUTED 260a8: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(group_fp);
260ac: 1b0063e2 blne 3f03c <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
260b0: e59f0010 ldr r0, [pc, #16] ; 260c8 <setgrent+0x30> <== NOT EXECUTED 260b4: e59f1010 ldr r1, [pc, #16] ; 260cc <setgrent+0x34> <== NOT EXECUTED 260b8: eb006602 bl 3f8c8 <fopen> <== NOT EXECUTED 260bc: e5840000 str r0, [r4] <== NOT EXECUTED
}
260c0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
260c4: 00066f80 .word 0x00066f80 260c8: 0005d574 .word 0x0005d574 260cc: 00062d78 .word 0x00062d78
00026290 <setpwent>: return NULL; return &pwent; } void setpwent(void) {
26290: e92d4010 push {r4, lr} <== NOT EXECUTED
init_etc_passwd_group(); if (passwd_fp != NULL)
26294: e59f4020 ldr r4, [pc, #32] ; 262bc <setpwent+0x2c> <== NOT EXECUTED
return &pwent; } void setpwent(void) { init_etc_passwd_group();
26298: ebffff46 bl 25fb8 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
2629c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 262a0: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(passwd_fp);
262a4: 1b006364 blne 3f03c <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
262a8: e59f0010 ldr r0, [pc, #16] ; 262c0 <setpwent+0x30> <== NOT EXECUTED 262ac: e59f1010 ldr r1, [pc, #16] ; 262c4 <setpwent+0x34> <== NOT EXECUTED 262b0: eb006584 bl 3f8c8 <fopen> <== NOT EXECUTED 262b4: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
262b8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
262bc: 00066f80 .word 0x00066f80 262c0: 0005d4c4 .word 0x0005d4c4 262c4: 00062d78 .word 0x00062d78
00004d0c <setuid>: int setuid( uid_t uid ) { _POSIX_types_Uid = uid;
4d0c: e59f300c ldr r3, [pc, #12] ; 4d20 <setuid+0x14> <== NOT EXECUTED 4d10: e5933000 ldr r3, [r3] <== NOT EXECUTED 4d14: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED
return 0; }
4d18: e3a00000 mov r0, #0 <== NOT EXECUTED 4d1c: e12fff1e bx lr <== NOT EXECUTED
4d20: 00059348 .word 0x00059348
00003574 <siproc>: int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
3574: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 3578: e3c33f61 bic r3, r3, #388 ; 0x184 <== NOT EXECUTED 357c: e3c33003 bic r3, r3, #3 <== NOT EXECUTED 3580: e1a03a03 lsl r3, r3, #20 <== NOT EXECUTED 3584: e1a03a23 lsr r3, r3, #20 <== NOT EXECUTED 3588: e3530000 cmp r3, #0 <== NOT EXECUTED
/* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) {
358c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3590: e1a04001 mov r4, r1 <== NOT EXECUTED 3594: 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)) {
3598: 1a000002 bne 35a8 <siproc+0x34> <== 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);
359c: e1a00005 mov r0, r5 <== NOT EXECUTED
} return i; }
35a0: 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);
35a4: eaffff80 b 33ac <iproc> <== NOT EXECUTED
/* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
35a8: e3a01000 mov r1, #0 <== NOT EXECUTED 35ac: e1a02001 mov r2, r1 <== NOT EXECUTED 35b0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 35b4: eb000699 bl 5020 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
35b8: e1a01004 mov r1, r4 <== NOT EXECUTED 35bc: e1a00005 mov r0, r5 <== NOT EXECUTED 35c0: ebffff79 bl 33ac <iproc> <== NOT EXECUTED 35c4: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
35c8: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 35cc: eb0006db bl 5140 <rtems_semaphore_release> <== NOT EXECUTED
} else { i = iproc (c, tty); } return i; }
35d0: e1a00005 mov r0, r5 <== NOT EXECUTED 35d4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00006070 <stat>: int _STAT_NAME( const char *path, struct stat *buf ) {
6070: e92d4070 push {r4, r5, r6, lr}
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
6074: e2515000 subs r5, r1, #0
int _STAT_NAME( const char *path, struct stat *buf ) {
6078: e24dd018 sub sp, sp, #24 607c: e1a06000 mov r6, r0
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6080: 0a00002f beq 6144 <stat+0xd4> rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ),
6084: eb00fe2a bl 45934 <strlen> 6088: e28d4004 add r4, sp, #4 608c: e1a01000 mov r1, r0 6090: e3a0c001 mov ip, #1 6094: e1a00006 mov r0, r6 6098: e3a02000 mov r2, #0 609c: e1a03004 mov r3, r4 60a0: e58dc000 str ip, [sp] 60a4: ebfffa96 bl 4b04 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
60a8: e2501000 subs r1, r0, #0
60ac: 1a000022 bne 613c <stat+0xcc> return -1; if ( !loc.handlers->fstat_h ){
60b0: e59d300c ldr r3, [sp, #12] 60b4: e5933018 ldr r3, [r3, #24] 60b8: e3530000 cmp r3, #0
60bc: 0a000013 beq 6110 <stat+0xa0> /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
60c0: e3a02048 mov r2, #72 ; 0x48 60c4: e1a00005 mov r0, r5 60c8: eb00f046 bl 421e8 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
60cc: e1a01005 mov r1, r5 60d0: e59d300c ldr r3, [sp, #12] 60d4: e1a00004 mov r0, r4 60d8: e1a0e00f mov lr, pc 60dc: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
60e0: e59d3010 ldr r3, [sp, #16] 60e4: e3530000 cmp r3, #0
* versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf );
60e8: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 60ec: 0a000004 beq 6104 <stat+0x94>
60f0: e593301c ldr r3, [r3, #28] 60f4: e3530000 cmp r3, #0 60f8: 11a00004 movne r0, r4 60fc: 11a0e00f movne lr, pc 6100: 112fff13 bxne r3
return status; }
6104: e1a00005 mov r0, r5 6108: e28dd018 add sp, sp, #24 610c: e8bd8070 pop {r4, r5, r6, pc}
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc );
6110: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6114: e3530000 cmp r3, #0 <== NOT EXECUTED 6118: 0a000004 beq 6130 <stat+0xc0> <== NOT EXECUTED 611c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6120: e3530000 cmp r3, #0 <== NOT EXECUTED 6124: 11a00004 movne r0, r4 <== NOT EXECUTED 6128: 11a0e00f movne lr, pc <== NOT EXECUTED 612c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
6130: eb00e374 bl 3ef08 <__errno> <== NOT EXECUTED 6134: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6138: e5803000 str r3, [r0] <== NOT EXECUTED
613c: e3e05000 mvn r5, #0 6140: eaffffef b 6104 <stat+0x94>
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT );
6144: eb00e36f bl 3ef08 <__errno> 6148: e3a0300e mov r3, #14 614c: e5803000 str r3, [r0] 6150: e3e05000 mvn r5, #0 6154: eaffffea b 6104 <stat+0x94>
00027298 <statvfs>: */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) {
27298: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 2729c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 272a0: e1a04001 mov r4, r1 <== NOT EXECUTED 272a4: 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 ) )
272a8: eb0079a1 bl 45934 <strlen> <== NOT EXECUTED 272ac: e28d5004 add r5, sp, #4 <== NOT EXECUTED 272b0: e1a01000 mov r1, r0 <== NOT EXECUTED 272b4: e3a0c001 mov ip, #1 <== NOT EXECUTED 272b8: e1a00006 mov r0, r6 <== NOT EXECUTED 272bc: e3a02000 mov r2, #0 <== NOT EXECUTED 272c0: e1a03005 mov r3, r5 <== NOT EXECUTED 272c4: e58dc000 str ip, [sp] <== NOT EXECUTED 272c8: ebff760d bl 4b04 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 272cc: e3500000 cmp r0, #0 <== NOT EXECUTED 272d0: 1a000028 bne 27378 <statvfs+0xe0> <== NOT EXECUTED
return -1; mt_entry = loc.mt_entry;
272d4: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
272d8: e5932028 ldr r2, [r3, #40] ; 0x28 <== NOT EXECUTED 272dc: e5922044 ldr r2, [r2, #68] ; 0x44 <== NOT EXECUTED 272e0: e3520000 cmp r2, #0 <== NOT EXECUTED 272e4: 0a000020 beq 2736c <statvfs+0xd4> <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs));
272e8: e1a02004 mov r2, r4 <== NOT EXECUTED 272ec: e4820004 str r0, [r2], #4 <== NOT EXECUTED 272f0: e2822004 add r2, r2, #4 <== NOT EXECUTED 272f4: e5840004 str r0, [r4, #4] <== NOT EXECUTED 272f8: e4820004 str r0, [r2], #4 <== NOT EXECUTED 272fc: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27300: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27304: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27308: e4820004 str r0, [r2], #4 <== NOT EXECUTED 2730c: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27310: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27314: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27318: e4820004 str r0, [r2], #4 <== NOT EXECUTED 2731c: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27320: e4820004 str r0, [r2], #4 <== NOT EXECUTED 27324: e5820000 str r0, [r2] <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
27328: e1a01004 mov r1, r4 <== NOT EXECUTED 2732c: e283001c add r0, r3, #28 <== NOT EXECUTED 27330: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 27334: e1a0e00f mov lr, pc <== NOT EXECUTED 27338: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2733c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 27340: 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 );
27344: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
27348: 0a000004 beq 27360 <statvfs+0xc8> <== NOT EXECUTED 2734c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 27350: e3530000 cmp r3, #0 <== NOT EXECUTED 27354: 11a00005 movne r0, r5 <== NOT EXECUTED 27358: 11a0e00f movne lr, pc <== NOT EXECUTED 2735c: 112fff13 bxne r3 <== NOT EXECUTED
return result; }
27360: e1a00004 mov r0, r4 <== NOT EXECUTED 27364: e28dd018 add sp, sp, #24 <== NOT EXECUTED 27368: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
2736c: eb005ee5 bl 3ef08 <__errno> <== NOT EXECUTED 27370: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 27374: e5803000 str r3, [r0] <== NOT EXECUTED 27378: e3e04000 mvn r4, #0 <== NOT EXECUTED 2737c: eafffff7 b 27360 <statvfs+0xc8> <== NOT EXECUTED
00027380 <symlink>: int symlink( const char *actualpath, const char *sympath ) {
27380: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
27384: e5d13000 ldrb r3, [r1] 27388: e353002f cmp r3, #47 ; 0x2f 2738c: 1353005c cmpne r3, #92 ; 0x5c
int symlink( const char *actualpath, const char *sympath ) {
27390: e24dd018 sub sp, sp, #24 27394: e1a0e001 mov lr, r1
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
27398: 13a06000 movne r6, #0 2739c: 03a06001 moveq r6, #1
int symlink( const char *actualpath, const char *sympath ) {
273a0: e1a05000 mov r5, r0
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 273a4: 0a000001 beq 273b0 <symlink+0x30>
273a8: e3530000 cmp r3, #0
273ac: 1a000029 bne 27458 <symlink+0xd8>
273b0: e59f3104 ldr r3, [pc, #260] ; 274bc <symlink+0x13c> 273b4: e593c000 ldr ip, [r3] 273b8: e28cc018 add ip, ip, #24 273bc: e8bc000f ldm ip!, {r0, r1, r2, r3} 273c0: e1a0600d mov r6, sp 273c4: e8a6000f stmia r6!, {r0, r1, r2, r3}
if ( !loc.ops->evalformake_h ) {
273c8: e59d300c ldr r3, [sp, #12] 273cc: e5933004 ldr r3, [r3, #4]
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
273d0: e59c2000 ldr r2, [ip]
if ( !loc.ops->evalformake_h ) {
273d4: e3530000 cmp r3, #0
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
273d8: e5862000 str r2, [r6] 273dc: e1a0400d mov r4, sp 273e0: e3a06001 mov r6, #1
if ( !loc.ops->evalformake_h ) { 273e4: 0a000028 beq 2748c <symlink+0x10c> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
273e8: e08e0006 add r0, lr, r6 273ec: e1a0100d mov r1, sp 273f0: e28d2014 add r2, sp, #20 273f4: e1a0e00f mov lr, pc 273f8: e12fff13 bx r3
if ( result != 0 )
273fc: e3500000 cmp r0, #0
27400: 1a000024 bne 27498 <symlink+0x118> return -1; if ( !loc.ops->symlink_h ) {
27404: e59d200c ldr r2, [sp, #12] 27408: e5923038 ldr r3, [r2, #56] ; 0x38 2740c: e3530000 cmp r3, #0
27410: 0a000022 beq 274a0 <symlink+0x120> rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
27414: e1a01005 mov r1, r5 27418: e1a0000d mov r0, sp 2741c: e59d2014 ldr r2, [sp, #20] 27420: e1a0e00f mov lr, pc 27424: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
27428: e59d300c ldr r3, [sp, #12] 2742c: 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);
27430: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 27434: 0a000004 beq 2744c <symlink+0xcc>
27438: e593301c ldr r3, [r3, #28] 2743c: e3530000 cmp r3, #0 27440: 11a0000d movne r0, sp 27444: 11a0e00f movne lr, pc 27448: 112fff13 bxne r3
return result; }
2744c: e1a00005 mov r0, r5 27450: e28dd018 add sp, sp, #24 27454: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
27458: e59f305c ldr r3, [pc, #92] ; 274bc <symlink+0x13c> 2745c: e593c000 ldr ip, [r3] 27460: e28cc004 add ip, ip, #4 27464: e8bc000f ldm ip!, {r0, r1, r2, r3} 27468: e1a0700d mov r7, sp 2746c: e8a7000f stmia r7!, {r0, r1, r2, r3}
if ( !loc.ops->evalformake_h ) {
27470: e59d300c ldr r3, [sp, #12] 27474: e5933004 ldr r3, [r3, #4]
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
27478: e59c2000 ldr r2, [ip]
if ( !loc.ops->evalformake_h ) {
2747c: e3530000 cmp r3, #0
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
27480: e1a0400d mov r4, sp 27484: e5872000 str r2, [r7]
if ( !loc.ops->evalformake_h ) { 27488: 1affffd6 bne 273e8 <symlink+0x68> if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP );
2748c: eb005e9d bl 3ef08 <__errno> <== NOT EXECUTED 27490: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 27494: e5803000 str r3, [r0] <== NOT EXECUTED
27498: e3e05000 mvn r5, #0 2749c: eaffffea b 2744c <symlink+0xcc>
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc );
274a0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 274a4: e3530000 cmp r3, #0 <== NOT EXECUTED 274a8: 0afffff7 beq 2748c <symlink+0x10c> <== NOT EXECUTED 274ac: e1a0000d mov r0, sp <== NOT EXECUTED 274b0: e1a0e00f mov lr, pc <== NOT EXECUTED 274b4: e12fff13 bx r3 <== NOT EXECUTED 274b8: eafffff3 b 2748c <symlink+0x10c> <== NOT EXECUTED
274bc: 00059348 .word 0x00059348
00011fe4 <tcsetattr>: int fd, int opt, struct termios *tp ) { switch (opt) {
11fe4: e3510000 cmp r1, #0
int tcsetattr( int fd, int opt, struct termios *tp ) {
11fe8: e92d4030 push {r4, r5, lr} 11fec: e1a04002 mov r4, r2 11ff0: e1a05000 mov r5, r0
switch (opt) { 11ff4: 0a00000b beq 12028 <tcsetattr+0x44>
11ff8: e3510001 cmp r1, #1 <== NOT EXECUTED 11ffc: 0a000004 beq 12014 <tcsetattr+0x30> <== NOT EXECUTED
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
12000: eb0014d2 bl 17350 <__errno> <== NOT EXECUTED 12004: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 12008: e5803000 str r3, [r0] <== NOT EXECUTED
* Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } }
1200c: e3e00000 mvn r0, #0 <== NOT EXECUTED 12010: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
12014: e3a01003 mov r1, #3 <== NOT EXECUTED 12018: e3a02000 mov r2, #0 <== NOT EXECUTED 1201c: eb000eda bl 15b8c <ioctl> <== NOT EXECUTED 12020: e3500000 cmp r0, #0 <== NOT EXECUTED 12024: bafffff8 blt 1200c <tcsetattr+0x28> <== NOT EXECUTED
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
12028: e1a00005 mov r0, r5 1202c: e1a02004 mov r2, r4 12030: e3a01002 mov r1, #2
} }
12034: e8bd4030 pop {r4, r5, lr}
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
12038: ea000ed3 b 15b8c <ioctl>
0000d2d8 <unlink>: #include <rtems/seterr.h> int unlink( const char *path ) {
d2d8: e92d40f0 push {r4, r5, r6, r7, lr} d2dc: e24dd02c sub sp, sp, #44 ; 0x2c d2e0: e1a05000 mov r5, r0
/* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path );
d2e4: ebffd171 bl 18b0 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
d2e8: e2507000 subs r7, r0, #0
d2ec: 1a00007d bne d4e8 <unlink+0x210> rtems_filesystem_get_start_loc( path, &i, &parentloc );
d2f0: e5d53000 ldrb r3, [r5] d2f4: e353002f cmp r3, #47 ; 0x2f d2f8: 1353005c cmpne r3, #92 ; 0x5c
d2fc: 1a000049 bne d428 <unlink+0x150>
d300: e59f326c ldr r3, [pc, #620] ; d574 <unlink+0x29c> d304: e593c000 ldr ip, [r3] d308: e28cc018 add ip, ip, #24 d30c: e8bc000f ldm ip!, {r0, r1, r2, r3} d310: e28d4018 add r4, sp, #24 d314: e1a0e004 mov lr, r4 d318: e8ae000f stmia lr!, {r0, r1, r2, r3} d31c: e59c2000 ldr r2, [ip] d320: e58e2000 str r2, [lr] d324: e3a06000 mov r6, #0
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
d328: e1a0e004 mov lr, r4 d32c: e8be000f ldm lr!, {r0, r1, r2, r3} d330: e28dc004 add ip, sp, #4 d334: e8ac000f stmia ip!, {r0, r1, r2, r3} d338: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
d33c: e0855007 add r5, r5, r7
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
d340: e58c3000 str r3, [ip]
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
d344: e1a00005 mov r0, r5 d348: eb000622 bl ebd8 <strlen> d34c: e1a01000 mov r1, r0 d350: e1a00005 mov r0, r5 d354: ebffd141 bl 1860 <rtems_filesystem_prefix_separators> d358: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
d35c: e1a00007 mov r0, r7 d360: eb00061c bl ebd8 <strlen> d364: e28d5004 add r5, sp, #4 d368: e3a0c000 mov ip, #0 d36c: e1a01000 mov r1, r0 d370: e1a0200c mov r2, ip d374: e1a00007 mov r0, r7 d378: e1a03005 mov r3, r5 d37c: e58dc000 str ip, [sp] d380: ebffd164 bl 1918 <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
d384: e3500000 cmp r0, #0
d388: 1a000033 bne d45c <unlink+0x184> if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) {
d38c: e59d2010 ldr r2, [sp, #16] d390: e5923010 ldr r3, [r2, #16] d394: e3530000 cmp r3, #0
d398: 0a00003e beq d498 <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 ) {
d39c: e1a00005 mov r0, r5 d3a0: e1a0e00f mov lr, pc d3a4: e12fff13 bx r3 d3a8: e3500001 cmp r0, #1
d3ac: 0a000059 beq d518 <unlink+0x240> if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) {
d3b0: e59d2010 ldr r2, [sp, #16] d3b4: e592300c ldr r3, [r2, #12] d3b8: e3530000 cmp r3, #0
d3bc: 0a000035 beq d498 <unlink+0x1c0> if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc );
d3c0: e1a00004 mov r0, r4 d3c4: e1a01005 mov r1, r5 d3c8: e1a0e00f mov lr, pc d3cc: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
d3d0: e59d3010 ldr r3, [sp, #16] d3d4: 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 );
d3d8: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc ); d3dc: 0a000004 beq d3f4 <unlink+0x11c>
d3e0: e593301c ldr r3, [r3, #28] d3e4: e3530000 cmp r3, #0 d3e8: 11a00005 movne r0, r5 d3ec: 11a0e00f movne lr, pc d3f0: 112fff13 bxne r3
if ( free_parentloc )
d3f4: e3560000 cmp r6, #0
d3f8: 0a000007 beq d41c <unlink+0x144> rtems_filesystem_freenode( &parentloc );
d3fc: e59d3024 ldr r3, [sp, #36] ; 0x24 d400: e3530000 cmp r3, #0
d404: 0a000004 beq d41c <unlink+0x144>
d408: e593301c ldr r3, [r3, #28] d40c: e3530000 cmp r3, #0 d410: 11a00004 movne r0, r4 d414: 11a0e00f movne lr, pc d418: 112fff13 bxne r3
return result; }
d41c: e1a00007 mov r0, r7 d420: e28dd02c add sp, sp, #44 ; 0x2c d424: e8bd80f0 pop {r4, r5, r6, r7, pc}
*/ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc );
d428: e3530000 cmp r3, #0
d42c: 0affffb3 beq d300 <unlink+0x28>
d430: e59f313c ldr r3, [pc, #316] ; d574 <unlink+0x29c> d434: e593c000 ldr ip, [r3] d438: e28cc004 add ip, ip, #4 d43c: e8bc000f ldm ip!, {r0, r1, r2, r3} d440: e28d4018 add r4, sp, #24 d444: e1a0e004 mov lr, r4 d448: e8ae000f stmia lr!, {r0, r1, r2, r3} d44c: e59c2000 ldr r2, [ip] d450: e1a06007 mov r6, r7 d454: e58e2000 str r2, [lr] d458: eaffffb2 b d328 <unlink+0x50>
name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc )
d45c: e3560000 cmp r6, #0
d460: 1a000001 bne d46c <unlink+0x194> result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc );
d464: e3e07000 mvn r7, #0 <== NOT EXECUTED d468: eaffffeb b d41c <unlink+0x144> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc );
d46c: e59d3024 ldr r3, [sp, #36] ; 0x24 d470: e3530000 cmp r3, #0
d474: 0afffffa beq d464 <unlink+0x18c>
d478: e593301c ldr r3, [r3, #28] d47c: e3530000 cmp r3, #0
d480: 0afffff7 beq d464 <unlink+0x18c>
d484: e1a00004 mov r0, r4 d488: e1a0e00f mov lr, pc d48c: e12fff13 bx r3 d490: e3e07000 mvn r7, #0 d494: eaffffe0 b d41c <unlink+0x144>
rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc );
d498: e592301c ldr r3, [r2, #28] <== NOT EXECUTED d49c: e3530000 cmp r3, #0 <== NOT EXECUTED d4a0: 11a00005 movne r0, r5 <== NOT EXECUTED d4a4: 11a0e00f movne lr, pc <== NOT EXECUTED d4a8: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
d4ac: e3560000 cmp r6, #0 <== NOT EXECUTED d4b0: 0a000007 beq d4d4 <unlink+0x1fc> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
d4b4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED d4b8: e3530000 cmp r3, #0 <== NOT EXECUTED d4bc: 0a000004 beq d4d4 <unlink+0x1fc> <== NOT EXECUTED d4c0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED d4c4: e3530000 cmp r3, #0 <== NOT EXECUTED d4c8: 11a00004 movne r0, r4 <== NOT EXECUTED d4cc: 11a0e00f movne lr, pc <== NOT EXECUTED d4d0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
d4d4: eb0001ce bl dc14 <__errno> <== NOT EXECUTED d4d8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED d4dc: e5803000 str r3, [r0] <== NOT EXECUTED d4e0: e3e07000 mvn r7, #0 <== NOT EXECUTED d4e4: eaffffcc b d41c <unlink+0x144> <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen,
d4e8: e28d4018 add r4, sp, #24 d4ec: e3a0c000 mov ip, #0 d4f0: e1a00005 mov r0, r5 d4f4: e1a01007 mov r1, r7 d4f8: e3a02002 mov r2, #2 d4fc: e1a03004 mov r3, r4 d500: e58dc000 str ip, [sp] d504: ebffd13f bl 1a08 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
d508: e3500000 cmp r0, #0
d50c: 1affffd4 bne d464 <unlink+0x18c>
d510: e3a06001 mov r6, #1 d514: eaffff83 b d328 <unlink+0x50>
rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc );
d518: e59d3010 ldr r3, [sp, #16] d51c: e3530000 cmp r3, #0
d520: 0a000004 beq d538 <unlink+0x260>
d524: e593301c ldr r3, [r3, #28] d528: e3530000 cmp r3, #0 d52c: 11a00005 movne r0, r5 d530: 11a0e00f movne lr, pc d534: 112fff13 bxne r3
if ( free_parentloc )
d538: e3560000 cmp r6, #0
d53c: 0a000007 beq d560 <unlink+0x288> rtems_filesystem_freenode( &parentloc );
d540: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED d544: e3530000 cmp r3, #0 <== NOT EXECUTED d548: 0a000004 beq d560 <unlink+0x288> <== NOT EXECUTED d54c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED d550: e3530000 cmp r3, #0 <== NOT EXECUTED d554: 11a00004 movne r0, r4 <== NOT EXECUTED d558: 11a0e00f movne lr, pc <== NOT EXECUTED d55c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
d560: eb0001ab bl dc14 <__errno> d564: e3a03015 mov r3, #21 d568: e5803000 str r3, [r0] d56c: e3e07000 mvn r7, #0 d570: eaffffa9 b d41c <unlink+0x144> d574: 00019658 .word 0x00019658
000275b4 <unmount>: */ int unmount( const char *path ) {
275b4: e92d4030 push {r4, r5, lr} 275b8: e24dd018 sub sp, sp, #24 275bc: 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 ) )
275c0: eb0078db bl 45934 <strlen> 275c4: e28d4004 add r4, sp, #4 275c8: e1a01000 mov r1, r0 275cc: e3a0c001 mov ip, #1 275d0: e1a00005 mov r0, r5 275d4: e3a02000 mov r2, #0 275d8: e1a03004 mov r3, r4 275dc: e58dc000 str ip, [sp] 275e0: ebff7547 bl 4b04 <rtems_filesystem_evaluate_path> 275e4: e3500000 cmp r0, #0
275e8: 1a000032 bne 276b8 <unmount+0x104> return -1; mt_entry = loc.mt_entry;
275ec: e59d5014 ldr r5, [sp, #20]
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
275f0: e59d3004 ldr r3, [sp, #4] 275f4: e595201c ldr r2, [r5, #28] 275f8: e1520003 cmp r2, r3
275fc: 1a000049 bne 27728 <unmount+0x174> /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc );
27600: e59d3010 ldr r3, [sp, #16] 27604: e3530000 cmp r3, #0
27608: 0a000004 beq 27620 <unmount+0x6c>
2760c: e593301c ldr r3, [r3, #28] 27610: e3530000 cmp r3, #0 27614: 11a00004 movne r0, r4 27618: 11a0e00f movne lr, pc 2761c: 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;
27620: e5953014 ldr r3, [r5, #20] 27624: e5933028 ldr r3, [r3, #40] ; 0x28 27628: e3530000 cmp r3, #0
2762c: 0a000052 beq 2777c <unmount+0x1c8> fs_root_loc = &mt_entry->mt_fs_root;
27630: e5953028 ldr r3, [r5, #40] ; 0x28 27634: e593302c ldr r3, [r3, #44] ; 0x2c 27638: e3530000 cmp r3, #0
2763c: 0a00004e beq 2777c <unmount+0x1c8> * 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 )
27640: e59f3148 ldr r3, [pc, #328] ; 27790 <unmount+0x1dc> 27644: e5933000 ldr r3, [r3] 27648: e5933014 ldr r3, [r3, #20] 2764c: e1530005 cmp r3, r5
27650: 0a00001b beq 276c4 <unmount+0x110> /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
27654: e59f1138 ldr r1, [pc, #312] ; 27794 <unmount+0x1e0> 27658: e4913004 ldr r3, [r1], #4 2765c: e1530001 cmp r3, r1
27660: 0a00000a beq 27690 <unmount+0xdc> !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 ) {
27664: e595002c ldr r0, [r5, #44] ; 0x2c 27668: e5932018 ldr r2, [r3, #24] 2766c: e1520000 cmp r2, r0
27670: 1a000003 bne 27684 <unmount+0xd0>
27674: ea000012 b 276c4 <unmount+0x110> <== NOT EXECUTED
27678: e5932018 ldr r2, [r3, #24] 2767c: e1500002 cmp r0, r2
27680: 0a00000f beq 276c4 <unmount+0x110> * 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 ) {
27684: e5933000 ldr r3, [r3]
/* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
27688: e1530001 cmp r3, r1
2768c: 1afffff9 bne 27678 <unmount+0xc4> * 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 )
27690: e1a00005 mov r0, r5 27694: ebff7623 bl 4f28 <rtems_libio_is_open_files_in_fs> 27698: e3500001 cmp r0, #1
2769c: 0a000008 beq 276c4 <unmount+0x110> * 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 )
276a0: e5953014 ldr r3, [r5, #20] 276a4: e1a00005 mov r0, r5 276a8: e1a0e00f mov lr, pc 276ac: e593f028 ldr pc, [r3, #40] ; 0x28 276b0: e2504000 subs r4, r0, #0
276b4: 0a000007 beq 276d8 <unmount+0x124> */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0;
276b8: e3e00000 mvn r0, #0
}
276bc: e28dd018 add sp, sp, #24 276c0: e8bd8030 pop {r4, r5, pc}
* 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 );
276c4: eb005e0f bl 3ef08 <__errno> 276c8: e3a03010 mov r3, #16 276cc: e5803000 str r3, [r0] 276d0: e3e00000 mvn r0, #0 276d4: eafffff8 b 276bc <unmount+0x108>
* 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){
276d8: e5953028 ldr r3, [r5, #40] ; 0x28 276dc: e1a00005 mov r0, r5 276e0: e1a0e00f mov lr, pc 276e4: e593f02c ldr pc, [r3, #44] ; 0x2c 276e8: e3500000 cmp r0, #0
276ec: 1a00001a bne 2775c <unmount+0x1a8> */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
276f0: e1a00005 mov r0, r5 276f4: ebff8835 bl 97d0 <_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 );
276f8: e5953014 ldr r3, [r5, #20] 276fc: e3530000 cmp r3, #0
27700: 0a000004 beq 27718 <unmount+0x164>
27704: e593301c ldr r3, [r3, #28] 27708: e3530000 cmp r3, #0 2770c: 12850008 addne r0, r5, #8 27710: 11a0e00f movne lr, pc 27714: 112fff13 bxne r3
free( mt_entry );
27718: e1a00005 mov r0, r5 2771c: ebff752e bl 4bdc <free> 27720: e3a00000 mov r0, #0
return 0;
27724: eaffffe4 b 276bc <unmount+0x108>
/* * 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 );
27728: e59d3010 ldr r3, [sp, #16] 2772c: e3530000 cmp r3, #0
27730: 0a000004 beq 27748 <unmount+0x194>
27734: e593301c ldr r3, [r3, #28] 27738: e3530000 cmp r3, #0 2773c: 11a00004 movne r0, r4 27740: 11a0e00f movne lr, pc 27744: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
27748: eb005dee bl 3ef08 <__errno> 2774c: e3a0300d mov r3, #13 27750: e5803000 str r3, [r0] 27754: e3e00000 mvn r0, #0 27758: eaffffd7 b 276bc <unmount+0x108>
* This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
2775c: e1a00005 mov r0, r5 <== NOT EXECUTED 27760: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 27764: e1a0e00f mov lr, pc <== NOT EXECUTED 27768: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 2776c: e3500000 cmp r0, #0 <== NOT EXECUTED 27770: 0affffd0 beq 276b8 <unmount+0x104> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
27774: e1a00004 mov r0, r4 <== NOT EXECUTED 27778: ebff8740 bl 9480 <rtems_fatal_error_occurred> <== NOT EXECUTED
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 );
2777c: eb005de1 bl 3ef08 <__errno> <== NOT EXECUTED 27780: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 27784: e5803000 str r3, [r0] <== NOT EXECUTED 27788: e3e00000 mvn r0, #0 <== NOT EXECUTED 2778c: eaffffca b 276bc <unmount+0x108> <== NOT EXECUTED
27790: 00059348 .word 0x00059348 27794: 00067410 .word 0x00067410
00027798 <utime>: int utime( const char *path, const struct utimbuf *times ) {
27798: e92d4070 push {r4, r5, r6, lr} 2779c: e24dd018 sub sp, sp, #24 277a0: e1a05001 mov r5, r1 277a4: 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 ) )
277a8: eb007861 bl 45934 <strlen> 277ac: e28d4004 add r4, sp, #4 277b0: e1a01000 mov r1, r0 277b4: e3a0c001 mov ip, #1 277b8: e1a00006 mov r0, r6 277bc: e3a02000 mov r2, #0 277c0: e1a03004 mov r3, r4 277c4: e58dc000 str ip, [sp] 277c8: ebff74cd bl 4b04 <rtems_filesystem_evaluate_path> 277cc: e3500000 cmp r0, #0
277d0: 1a00001b bne 27844 <utime+0xac> return -1; if ( !temp_loc.ops->utime_h ){
277d4: e59d2010 ldr r2, [sp, #16] 277d8: e5923030 ldr r3, [r2, #48] ; 0x30 277dc: e3530000 cmp r3, #0
277e0: 0a00000f beq 27824 <utime+0x8c> rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
277e4: e8950006 ldm r5, {r1, r2} 277e8: e1a00004 mov r0, r4 277ec: e1a0e00f mov lr, pc 277f0: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
277f4: e59d3010 ldr r3, [sp, #16] 277f8: 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 );
277fc: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc ); 27800: 0a000004 beq 27818 <utime+0x80>
27804: e593301c ldr r3, [r3, #28] 27808: e3530000 cmp r3, #0 2780c: 11a00004 movne r0, r4 27810: 11a0e00f movne lr, pc 27814: 112fff13 bxne r3
return result; }
27818: e1a00005 mov r0, r5 2781c: e28dd018 add sp, sp, #24 27820: e8bd8070 pop {r4, r5, r6, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc );
27824: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 27828: e3530000 cmp r3, #0 <== NOT EXECUTED 2782c: 11a00004 movne r0, r4 <== NOT EXECUTED 27830: 11a0e00f movne lr, pc <== NOT EXECUTED 27834: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
27838: eb005db2 bl 3ef08 <__errno> <== NOT EXECUTED 2783c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 27840: e5803000 str r3, [r0] <== NOT EXECUTED
27844: e3e05000 mvn r5, #0 27848: eafffff2 b 27818 <utime+0x80>
00018f38 <write>: ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
18f38: e59f30bc ldr r3, [pc, #188] ; 18ffc <write+0xc4> 18f3c: e5933000 ldr r3, [r3] 18f40: e1500003 cmp r0, r3
ssize_t write( int fd, const void *buffer, size_t count ) {
18f44: e92d4810 push {r4, fp, lr}
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 18f48: 2a00001c bcs 18fc0 <write+0x88> iop = rtems_libio_iop( fd );
18f4c: e59f40ac ldr r4, [pc, #172] ; 19000 <write+0xc8> 18f50: e5944000 ldr r4, [r4] 18f54: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
18f58: e5940014 ldr r0, [r4, #20] 18f5c: e3100c01 tst r0, #256 ; 0x100
18f60: 0a000016 beq 18fc0 <write+0x88> rtems_libio_check_buffer( buffer );
18f64: e3510000 cmp r1, #0
18f68: 0a000019 beq 18fd4 <write+0x9c> rtems_libio_check_count( count );
18f6c: e3520000 cmp r2, #0 18f70: 01a00002 moveq r0, r2 18f74: 08bd8810 popeq {r4, fp, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
18f78: e3100004 tst r0, #4
18f7c: 0a000014 beq 18fd4 <write+0x9c> /* * Now process the write() request. */ if ( !iop->handlers->write_h )
18f80: e594303c ldr r3, [r4, #60] ; 0x3c 18f84: e593300c ldr r3, [r3, #12] 18f88: e3530000 cmp r3, #0
18f8c: 0a000015 beq 18fe8 <write+0xb0> rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count );
18f90: e1a00004 mov r0, r4 18f94: e1a0e00f mov lr, pc 18f98: e12fff13 bx r3
if ( rc > 0 )
18f9c: e3500000 cmp r0, #0 18fa0: d8bd8810 pople {r4, fp, pc}
iop->offset += rc;
18fa4: e284c00c add ip, r4, #12 18fa8: e89c1800 ldm ip, {fp, ip} 18fac: e09b2000 adds r2, fp, r0 18fb0: e0ac3fc0 adc r3, ip, r0, asr #31 18fb4: e584200c str r2, [r4, #12] 18fb8: e5843010 str r3, [r4, #16]
return rc; }
18fbc: e8bd8810 pop {r4, fp, pc}
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop );
18fc0: ebffd313 bl dc14 <__errno> <== NOT EXECUTED 18fc4: e3a03009 mov r3, #9 <== NOT EXECUTED 18fc8: e5803000 str r3, [r0] <== NOT EXECUTED 18fcc: e3e00000 mvn r0, #0 <== NOT EXECUTED 18fd0: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
18fd4: ebffd30e bl dc14 <__errno> <== NOT EXECUTED 18fd8: e3a03016 mov r3, #22 <== NOT EXECUTED 18fdc: e5803000 str r3, [r0] <== NOT EXECUTED 18fe0: e3e00000 mvn r0, #0 <== NOT EXECUTED 18fe4: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
/* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
18fe8: ebffd309 bl dc14 <__errno> <== NOT EXECUTED 18fec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 18ff0: e5803000 str r3, [r0] <== NOT EXECUTED 18ff4: e3e00000 mvn r0, #0 <== NOT EXECUTED 18ff8: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
18ffc: 000194c0 .word 0x000194c0 19000: 0001ae8c .word 0x0001ae8c
00006138 <writev>: int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd );
6138: e59f317c ldr r3, [pc, #380] ; 62bc <writev+0x184> 613c: e5933000 ldr r3, [r3] 6140: e1500003 cmp r0, r3
ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) {
6144: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 6148: e1a05002 mov r5, r2
int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 614c: 2a00004e bcs 628c <writev+0x154> iop = rtems_libio_iop( fd );
6150: e59f3168 ldr r3, [pc, #360] ; 62c0 <writev+0x188> 6154: e5937000 ldr r7, [r3] 6158: e0877300 add r7, r7, r0, lsl #6
rtems_libio_check_is_open( iop );
615c: e5973014 ldr r3, [r7, #20] 6160: e3130c01 tst r3, #256 ; 0x100
6164: 0a000048 beq 628c <writev+0x154> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
6168: e3130004 tst r3, #4
616c: 0a000040 beq 6274 <writev+0x13c> /* * Argument validation on IO vector */ if ( !iov )
6170: e3510000 cmp r1, #0
6174: 0a00003e beq 6274 <writev+0x13c> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
6178: e3520000 cmp r2, #0
617c: da00003c ble 6274 <writev+0x13c> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
6180: e3520b01 cmp r2, #1024 ; 0x400
6184: ca00003a bgt 6274 <writev+0x13c> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h )
6188: e597303c ldr r3, [r7, #60] ; 0x3c 618c: e593300c ldr r3, [r3, #12] 6190: e3530000 cmp r3, #0
6194: 0a000043 beq 62a8 <writev+0x170> rtems_set_errno_and_return_minus_one( ENOTSUP );
6198: e1a04001 mov r4, r1
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
619c: e3a0cc7f mov ip, #32512 ; 0x7f00
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 );
61a0: e3a01000 mov r1, #0
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
61a4: e28cc0ff add ip, ip, #255 ; 0xff
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 );
61a8: e1a02004 mov r2, r4 61ac: e3a06001 mov r6, #1 61b0: e1a08001 mov r8, r1 61b4: ea000000 b 61bc <writev+0x84>
* 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++ ) {
61b8: e1a08003 mov r8, r3
if ( !iov[v].iov_base )
61bc: e5923000 ldr r3, [r2] 61c0: e3530000 cmp r3, #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++ ) {
61c4: e2811001 add r1, r1, #1
if ( !iov[v].iov_base ) 61c8: 0a000029 beq 6274 <writev+0x13c> 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 )
61cc: e5920004 ldr r0, [r2, #4]
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len;
61d0: e0883000 add r3, r8, r0
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
61d4: e3500000 cmp r0, #0 61d8: 13a06000 movne r6, #0
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
61dc: e1580003 cmp r8, r3 61e0: d153000c cmple r3, ip 61e4: d3a08000 movle r8, #0 61e8: c3a08001 movgt r8, #1
61ec: ca000020 bgt 6274 <writev+0x13c> * 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++ ) {
61f0: e1550001 cmp r5, r1 61f4: e2822008 add r2, r2, #8
61f8: caffffee bgt 61b8 <writev+0x80> } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) {
61fc: e3560000 cmp r6, #0
6200: 1a00001f bne 6284 <writev+0x14c>
6204: e1a08006 mov r8, r6 6208: ea000002 b 6218 <writev+0xe0>
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
620c: e1550006 cmp r5, r6 6210: e2844008 add r4, r4, #8
6214: da00001a ble 6284 <writev+0x14c> /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 )
6218: e5942004 ldr r2, [r4, #4] 621c: e3520000 cmp r2, #0
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
6220: e2866001 add r6, r6, #1
/* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 6224: 0afffff8 beq 620c <writev+0xd4> continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
6228: e5941000 ldr r1, [r4] 622c: e597303c ldr r3, [r7, #60] ; 0x3c 6230: e1a00007 mov r0, r7 6234: e1a0e00f mov lr, pc 6238: e593f00c ldr pc, [r3, #12]
if ( bytes < 0 )
623c: e3500000 cmp r0, #0
6240: ba000016 blt 62a0 <writev+0x168> return -1; if ( bytes > 0 ) { 6244: 0a000006 beq 6264 <writev+0x12c> iop->offset += bytes;
6248: e287c00c add ip, r7, #12 624c: e89c1800 ldm ip, {fp, ip} 6250: e09b2000 adds r2, fp, r0 6254: e0ac3fc0 adc r3, ip, r0, asr #31 6258: e587200c str r2, [r7, #12] 625c: e5873010 str r3, [r7, #16]
total += bytes;
6260: e0888000 add r8, r8, r0
} if (bytes != iov[ v ].iov_len)
6264: e5943004 ldr r3, [r4, #4] 6268: e1500003 cmp r0, r3
626c: 0affffe6 beq 620c <writev+0xd4>
6270: ea000003 b 6284 <writev+0x14c> <== NOT EXECUTED
/* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL );
6274: eb002852 bl 103c4 <__errno> 6278: e3a03016 mov r3, #22 627c: e5803000 str r3, [r0] 6280: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len) break; } return total; }
6284: e1a00008 mov r0, r8 6288: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop );
628c: eb00284c bl 103c4 <__errno> 6290: e3a03009 mov r3, #9 6294: e5803000 str r3, [r0] 6298: e3e08000 mvn r8, #0 629c: eafffff8 b 6284 <writev+0x14c>
if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 )
62a0: e3e08000 mvn r8, #0 <== NOT EXECUTED 62a4: eafffff6 b 6284 <writev+0x14c> <== NOT EXECUTED
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 );
62a8: eb002845 bl 103c4 <__errno> <== NOT EXECUTED 62ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 62b0: e5803000 str r3, [r0] <== NOT EXECUTED 62b4: e3e08000 mvn r8, #0 <== NOT EXECUTED 62b8: eafffff1 b 6284 <writev+0x14c> <== NOT EXECUTED
62bc: 0001d4d0 .word 0x0001d4d0 62c0: 000202e0 .word 0x000202e0