30007914 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 30007914: e5903000 ldr r3, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 30007918: e590200c ldr r2, [r0, #12] switch( node->type ) { 3000791c: e593304c ldr r3, [r3, #76] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 30007920: e592202c ldr r2, [r2, #44] switch( node->type ) { 30007924: e2433001 sub r3, r3, #1 ; 0x1 30007928: e3530005 cmp r3, #5 ; 0x5 3000792c: 979ff103 ldrls pc, [pc, r3, lsl #2] 30007930: ea00000d b 3000796c <== NOT EXECUTED 30007934: 3000794c .word 0x3000794c <== NOT EXECUTED 30007938: 30007954 .word 0x30007954 <== NOT EXECUTED 3000793c: 3000795c .word 0x3000795c <== NOT EXECUTED 30007940: 3000795c .word 0x3000795c <== NOT EXECUTED 30007944: 30007964 .word 0x30007964 <== NOT EXECUTED 30007948: 30007964 .word 0x30007964 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 3000794c: e5923008 ldr r3, [r2, #8] 30007950: ea000004 b 30007968 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 30007954: e59f3018 ldr r3, [pc, #24] ; 30007974 30007958: ea000002 b 30007968 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 3000795c: e59f3014 ldr r3, [pc, #20] ; 30007978 30007960: ea000000 b 30007968 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 30007964: e5923004 ldr r3, [r2, #4] 30007968: e5803004 str r3, [r0, #4] break; } return 0; } 3000796c: e3a00000 mov r0, #0 ; 0x0 30007970: e12fff1e bx lr 30007974: 30014624 .word 0x30014624 30007978: 3001465c .word 0x3001465c 3001a330 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3001a330: e92d40f0 push {r4, r5, r6, r7, lr} 3001a334: e1a01801 lsl r1, r1, #16 3001a338: e1a02802 lsl r2, r2, #16 3001a33c: e24dd008 sub sp, sp, #8 ; 0x8 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 3001a340: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3001a344: e1a06821 lsr r6, r1, #16 3001a348: e1a07822 lsr r7, r2, #16 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3001a34c: eb000677 bl 3001bd30 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3001a350: e1d433bc ldrh r3, [r4, #60] 3001a354: e1530000 cmp r3, r0 3001a358: 13500000 cmpne r0, #0 ; 0x0 3001a35c: 03a05000 moveq r5, #0 ; 0x0 3001a360: 13a05001 movne r5, #1 ; 0x1 3001a364: 0a000004 beq 3001a37c rtems_set_errno_and_return_minus_one( EPERM ); 3001a368: eb003f35 bl 3002a044 <__errno> <== NOT EXECUTED 3001a36c: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 3001a370: e5803000 str r3, [r0] <== NOT EXECUTED 3001a374: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001a378: ea000007 b 3001a39c <== NOT EXECUTED #endif jnode->st_uid = owner; 3001a37c: e1c463bc strh r6, [r4, #60] jnode->st_gid = group; 3001a380: e1c473be strh r7, [r4, #62] IMFS_update_ctime( jnode ); 3001a384: e1a0000d mov r0, sp 3001a388: e1a01005 mov r1, r5 3001a38c: ebffa691 bl 30003dd8 3001a390: e59d3000 ldr r3, [sp] 3001a394: e1a00005 mov r0, r5 3001a398: e5843048 str r3, [r4, #72] return 0; } 3001a39c: e28dd008 add sp, sp, #8 ; 0x8 3001a3a0: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000a7dc : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000a7dc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) 3000a7e0: e2508000 subs r8, r0, #0 ; 0x0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000a7e4: e24dd008 sub sp, sp, #8 ; 0x8 3000a7e8: e1a09001 mov r9, r1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 3000a7ec: e3a00001 mov r0, #1 ; 0x1 3000a7f0: e3a01060 mov r1, #96 ; 0x60 IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) 3000a7f4: 01a06008 moveq r6, r8 parent = parent_loc->node_access; 3000a7f8: 15986000 ldrne r6, [r8] IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000a7fc: e1a05002 mov r5, r2 3000a800: e1a0a003 mov sl, r3 3000a804: e59d7028 ldr r7, [sp, #40] /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 3000a808: ebfff76e bl 300085c8 if ( !node ) 3000a80c: e2504000 subs r4, r0, #0 ; 0x0 3000a810: 0a000048 beq 3000a938 /* * Fill in the basic information */ node->st_nlink = 1; 3000a814: e3a03001 mov r3, #1 ; 0x1 node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 3000a818: e3a02020 mov r2, #32 ; 0x20 3000a81c: e1a01005 mov r1, r5 /* * Fill in the basic information */ node->st_nlink = 1; 3000a820: e1c433b4 strh r3, [r4, #52] node->type = type; 3000a824: e584904c str r9, [r4, #76] strncpy( node->name, name, IMFS_NAME_MAX ); 3000a828: e284000c add r0, r4, #12 ; 0xc 3000a82c: eb000822 bl 3000c8bc /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 3000a830: e59f310c ldr r3, [pc, #268] ; 3000a944 3000a834: e5933000 ldr r3, [r3] 3000a838: e5933024 ldr r3, [r3, #36] 3000a83c: e1ca3003 bic r3, sl, r3 3000a840: e5843030 str r3, [r4, #48] #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 3000a844: ebfff7ff bl 30008848 3000a848: e1c403bc strh r0, [r4, #60] node->st_gid = getegid(); 3000a84c: ebfff7f8 bl 30008834 /* * Now set all the times. */ gettimeofday( &tv, 0 ); 3000a850: e3a01000 mov r1, #0 ; 0x0 node->st_mode = mode & ~rtems_filesystem_umask; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 3000a854: e1c403be strh r0, [r4, #62] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 3000a858: e1a0000d mov r0, sp 3000a85c: ebfff7fe bl 3000885c node->stat_atime = (time_t) tv.tv_sec; 3000a860: e59d3000 ldr r3, [sp] /* * Set the type specific information */ switch (type) { 3000a864: e2492001 sub r2, r9, #1 ; 0x1 gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 3000a868: e5843048 str r3, [r4, #72] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 3000a86c: e5843040 str r3, [r4, #64] node->stat_mtime = (time_t) tv.tv_sec; 3000a870: e5843044 str r3, [r4, #68] /* * Set the type specific information */ switch (type) { 3000a874: e3520005 cmp r2, #5 ; 0x5 3000a878: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000a87c: ea00001c b 3000a8f4 <== NOT EXECUTED 3000a880: 3000a898 .word 0x3000a898 <== NOT EXECUTED 3000a884: 3000a8c0 .word 0x3000a8c0 <== NOT EXECUTED 3000a888: 3000a8b4 .word 0x3000a8b4 <== NOT EXECUTED 3000a88c: 3000a8b4 .word 0x3000a8b4 <== NOT EXECUTED 3000a890: 3000a8dc .word 0x3000a8dc <== NOT EXECUTED 3000a894: 3000a8d0 .word 0x3000a8d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 3000a898: e2843054 add r3, r4, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 3000a89c: e2842050 add r2, r4, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 3000a8a0: e5843050 str r3, [r4, #80] the_chain->permanent_null = NULL; 3000a8a4: e3a03000 mov r3, #0 ; 0x0 3000a8a8: e5843054 str r3, [r4, #84] the_chain->last = _Chain_Head(the_chain); 3000a8ac: e5842058 str r2, [r4, #88] 3000a8b0: ea000014 b 3000a908 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; 3000a8b4: e5973000 ldr r3, [r7] 3000a8b8: e5843050 str r3, [r4, #80] 3000a8bc: ea000011 b 3000a908 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 3000a8c0: e897000c ldm r7, {r2, r3} 3000a8c4: e5843054 str r3, [r4, #84] case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 3000a8c8: e5842050 str r2, [r4, #80] 3000a8cc: ea00000d b 3000a908 node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 3000a8d0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED node->info.linearfile.direct = 0; 3000a8d4: e5843054 str r3, [r4, #84] <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 3000a8d8: e5843050 str r3, [r4, #80] <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 3000a8dc: e3a03000 mov r3, #0 ; 0x0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 3000a8e0: e584305c str r3, [r4, #92] case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 3000a8e4: e5843050 str r3, [r4, #80] node->info.file.indirect = 0; 3000a8e8: e5843054 str r3, [r4, #84] node->info.file.doubly_indirect = 0; 3000a8ec: e5843058 str r3, [r4, #88] 3000a8f0: ea000004 b 3000a908 node->info.file.triply_indirect = 0; break; default: assert(0); 3000a8f4: e59f004c ldr r0, [pc, #76] ; 3000a948 <== NOT EXECUTED 3000a8f8: e3a01074 mov r1, #116 ; 0x74 <== NOT EXECUTED 3000a8fc: e59f2048 ldr r2, [pc, #72] ; 3000a94c <== NOT EXECUTED 3000a900: e59f3048 ldr r3, [pc, #72] ; 3000a950 <== NOT EXECUTED 3000a904: ebfff6d6 bl 30008464 <__assert_func> <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 3000a908: e3560000 cmp r6, #0 ; 0x0 3000a90c: 0a000009 beq 3000a938 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 3000a910: e2860050 add r0, r6, #80 ; 0x50 3000a914: e1a01004 mov r1, r4 3000a918: ebffe90b bl 30004d4c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; 3000a91c: e598300c ldr r3, [r8, #12] * If this node has a parent, then put it in that directory list. */ if ( parent ) { rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; 3000a920: e5846008 str r6, [r4, #8] fs_info = parent_loc->mt_entry->fs_info; 3000a924: e593202c ldr r2, [r3, #44] node->st_ino = ++fs_info->ino_count; 3000a928: e5923000 ldr r3, [r2] 3000a92c: e2833001 add r3, r3, #1 ; 0x1 3000a930: e5823000 str r3, [r2] 3000a934: e5843038 str r3, [r4, #56] } return node; } 3000a938: e1a00004 mov r0, r4 3000a93c: e28dd008 add sp, sp, #8 ; 0x8 3000a940: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 3000a944: 30015980 .word 0x30015980 3000a948: 30015139 .word 0x30015139 3000a94c: 30014960 .word 0x30014960 3000a950: 30014e74 .word 0x30014e74 3000289c : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3000289c: e3500000 cmp r0, #0 ; 0x0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 300028a0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 300028a4: e1a06001 mov r6, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 300028a8: 059f00a4 ldreq r0, [pc, #164] ; 30002954 300028ac: 03a0107f moveq r1, #127 ; 0x7f 300028b0: 059f20a0 ldreq r2, [pc, #160] ; 30002958 300028b4: 059f30a0 ldreq r3, [pc, #160] ; 3000295c 300028b8: 0a000005 beq 300028d4 assert( level >= 0 ); 300028bc: e3510000 cmp r1, #0 ; 0x0 300028c0: aa000004 bge 300028d8 300028c4: e59f0088 ldr r0, [pc, #136] ; 30002954 <== NOT EXECUTED 300028c8: e59f2088 ldr r2, [pc, #136] ; 30002958 <== NOT EXECUTED 300028cc: e59f308c ldr r3, [pc, #140] ; 30002960 <== NOT EXECUTED 300028d0: e3a01081 mov r1, #129 ; 0x81 <== NOT EXECUTED 300028d4: eb0001b1 bl 30002fa0 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 300028d8: e590304c ldr r3, [r0, #76] 300028dc: e3530001 cmp r3, #1 ; 0x1 300028e0: 159f006c ldrne r0, [pc, #108] ; 30002954 300028e4: 13a01083 movne r1, #131 ; 0x83 300028e8: 159f2068 ldrne r2, [pc, #104] ; 30002958 300028ec: 159f3070 ldrne r3, [pc, #112] ; 30002964 300028f0: 1afffff7 bne 300028d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300028f4: e2808054 add r8, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 300028f8: e5905050 ldr r5, [r0, #80] the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 300028fc: e59fa064 ldr sl, [pc, #100] ; 30002968 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 30002900: e2817001 add r7, r1, #1 ; 0x1 30002904: ea00000f b 30002948 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; 30002908: e3a04000 mov r4, #0 ; 0x0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 3000290c: e59a3000 ldr r3, [sl] !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++ ) 30002910: e2844001 add r4, r4, #1 ; 0x1 fprintf(stdout, "...." ); 30002914: e5931008 ldr r1, [r3, #8] 30002918: e59f004c ldr r0, [pc, #76] ; 3000296c 3000291c: eb003294 bl 3000f374 !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++ ) 30002920: e1540006 cmp r4, r6 30002924: dafffff8 ble 3000290c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 30002928: e1a00005 mov r0, r5 3000292c: ebffff87 bl 30002750 if ( the_jnode->type == IMFS_DIRECTORY ) 30002930: e595304c ldr r3, [r5, #76] 30002934: e3530001 cmp r3, #1 ; 0x1 IMFS_dump_directory( the_jnode, level + 1 ); 30002938: 01a00005 moveq r0, r5 3000293c: 01a01007 moveq r1, r7 30002940: 0bffffd5 bleq 3000289c 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 ) { 30002944: e5955000 ldr r5, [r5] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 30002948: e1550008 cmp r5, r8 3000294c: 1affffed bne 30002908 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 30002950: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30002954: 3001b640 .word 0x3001b640 30002958: 3001a1ba .word 0x3001a1ba 3000295c: 3001b6e6 .word 0x3001b6e6 30002960: 3001b6f4 .word 0x3001b6f4 30002964: 3001b6ff .word 0x3001b6ff 30002968: 3001cc14 .word 0x3001cc14 3000296c: 3001b725 .word 0x3001b725 30007af4 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30007af4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30007af8: e24dd038 sub sp, sp, #56 ; 0x38 30007afc: e1a05002 mov r5, r2 30007b00: e1a0a000 mov sl, r0 30007b04: e1a09001 mov r9, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30007b08: e5924000 ldr r4, [r2] 30007b0c: e3a08000 mov r8, #0 ; 0x0 30007b10: e3a06001 mov r6, #1 ; 0x1 * 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], token, &len ); 30007b14: e28db003 add fp, sp, #3 ; 0x3 30007b18: ea000054 b 30007c70 30007b1c: e08a0008 add r0, sl, r8 30007b20: e1a0100b mov r1, fp 30007b24: e28d2034 add r2, sp, #52 ; 0x34 30007b28: eb000156 bl 30008088 i += len; if ( !pathloc->node_access ) 30007b2c: e5953000 ldr r3, [r5] * 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], token, &len ); 30007b30: e1a06000 mov r6, r0 i += len; if ( !pathloc->node_access ) 30007b34: e3530000 cmp r3, #0 ; 0x0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); i += len; 30007b38: e59d7034 ldr r7, [sp, #52] if ( !pathloc->node_access ) 30007b3c: 0a000043 beq 30007c50 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30007b40: e3500000 cmp r0, #0 ; 0x0 30007b44: 0a000006 beq 30007b64 if ( node->type == IMFS_DIRECTORY ) 30007b48: e594104c ldr r1, [r4, #76] 30007b4c: e3510001 cmp r1, #1 ; 0x1 30007b50: 1a000003 bne 30007b64 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30007b54: e1a00005 mov r0, r5 30007b58: ebffff87 bl 3000797c 30007b5c: e3500000 cmp r0, #0 ; 0x0 30007b60: 0a000062 beq 30007cf0 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 30007b64: e3560003 cmp r6, #3 ; 0x3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); i += len; 30007b68: e0888007 add r8, r8, r7 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; 30007b6c: e5954000 ldr r4, [r5] switch( type ) { 30007b70: 0a000013 beq 30007bc4 30007b74: e3560004 cmp r6, #4 ; 0x4 30007b78: 0a000039 beq 30007c64 30007b7c: e3560002 cmp r6, #2 ; 0x2 30007b80: 1a00003a bne 30007c70 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30007b84: e59f2180 ldr r2, [pc, #384] ; 30007d0c 30007b88: e5923000 ldr r3, [r2] 30007b8c: e5933014 ldr r3, [r3, #20] 30007b90: e1540003 cmp r4, r3 30007b94: 0a000035 beq 30007c70 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 30007b98: e595200c ldr r2, [r5, #12] 30007b9c: e5923018 ldr r3, [r2, #24] 30007ba0: e1540003 cmp r4, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 30007ba4: 02823008 addeq r3, r2, #8 ; 0x8 30007ba8: 0a00003a beq 30007c98 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 30007bac: e5944008 ldr r4, [r4, #8] 30007bb0: e3540000 cmp r4, #0 ; 0x0 30007bb4: 1a000028 bne 30007c5c rtems_set_errno_and_return_minus_one( ENOENT ); 30007bb8: eb000de2 bl 3000b348 <__errno> 30007bbc: e5806000 str r6, [r0] 30007bc0: ea00004d b 30007cfc case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 30007bc4: e594304c ldr r3, [r4, #76] 30007bc8: e3530003 cmp r3, #3 ; 0x3 30007bcc: 1a000006 bne 30007bec IMFS_evaluate_hard_link( pathloc, 0 ); 30007bd0: e1a00005 mov r0, r5 30007bd4: e3a01000 mov r1, #0 ; 0x0 30007bd8: ebffff7b bl 300079cc node = pathloc->node_access; 30007bdc: e5954000 ldr r4, [r5] if ( !node ) 30007be0: e3540000 cmp r4, #0 ; 0x0 30007be4: 1a00000a bne 30007c14 30007be8: ea00000c b 30007c20 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 30007bec: e3530004 cmp r3, #4 ; 0x4 30007bf0: 1a000007 bne 30007c14 result = IMFS_evaluate_sym_link( pathloc, 0 ); 30007bf4: e1a00005 mov r0, r5 30007bf8: e3a01000 mov r1, #0 ; 0x0 30007bfc: ebffff89 bl 30007a28 node = pathloc->node_access; if ( result == -1 ) 30007c00: e3700001 cmn r0, #1 ; 0x1 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 30007c04: e1a04000 mov r4, r0 node = pathloc->node_access; 30007c08: e5950000 ldr r0, [r5] if ( result == -1 ) 30007c0c: 0a00003b beq 30007d00 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 30007c10: e1a04000 mov r4, r0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30007c14: e594304c ldr r3, [r4, #76] 30007c18: e3530001 cmp r3, #1 ; 0x1 30007c1c: 0a000002 beq 30007c2c rtems_set_errno_and_return_minus_one( ENOTDIR ); 30007c20: eb000dc8 bl 3000b348 <__errno> 30007c24: e3a03014 mov r3, #20 ; 0x14 30007c28: ea000032 b 30007cf8 /* * 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 ) { 30007c2c: e594305c ldr r3, [r4, #92] 30007c30: e3530000 cmp r3, #0 ; 0x0 newloc = node->info.directory.mt_fs->mt_fs_root; 30007c34: 12833018 addne r3, r3, #24 ; 0x18 30007c38: 1a000016 bne 30007c98 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 30007c3c: e1a00004 mov r0, r4 30007c40: e1a0100b mov r1, fp 30007c44: eb0000e7 bl 30007fe8 if ( !node ) 30007c48: e2504000 subs r4, r0, #0 ; 0x0 30007c4c: 1a000002 bne 30007c5c rtems_set_errno_and_return_minus_one( ENOENT ); 30007c50: eb000dbc bl 3000b348 <__errno> 30007c54: e3a03002 mov r3, #2 ; 0x2 30007c58: ea000026 b 30007cf8 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 30007c5c: e5854000 str r4, [r5] 30007c60: ea000002 b 30007c70 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30007c64: eb000db7 bl 3000b348 <__errno> 30007c68: e3a0305b mov r3, #91 ; 0x5b 30007c6c: ea000021 b 30007cf8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 30007c70: e3560000 cmp r6, #0 ; 0x0 30007c74: 13560004 cmpne r6, #4 ; 0x4 30007c78: 1affffa7 bne 30007b1c * 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 ) { 30007c7c: e594304c ldr r3, [r4, #76] 30007c80: e3530001 cmp r3, #1 ; 0x1 30007c84: 1a000011 bne 30007cd0 if ( node->info.directory.mt_fs != NULL ) { 30007c88: e594005c ldr r0, [r4, #92] 30007c8c: e3500000 cmp r0, #0 ; 0x0 30007c90: 0a00000e beq 30007cd0 newloc = node->info.directory.mt_fs->mt_fs_root; 30007c94: e2803018 add r3, r0, #24 ; 0x18 30007c98: e28dc024 add ip, sp, #36 ; 0x24 30007c9c: e893000f ldm r3, {r0, r1, r2, r3} 30007ca0: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 30007ca4: e59dc034 ldr ip, [sp, #52] */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 30007ca8: e885000f stm r5, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 30007cac: e06cc008 rsb ip, ip, r8 30007cb0: e5923000 ldr r3, [r2] 30007cb4: e08a000c add r0, sl, ip 30007cb8: e1a01009 mov r1, r9 30007cbc: e1a02005 mov r2, r5 30007cc0: e1a0e00f mov lr, pc 30007cc4: e12fff13 bx r3 30007cc8: e1a04000 mov r4, r0 30007ccc: ea00000b b 30007d00 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30007cd0: e1a00005 mov r0, r5 30007cd4: ebffff0e bl 30007914 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30007cd8: e1a01009 mov r1, r9 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30007cdc: e1a04000 mov r4, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30007ce0: e1a00005 mov r0, r5 30007ce4: ebffff24 bl 3000797c 30007ce8: e3500000 cmp r0, #0 ; 0x0 30007cec: 1a000003 bne 30007d00 rtems_set_errno_and_return_minus_one( EACCES ); 30007cf0: eb000d94 bl 3000b348 <__errno> 30007cf4: e3a0300d mov r3, #13 ; 0xd 30007cf8: e5803000 str r3, [r0] 30007cfc: e3e04000 mvn r4, #0 ; 0x0 return result; } 30007d00: e1a00004 mov r0, r4 30007d04: e28dd038 add sp, sp, #56 ; 0x38 30007d08: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30007d0c: 30015980 .word 0x30015980 30007dc4 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 30007dc4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30007dc8: e5914000 ldr r4, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 30007dcc: e24dd038 sub sp, sp, #56 ; 0x38 30007dd0: e1a05001 mov r5, r1 30007dd4: e1a0a000 mov sl, r0 30007dd8: e1a09002 mov r9, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30007ddc: e3a07000 mov r7, #0 ; 0x0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 30007de0: e28db003 add fp, sp, #3 ; 0x3 30007de4: e08a0007 add r0, sl, r7 30007de8: e1a0100b mov r1, fp 30007dec: e28d2034 add r2, sp, #52 ; 0x34 30007df0: eb0000a4 bl 30008088 i += len; if ( !pathloc->node_access ) 30007df4: e5953000 ldr r3, [r5] * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 30007df8: e1a06000 mov r6, r0 i += len; if ( !pathloc->node_access ) 30007dfc: e3530000 cmp r3, #0 ; 0x0 */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); i += len; 30007e00: e59d8034 ldr r8, [sp, #52] if ( !pathloc->node_access ) 30007e04: 0a000059 beq 30007f70 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30007e08: e3500000 cmp r0, #0 ; 0x0 30007e0c: 0a000006 beq 30007e2c if ( node->type == IMFS_DIRECTORY ) 30007e10: e594104c ldr r1, [r4, #76] 30007e14: e3510001 cmp r1, #1 ; 0x1 30007e18: 1a000003 bne 30007e2c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30007e1c: e1a00005 mov r0, r5 30007e20: ebfffed5 bl 3000797c 30007e24: e3500000 cmp r0, #0 ; 0x0 30007e28: 0a000066 beq 30007fc8 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 30007e2c: e5952000 ldr r2, [r5] */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); i += len; 30007e30: e0877008 add r7, r7, r8 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; 30007e34: e1a04002 mov r4, r2 switch( type ) { 30007e38: e3560004 cmp r6, #4 ; 0x4 30007e3c: 979ff106 ldrls pc, [pc, r6, lsl #2] 30007e40: eaffffe7 b 30007de4 <== NOT EXECUTED 30007e44: 30007f34 .word 0x30007f34 <== NOT EXECUTED 30007e48: 30007de4 .word 0x30007de4 <== NOT EXECUTED 30007e4c: 30007e58 .word 0x30007e58 <== NOT EXECUTED 30007e50: 30007e90 .word 0x30007e90 <== NOT EXECUTED 30007e54: 30007f40 .word 0x30007f40 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30007e58: e59f1184 ldr r1, [pc, #388] ; 30007fe4 30007e5c: e5913000 ldr r3, [r1] 30007e60: e5933014 ldr r3, [r3, #20] 30007e64: e1520003 cmp r2, r3 30007e68: 0affffdd beq 30007de4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 30007e6c: e595100c ldr r1, [r5, #12] 30007e70: e5913018 ldr r3, [r1, #24] 30007e74: e1520003 cmp r2, r3 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 30007e78: 02813008 addeq r3, r1, #8 ; 0x8 30007e7c: 0a000018 beq 30007ee4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 30007e80: e5924008 ldr r4, [r2, #8] 30007e84: e3540000 cmp r4, #0 ; 0x0 30007e88: 1a000027 bne 30007f2c 30007e8c: ea000037 b 30007f70 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 30007e90: e592304c ldr r3, [r2, #76] 30007e94: e3530003 cmp r3, #3 ; 0x3 30007e98: 0a000001 beq 30007ea4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 30007e9c: e3530004 cmp r3, #4 ; 0x4 30007ea0: 1a000005 bne 30007ebc result = IMFS_evaluate_link( pathloc, 0 ); 30007ea4: e1a00005 mov r0, r5 30007ea8: e3a01000 mov r1, #0 ; 0x0 30007eac: ebffff97 bl 30007d10 if ( result == -1 ) 30007eb0: e3700001 cmn r0, #1 ; 0x1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 30007eb4: e1a04000 mov r4, r0 if ( result == -1 ) 30007eb8: 0a000046 beq 30007fd8 return -1; } node = pathloc->node_access; 30007ebc: e5950000 ldr r0, [r5] if ( !node ) 30007ec0: e3500000 cmp r0, #0 ; 0x0 30007ec4: 0a000037 beq 30007fa8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30007ec8: e590304c ldr r3, [r0, #76] 30007ecc: e3530001 cmp r3, #1 ; 0x1 30007ed0: 1a000034 bne 30007fa8 /* * 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 ) { 30007ed4: e590305c ldr r3, [r0, #92] 30007ed8: e3530000 cmp r3, #0 ; 0x0 30007edc: 0a00000e beq 30007f1c newloc = node->info.directory.mt_fs->mt_fs_root; 30007ee0: e2833018 add r3, r3, #24 ; 0x18 30007ee4: e28dc024 add ip, sp, #36 ; 0x24 30007ee8: e893000f ldm r3, {r0, r1, r2, r3} 30007eec: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30007ef0: e59dc034 ldr ip, [sp, #52] * 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; 30007ef4: e885000f stm r5, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30007ef8: e06cc007 rsb ip, ip, r7 30007efc: e5923004 ldr r3, [r2, #4] 30007f00: e08a000c add r0, sl, ip 30007f04: e1a01005 mov r1, r5 30007f08: e1a02009 mov r2, r9 30007f0c: e1a0e00f mov lr, pc 30007f10: e12fff13 bx r3 30007f14: e1a04000 mov r4, r0 30007f18: ea00002e b 30007fd8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 30007f1c: e1a0100b mov r1, fp 30007f20: eb000030 bl 30007fe8 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 30007f24: e2504000 subs r4, r0, #0 ; 0x0 30007f28: 0a000007 beq 30007f4c done = true; else pathloc->node_access = node; 30007f2c: e5854000 str r4, [r5] 30007f30: eaffffab b 30007de4 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 30007f34: eb000d03 bl 3000b348 <__errno> 30007f38: e3a03011 mov r3, #17 ; 0x11 30007f3c: ea000023 b 30007fd0 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30007f40: eb000d00 bl 3000b348 <__errno> 30007f44: e3a0305b mov r3, #91 ; 0x5b 30007f48: ea000020 b 30007fd0 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 30007f4c: e59d3034 ldr r3, [sp, #52] 30007f50: e08a2007 add r2, sl, r7 30007f54: e0633007 rsb r3, r3, r7 30007f58: e08a3003 add r3, sl, r3 30007f5c: e5893000 str r3, [r9] 30007f60: ea000005 b 30007f7c * 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++) { if ( !IMFS_is_separator( path[ i ] ) ) 30007f64: e353002f cmp r3, #47 ; 0x2f 30007f68: 1353005c cmpne r3, #92 ; 0x5c 30007f6c: 0a000002 beq 30007f7c rtems_set_errno_and_return_minus_one( ENOENT ); 30007f70: eb000cf4 bl 3000b348 <__errno> 30007f74: e3a03002 mov r3, #2 ; 0x2 30007f78: ea000014 b 30007fd0 /* * 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++) { 30007f7c: e5d23000 ldrb r3, [r2] 30007f80: e2822001 add r2, r2, #1 ; 0x1 30007f84: e3530000 cmp r3, #0 ; 0x0 30007f88: 1afffff5 bne 30007f64 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 30007f8c: e1a00005 mov r0, r5 30007f90: ebfffe5f bl 30007914 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 30007f94: e5953000 ldr r3, [r5] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 30007f98: e1a04000 mov r4, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 30007f9c: e593304c ldr r3, [r3, #76] 30007fa0: e3530001 cmp r3, #1 ; 0x1 30007fa4: 0a000002 beq 30007fb4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30007fa8: eb000ce6 bl 3000b348 <__errno> 30007fac: e3a03014 mov r3, #20 ; 0x14 30007fb0: ea000006 b 30007fd0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 30007fb4: e1a00005 mov r0, r5 30007fb8: e3a01003 mov r1, #3 ; 0x3 30007fbc: ebfffe6e bl 3000797c 30007fc0: e3500000 cmp r0, #0 ; 0x0 30007fc4: 1a000003 bne 30007fd8 rtems_set_errno_and_return_minus_one( EACCES ); 30007fc8: eb000cde bl 3000b348 <__errno> 30007fcc: e3a0300d mov r3, #13 ; 0xd 30007fd0: e5803000 str r3, [r0] 30007fd4: e3e04000 mvn r4, #0 ; 0x0 return result; } 30007fd8: e1a00004 mov r0, r4 30007fdc: e28dd038 add sp, sp, #56 ; 0x38 30007fe0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30007fe4: 30015980 .word 0x30015980 300079cc : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 300079cc: e5902000 ldr r2, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300079d0: e92d4030 push {r4, r5, lr} /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 300079d4: e592304c ldr r3, [r2, #76] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300079d8: e1a04000 mov r4, r0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 300079dc: e3530003 cmp r3, #3 ; 0x3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300079e0: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 300079e4: 159f0038 ldrne r0, [pc, #56] ; 30007a24 300079e8: 1bfff3ea blne 30004998 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 300079ec: e5923050 ldr r3, [r2, #80] 300079f0: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 300079f4: ebffffc6 bl 30007914 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 300079f8: e1a00004 mov r0, r4 300079fc: e1a01005 mov r1, r5 30007a00: ebffffdd bl 3000797c 30007a04: e3500000 cmp r0, #0 ; 0x0 30007a08: 13a00000 movne r0, #0 ; 0x0 30007a0c: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 30007a10: eb000e4c bl 3000b348 <__errno> <== NOT EXECUTED 30007a14: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 30007a18: e5803000 str r3, [r0] <== NOT EXECUTED 30007a1c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED return result; } 30007a20: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30007a24: abcd0000 .word 0xabcd0000 30007a28 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30007a28: e92d4070 push {r4, r5, r6, lr} 30007a2c: e1a04000 mov r4, r0 IMFS_jnode_t *jnode = node->node_access; 30007a30: e5900000 ldr r0, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30007a34: e1a06001 mov r6, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30007a38: e590304c ldr r3, [r0, #76] 30007a3c: e3530004 cmp r3, #4 ; 0x4 rtems_fatal_error_occurred (0xABCD0000); 30007a40: 159f00a0 ldrne r0, [pc, #160] ; 30007ae8 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30007a44: 1a000003 bne 30007a58 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 30007a48: e5903008 ldr r3, [r0, #8] 30007a4c: e3530000 cmp r3, #0 ; 0x0 30007a50: 1a000001 bne 30007a5c rtems_fatal_error_occurred( 0xBAD00000 ); 30007a54: e59f0090 ldr r0, [pc, #144] ; 30007aec <== NOT EXECUTED 30007a58: ebfff3ce bl 30004998 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 30007a5c: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 30007a60: e590e050 ldr lr, [r0, #80] 30007a64: e5de3000 ldrb r3, [lr] 30007a68: e353005c cmp r3, #92 ; 0x5c 30007a6c: 1353002f cmpne r3, #47 ; 0x2f 30007a70: 13a02000 movne r2, #0 ; 0x0 30007a74: 03a02001 moveq r2, #1 ; 0x1 30007a78: 0a000002 beq 30007a88 30007a7c: e3530000 cmp r3, #0 ; 0x0 30007a80: 11a0c002 movne ip, r2 30007a84: 1a000005 bne 30007aa0 30007a88: e59f3060 ldr r3, [pc, #96] ; 30007af0 30007a8c: e3a0c001 mov ip, #1 ; 0x1 30007a90: e5933000 ldr r3, [r3] 30007a94: e2833014 add r3, r3, #20 ; 0x14 30007a98: e893000f ldm r3, {r0, r1, r2, r3} 30007a9c: e884000f stm r4, {r0, r1, r2, r3} /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 30007aa0: e08e000c add r0, lr, ip 30007aa4: e1a02004 mov r2, r4 30007aa8: e1a01006 mov r1, r6 30007aac: eb000010 bl 30007af4 30007ab0: e1a05000 mov r5, r0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 30007ab4: e1a00004 mov r0, r4 30007ab8: ebffff95 bl 30007914 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 30007abc: e1a00004 mov r0, r4 30007ac0: e1a01006 mov r1, r6 30007ac4: ebffffac bl 3000797c 30007ac8: e3500000 cmp r0, #0 ; 0x0 30007acc: 1a000003 bne 30007ae0 rtems_set_errno_and_return_minus_one( EACCES ); 30007ad0: eb000e1c bl 3000b348 <__errno> <== NOT EXECUTED 30007ad4: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 30007ad8: e5803000 str r3, [r0] <== NOT EXECUTED 30007adc: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED return result; } 30007ae0: e1a00005 mov r0, r5 30007ae4: e8bd8070 pop {r4, r5, r6, pc} 30007ae8: abcd0000 .word 0xabcd0000 30007aec: bad00000 .word 0xbad00000 30007af0: 30015980 .word 0x30015980 3001abf8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3001abf8: 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; 3001abfc: e1a03000 mov r3, r0 3001ac00: e5b34018 ldr r4, [r3, #24]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3001ac04: e24dd010 sub sp, sp, #16 ; 0x10 3001ac08: 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; 3001ac0c: e893000f ldm r3, {r0, r1, r2, r3} 3001ac10: e88d000f stm sp, {r0, r1, r2, r3} /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3001ac14: e3a03000 mov r3, #0 ; 0x0 3001ac18: e58e3018 str r3, [lr, #24] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3001ac1c: e1a0500d mov r5, sp 3001ac20: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 3001ac24: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3001ac28: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3001ac2c: ebfffe3a bl 3001a51c if ( jnode->type != IMFS_DIRECTORY ) { 3001ac30: e594304c ldr r3, [r4, #76] result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3001ac34: e2842054 add r2, r4, #84 ; 0x54 do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 3001ac38: e3530001 cmp r3, #1 ; 0x1 3001ac3c: 1a000002 bne 3001ac4c result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3001ac40: e5943050 ldr r3, [r4, #80] 3001ac44: e1530002 cmp r3, r2 3001ac48: 1a000004 bne 3001ac60 result = IMFS_unlink( &loc ); 3001ac4c: e1a0000d mov r0, sp 3001ac50: ebffa2ba bl 30003740 if (result != 0) 3001ac54: e3500000 cmp r0, #0 ; 0x0 3001ac58: 1a00000c bne 3001ac90 3001ac5c: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { 3001ac60: e3540000 cmp r4, #0 ; 0x0 3001ac64: 0a00000b beq 3001ac98 if ( jnode->type == IMFS_DIRECTORY ) { 3001ac68: e594304c ldr r3, [r4, #76] 3001ac6c: e3530001 cmp r3, #1 ; 0x1 3001ac70: 1affffea bne 3001ac20 if ( jnode_has_children( jnode ) ) 3001ac74: e5942050 ldr r2, [r4, #80] 3001ac78: e2843054 add r3, r4, #84 ; 0x54 3001ac7c: e1520003 cmp r2, r3 3001ac80: 0affffe6 beq 3001ac20 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3001ac84: e2524000 subs r4, r2, #0 ; 0x0 3001ac88: 1affffe4 bne 3001ac20 3001ac8c: ea000001 b 3001ac98 <== NOT EXECUTED 3001ac90: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001ac94: ea000000 b 3001ac9c <== NOT EXECUTED 3001ac98: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001ac9c: e28dd010 add sp, sp, #16 ; 0x10 3001aca0: e8bd8070 pop {r4, r5, r6, pc} 30008158 : 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 ) { 30008158: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000815c: e1a05000 mov r5, r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30008160: e59f00e0 ldr r0, [pc, #224] ; 30008248 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 ) { 30008164: e1a07003 mov r7, r3 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30008168: e5900000 ldr r0, [r0] rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 3000816c: e24dd004 sub sp, sp, #4 ; 0x4 30008170: e1a08001 mov r8, r1 30008174: e1a0a002 mov sl, r2 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30008178: e3a0e010 mov lr, #16 ; 0x10 3000817c: e3a03000 mov r3, #0 ; 0x0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 30008180: e15e0000 cmp lr, r0 bit_mask <<= 1) { 30008184: e2833001 add r3, r3, #1 ; 0x1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 30008188: 0a000003 beq 3000819c 3000818c: e3530006 cmp r3, #6 ; 0x6 bit_mask <<= 1) { 30008190: e1a0e08e lsl lr, lr, #1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 30008194: 1afffff9 bne 30008180 30008198: e3a0e080 mov lr, #128 ; 0x80 <== NOT EXECUTED bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 3000819c: e59fc0a8 ldr ip, [pc, #168] ; 3000824c * 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_node( 300081a0: e3a06000 mov r6, #0 ; 0x0 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 300081a4: e58ce000 str lr, [ip] * 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_node( 300081a8: e3a01001 mov r1, #1 ; 0x1 300081ac: e59f209c ldr r2, [pc, #156] ; 30008250 300081b0: e59f309c ldr r3, [pc, #156] ; 30008254 300081b4: e1a00006 mov r0, r6 300081b8: e58d6000 str r6, [sp] 300081bc: eb000986 bl 3000a7dc NULL ); 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; 300081c0: e59f3090 ldr r3, [pc, #144] ; 30008258 300081c4: e285c030 add ip, r5, #48 ; 0x30 300081c8: e1a04003 mov r4, 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_node( 300081cc: e5850018 str r0, [r5, #24] NULL ); 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; 300081d0: e8b4000f ldm r4!, {r0, r1, r2, r3} 300081d4: e8ac000f stmia ip!, {r0, r1, r2, r3} 300081d8: e8b4000f ldm r4!, {r0, r1, r2, r3} 300081dc: e8ac000f stmia ip!, {r0, r1, r2, r3} 300081e0: e894000f ldm r4, {r0, r1, r2, r3} ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 300081e4: e5858020 str r8, [r5, #32] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 300081e8: e88c000f stm ip, {r0, r1, r2, r3} "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 300081ec: e585701c str r7, [r5, #28] 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 ) ); 300081f0: e3a00001 mov r0, #1 ; 0x1 300081f4: e3a0100c mov r1, #12 ; 0xc 300081f8: eb0000f2 bl 300085c8 if ( !fs_info ){ 300081fc: e3500000 cmp r0, #0 ; 0x0 30008200: 1a000006 bne 30008220 free(temp_mt_entry->mt_fs_root.node_access); 30008204: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30008208: eb00012b bl 300086bc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 3000820c: eb000c4d bl 3000b348 <__errno> <== NOT EXECUTED 30008210: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 30008214: e5803000 str r3, [r0] <== NOT EXECUTED 30008218: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3000821c: ea000007 b 30008240 <== NOT EXECUTED 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; 30008220: e5952018 ldr r2, [r5, #24] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 30008224: e3a03001 mov r3, #1 ; 0x1 30008228: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 3000822c: e5807008 str r7, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 30008230: e580a004 str sl, [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; 30008234: e585002c str r0, [r5, #44] 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; 30008238: e5823038 str r3, [r2, #56] 3000823c: e1a00006 mov r0, r6 return 0; } 30008240: e28dd004 add sp, sp, #4 ; 0x4 30008244: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30008248: 3001537c .word 0x3001537c 3000824c: 30016078 .word 0x30016078 30008250: 30014eb9 .word 0x30014eb9 30008254: 000041ed .word 0x000041ed 30008258: 30014930 .word 0x30014930 300034e0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 300034e0: e92d4030 push {r4, r5, lr} /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 300034e4: 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 */ ) { 300034e8: e24dd044 sub sp, sp, #68 ; 0x44 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 300034ec: e58d3028 str r3, [sp, #40] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 300034f0: e1d333b4 ldrh r3, [r3, #52] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 300034f4: e1a05001 mov r5, r1 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 300034f8: e3530007 cmp r3, #7 ; 0x7 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 300034fc: e1a00002 mov r0, 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 ) 30003500: 9a000002 bls 30003510 rtems_set_errno_and_return_minus_one( EMLINK ); 30003504: eb009ace bl 3002a044 <__errno> 30003508: e3a0301f mov r3, #31 ; 0x1f 3000350c: ea00000e b 3000354c /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 30003510: e28d4007 add r4, sp, #7 ; 0x7 30003514: e1a01004 mov r1, r4 30003518: e28d2040 add r2, sp, #64 ; 0x40 3000351c: ebffff73 bl 300032f0 /* * Create a new link node. */ new_node = IMFS_create_node( 30003520: e28dc028 add ip, sp, #40 ; 0x28 30003524: e1a00005 mov r0, r5 30003528: e1a02004 mov r2, r4 3000352c: e3a01003 mov r1, #3 ; 0x3 30003530: e59f3054 ldr r3, [pc, #84] ; 3000358c 30003534: e58dc000 str ip, [sp] 30003538: eb005b99 bl 3001a3a4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 3000353c: e3500000 cmp r0, #0 ; 0x0 30003540: 1a000004 bne 30003558 rtems_set_errno_and_return_minus_one( ENOMEM ); 30003544: eb009abe bl 3002a044 <__errno> <== NOT EXECUTED 30003548: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3000354c: e5803000 str r3, [r0] 30003550: e3e00000 mvn r0, #0 ; 0x0 30003554: ea00000a b 30003584 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30003558: e59d2028 ldr r2, [sp, #40] IMFS_update_ctime( info.hard_link.link_node ); 3000355c: e28d0038 add r0, sp, #56 ; 0x38 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30003560: e1d233b4 ldrh r3, [r2, #52] IMFS_update_ctime( info.hard_link.link_node ); 30003564: e3a01000 mov r1, #0 ; 0x0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30003568: e2833001 add r3, r3, #1 ; 0x1 3000356c: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( info.hard_link.link_node ); 30003570: eb000218 bl 30003dd8 30003574: e59d2038 ldr r2, [sp, #56] 30003578: e59d3028 ldr r3, [sp, #40] 3000357c: e3a00000 mov r0, #0 ; 0x0 30003580: e5832048 str r2, [r3, #72] return 0; } 30003584: e28dd044 add sp, sp, #68 ; 0x44 30003588: e8bd8030 pop {r4, r5, pc} 3000358c: 0000a1ff .word 0x0000a1ff 30021fa8 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 30021fa8: e2503000 subs r3, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 30021fac: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 30021fb0: 059f0060 ldreq r0, [pc, #96] ; 30022018 30021fb4: 059f1060 ldreq r1, [pc, #96] ; 3002201c 30021fb8: 059f2060 ldreq r2, [pc, #96] ; 30022020 30021fbc: 059f3060 ldreq r3, [pc, #96] ; 30022024 30021fc0: 0a000006 beq 30021fe0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30021fc4: e593304c ldr r3, [r3, #76] 30021fc8: e3530005 cmp r3, #5 ; 0x5 30021fcc: 0a000004 beq 30021fe4 30021fd0: e59f0040 ldr r0, [pc, #64] ; 30022018 <== NOT EXECUTED 30021fd4: e59f104c ldr r1, [pc, #76] ; 30022028 <== NOT EXECUTED 30021fd8: e59f2040 ldr r2, [pc, #64] ; 30022020 <== NOT EXECUTED 30021fdc: e59f3048 ldr r3, [pc, #72] ; 3002202c <== NOT EXECUTED 30021fe0: ebffe3ca bl 3001af10 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 30021fe4: e3a02001 mov r2, #1 ; 0x1 30021fe8: ebfffeab bl 30021a9c if ( *block_entry_ptr ) 30021fec: e5905000 ldr r5, [r0] assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 30021ff0: e1a04000 mov r4, r0 if ( *block_entry_ptr ) 30021ff4: e3550000 cmp r5, #0 ; 0x0 30021ff8: 13a00000 movne r0, #0 ; 0x0 30021ffc: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 30022000: ebfffe98 bl 30021a68 if ( !memory ) 30022004: e3500000 cmp r0, #0 ; 0x0 return 1; *block_entry_ptr = memory; 30022008: 15840000 strne r0, [r4] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 3002200c: 03a00001 moveq r0, #1 ; 0x1 return 1; *block_entry_ptr = memory; 30022010: 11a00005 movne r0, r5 return 0; } 30022014: e8bd8030 pop {r4, r5, pc} 30022018: 3003f565 .word 0x3003f565 3002201c: 00000169 .word 0x00000169 30022020: 3003c2e1 .word 0x3003c2e1 30022024: 3003f5ae .word 0x3003f5ae 30022028: 0000016d .word 0x0000016d 3002202c: 3003f5b8 .word 0x3003f5b8 30022030 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30022030: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30022034: e2507000 subs r7, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30022038: e1a06001 mov r6, r1 /* * Perform internal consistency checks */ assert( the_jnode ); 3002203c: 059f00f8 ldreq r0, [pc, #248] ; 3002213c 30022040: 059f10f8 ldreq r1, [pc, #248] ; 30022140 30022044: 059f20f8 ldreq r2, [pc, #248] ; 30022144 30022048: 059f30f8 ldreq r3, [pc, #248] ; 30022148 3002204c: 0a000006 beq 3002206c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30022050: e597304c ldr r3, [r7, #76] 30022054: e3530005 cmp r3, #5 ; 0x5 30022058: 0a000004 beq 30022070 3002205c: e59f00d8 ldr r0, [pc, #216] ; 3002213c <== NOT EXECUTED 30022060: e59f10e4 ldr r1, [pc, #228] ; 3002214c <== NOT EXECUTED 30022064: e59f20d8 ldr r2, [pc, #216] ; 30022144 <== NOT EXECUTED 30022068: e59f30e0 ldr r3, [pc, #224] ; 30022150 <== NOT EXECUTED 3002206c: ebffe3a7 bl 3001af10 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30022070: e59f30dc ldr r3, [pc, #220] ; 30022154 30022074: e5934000 ldr r4, [r3] 30022078: e1a02124 lsr r2, r4, #2 3002207c: e2823001 add r3, r2, #1 ; 0x1 30022080: e0030392 mul r3, r2, r3 30022084: e2833001 add r3, r3, #1 ; 0x1 30022088: e0030392 mul r3, r2, r3 3002208c: e2433001 sub r3, r3, #1 ; 0x1 30022090: e0030394 mul r3, r4, r3 30022094: e1510003 cmp r1, r3 30022098: 3a000002 bcc 300220a8 rtems_set_errno_and_return_minus_one( EINVAL ); 3002209c: eb001fe8 bl 3002a044 <__errno> <== NOT EXECUTED 300220a0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300220a4: ea00001b b 30022118 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 300220a8: e5975050 ldr r5, [r7, #80] 300220ac: e1510005 cmp r1, r5 300220b0: d3a00000 movle r0, #0 ; 0x0 300220b4: d8bd81f0 pople {r4, r5, r6, r7, r8, pc} /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 300220b8: e1a00001 mov r0, r1 300220bc: e1a01004 mov r1, r4 300220c0: eb0060a5 bl 3003a35c <__aeabi_idiv> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 300220c4: e1a01004 mov r1, r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 300220c8: e1a08000 mov r8, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 300220cc: e1a00005 mov r0, r5 300220d0: eb0060a1 bl 3003a35c <__aeabi_idiv> 300220d4: e1a05000 mov r5, r0 300220d8: e1a04000 mov r4, r0 300220dc: ea000011 b 30022128 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 300220e0: e1a00007 mov r0, r7 300220e4: e1a01004 mov r1, r4 300220e8: ebffffae bl 30021fa8 300220ec: e3500000 cmp r0, #0 ; 0x0 300220f0: 0a00000b beq 30022124 300220f4: ea000003 b 30022108 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 300220f8: e1a01004 mov r1, r4 <== NOT EXECUTED 300220fc: e1a00007 mov r0, r7 <== NOT EXECUTED 30022100: ebfffef4 bl 30021cd8 <== 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-- ) { 30022104: e2444001 sub r4, r4, #1 ; 0x1 <== NOT EXECUTED 30022108: e1540005 cmp r4, r5 <== NOT EXECUTED 3002210c: 2afffff9 bcs 300220f8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 30022110: eb001fcb bl 3002a044 <__errno> <== NOT EXECUTED 30022114: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 30022118: e5803000 str r3, [r0] <== NOT EXECUTED 3002211c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30022120: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 30022124: e2844001 add r4, r4, #1 ; 0x1 30022128: e1540008 cmp r4, r8 3002212c: 9affffeb bls 300220e0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 30022130: e5876050 str r6, [r7, #80] 30022134: e3a00000 mov r0, #0 ; 0x0 return 0; } 30022138: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3002213c: 3003f565 .word 0x3003f565 30022140: 00000131 .word 0x00000131 30022144: 3003c2f7 .word 0x3003c2f7 30022148: 3003f5ae .word 0x3003f5ae 3002214c: 00000135 .word 0x00000135 30022150: 3003f5b8 .word 0x3003f5b8 30022154: 30043468 .word 0x30043468 30021a9c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 30021a9c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30021aa0: e2507000 subs r7, r0, #0 ; 0x0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 30021aa4: e1a04001 mov r4, r1 30021aa8: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 30021aac: 059f0208 ldreq r0, [pc, #520] ; 30021cbc 30021ab0: 059f1208 ldreq r1, [pc, #520] ; 30021cc0 30021ab4: 059f2208 ldreq r2, [pc, #520] ; 30021cc4 30021ab8: 059f3208 ldreq r3, [pc, #520] ; 30021cc8 30021abc: 0a000006 beq 30021adc if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 30021ac0: e597304c ldr r3, [r7, #76] 30021ac4: e3530005 cmp r3, #5 ; 0x5 30021ac8: 0a000004 beq 30021ae0 30021acc: e59f01e8 ldr r0, [pc, #488] ; 30021cbc <== NOT EXECUTED 30021ad0: e59f11f4 ldr r1, [pc, #500] ; 30021ccc <== NOT EXECUTED 30021ad4: e59f21e8 ldr r2, [pc, #488] ; 30021cc4 <== NOT EXECUTED 30021ad8: e59f31f0 ldr r3, [pc, #496] ; 30021cd0 <== NOT EXECUTED 30021adc: ebffe50b bl 3001af10 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 30021ae0: e59f31ec ldr r3, [pc, #492] ; 30021cd4 30021ae4: e5933000 ldr r3, [r3] 30021ae8: e1a05123 lsr r5, r3, #2 30021aec: e2453001 sub r3, r5, #1 ; 0x1 30021af0: e1510003 cmp r1, r3 30021af4: 8a00000f bhi 30021b38 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 30021af8: e3520000 cmp r2, #0 ; 0x0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 30021afc: e5970054 ldr r0, [r7, #84] if ( malloc_it ) { 30021b00: 0a000008 beq 30021b28 if ( !p ) { 30021b04: e3500000 cmp r0, #0 ; 0x0 30021b08: 1a000003 bne 30021b1c p = memfile_alloc_block(); 30021b0c: ebffffd5 bl 30021a68 if ( !p ) 30021b10: e3500000 cmp r0, #0 ; 0x0 30021b14: 0a000066 beq 30021cb4 return 0; info->indirect = p; 30021b18: e5870054 str r0, [r7, #84] } return &info->indirect[ my_block ]; 30021b1c: e5973054 ldr r3, [r7, #84] 30021b20: e0830104 add r0, r3, r4, lsl #2 30021b24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } if ( !p ) 30021b28: e3500000 cmp r0, #0 ; 0x0 return 0; return &info->indirect[ my_block ]; 30021b2c: 10800101 addne r0, r0, r1, lsl #2 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 30021b30: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} 30021b34: ea00005e b 30021cb4 <== NOT EXECUTED /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 30021b38: e2853001 add r3, r5, #1 ; 0x1 <== NOT EXECUTED 30021b3c: e0000395 mul r0, r5, r3 <== NOT EXECUTED 30021b40: e2403001 sub r3, r0, #1 ; 0x1 <== NOT EXECUTED 30021b44: e1510003 cmp r1, r3 <== NOT EXECUTED 30021b48: 8a000022 bhi 30021bd8 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 30021b4c: e0654001 rsb r4, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30021b50: e1a00004 mov r0, r4 <== NOT EXECUTED 30021b54: e1a01005 mov r1, r5 <== NOT EXECUTED 30021b58: eb00624f bl 3003a49c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30021b5c: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30021b60: e1a06000 mov r6, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30021b64: e1a00004 mov r0, r4 <== NOT EXECUTED 30021b68: eb0061b7 bl 3003a24c <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 30021b6c: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30021b70: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->doubly_indirect; 30021b74: e5970058 ldr r0, [r7, #88] <== NOT EXECUTED if ( malloc_it ) { 30021b78: 0a00000f beq 30021bbc <== NOT EXECUTED if ( !p ) { 30021b7c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021b80: 1a000003 bne 30021b94 <== NOT EXECUTED p = memfile_alloc_block(); 30021b84: ebffffb7 bl 30021a68 <== NOT EXECUTED if ( !p ) 30021b88: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021b8c: 0a000048 beq 30021cb4 <== NOT EXECUTED return 0; info->doubly_indirect = p; 30021b90: e5870058 str r0, [r7, #88] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 30021b94: e7901104 ldr r1, [r0, r4, lsl #2] <== NOT EXECUTED 30021b98: e0804104 add r4, r0, r4, lsl #2 <== NOT EXECUTED if ( !p1 ) { 30021b9c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 30021ba0: 1a000003 bne 30021bb4 <== NOT EXECUTED p1 = memfile_alloc_block(); 30021ba4: ebffffaf bl 30021a68 <== NOT EXECUTED if ( !p1 ) 30021ba8: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 30021bac: 0a000040 beq 30021cb4 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 30021bb0: e5841000 str r1, [r4] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 30021bb4: e0810106 add r0, r1, r6, lsl #2 <== NOT EXECUTED 30021bb8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if ( !p ) 30021bbc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021bc0: 0a00003b beq 30021cb4 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 30021bc4: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED if ( !p ) 30021bc8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 30021bcc: 10800106 addne r0, r0, r6, lsl #2 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 30021bd0: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 30021bd4: ea000036 b 30021cb4 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 30021bd8: e2803001 add r3, r0, #1 ; 0x1 <== NOT EXECUTED 30021bdc: e0030395 mul r3, r5, r3 <== NOT EXECUTED 30021be0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30021be4: e1510003 cmp r1, r3 <== NOT EXECUTED 30021be8: 8a000031 bhi 30021cb4 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 30021bec: e0604001 rsb r4, r0, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30021bf0: e1a00004 mov r0, r4 <== NOT EXECUTED 30021bf4: e1a01005 mov r1, r5 <== NOT EXECUTED 30021bf8: eb006227 bl 3003a49c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30021bfc: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30021c00: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30021c04: e1a00004 mov r0, r4 <== NOT EXECUTED 30021c08: eb00618f bl 3003a24c <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 30021c0c: 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; 30021c10: e1a04000 mov r4, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 30021c14: eb00618c bl 3003a24c <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 30021c18: 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; 30021c1c: e1a06000 mov r6, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 30021c20: e1a00004 mov r0, r4 <== NOT EXECUTED 30021c24: eb00621c bl 3003a49c <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 30021c28: e3580000 cmp r8, #0 ; 0x0 <== 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; 30021c2c: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->triply_indirect; 30021c30: e597005c ldr r0, [r7, #92] <== NOT EXECUTED if ( malloc_it ) { 30021c34: 0a000017 beq 30021c98 <== NOT EXECUTED if ( !p ) { 30021c38: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021c3c: 1a000003 bne 30021c50 <== NOT EXECUTED p = memfile_alloc_block(); 30021c40: ebffff88 bl 30021a68 <== NOT EXECUTED if ( !p ) 30021c44: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021c48: 0a000019 beq 30021cb4 <== NOT EXECUTED return 0; info->triply_indirect = p; 30021c4c: e587005c str r0, [r7, #92] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 30021c50: e7903106 ldr r3, [r0, r6, lsl #2] <== NOT EXECUTED 30021c54: e0805106 add r5, r0, r6, lsl #2 <== NOT EXECUTED if ( !p1 ) { 30021c58: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30021c5c: 1a000003 bne 30021c70 <== NOT EXECUTED p1 = memfile_alloc_block(); 30021c60: ebffff80 bl 30021a68 <== NOT EXECUTED if ( !p1 ) 30021c64: e2503000 subs r3, r0, #0 ; 0x0 <== NOT EXECUTED 30021c68: 0a000011 beq 30021cb4 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 30021c6c: e5853000 str r3, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 30021c70: e7930104 ldr r0, [r3, r4, lsl #2] <== NOT EXECUTED 30021c74: e0834104 add r4, r3, r4, lsl #2 <== NOT EXECUTED if ( !p2 ) { 30021c78: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021c7c: 1a000003 bne 30021c90 <== NOT EXECUTED p2 = memfile_alloc_block(); 30021c80: ebffff78 bl 30021a68 <== NOT EXECUTED if ( !p2 ) 30021c84: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021c88: 0a000009 beq 30021cb4 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 30021c8c: e5840000 str r0, [r4] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 30021c90: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 30021c94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if ( !p ) 30021c98: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021c9c: 0a000004 beq 30021cb4 <== 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 ]; 30021ca0: e7900106 ldr r0, [r0, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) 30021ca4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 30021ca8: 17903104 ldrne r3, [r0, r4, lsl #2] <== NOT EXECUTED 30021cac: 1083010a addne r0, r3, sl, lsl #2 <== 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 ]; if ( !p1 ) 30021cb0: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 30021cb4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 30021cb8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 30021cbc: 3003f565 .word 0x3003f565 30021cc0: 00000386 .word 0x00000386 30021cc4: 3003c26c .word 0x3003c26c 30021cc8: 3003f5ae .word 0x3003f5ae 30021ccc: 0000038a .word 0x0000038a 30021cd0: 3003f5b8 .word 0x3003f5b8 30021cd4: 30043468 .word 0x30043468 300224dc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 300224dc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 300224e0: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 300224e4: e24dd008 sub sp, sp, #8 ; 0x8 300224e8: e1a06001 mov r6, r1 300224ec: e1a08002 mov r8, r2 300224f0: e1a00003 mov r0, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 300224f4: 059f01fc ldreq r0, [pc, #508] ; 300226f8 300224f8: 059f11fc ldreq r1, [pc, #508] ; 300226fc 300224fc: 059f21fc ldreq r2, [pc, #508] ; 30022700 30022500: 059f31fc ldreq r3, [pc, #508] ; 30022704 30022504: 0a000007 beq 30022528 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 30022508: e59a204c ldr r2, [sl, #76] 3002250c: e2423005 sub r3, r2, #5 ; 0x5 30022510: e3530001 cmp r3, #1 ; 0x1 30022514: 9a000004 bls 3002252c 30022518: e59f01d8 ldr r0, [pc, #472] ; 300226f8 <== NOT EXECUTED 3002251c: e59f11e4 ldr r1, [pc, #484] ; 30022708 <== NOT EXECUTED 30022520: e59f21d8 ldr r2, [pc, #472] ; 30022700 <== NOT EXECUTED 30022524: e59f31e0 ldr r3, [pc, #480] ; 3002270c <== NOT EXECUTED 30022528: ebffe278 bl 3001af10 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 3002252c: e3580000 cmp r8, #0 ; 0x0 30022530: 059f01c0 ldreq r0, [pc, #448] ; 300226f8 30022534: 03a01f96 moveq r1, #600 ; 0x258 30022538: 059f21c0 ldreq r2, [pc, #448] ; 30022700 3002253c: 059f31cc ldreq r3, [pc, #460] ; 30022710 30022540: 0afffff8 beq 30022528 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 30022544: e3500000 cmp r0, #0 ; 0x0 30022548: 1a000004 bne 30022560 rtems_set_errno_and_return_minus_one( EINVAL ); 3002254c: eb001ebc bl 3002a044 <__errno> <== NOT EXECUTED 30022550: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30022554: e5803000 str r3, [r0] <== NOT EXECUTED 30022558: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3002255c: ea000063 b 300226f0 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 30022560: e3520006 cmp r2, #6 ; 0x6 30022564: 1a00000d bne 300225a0 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 30022568: e59a4050 ldr r4, [sl, #80] <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 3002256c: e59a1054 ldr r1, [sl, #84] <== 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)) 30022570: e0664004 rsb r4, r6, r4 <== NOT EXECUTED 30022574: e1540000 cmp r4, r0 <== NOT EXECUTED 30022578: 21a04000 movcs r4, r0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 3002257c: e0811006 add r1, r1, r6 <== NOT EXECUTED 30022580: e1a02004 mov r2, r4 <== NOT EXECUTED 30022584: e1a00008 mov r0, r8 <== NOT EXECUTED 30022588: eb002825 bl 3002c624 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 3002258c: e1a0000d mov r0, sp <== NOT EXECUTED 30022590: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30022594: ebff860f bl 30003dd8 <== NOT EXECUTED return my_length; 30022598: e1a00004 mov r0, r4 <== NOT EXECUTED 3002259c: ea000051 b 300226e8 <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 300225a0: e59a2050 ldr r2, [sl, #80] 300225a4: e0803001 add r3, r0, r1 300225a8: e1530002 cmp r3, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300225ac: e59f3160 ldr r3, [pc, #352] ; 30022714 * 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 ) 300225b0: 91a07000 movls r7, r0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300225b4: e5934000 ldr r4, [r3] * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; 300225b8: 80617002 rsbhi r7, r1, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300225bc: e1a00001 mov r0, r1 300225c0: e1a01004 mov r1, r4 300225c4: eb005fe7 bl 3003a568 <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300225c8: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300225cc: e1a05000 mov r5, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300225d0: e1a00006 mov r0, r6 300225d4: eb005f60 bl 3003a35c <__aeabi_idiv> if ( start_offset ) { 300225d8: e3550000 cmp r5, #0 ; 0x0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300225dc: e1a06000 mov r6, r0 if ( start_offset ) { 300225e0: 0a000013 beq 30022634 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 ); 300225e4: e1a01006 mov r1, r6 300225e8: e1a0000a mov r0, sl 300225ec: e3a02000 mov r2, #0 ; 0x0 300225f0: ebfffd29 bl 30021a9c assert( block_ptr ); 300225f4: e3500000 cmp r0, #0 ; 0x0 300225f8: 059f00f8 ldreq r0, [pc, #248] ; 300226f8 300225fc: 03a01fa5 moveq r1, #660 ; 0x294 30022600: 0a00002c beq 300226b8 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 30022604: 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; 30022608: e0654004 rsb r4, r5, r4 3002260c: e1570004 cmp r7, r4 30022610: 31a04007 movcc r4, r7 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 ); 30022614: e0811005 add r1, r1, r5 30022618: e1a00008 mov r0, r8 3002261c: e1a02004 mov r2, r4 30022620: eb0027ff bl 3002c624 dest += to_copy; 30022624: e0888004 add r8, r8, r4 block++; 30022628: e2866001 add r6, r6, #1 ; 0x1 my_length -= to_copy; 3002262c: e0647007 rsb r7, r4, r7 30022630: e1a05004 mov r5, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 30022634: e59f30d8 ldr r3, [pc, #216] ; 30022714 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30022638: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 3002263c: e5934000 ldr r4, [r3] 30022640: ea00000f b 30022684 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30022644: e1a0000a mov r0, sl 30022648: e1a01006 mov r1, r6 3002264c: e3a02000 mov r2, #0 ; 0x0 30022650: ebfffd11 bl 30021a9c assert( block_ptr ); 30022654: e3500000 cmp r0, #0 ; 0x0 30022658: 059f0098 ldreq r0, [pc, #152] ; 300226f8 3002265c: 059f10b4 ldreq r1, [pc, #180] ; 30022718 30022660: 0a000014 beq 300226b8 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 30022664: e5901000 ldr r1, [r0] 30022668: e1a02004 mov r2, r4 3002266c: e1a00008 mov r0, r8 30022670: eb0027eb bl 3002c624 dest += to_copy; 30022674: e0888004 add r8, r8, r4 block++; 30022678: e2866001 add r6, r6, #1 ; 0x1 my_length -= to_copy; 3002267c: e0647007 rsb r7, r4, r7 copied += to_copy; 30022680: e0855004 add r5, r5, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30022684: e5993000 ldr r3, [r9] 30022688: e1570003 cmp r7, r3 3002268c: 2affffec bcs 30022644 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 30022690: e3570000 cmp r7, #0 ; 0x0 30022694: 0a00000f beq 300226d8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30022698: e1a01006 mov r1, r6 3002269c: e1a0000a mov r0, sl 300226a0: e3a02000 mov r2, #0 ; 0x0 300226a4: ebfffcfc bl 30021a9c assert( block_ptr ); 300226a8: e2501000 subs r1, r0, #0 ; 0x0 300226ac: 1a000004 bne 300226c4 300226b0: e59f0040 ldr r0, [pc, #64] ; 300226f8 <== NOT EXECUTED 300226b4: e59f1060 ldr r1, [pc, #96] ; 3002271c <== NOT EXECUTED 300226b8: e59f2040 ldr r2, [pc, #64] ; 30022700 <== NOT EXECUTED 300226bc: e59f305c ldr r3, [pc, #92] ; 30022720 <== NOT EXECUTED 300226c0: eaffff98 b 30022528 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 300226c4: e1a00008 mov r0, r8 300226c8: e5911000 ldr r1, [r1] 300226cc: e1a02007 mov r2, r7 300226d0: eb0027d3 bl 3002c624 copied += my_length; 300226d4: e0875005 add r5, r7, r5 } IMFS_update_atime( the_jnode ); 300226d8: e1a0000d mov r0, sp 300226dc: e3a01000 mov r1, #0 ; 0x0 300226e0: ebff85bc bl 30003dd8 return copied; 300226e4: e1a00005 mov r0, r5 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 300226e8: e59d3000 ldr r3, [sp] 300226ec: e58a3040 str r3, [sl, #64] return copied; } 300226f0: e28dd008 add sp, sp, #8 ; 0x8 300226f4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 300226f8: 3003f565 .word 0x3003f565 300226fc: 0000024a .word 0x0000024a 30022700: 3003c29e .word 0x3003c29e 30022704: 3003f5ae .word 0x3003f5ae 30022708: 0000024f .word 0x0000024f 3002270c: 3003f61b .word 0x3003f61b 30022710: 3003f666 .word 0x3003f666 30022714: 30043468 .word 0x30043468 30022718: 000002a5 .word 0x000002a5 3002271c: 000002b7 .word 0x000002b7 30022720: 3003f5e8 .word 0x3003f5e8 30021d7c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 30021d7c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30021d80: e2506000 subs r6, r0, #0 ; 0x0 30021d84: 059f0130 ldreq r0, [pc, #304] ; 30021ebc 30021d88: 03a01f7b moveq r1, #492 ; 0x1ec 30021d8c: 059f212c ldreq r2, [pc, #300] ; 30021ec0 30021d90: 059f312c ldreq r3, [pc, #300] ; 30021ec4 30021d94: 0a000006 beq 30021db4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30021d98: e596304c ldr r3, [r6, #76] 30021d9c: e3530005 cmp r3, #5 ; 0x5 30021da0: 0a000004 beq 30021db8 30021da4: e59f0110 ldr r0, [pc, #272] ; 30021ebc <== NOT EXECUTED 30021da8: e59f2110 ldr r2, [pc, #272] ; 30021ec0 <== NOT EXECUTED 30021dac: e59f3114 ldr r3, [pc, #276] ; 30021ec8 <== NOT EXECUTED 30021db0: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED 30021db4: ebffe455 bl 3001af10 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 30021db8: e59f210c ldr r2, [pc, #268] ; 30021ecc * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30021dbc: e5963054 ldr r3, [r6, #84] /* * 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; 30021dc0: e5922000 ldr r2, [r2] * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30021dc4: e3530000 cmp r3, #0 ; 0x0 /* * 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; 30021dc8: e1a08122 lsr r8, r2, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 30021dcc: 12860054 addne r0, r6, #84 ; 0x54 30021dd0: 11a01008 movne r1, r8 30021dd4: 1bffffc9 blne 30021d00 } if ( info->doubly_indirect ) { 30021dd8: e5963058 ldr r3, [r6, #88] 30021ddc: e3530000 cmp r3, #0 ; 0x0 30021de0: 13a04000 movne r4, #0 ; 0x0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 30021de8: 1a000008 bne 30021e10 30021dec: ea00000d b 30021e28 for ( i=0 ; idoubly_indirect[i] ) { 30021df0: e5960058 ldr r0, [r6, #88] <== NOT EXECUTED 30021df4: e1a02104 lsl r2, r4, #2 <== NOT EXECUTED 30021df8: e7903104 ldr r3, [r0, r4, lsl #2] <== NOT EXECUTED 30021dfc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED memfile_free_blocks_in_table( 30021e00: 10800002 addne r0, r0, r2 <== NOT EXECUTED 30021e04: 11a01008 movne r1, r8 <== NOT EXECUTED 30021e08: 1bffffbc blne 30021d00 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== 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 ); 30021e1c: e2860058 add r0, r6, #88 ; 0x58 <== NOT EXECUTED 30021e20: e1a01008 mov r1, r8 <== NOT EXECUTED 30021e24: ebffffb5 bl 30021d00 <== NOT EXECUTED } if ( info->triply_indirect ) { 30021e28: e596305c ldr r3, [r6, #92] 30021e2c: e3530000 cmp r3, #0 ; 0x0 30021e30: 13a07000 movne r7, #0 ; 0x0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 30021e38: 1a000017 bne 30021e9c 30021e3c: ea00001c b 30021eb4 for ( i=0 ; itriply_indirect[i]; 30021e40: e596305c ldr r3, [r6, #92] <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 30021e44: e1a0a107 lsl sl, r7, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 30021e48: e7930107 ldr r0, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30021e4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30021e50: 0a000014 beq 30021ea8 <== NOT EXECUTED break; 30021e54: e1a04000 mov r4, r0 <== NOT EXECUTED 30021e58: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 30021e5c: ea000006 b 30021e7c <== NOT EXECUTED for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 30021e88: e596005c ldr r0, [r6, #92] <== NOT EXECUTED 30021e8c: e1a01008 mov r1, r8 <== NOT EXECUTED 30021e90: e080000a add r0, r0, sl <== NOT EXECUTED 30021e94: ebffff99 bl 30021d00 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 30021ea8: e286005c add r0, r6, #92 ; 0x5c <== NOT EXECUTED 30021eac: e1a01008 mov r1, r8 <== NOT EXECUTED 30021eb0: ebffff92 bl 30021d00 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 30021eb4: e3a00000 mov r0, #0 ; 0x0 30021eb8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 30021ebc: 3003f565 .word 0x3003f565 30021ec0: 3003c2b0 .word 0x3003c2b0 30021ec4: 3003f5ae .word 0x3003f5ae 30021ec8: 3003f5b8 .word 0x3003f5b8 30021ecc: 30043468 .word 0x30043468 30021cd8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 30021cd8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED block_p *block_entry_ptr; block_p ptr; block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30021cdc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30021ce0: ebffff6d bl 30021a9c <== NOT EXECUTED ptr = *block_entry_ptr; 30021ce4: e5902000 ldr r2, [r0] <== NOT EXECUTED *block_entry_ptr = 0; 30021ce8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30021cec: e5803000 str r3, [r0] <== NOT EXECUTED memfile_free_block( ptr ); 30021cf0: e1a00002 mov r0, r2 <== NOT EXECUTED 30021cf4: ebffff53 bl 30021a48 <== NOT EXECUTED return 1; } 30021cf8: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30021cfc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30022208 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30022208: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 3002220c: e2509000 subs r9, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30022210: e24dd008 sub sp, sp, #8 ; 0x8 30022214: e1a05001 mov r5, r1 30022218: e1a08002 mov r8, r2 3002221c: e1a0a003 mov sl, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 30022220: 059f01d4 ldreq r0, [pc, #468] ; 300223fc 30022224: 059f11d4 ldreq r1, [pc, #468] ; 30022400 30022228: 059f21d4 ldreq r2, [pc, #468] ; 30022404 3002222c: 059f31d4 ldreq r3, [pc, #468] ; 30022408 30022230: 0a000006 beq 30022250 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30022234: e599304c ldr r3, [r9, #76] 30022238: e3530005 cmp r3, #5 ; 0x5 3002223c: 0a000004 beq 30022254 30022240: e59f01b4 ldr r0, [pc, #436] ; 300223fc <== NOT EXECUTED 30022244: e59f11c0 ldr r1, [pc, #448] ; 3002240c <== NOT EXECUTED 30022248: e59f21b4 ldr r2, [pc, #436] ; 30022404 <== NOT EXECUTED 3002224c: e59f31bc ldr r3, [pc, #444] ; 30022410 <== NOT EXECUTED 30022250: ebffe32e bl 3001af10 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 30022254: e3520000 cmp r2, #0 ; 0x0 30022258: 059f019c ldreq r0, [pc, #412] ; 300223fc 3002225c: 059f11b0 ldreq r1, [pc, #432] ; 30022414 30022260: 059f219c ldreq r2, [pc, #412] ; 30022404 30022264: 059f31ac ldreq r3, [pc, #428] ; 30022418 30022268: 0afffff8 beq 30022250 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 3002226c: e35a0000 cmp sl, #0 ; 0x0 30022270: 1a000002 bne 30022280 rtems_set_errno_and_return_minus_one( EINVAL ); 30022274: eb001f72 bl 3002a044 <__errno> <== NOT EXECUTED 30022278: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3002227c: ea000008 b 300222a4 <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 30022280: e5993050 ldr r3, [r9, #80] /* * 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; 30022284: e08a1001 add r1, sl, r1 if ( last_byte > the_jnode->info.file.size ) { 30022288: e1510003 cmp r1, r3 3002228c: 9a000007 bls 300222b0 status = IMFS_memfile_extend( the_jnode, last_byte ); 30022290: ebffff66 bl 30022030 if ( status ) 30022294: e3500000 cmp r0, #0 ; 0x0 30022298: 0a000004 beq 300222b0 rtems_set_errno_and_return_minus_one( ENOSPC ); 3002229c: eb001f68 bl 3002a044 <__errno> <== NOT EXECUTED 300222a0: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 300222a4: e5803000 str r3, [r0] <== NOT EXECUTED 300222a8: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 300222ac: ea00004f b 300223f0 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300222b0: e59f3164 ldr r3, [pc, #356] ; 3002241c 300222b4: e1a00005 mov r0, r5 300222b8: e5934000 ldr r4, [r3] 300222bc: e1a01004 mov r1, r4 300222c0: eb0060a8 bl 3003a568 <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300222c4: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300222c8: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300222cc: e1a00005 mov r0, r5 300222d0: eb006021 bl 3003a35c <__aeabi_idiv> if ( start_offset ) { 300222d4: e3560000 cmp r6, #0 ; 0x0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300222d8: e1a07000 mov r7, r0 if ( start_offset ) { 300222dc: 01a0500a moveq r5, sl 300222e0: 01a04006 moveq r4, r6 300222e4: 0a000012 beq 30022334 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 ); 300222e8: e1a00009 mov r0, r9 300222ec: e1a01007 mov r1, r7 300222f0: e3a02000 mov r2, #0 ; 0x0 300222f4: ebfffde8 bl 30021a9c assert( block_ptr ); 300222f8: e3500000 cmp r0, #0 ; 0x0 300222fc: 059f00f8 ldreq r0, [pc, #248] ; 300223fc 30022300: 059f1118 ldreq r1, [pc, #280] ; 30022420 30022304: 0a00002b beq 300223b8 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 ); 30022308: 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; 3002230c: e0664004 rsb r4, r6, r4 30022310: e154000a cmp r4, sl 30022314: 21a0400a movcs r4, 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 ); 30022318: e1a01008 mov r1, r8 3002231c: e0800006 add r0, r0, r6 30022320: e1a02004 mov r2, r4 30022324: eb0028be bl 3002c624 src += to_copy; 30022328: e0888004 add r8, r8, r4 block++; 3002232c: e2877001 add r7, r7, #1 ; 0x1 my_length -= to_copy; 30022330: e064500a rsb r5, r4, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 30022334: e59f30e0 ldr r3, [pc, #224] ; 3002241c while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30022338: e1a0a003 mov sl, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 3002233c: e5936000 ldr r6, [r3] 30022340: ea00000f b 30022384 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30022344: e1a00009 mov r0, r9 30022348: e1a01007 mov r1, r7 3002234c: e3a02000 mov r2, #0 ; 0x0 30022350: ebfffdd1 bl 30021a9c assert( block_ptr ); 30022354: e3500000 cmp r0, #0 ; 0x0 30022358: 059f009c ldreq r0, [pc, #156] ; 300223fc 3002235c: 059f10c0 ldreq r1, [pc, #192] ; 30022424 30022360: 0a000014 beq 300223b8 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 ); 30022364: e1a01008 mov r1, r8 30022368: e5900000 ldr r0, [r0] 3002236c: e1a02006 mov r2, r6 30022370: eb0028ab bl 3002c624 src += to_copy; 30022374: e0888006 add r8, r8, r6 block++; 30022378: e2877001 add r7, r7, #1 ; 0x1 my_length -= to_copy; 3002237c: e0665005 rsb r5, r6, r5 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30022380: e0844006 add r4, r4, r6 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30022384: e59a3000 ldr r3, [sl] 30022388: e1550003 cmp r5, r3 3002238c: 2affffec bcs 30022344 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 30022390: e3550000 cmp r5, #0 ; 0x0 30022394: 0a00000f beq 300223d8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30022398: e1a01007 mov r1, r7 3002239c: e1a00009 mov r0, r9 300223a0: e3a02000 mov r2, #0 ; 0x0 300223a4: ebfffdbc bl 30021a9c assert( block_ptr ); 300223a8: e3500000 cmp r0, #0 ; 0x0 300223ac: 1a000004 bne 300223c4 300223b0: e59f0044 ldr r0, [pc, #68] ; 300223fc <== NOT EXECUTED 300223b4: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED 300223b8: e59f2044 ldr r2, [pc, #68] ; 30022404 <== NOT EXECUTED 300223bc: e59f3064 ldr r3, [pc, #100] ; 30022428 <== NOT EXECUTED 300223c0: eaffffa2 b 30022250 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 300223c4: e5900000 ldr r0, [r0] 300223c8: e1a01008 mov r1, r8 300223cc: e1a02005 mov r2, r5 300223d0: eb002893 bl 3002c624 my_length = 0; copied += to_copy; 300223d4: e0844005 add r4, r4, r5 } IMFS_atime_mtime_update( the_jnode ); 300223d8: e1a0000d mov r0, sp 300223dc: e3a01000 mov r1, #0 ; 0x0 300223e0: ebff867c bl 30003dd8 300223e4: e59d3000 ldr r3, [sp] 300223e8: e5893040 str r3, [r9, #64] 300223ec: e5893044 str r3, [r9, #68] return copied; } 300223f0: e1a00004 mov r0, r4 300223f4: e28dd008 add sp, sp, #8 ; 0x8 300223f8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 300223fc: 3003f565 .word 0x3003f565 30022400: 000002e1 .word 0x000002e1 30022404: 3003c28b .word 0x3003c28b 30022408: 3003f5ae .word 0x3003f5ae 3002240c: 000002e5 .word 0x000002e5 30022410: 3003f5b8 .word 0x3003f5b8 30022414: 000002ed .word 0x000002ed 30022418: 3003f223 .word 0x3003f223 3002241c: 30043468 .word 0x30043468 30022420: 0000031a .word 0x0000031a 30022424: 0000032e .word 0x0000032e 30022428: 3003f5e8 .word 0x3003f5e8 3000825c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000825c: e92d4070 push {r4, r5, r6, lr} 30008260: e24dd03c sub sp, sp, #60 ; 0x3c 30008264: e1a06001 mov r6, r1 30008268: e1a05002 mov r5, r2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 3000826c: e28d1007 add r1, sp, #7 ; 0x7 30008270: e28d2038 add r2, sp, #56 ; 0x38 const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30008274: e1a04003 mov r4, r3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 30008278: ebffff82 bl 30008088 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 3000827c: e2063a0f and r3, r6, #61440 ; 0xf000 30008280: e3530901 cmp r3, #16384 ; 0x4000 30008284: 0a00000b beq 300082b8 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 30008288: e3530902 cmp r3, #32768 ; 0x8000 3000828c: 03a01005 moveq r1, #5 ; 0x5 30008290: 0a000009 beq 300082bc type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 30008294: e3530a02 cmp r3, #8192 ; 0x2000 30008298: 13530a06 cmpne r3, #24576 ; 0x6000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 3000829c: 058d5028 streq r5, [sp, #40] 300082a0: 058d402c streq r4, [sp, #44] 300082a4: 03a01002 moveq r1, #2 ; 0x2 if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 300082a8: 0a000003 beq 300082bc type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 300082ac: eb000c25 bl 3000b348 <__errno> <== NOT EXECUTED 300082b0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300082b4: ea00000b b 300082e8 <== NOT EXECUTED 300082b8: e3a01001 mov r1, #1 ; 0x1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 300082bc: e28dc028 add ip, sp, #40 ; 0x28 300082c0: e59d004c ldr r0, [sp, #76] 300082c4: e1a03006 mov r3, r6 300082c8: e28d2007 add r2, sp, #7 ; 0x7 300082cc: e58dc000 str ip, [sp] 300082d0: eb000941 bl 3000a7dc new_name, mode, &info ); if ( !new_node ) 300082d4: e3500000 cmp r0, #0 ; 0x0 300082d8: 13a00000 movne r0, #0 ; 0x0 300082dc: 1a000003 bne 300082f0 rtems_set_errno_and_return_minus_one( ENOMEM ); 300082e0: eb000c18 bl 3000b348 <__errno> <== NOT EXECUTED 300082e4: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 300082e8: e5803000 str r3, [r0] <== NOT EXECUTED 300082ec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED return 0; } 300082f0: e28dd03c add sp, sp, #60 ; 0x3c 300082f4: e8bd8070 pop {r4, r5, r6, pc} 3000362c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 3000362c: e5902008 ldr r2, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30003630: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30003634: e592304c ldr r3, [r2, #76] 30003638: e3530001 cmp r3, #1 ; 0x1 3000363c: 0a000004 beq 30003654 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30003640: eb009a7f bl 3002a044 <__errno> <== NOT EXECUTED 30003644: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 30003648: e5803000 str r3, [r0] <== NOT EXECUTED 3000364c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003650: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 30003654: e582005c str r0, [r2, #92] 30003658: e3a00000 mov r0, #0 ; 0x0 return 0; } 3000365c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30002750 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 30002750: e92d4030 push {r4, r5, lr} assert( the_jnode ); 30002754: e2504000 subs r4, r0, #0 ; 0x0 30002758: 059f0110 ldreq r0, [pc, #272] ; 30002870 3000275c: 03a01038 moveq r1, #56 ; 0x38 30002760: 059f210c ldreq r2, [pc, #268] ; 30002874 30002764: 059f310c ldreq r3, [pc, #268] ; 30002878 30002768: 0a00002e beq 30002828 fprintf(stdout, "%s", the_jnode->name ); 3000276c: e59f5108 ldr r5, [pc, #264] ; 3000287c 30002770: e284000c add r0, r4, #12 ; 0xc 30002774: e5953000 ldr r3, [r5] 30002778: e5931008 ldr r1, [r3, #8] 3000277c: eb0032fc bl 3000f374 switch( the_jnode->type ) { 30002780: e594204c ldr r2, [r4, #76] 30002784: e2423001 sub r3, r2, #1 ; 0x1 30002788: e3530005 cmp r3, #5 ; 0x5 3000278c: 979ff103 ldrls pc, [pc, r3, lsl #2] 30002790: ea00002c b 30002848 <== NOT EXECUTED 30002794: 300027ac .word 0x300027ac <== NOT EXECUTED 30002798: 300027c0 .word 0x300027c0 <== NOT EXECUTED 3000279c: 30002808 .word 0x30002808 <== NOT EXECUTED 300027a0: 3000282c .word 0x3000282c <== NOT EXECUTED 300027a4: 300027f0 .word 0x300027f0 <== NOT EXECUTED 300027a8: 300027d4 .word 0x300027d4 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 300027ac: e5953000 ldr r3, [r5] 300027b0: e3a0002f mov r0, #47 ; 0x2f 300027b4: e5931008 ldr r1, [r3, #8] 300027b8: eb0032b6 bl 3000f298 300027bc: ea000028 b 30002864 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 300027c0: e5952000 ldr r2, [r5] 300027c4: e5943054 ldr r3, [r4, #84] 300027c8: e5920008 ldr r0, [r2, #8] 300027cc: e59f10ac ldr r1, [pc, #172] ; 30002880 300027d0: ea000003 b 300027e4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 300027d4: e5952000 ldr r2, [r5] <== NOT EXECUTED 300027d8: e5943054 ldr r3, [r4, #84] <== NOT EXECUTED 300027dc: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 300027e0: e59f109c ldr r1, [pc, #156] ; 30002884 <== NOT EXECUTED 300027e4: e5942050 ldr r2, [r4, #80] 300027e8: eb003296 bl 3000f248 300027ec: ea00001c b 30002864 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 300027f0: e5953000 ldr r3, [r5] 300027f4: e5942050 ldr r2, [r4, #80] 300027f8: e5930008 ldr r0, [r3, #8] 300027fc: e59f1084 ldr r1, [pc, #132] ; 30002888 30002800: eb003290 bl 3000f248 30002804: ea000016 b 30002864 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 30002808: e5953000 ldr r3, [r5] <== NOT EXECUTED 3000280c: e59f0078 ldr r0, [pc, #120] ; 3000288c <== NOT EXECUTED 30002810: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 30002814: eb0032d6 bl 3000f374 <== NOT EXECUTED assert(0); 30002818: e59f0050 ldr r0, [pc, #80] ; 30002870 <== NOT EXECUTED 3000281c: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 30002820: e59f204c ldr r2, [pc, #76] ; 30002874 <== NOT EXECUTED 30002824: e59f3064 ldr r3, [pc, #100] ; 30002890 <== NOT EXECUTED 30002828: eb0001dc bl 30002fa0 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3000282c: e5953000 ldr r3, [r5] <== NOT EXECUTED 30002830: e59f0054 ldr r0, [pc, #84] ; 3000288c <== NOT EXECUTED 30002834: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 30002838: eb0032cd bl 3000f374 <== NOT EXECUTED assert(0); 3000283c: e59f002c ldr r0, [pc, #44] ; 30002870 <== NOT EXECUTED 30002840: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 30002844: eafffff5 b 30002820 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 30002848: e5953000 ldr r3, [r5] <== NOT EXECUTED 3000284c: e59f1040 ldr r1, [pc, #64] ; 30002894 <== NOT EXECUTED 30002850: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30002854: eb00327b bl 3000f248 <== NOT EXECUTED assert(0); 30002858: e59f0010 ldr r0, [pc, #16] ; 30002870 <== NOT EXECUTED 3000285c: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 30002860: eaffffee b 30002820 <== NOT EXECUTED break; } puts(""); 30002864: e59f002c ldr r0, [pc, #44] ; 30002898 } 30002868: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 3000286c: ea003979 b 30010e58 30002870: 3001b640 .word 0x3001b640 30002874: 3001a1ce .word 0x3001a1ce 30002878: 3001b68c .word 0x3001b68c 3000287c: 3001cc14 .word 0x3001cc14 30002880: 3001b696 .word 0x3001b696 30002884: 3001b6a9 .word 0x3001b6a9 30002888: 3001b6b8 .word 0x3001b6b8 3000288c: 3001b6c4 .word 0x3001b6c4 30002890: 3001b01c .word 0x3001b01c 30002894: 3001b6d8 .word 0x3001b6d8 30002898: 3001b87a .word 0x3001b87a 3000366c : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 3000366c: e590c000 ldr ip, [r0] int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 30003670: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 30003674: e59c304c ldr r3, [ip, #76] 30003678: e3530004 cmp r3, #4 ; 0x4 3000367c: 03a00000 moveq r0, #0 ; 0x0 30003680: 0a000006 beq 300036a0 rtems_set_errno_and_return_minus_one( EINVAL ); 30003684: eb009a6e bl 3002a044 <__errno> <== NOT EXECUTED 30003688: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3000368c: e5803000 str r3, [r0] <== NOT EXECUTED 30003690: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003694: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 30003698: e7c13000 strb r3, [r1, r0] node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 3000369c: e2800001 add r0, r0, #1 ; 0x1 300036a0: e1500002 cmp r0, r2 300036a4: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 300036a8: e59c3050 ldr r3, [ip, #80] 300036ac: e7d33000 ldrb r3, [r3, r0] 300036b0: e3530000 cmp r3, #0 ; 0x0 300036b4: 1afffff7 bne 30003698 buf[i] = node->info.sym_link.name[i]; return i; } 300036b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300083b4 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 300083b4: e5900000 ldr r0, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 300083b8: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 300083bc: e590304c ldr r3, [r0, #76] 300083c0: e2433002 sub r3, r3, #2 ; 0x2 300083c4: e3530004 cmp r3, #4 ; 0x4 300083c8: 979ff103 ldrls pc, [pc, r3, lsl #2] 300083cc: ea00000d b 30008408 <== NOT EXECUTED 300083d0: 300083e4 .word 0x300083e4 <== NOT EXECUTED 300083d4: 30008408 .word 0x30008408 <== NOT EXECUTED 300083d8: 300083fc .word 0x300083fc <== NOT EXECUTED 300083dc: 300083f4 .word 0x300083f4 <== NOT EXECUTED 300083e0: 300083f4 .word 0x300083f4 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 300083e4: e5903054 ldr r3, [r0, #84] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 300083e8: e5902050 ldr r2, [r0, #80] 300083ec: e881000c stm r1, {r2, r3} 300083f0: ea000009 b 3000841c break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 300083f4: e5903050 ldr r3, [r0, #80] 300083f8: ea000000 b 30008400 break; case IMFS_SYM_LINK: buf->st_size = 0; 300083fc: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30008400: e5813020 str r3, [r1, #32] 30008404: ea000004 b 3000841c break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 30008408: eb000bce bl 3000b348 <__errno> <== NOT EXECUTED 3000840c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008410: e5803000 str r3, [r0] <== NOT EXECUTED 30008414: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30008418: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 3000841c: e5903038 ldr r3, [r0, #56] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 30008420: e1d023b4 ldrh r2, [r0, #52] buf->st_ino = the_jnode->st_ino; 30008424: e5813008 str r3, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 30008428: e5903040 ldr r3, [r0, #64] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 3000842c: e1c121b0 strh r2, [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; 30008430: e5813024 str r3, [r1, #36] buf->st_mtime = the_jnode->stat_mtime; 30008434: e5903044 ldr r3, [r0, #68] } 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; 30008438: e1d0c3bc ldrh ip, [r0, #60] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 3000843c: e581302c str r3, [r1, #44] } 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; 30008440: e1c1c1b2 strh ip, [r1, #18] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 30008444: e5902030 ldr r2, [r0, #48] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 30008448: e5903048 ldr r3, [r0, #72] 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; 3000844c: e1d003be ldrh r0, [r0, #62] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 30008450: 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; buf->st_gid = the_jnode->st_gid; 30008454: e1c101b4 strh r0, [r1, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 30008458: e5813034 str r3, [r1, #52] 3000845c: e3a00000 mov r0, #0 ; 0x0 return 0; } 30008460: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300036bc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 300036bc: e92d4070 push {r4, r5, r6, lr} 300036c0: e24dd03c sub sp, sp, #60 ; 0x3c /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 300036c4: e28d6007 add r6, sp, #7 ; 0x7 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 300036c8: e1a04001 mov r4, r1 300036cc: e1a05000 mov r5, r0 /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 300036d0: e1a01006 mov r1, r6 300036d4: e1a00002 mov r0, r2 300036d8: e28d2038 add r2, sp, #56 ; 0x38 300036dc: ebffff03 bl 300032f0 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 300036e0: e1a00004 mov r0, r4 300036e4: eb00af2d bl 3002f3a0 if (info.sym_link.name == NULL) { 300036e8: e3500000 cmp r0, #0 ; 0x0 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 300036ec: e58d0028 str r0, [sp, #40] if (info.sym_link.name == NULL) { 300036f0: 0a00000b beq 30003724 /* * Create a new link node. */ new_node = IMFS_create_node( 300036f4: e28dc028 add ip, sp, #40 ; 0x28 300036f8: e1a00005 mov r0, r5 300036fc: e1a02006 mov r2, r6 30003700: e3a01004 mov r1, #4 ; 0x4 30003704: e59f3030 ldr r3, [pc, #48] ; 3000373c 30003708: e58dc000 str ip, [sp] 3000370c: eb005b24 bl 3001a3a4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30003710: e3500000 cmp r0, #0 ; 0x0 30003714: 13a00000 movne r0, #0 ; 0x0 30003718: 1a000005 bne 30003734 free( info.sym_link.name); 3000371c: e59d0028 ldr r0, [sp, #40] <== NOT EXECUTED 30003720: eb000184 bl 30003d38 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 30003724: eb009a46 bl 3002a044 <__errno> <== NOT EXECUTED 30003728: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3000372c: e5803000 str r3, [r0] <== NOT EXECUTED 30003730: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED } return 0; } 30003734: e28dd03c add sp, sp, #60 ; 0x3c 30003738: e8bd8070 pop {r4, r5, r6, pc} 3000373c: 0000a1ff .word 0x0000a1ff 30003740 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 30003740: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 30003744: e5906000 ldr r6, [r0] #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 30003748: e24dd018 sub sp, sp, #24 ; 0x18 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 3000374c: e596304c ldr r3, [r6, #76] #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 30003750: e1a04000 mov r4, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30003754: e3530003 cmp r3, #3 ; 0x3 30003758: 1a000020 bne 300037e0 if ( !node->info.hard_link.link_node ) 3000375c: e596c050 ldr ip, [r6, #80] 30003760: e35c0000 cmp ip, #0 ; 0x0 30003764: 1a000003 bne 30003778 rtems_set_errno_and_return_minus_one( EINVAL ); 30003768: eb009a35 bl 3002a044 <__errno> <== NOT EXECUTED 3000376c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30003770: e5803000 str r3, [r0] <== NOT EXECUTED 30003774: ea00000f b 300037b8 <== NOT EXECUTED the_link = *loc; 30003778: e890000f ldm r0, {r0, r1, r2, r3} 3000377c: e88d000f stm sp, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 30003780: e1a0000d mov r0, sp if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; 30003784: e58dc000 str ip, [sp] IMFS_Set_handlers( &the_link ); 30003788: eb005b63 bl 3001a51c /* * 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) 3000378c: e5962050 ldr r2, [r6, #80] if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 30003790: e1a0500d mov r5, sp /* * 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) 30003794: e1d233b4 ldrh r3, [r2, #52] 30003798: e3530001 cmp r3, #1 ; 0x1 3000379c: 1a000007 bne 300037c0 { result = (*the_link.handlers->rmnod_h)( &the_link ); 300037a0: e1a0000d mov r0, sp 300037a4: e59d3004 ldr r3, [sp, #4] 300037a8: e1a0e00f mov lr, pc 300037ac: e593f034 ldr pc, [r3, #52] if ( result != 0 ) 300037b0: e3500000 cmp r0, #0 ; 0x0 300037b4: 0a000009 beq 300037e0 300037b8: e3e00000 mvn r0, #0 ; 0x0 300037bc: ea00000b b 300037f0 return -1; } else { node->info.hard_link.link_node->st_nlink --; 300037c0: e2433001 sub r3, r3, #1 ; 0x1 300037c4: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( node->info.hard_link.link_node ); 300037c8: e28d0010 add r0, sp, #16 ; 0x10 300037cc: e3a01000 mov r1, #0 ; 0x0 300037d0: eb000180 bl 30003dd8 300037d4: e5962050 ldr r2, [r6, #80] 300037d8: e59d3010 ldr r3, [sp, #16] 300037dc: e5823048 str r3, [r2, #72] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 300037e0: e1a00004 mov r0, r4 300037e4: e5943004 ldr r3, [r4, #4] 300037e8: e1a0e00f mov lr, pc 300037ec: e593f034 ldr pc, [r3, #52] return result; } 300037f0: e28dd018 add sp, sp, #24 ; 0x18 300037f4: e8bd8070 pop {r4, r5, r6, pc} 300037f8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 300037f8: e5902008 ldr r2, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 300037fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30003800: e592304c ldr r3, [r2, #76] 30003804: e3530001 cmp r3, #1 ; 0x1 30003808: 0a000002 beq 30003818 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000380c: eb009a0c bl 3002a044 <__errno> <== NOT EXECUTED 30003810: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 30003814: ea000004 b 3000382c <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 30003818: e592305c ldr r3, [r2, #92] 3000381c: e3530000 cmp r3, #0 ; 0x0 30003820: 1a000004 bne 30003838 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 30003824: eb009a06 bl 3002a044 <__errno> <== NOT EXECUTED 30003828: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3000382c: e5803000 str r3, [r0] <== NOT EXECUTED 30003830: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003834: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 30003838: e3a03000 mov r3, #0 ; 0x0 3000383c: e582305c str r3, [r2, #92] 30003840: e1a00003 mov r0, r3 return 0; } 30003844: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300014a0 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 300014a0: e59f3094 ldr r3, [pc, #148] ; 3000153c void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 300014a4: e92d4070 push {r4, r5, r6, lr} #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 300014a8: e5933000 ldr r3, [r3] void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 300014ac: e1a04000 mov r4, r0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 300014b0: e3530000 cmp r3, #0 ; 0x0 void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 300014b4: e1a05001 mov r5, r1 300014b8: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->initialize)(); 300014bc: 11a0e00f movne lr, pc 300014c0: 1593f000 ldrne pc, [r3] /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 300014c4: eb001db5 bl 30008ba0 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 300014c8: e59f3070 ldr r3, [pc, #112] ; 30001540 300014cc: e5933000 ldr r3, [r3] 300014d0: e3530000 cmp r3, #0 ; 0x0 300014d4: 0a000004 beq 300014ec starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 300014d8: e1a00004 mov r0, r4 <== NOT EXECUTED 300014dc: e1a01006 mov r1, r6 <== NOT EXECUTED 300014e0: e1a0e00f mov lr, pc <== NOT EXECUTED 300014e4: e593f000 ldr pc, [r3] <== NOT EXECUTED 300014e8: e1a04000 mov r4, r0 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( rtems_configuration_get_do_zero_of_workspace() ) 300014ec: e59f3050 ldr r3, [pc, #80] ; 30001544 300014f0: e5933000 ldr r3, [r3] 300014f4: e5d33028 ldrb r3, [r3, #40] 300014f8: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, length ); 300014fc: 11a00004 movne r0, r4 30001500: 13a01000 movne r1, #0 ; 0x0 30001504: 11a02005 movne r2, r5 30001508: 1b002997 blne 3000bb6c void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 3000150c: e1a01004 mov r1, r4 30001510: e59f0030 ldr r0, [pc, #48] ; 30001548 30001514: e1a02005 mov r2, r5 30001518: e3a03004 mov r3, #4 ; 0x4 3000151c: eb000f4f bl 30005260 <_Heap_Initialize> &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 30001520: e3500000 cmp r0, #0 ; 0x0 rtems_fatal_error_occurred( status ); 30001524: 0b000d1b bleq 30004998 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 30001528: e59f201c ldr r2, [pc, #28] ; 3000154c 3000152c: e5923000 ldr r3, [r2] 30001530: e0853003 add r3, r5, r3 30001534: e5823000 str r3, [r2] } 30001538: e8bd8070 pop {r4, r5, r6, pc} 3000153c: 30015f1c .word 0x30015f1c 30001540: 30015f20 .word 0x30015f20 30001544: 300162fc .word 0x300162fc 30001548: 300160f8 .word 0x300160f8 3000154c: 30016150 .word 0x30016150 300027f8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 300027f8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 300027fc: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 30002800: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 30002804: 0a000047 beq 30002928 <== NOT EXECUTED return; if ( !print_handler ) 30002808: e59f3120 ldr r3, [pc, #288] ; 30002930 <== NOT EXECUTED 3000280c: e5938000 ldr r8, [r3] <== NOT EXECUTED 30002810: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 30002814: 0a000043 beq 30002928 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 30002818: e3740001 cmn r4, #1 ; 0x1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 3000281c: 159490f4 ldrne r9, [r4, #244] <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 30002820: 128460c4 addne r6, r4, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 30002824: 1a000006 bne 30002844 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 30002828: e59f2104 ldr r2, [pc, #260] ; 30002934 <== NOT EXECUTED 3000282c: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 30002830: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 30002834: 12844001 addne r4, r4, #1 ; 0x1 <== NOT EXECUTED 30002838: 11a06002 movne r6, r2 <== NOT EXECUTED 3000283c: 11a09004 movne r9, r4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 30002840: 0a000038 beq 30002928 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 30002844: e896000c ldm r6, {r2, r3} <== NOT EXECUTED 30002848: e2835010 add r5, r3, #16 ; 0x10 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 3000284c: e2427010 sub r7, r2, #16 ; 0x10 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 30002850: e1a00005 mov r0, r5 <== NOT EXECUTED 30002854: e1a01007 mov r1, r7 <== NOT EXECUTED 30002858: ebffffd8 bl 300027c0 <== NOT EXECUTED if ( high_water_mark ) 3000285c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 30002860: 10853007 addne r3, r5, r7 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 30002864: 01a0a000 moveq sl, r0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 30002868: 1060a003 rsbne sl, r0, r3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 3000286c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30002870: e59f00c0 ldr r0, [pc, #192] ; 30002938 <== NOT EXECUTED 30002874: 0a00000c beq 300028ac <== NOT EXECUTED (*print_handler)( 30002878: e5944008 ldr r4, [r4, #8] <== NOT EXECUTED 3000287c: e5905000 ldr r5, [r0] <== NOT EXECUTED 30002880: e28d200b add r2, sp, #11 ; 0xb <== NOT EXECUTED 30002884: e1a00004 mov r0, r4 <== NOT EXECUTED 30002888: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 3000288c: eb001315 bl 300074e8 <== NOT EXECUTED 30002890: e1a02004 mov r2, r4 <== NOT EXECUTED 30002894: e1a03000 mov r3, r0 <== NOT EXECUTED 30002898: e59f109c ldr r1, [pc, #156] ; 3000293c <== NOT EXECUTED 3000289c: e1a00005 mov r0, r5 <== NOT EXECUTED 300028a0: e1a0e00f mov lr, pc <== NOT EXECUTED 300028a4: e12fff18 bx r8 <== NOT EXECUTED 300028a8: ea000004 b 300028c0 <== 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 ); 300028ac: e5900000 ldr r0, [r0] <== NOT EXECUTED 300028b0: e59f1088 ldr r1, [pc, #136] ; 30002940 <== NOT EXECUTED 300028b4: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED 300028b8: e1a0e00f mov lr, pc <== NOT EXECUTED 300028bc: e12fff18 bx r8 <== NOT EXECUTED } (*print_handler)( 300028c0: e5963000 ldr r3, [r6] <== NOT EXECUTED 300028c4: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED 300028c8: e59f5068 ldr r5, [pc, #104] ; 30002938 <== NOT EXECUTED 300028cc: e58d9000 str r9, [sp] <== NOT EXECUTED 300028d0: e58d7004 str r7, [sp, #4] <== NOT EXECUTED 300028d4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300028d8: e0823003 add r3, r2, r3 <== NOT EXECUTED 300028dc: e59f404c ldr r4, [pc, #76] ; 30002930 <== NOT EXECUTED 300028e0: e5950000 ldr r0, [r5] <== NOT EXECUTED 300028e4: e59f1058 ldr r1, [pc, #88] ; 30002944 <== NOT EXECUTED 300028e8: e1a0e00f mov lr, pc <== NOT EXECUTED 300028ec: e594f000 ldr pc, [r4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 300028f0: e59f3050 ldr r3, [pc, #80] ; 30002948 <== NOT EXECUTED 300028f4: e5933000 ldr r3, [r3] <== NOT EXECUTED 300028f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300028fc: 1a000004 bne 30002914 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 30002900: e5950000 ldr r0, [r5] <== NOT EXECUTED 30002904: e59f1040 ldr r1, [pc, #64] ; 3000294c <== NOT EXECUTED 30002908: e1a0e00f mov lr, pc <== NOT EXECUTED 3000290c: e594f000 ldr pc, [r4] <== NOT EXECUTED 30002910: ea000004 b 30002928 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 30002914: e5950000 ldr r0, [r5] <== NOT EXECUTED 30002918: e1a0200a mov r2, sl <== NOT EXECUTED 3000291c: e59f102c ldr r1, [pc, #44] ; 30002950 <== NOT EXECUTED 30002920: e1a0e00f mov lr, pc <== NOT EXECUTED 30002924: e594f000 ldr pc, [r4] <== NOT EXECUTED } } 30002928: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 3000292c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30002930: 30043464 .word 0x30043464 30002934: 300564b0 .word 0x300564b0 30002938: 30043460 .word 0x30043460 3000293c: 3003d39b .word 0x3003d39b 30002940: 3003d3a8 .word 0x3003d3a8 30002944: 3003d3b6 .word 0x3003d3b6 30002948: 3004345c .word 0x3004345c 3000294c: 3003d3d4 .word 0x3003d3d4 30002950: 3003d3e1 .word 0x3003d3e1 300027c0 : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 300027c0: e3c11003 bic r1, r1, #3 ; 0x3 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 300027c4: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 300027c8: e0802001 add r2, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 300027cc: e59f1020 ldr r1, [pc, #32] ; 300027f4 <== NOT EXECUTED 300027d0: ea000003 b 300027e4 <== NOT EXECUTED 300027d4: e5903000 ldr r3, [r0] <== NOT EXECUTED 300027d8: e1530001 cmp r3, r1 <== NOT EXECUTED 300027dc: 112fff1e bxne lr <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 300027e0: e2800004 add r0, r0, #4 ; 0x4 <== NOT EXECUTED 300027e4: e1500002 cmp r0, r2 <== NOT EXECUTED 300027e8: 3afffff9 bcc 300027d4 <== NOT EXECUTED 300027ec: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 300027f0: e12fff1e bx lr <== NOT EXECUTED 300027f4: a5a5a5a5 .word 0xa5a5a5a5 300029d0 : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 300029d0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 300029d4: e1a05000 mov r5, r0 <== NOT EXECUTED 300029d8: e1a04001 mov r4, r1 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 300029dc: e59f0048 ldr r0, [pc, #72] ; 30002a2c <== NOT EXECUTED 300029e0: e1a01005 mov r1, r5 <== NOT EXECUTED 300029e4: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 300029e8: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 300029ec: eb0009ac bl 300050a4 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 300029f0: e59530c4 ldr r3, [r5, #196] <== NOT EXECUTED 300029f4: e59510c8 ldr r1, [r5, #200] <== NOT EXECUTED 300029f8: e2432001 sub r2, r3, #1 ; 0x1 <== NOT EXECUTED */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 300029fc: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 30002a00: e0812002 add r2, r1, r2 <== NOT EXECUTED 30002a04: e59f0024 ldr r0, [pc, #36] ; 30002a30 <== NOT EXECUTED 30002a08: eb0009a5 bl 300050a4 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 30002a0c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED printk( 30002a10: 059510c8 ldreq r1, [r5, #200] <== NOT EXECUTED 30002a14: 059f0018 ldreq r0, [pc, #24] ; 30002a34 <== NOT EXECUTED 30002a18: 02811008 addeq r1, r1, #8 ; 0x8 <== NOT EXECUTED 30002a1c: 03a02010 moveq r2, #16 ; 0x10 <== NOT EXECUTED 30002a20: 0b00099f bleq 300050a4 <== NOT EXECUTED " Damaged pattern begins at 0x%08lx and is %d bytes long\n", (unsigned long) Stack_check_Get_pattern_area(stack), PATTERN_SIZE_BYTES); } rtems_fatal_error_occurred( 0x81 ); 30002a24: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED 30002a28: eb0014ec bl 30007de0 <== NOT EXECUTED 30002a2c: 3003d448 .word 0x3003d448 30002a30: 3003d486 .word 0x3003d486 30002a34: 3003d4b4 .word 0x3003d4b4 30006930 <_CORE_RWLock_Release>: CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ISR_Level level; Thread_Control *executing = _Thread_Executing; 30006930: e59f30dc ldr r3, [pc, #220] ; 30006a14 <_CORE_RWLock_Release+0xe4> */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 30006934: e92d4010 push {r4, lr} ISR_Level level; Thread_Control *executing = _Thread_Executing; 30006938: e5931000 ldr r1, [r3] */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 3000693c: e1a04000 mov r4, r0 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 30006940: e10f2000 mrs r2, CPSR 30006944: e38230c0 orr r3, r2, #192 ; 0xc0 30006948: e129f003 msr CPSR_fc, r3 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 3000694c: e5903044 ldr r3, [r0, #68] 30006950: e3530000 cmp r3, #0 ; 0x0 30006954: 1a000003 bne 30006968 <_CORE_RWLock_Release+0x38> _ISR_Enable( level ); 30006958: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 3000695c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30006960: e5813034 str r3, [r1, #52] <== NOT EXECUTED 30006964: ea000028 b 30006a0c <_CORE_RWLock_Release+0xdc> <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 30006968: e3530001 cmp r3, #1 ; 0x1 3000696c: 1a000006 bne 3000698c <_CORE_RWLock_Release+0x5c> the_rwlock->number_of_readers -= 1; 30006970: e5903048 ldr r3, [r0, #72] 30006974: e2433001 sub r3, r3, #1 ; 0x1 if ( the_rwlock->number_of_readers != 0 ) { 30006978: e3530000 cmp r3, #0 ; 0x0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 3000697c: e5803048 str r3, [r0, #72] if ( the_rwlock->number_of_readers != 0 ) { 30006980: 0a000001 beq 3000698c <_CORE_RWLock_Release+0x5c> /* must be unlocked again */ _ISR_Enable( level ); 30006984: e129f002 msr CPSR_fc, r2 30006988: ea00001f b 30006a0c <_CORE_RWLock_Release+0xdc> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 3000698c: e3a03000 mov r3, #0 ; 0x0 30006990: e5813034 str r3, [r1, #52] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 30006994: e5843044 str r3, [r4, #68] _ISR_Enable( level ); 30006998: e129f002 msr CPSR_fc, r2 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 3000699c: e1a00004 mov r0, r4 300069a0: eb00055f bl 30007f24 <_Thread_queue_Dequeue> if ( next ) { 300069a4: e3500000 cmp r0, #0 ; 0x0 300069a8: 0a000017 beq 30006a0c <_CORE_RWLock_Release+0xdc> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 300069ac: e5903030 ldr r3, [r0, #48] 300069b0: e3530001 cmp r3, #1 ; 0x1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 300069b4: 02833001 addeq r3, r3, #1 ; 0x1 300069b8: 05843044 streq r3, [r4, #68] _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 300069bc: 0a000012 beq 30006a0c <_CORE_RWLock_Release+0xdc> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 300069c0: e5943048 ldr r3, [r4, #72] 300069c4: e2833001 add r3, r3, #1 ; 0x1 300069c8: e5843048 str r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 300069cc: e3a03001 mov r3, #1 ; 0x1 300069d0: e5843044 str r3, [r4, #68] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 300069d4: e1a00004 mov r0, r4 300069d8: eb000697 bl 3000843c <_Thread_queue_First> if ( !next || 300069dc: e2503000 subs r3, r0, #0 ; 0x0 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 300069e0: e1a01003 mov r1, r3 300069e4: e1a00004 mov r0, r4 /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 300069e8: 0a000007 beq 30006a0c <_CORE_RWLock_Release+0xdc> 300069ec: e5933030 ldr r3, [r3, #48] 300069f0: e3530001 cmp r3, #1 ; 0x1 300069f4: 0a000004 beq 30006a0c <_CORE_RWLock_Release+0xdc> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 300069f8: e5943048 ldr r3, [r4, #72] 300069fc: e2833001 add r3, r3, #1 ; 0x1 30006a00: e5843048 str r3, [r4, #72] _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 30006a04: eb000642 bl 30008314 <_Thread_queue_Extract> 30006a08: eafffff1 b 300069d4 <_CORE_RWLock_Release+0xa4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 30006a0c: e3a00000 mov r0, #0 ; 0x0 30006a10: e8bd8010 pop {r4, pc} 30006a14: 30018644 .word 0x30018644 30011b4c <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30011b4c: e590304c ldr r3, [r0, #76] size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 30011b50: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30011b54: e1520003 cmp r2, r3 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 30011b58: e1a07000 mov r7, r0 30011b5c: e1a06002 mov r6, r2 30011b60: e1a08001 mov r8, r1 30011b64: e59da020 ldr sl, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30011b68: 83a00001 movhi r0, #1 ; 0x1 30011b6c: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc} * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 30011b70: e5973048 ldr r3, [r7, #72] 30011b74: e3530000 cmp r3, #0 ; 0x0 *count = 0; 30011b78: 13a03000 movne r3, #0 ; 0x0 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 30011b7c: 01a05003 moveq r5, r3 * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 30011b80: 158a3000 strne r3, [sl] 30011b84: 11a00003 movne r0, r3 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 30011b88: 0a000005 beq 30011ba4 <_CORE_message_queue_Broadcast+0x58> 30011b8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30011b90: e594002c ldr r0, [r4, #44] 30011b94: eb001f1f bl 30019818 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011b98: e5943028 ldr r3, [r4, #40] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 30011b9c: e2855001 add r5, r5, #1 ; 0x1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011ba0: e5836000 str r6, [r3] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 30011ba4: e1a00007 mov r0, r7 30011ba8: eb00092b bl 3001405c <_Thread_queue_Dequeue> 30011bac: e2504000 subs r4, r0, #0 ; 0x0 30011bb0: e1a01008 mov r1, r8 30011bb4: e1a02006 mov r2, r6 30011bb8: 1afffff4 bne 30011b90 <_CORE_message_queue_Broadcast+0x44> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 30011bbc: e58a5000 str r5, [sl] 30011bc0: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30011bc4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3001021c <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 3001021c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30010220: e590c04c ldr ip, [r0, #76] CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 30010224: e1a05000 mov r5, r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30010228: e152000c cmp r2, ip CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 3001022c: e1a06002 mov r6, r2 30010230: e1a08001 mov r8, r1 30010234: e1a0b003 mov fp, r3 30010238: e59d9028 ldr r9, [sp, #40] 3001023c: e5dda02c ldrb sl, [sp, #44] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30010240: 83a00001 movhi r0, #1 ; 0x1 30010244: 88bd8ff0 pophi {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 30010248: e5957048 ldr r7, [r5, #72] 3001024c: e3570000 cmp r7, #0 ; 0x0 30010250: 1a00000b bne 30010284 <_CORE_message_queue_Submit+0x68> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 30010254: ebffea41 bl 3000ab60 <_Thread_queue_Dequeue> if ( the_thread ) { 30010258: e2504000 subs r4, r0, #0 ; 0x0 3001025c: 0a000008 beq 30010284 <_CORE_message_queue_Submit+0x68> 30010260: e1a01008 mov r1, r8 30010264: e594002c ldr r0, [r4, #44] 30010268: e1a02006 mov r2, r6 3001026c: eb0012c2 bl 30014d7c _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30010270: e5943028 ldr r3, [r4, #40] the_thread->Wait.count = submit_type; 30010274: e1a00007 mov r0, r7 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30010278: e5836000 str r6, [r3] the_thread->Wait.count = submit_type; 3001027c: e5849024 str r9, [r4, #36] 30010280: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 30010284: e5952048 ldr r2, [r5, #72] 30010288: e5953044 ldr r3, [r5, #68] 3001028c: e1520003 cmp r2, r3 30010290: 2a00000f bcs 300102d4 <_CORE_message_queue_Submit+0xb8> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 30010294: e2850068 add r0, r5, #104 ; 0x68 30010298: ebffe3e6 bl 30009238 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 3001029c: e2504000 subs r4, r0, #0 ; 0x0 300102a0: 0a000025 beq 3001033c <_CORE_message_queue_Submit+0x120> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 300102a4: e1a01008 mov r1, r8 300102a8: e1a02006 mov r2, r6 300102ac: e2840010 add r0, r4, #16 ; 0x10 300102b0: eb0012b1 bl 30014d7c size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 300102b4: e1a00005 mov r0, r5 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 300102b8: e584600c str r6, [r4, #12] the_message->priority = submit_type; 300102bc: e5849008 str r9, [r4, #8] _CORE_message_queue_Insert_message( 300102c0: e1a01004 mov r1, r4 300102c4: e1a02009 mov r2, r9 300102c8: eb000b3b bl 30012fbc <_CORE_message_queue_Insert_message> 300102cc: e3a00000 mov r0, #0 ; 0x0 300102d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 300102d4: e35a0000 cmp sl, #0 ; 0x0 300102d8: 03a00002 moveq r0, #2 ; 0x2 300102dc: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 300102e0: e59f305c ldr r3, [pc, #92] ; 30010344 <_CORE_message_queue_Submit+0x128> 300102e4: e5933000 ldr r3, [r3] 300102e8: e3530000 cmp r3, #0 ; 0x0 300102ec: 1a000012 bne 3001033c <_CORE_message_queue_Submit+0x120> * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 300102f0: e59f3050 ldr r3, [pc, #80] ; 30010348 <_CORE_message_queue_Submit+0x12c> 300102f4: e5932000 ldr r2, [r3] _ISR_Disable( level ); 300102f8: e10f1000 mrs r1, CPSR 300102fc: e38130c0 orr r3, r1, #192 ; 0xc0 30010300: e129f003 msr CPSR_fc, r3 30010304: e3a03001 mov r3, #1 ; 0x1 30010308: e5853030 str r3, [r5, #48] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 3001030c: e5829024 str r9, [r2, #36] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 30010310: e582b020 str fp, [r2, #32] executing->Wait.return_argument_second.immutable_object = buffer; 30010314: e582802c str r8, [r2, #44] executing->Wait.option = (uint32_t) size; 30010318: e5826030 str r6, [r2, #48] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 3001031c: e5825044 str r5, [r2, #68] executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 30010320: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 30010324: e59f2020 ldr r2, [pc, #32] ; 3001034c <_CORE_message_queue_Submit+0x130> 30010328: e1a00005 mov r0, r5 3001032c: e59d1030 ldr r1, [sp, #48] 30010330: ebffea63 bl 3000acc4 <_Thread_queue_Enqueue_with_handler> 30010334: e3a00007 mov r0, #7 ; 0x7 30010338: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 3001033c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 30010340: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30010344: 30024480 .word 0x30024480 30010348: 300244a4 .word 0x300244a4 3001034c: 3000b098 .word 0x3000b098 30009c5c <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 30009c5c: e59f3130 ldr r3, [pc, #304] ; 30009d94 <_CORE_mutex_Seize_interrupt_trylock+0x138> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009c60: e3a02000 mov r2, #0 ; 0x0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 30009c64: e593c000 ldr ip, [r3] CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 30009c68: e5911000 ldr r1, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009c6c: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 30009c70: e5903050 ldr r3, [r0, #80] #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 30009c74: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30009c78: e1530002 cmp r3, r2 30009c7c: 0a00002f beq 30009d40 <_CORE_mutex_Seize_interrupt_trylock+0xe4> the_mutex->lock = CORE_MUTEX_LOCKED; 30009c80: e5802050 str r2, [r0, #80] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 30009c84: e59c3008 ldr r3, [ip, #8] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 30009c88: e5902048 ldr r2, [r0, #72] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 30009c8c: e5803060 str r3, [r0, #96] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30009c90: e3520002 cmp r2, #2 ; 0x2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 30009c94: e3a03001 mov r3, #1 ; 0x1 30009c98: e5803054 str r3, [r0, #84] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 30009c9c: e580c05c str ip, [r0, #92] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30009ca0: 0a000001 beq 30009cac <_CORE_mutex_Seize_interrupt_trylock+0x50> 30009ca4: e3520003 cmp r2, #3 ; 0x3 30009ca8: 1a000002 bne 30009cb8 <_CORE_mutex_Seize_interrupt_trylock+0x5c> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 30009cac: e59c301c ldr r3, [ip, #28] 30009cb0: e2833001 add r3, r3, #1 ; 0x1 30009cb4: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 30009cb8: e5903048 ldr r3, [r0, #72] 30009cbc: e3530003 cmp r3, #3 ; 0x3 30009cc0: 0a000001 beq 30009ccc <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( level ); 30009cc4: e129f001 msr CPSR_fc, r1 30009cc8: ea00002d b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 30009ccc: e590204c ldr r2, [r0, #76] current = executing->current_priority; 30009cd0: e59c3014 ldr r3, [ip, #20] if ( current == ceiling ) { 30009cd4: e1530002 cmp r3, r2 30009cd8: 1a000001 bne 30009ce4 <_CORE_mutex_Seize_interrupt_trylock+0x88> _ISR_Enable( level ); 30009cdc: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30009ce0: ea000027 b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 30009ce4: 9a00000a bls 30009d14 <_CORE_mutex_Seize_interrupt_trylock+0xb8> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30009ce8: e59f20a8 ldr r2, [pc, #168] ; 30009d98 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 30009cec: e5923000 ldr r3, [r2] 30009cf0: e2833001 add r3, r3, #1 ; 0x1 30009cf4: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _ISR_Enable( level ); 30009cf8: e129f001 msr CPSR_fc, r1 _Thread_Change_priority( 30009cfc: e3a02000 mov r2, #0 ; 0x0 30009d00: e590104c ldr r1, [r0, #76] 30009d04: e590005c ldr r0, [r0, #92] 30009d08: ebffefda bl 30005c78 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 30009d0c: ebfff141 bl 30006218 <_Thread_Enable_dispatch> 30009d10: ea00001b b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 30009d14: e3a03006 mov r3, #6 ; 0x6 30009d18: e58c3034 str r3, [ip, #52] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 30009d1c: e3a03000 mov r3, #0 ; 0x0 30009d20: e5803054 str r3, [r0, #84] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 30009d24: e2833001 add r3, r3, #1 ; 0x1 30009d28: e5803050 str r3, [r0, #80] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 30009d2c: e59c301c ldr r3, [ip, #28] 30009d30: e2433001 sub r3, r3, #1 ; 0x1 30009d34: e58c301c str r3, [ip, #28] _ISR_Enable( level ); 30009d38: e129f001 msr CPSR_fc, r1 30009d3c: ea000010 b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 30009d40: e590205c ldr r2, [r0, #92] 30009d44: e152000c cmp r2, ip 30009d48: 1a00000f bne 30009d8c <_CORE_mutex_Seize_interrupt_trylock+0x130> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30009d4c: e5903040 ldr r3, [r0, #64] 30009d50: e3530000 cmp r3, #0 ; 0x0 30009d54: 0a000002 beq 30009d64 <_CORE_mutex_Seize_interrupt_trylock+0x108> 30009d58: e3530001 cmp r3, #1 ; 0x1 30009d5c: 1a00000a bne 30009d8c <_CORE_mutex_Seize_interrupt_trylock+0x130> 30009d60: ea000004 b 30009d78 <_CORE_mutex_Seize_interrupt_trylock+0x11c> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 30009d64: e5903054 ldr r3, [r0, #84] 30009d68: e2833001 add r3, r3, #1 ; 0x1 30009d6c: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 30009d70: e129f001 msr CPSR_fc, r1 30009d74: ea000002 b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 30009d78: e3a03002 mov r3, #2 ; 0x2 30009d7c: e5823034 str r3, [r2, #52] _ISR_Enable( level ); 30009d80: e129f001 msr CPSR_fc, r1 30009d84: e3a00000 mov r0, #0 ; 0x0 30009d88: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30009d8c: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 30009d90: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30009d94: 30016324 .word 0x30016324 30009d98: 3001626c .word 0x3001626c 30004f5c <_CORE_mutex_Surrender>: * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 30004f5c: e5d03044 ldrb r3, [r0, #68] CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 30004f60: e92d4010 push {r4, lr} * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 30004f64: e3530000 cmp r3, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 30004f68: e1a04000 mov r4, r0 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 30004f6c: e590005c ldr r0, [r0, #92] * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 30004f70: 0a000004 beq 30004f88 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 30004f74: e59f3130 ldr r3, [pc, #304] ; 300050ac <_CORE_mutex_Surrender+0x150> 30004f78: e5933000 ldr r3, [r3] 30004f7c: e1500003 cmp r0, r3 30004f80: 13a00003 movne r0, #3 ; 0x3 30004f84: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 30004f88: e5943054 ldr r3, [r4, #84] 30004f8c: e3530000 cmp r3, #0 ; 0x0 30004f90: 0a000043 beq 300050a4 <_CORE_mutex_Surrender+0x148> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 30004f94: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 30004f98: e3530000 cmp r3, #0 ; 0x0 /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 30004f9c: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 30004fa0: 0a000005 beq 30004fbc <_CORE_mutex_Surrender+0x60> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30004fa4: e5943040 ldr r3, [r4, #64] 30004fa8: e3530000 cmp r3, #0 ; 0x0 30004fac: 0a00003c beq 300050a4 <_CORE_mutex_Surrender+0x148> 30004fb0: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 30004fb4: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 30004fb8: 08bd8010 popeq {r4, pc} <== NOT EXECUTED 30004fbc: e5943048 ldr r3, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30004fc0: e3530002 cmp r3, #2 ; 0x2 30004fc4: 0a000001 beq 30004fd0 <_CORE_mutex_Surrender+0x74> 30004fc8: e3530003 cmp r3, #3 ; 0x3 30004fcc: 1a000002 bne 30004fdc <_CORE_mutex_Surrender+0x80> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 30004fd0: e590301c ldr r3, [r0, #28] 30004fd4: e2433001 sub r3, r3, #1 ; 0x1 30004fd8: e580301c str r3, [r0, #28] 30004fdc: e5942048 ldr r2, [r4, #72] } the_mutex->holder = NULL; 30004fe0: e3a03000 mov r3, #0 ; 0x0 /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30004fe4: e3520002 cmp r2, #2 ; 0x2 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 30004fe8: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 30004fec: e584305c str r3, [r4, #92] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30004ff0: 0a000001 beq 30004ffc <_CORE_mutex_Surrender+0xa0> 30004ff4: e3520003 cmp r2, #3 ; 0x3 30004ff8: 1a000007 bne 3000501c <_CORE_mutex_Surrender+0xc0> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 30004ffc: e590301c ldr r3, [r0, #28] 30005000: e3530000 cmp r3, #0 ; 0x0 30005004: 1a000004 bne 3000501c <_CORE_mutex_Surrender+0xc0> 30005008: e5901018 ldr r1, [r0, #24] 3000500c: e5903014 ldr r3, [r0, #20] 30005010: e1510003 cmp r1, r3 holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 30005014: 13a02001 movne r2, #1 ; 0x1 30005018: 1b000316 blne 30005c78 <_Thread_Change_priority> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 3000501c: e1a00004 mov r0, r4 30005020: eb00055d bl 3000659c <_Thread_queue_Dequeue> 30005024: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 30005028: 03a03001 moveq r3, #1 ; 0x1 3000502c: 05843050 streq r3, [r4, #80] 30005030: 01a00001 moveq r0, r1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 30005034: 08bd8010 popeq {r4, pc} } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30005038: e5913008 ldr r3, [r1, #8] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 3000503c: e5942048 ldr r2, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30005040: e5843060 str r3, [r4, #96] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30005044: e3520002 cmp r2, #2 ; 0x2 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 30005048: e3a03001 mov r3, #1 ; 0x1 3000504c: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 30005050: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30005054: 0a000002 beq 30005064 <_CORE_mutex_Surrender+0x108> 30005058: e3520003 cmp r2, #3 ; 0x3 3000505c: 1a000010 bne 300050a4 <_CORE_mutex_Surrender+0x148> 30005060: ea000004 b 30005078 <_CORE_mutex_Surrender+0x11c> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 30005064: e591301c ldr r3, [r1, #28] 30005068: e3a00000 mov r0, #0 ; 0x0 3000506c: e2833001 add r3, r3, #1 ; 0x1 30005070: e581301c str r3, [r1, #28] 30005074: e8bd8010 pop {r4, pc} case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 30005078: e591301c ldr r3, [r1, #28] if (the_mutex->Attributes.priority_ceiling < 3000507c: e5912014 ldr r2, [r1, #20] case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 30005080: e2833001 add r3, r3, #1 ; 0x1 30005084: e581301c str r3, [r1, #28] if (the_mutex->Attributes.priority_ceiling < 30005088: e594104c ldr r1, [r4, #76] 3000508c: e1510002 cmp r1, r2 30005090: 2a000003 bcs 300050a4 <_CORE_mutex_Surrender+0x148> the_thread->current_priority){ _Thread_Change_priority( 30005094: e3a02000 mov r2, #0 ; 0x0 30005098: eb0002f6 bl 30005c78 <_Thread_Change_priority> 3000509c: e3a00000 mov r0, #0 ; 0x0 300050a0: e8bd8010 pop {r4, pc} } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 300050a4: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 300050a8: e8bd8010 pop {r4, pc} 300050ac: 30016324 .word 0x30016324 3000588c <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 3000588c: e10f1000 mrs r1, CPSR 30005890: e38130c0 orr r3, r1, #192 ; 0xc0 30005894: e129f003 msr CPSR_fc, r3 /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 30005898: e5903004 ldr r3, [r0, #4] 3000589c: e3530000 cmp r3, #0 ; 0x0 300058a0: 1a000002 bne 300058b0 <_CORE_spinlock_Release+0x24> _ISR_Enable( level ); 300058a4: e129f001 msr CPSR_fc, r1 300058a8: e3a00006 mov r0, #6 ; 0x6 300058ac: e12fff1e bx lr } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 300058b0: e59f3040 ldr r3, [pc, #64] ; 300058f8 <_CORE_spinlock_Release+0x6c> 300058b4: e590200c ldr r2, [r0, #12] 300058b8: e5933000 ldr r3, [r3] 300058bc: e5933008 ldr r3, [r3, #8] 300058c0: e1520003 cmp r2, r3 300058c4: 0a000002 beq 300058d4 <_CORE_spinlock_Release+0x48> _ISR_Enable( level ); 300058c8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300058cc: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 300058d0: e12fff1e bx lr <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 300058d4: e5903008 ldr r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 300058d8: e3a02000 mov r2, #0 ; 0x0 } /* * Let it be unlocked. */ the_spinlock->users -= 1; 300058dc: e2433001 sub r3, r3, #1 ; 0x1 300058e0: e5803008 str r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 300058e4: e5802004 str r2, [r0, #4] the_spinlock->holder = 0; 300058e8: e580200c str r2, [r0, #12] _ISR_Enable( level ); 300058ec: e129f001 msr CPSR_fc, r1 300058f0: e3a00000 mov r0, #0 ; 0x0 return CORE_SPINLOCK_SUCCESSFUL; } 300058f4: e12fff1e bx lr 300058f8: 300118a4 .word 0x300118a4 300058fc <_CORE_spinlock_Wait>: bool wait, Watchdog_Interval timeout ) { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 300058fc: e59f3104 ldr r3, [pc, #260] ; 30005a08 <_CORE_spinlock_Wait+0x10c> CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 30005900: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 30005904: e5933000 ldr r3, [r3] CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 30005908: e1a05002 mov r5, r2 3000590c: e1a04000 mov r4, r0 30005910: e20180ff and r8, r1, #255 ; 0xff ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 30005914: e0827003 add r7, r2, r3 _ISR_Disable( level ); 30005918: e10f1000 mrs r1, CPSR 3000591c: e38130c0 orr r3, r1, #192 ; 0xc0 30005920: e129f003 msr CPSR_fc, r3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 30005924: e5903004 ldr r3, [r0, #4] 30005928: e3530001 cmp r3, #1 ; 0x1 3000592c: 1a000008 bne 30005954 <_CORE_spinlock_Wait+0x58> 30005930: e59f30d4 ldr r3, [pc, #212] ; 30005a0c <_CORE_spinlock_Wait+0x110> 30005934: e590200c ldr r2, [r0, #12] 30005938: e5933000 ldr r3, [r3] 3000593c: e5933008 ldr r3, [r3, #8] 30005940: e1520003 cmp r2, r3 30005944: 1a000002 bne 30005954 <_CORE_spinlock_Wait+0x58> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 30005948: e129f001 msr CPSR_fc, r1 3000594c: e3a00001 mov r0, #1 ; 0x1 30005950: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 30005954: e5943008 ldr r3, [r4, #8] } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 30005958: e59fa0a8 ldr sl, [pc, #168] ; 30005a08 <_CORE_spinlock_Wait+0x10c> if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 3000595c: e2833001 add r3, r3, #1 ; 0x1 30005960: e59f60a8 ldr r6, [pc, #168] ; 30005a10 <_CORE_spinlock_Wait+0x114> 30005964: e5843008 str r3, [r4, #8] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 30005968: e5943004 ldr r3, [r4, #4] 3000596c: e3530000 cmp r3, #0 ; 0x0 30005970: 1a000008 bne 30005998 <_CORE_spinlock_Wait+0x9c> the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 30005974: e59f3090 ldr r3, [pc, #144] ; 30005a0c <_CORE_spinlock_Wait+0x110> 30005978: e5932000 ldr r2, [r3] return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 3000597c: e3a03001 mov r3, #1 ; 0x1 30005980: e5843004 str r3, [r4, #4] the_spinlock->holder = _Thread_Executing->Object.id; 30005984: e5923008 ldr r3, [r2, #8] 30005988: e584300c str r3, [r4, #12] _ISR_Enable( level ); 3000598c: e129f001 msr CPSR_fc, r1 30005990: e3a00000 mov r0, #0 ; 0x0 30005994: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 30005998: e3580000 cmp r8, #0 ; 0x0 3000599c: 1a000005 bne 300059b8 <_CORE_spinlock_Wait+0xbc> the_spinlock->users -= 1; 300059a0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 300059a4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300059a8: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 300059ac: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300059b0: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED 300059b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 300059b8: e3550000 cmp r5, #0 ; 0x0 300059bc: 0a000008 beq 300059e4 <_CORE_spinlock_Wait+0xe8> 300059c0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 300059c4: e1570003 cmp r7, r3 <== NOT EXECUTED 300059c8: 8a000005 bhi 300059e4 <_CORE_spinlock_Wait+0xe8> <== NOT EXECUTED the_spinlock->users -= 1; 300059cc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 300059d0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300059d4: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 300059d8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300059dc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 300059e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 300059e4: e129f001 msr CPSR_fc, r1 /* An ISR could occur here */ _Thread_Enable_dispatch(); 300059e8: eb000424 bl 30006a80 <_Thread_Enable_dispatch> 300059ec: e5963000 ldr r3, [r6] 300059f0: e2833001 add r3, r3, #1 ; 0x1 300059f4: e5863000 str r3, [r6] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 300059f8: e10f1000 mrs r1, CPSR 300059fc: e38130c0 orr r3, r1, #192 ; 0xc0 30005a00: e129f003 msr CPSR_fc, r3 30005a04: eaffffd7 b 30005968 <_CORE_spinlock_Wait+0x6c> 30005a08: 30011944 .word 0x30011944 30005a0c: 300118a4 .word 0x300118a4 30005a10: 300117ec .word 0x300117ec 3001efe4 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 3001efe4: e10f2000 mrs r2, CPSR <== NOT EXECUTED 3001efe8: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 3001efec: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 3001eff0: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 3001eff4: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 3001eff8: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 3001effc: e5831004 str r1, [r3, #4] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 3001f000: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 3001f004: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 3001f008: e12fff1e bx lr <== NOT EXECUTED 30009b58 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 30009b58: e59f3010 ldr r3, [pc, #16] ; 30009b70 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 30009b5c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30009b60: e1100003 tst r0, r3 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 30009b64: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 30009b68: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 30009b6c: e12fff1e bx lr <== NOT EXECUTED 30009b70: 30016328 .word 0x30016328 30003e60 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 30003e60: e92d40f0 push {r4, r5, r6, r7, lr} 30003e64: e1a04000 mov r4, r0 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 30003e68: e5906104 ldr r6, [r0, #260] option_set = (rtems_option) the_thread->Wait.option; 30003e6c: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 30003e70: e10f5000 mrs r5, CPSR 30003e74: e38530c0 orr r3, r5, #192 ; 0xc0 30003e78: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 30003e7c: e596c000 ldr ip, [r6] event_condition = (rtems_event_set) the_thread->Wait.count; 30003e80: e5902024 ldr r2, [r0, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 30003e84: e012000c ands r0, r2, ip 30003e88: 1a000001 bne 30003e94 <_Event_Surrender+0x34> _ISR_Enable( level ); 30003e8c: e129f005 msr CPSR_fc, r5 30003e90: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 30003e94: e59f30f0 ldr r3, [pc, #240] ; 30003f8c <_Event_Surrender+0x12c> 30003e98: e5933000 ldr r3, [r3] 30003e9c: e3530000 cmp r3, #0 ; 0x0 30003ea0: 0a000019 beq 30003f0c <_Event_Surrender+0xac> 30003ea4: e59f30e4 ldr r3, [pc, #228] ; 30003f90 <_Event_Surrender+0x130> 30003ea8: e5933000 ldr r3, [r3] 30003eac: e1540003 cmp r4, r3 30003eb0: 1a000015 bne 30003f0c <_Event_Surrender+0xac> 30003eb4: e59f10d8 ldr r1, [pc, #216] ; 30003f94 <_Event_Surrender+0x134> 30003eb8: e5913000 ldr r3, [r1] 30003ebc: e3530001 cmp r3, #1 ; 0x1 30003ec0: 0a000002 beq 30003ed0 <_Event_Surrender+0x70> 30003ec4: e5913000 ldr r3, [r1] 30003ec8: e3530002 cmp r3, #2 ; 0x2 30003ecc: 1a00000e bne 30003f0c <_Event_Surrender+0xac> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 30003ed0: e1500002 cmp r0, r2 30003ed4: 0a000001 beq 30003ee0 <_Event_Surrender+0x80> 30003ed8: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 30003edc: 0a000008 beq 30003f04 <_Event_Surrender+0xa4> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 30003ee0: e1cc3000 bic r3, ip, r0 30003ee4: e5863000 str r3, [r6] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30003ee8: e59f30a4 ldr r3, [pc, #164] ; 30003f94 <_Event_Surrender+0x134> ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003eec: e5941028 ldr r1, [r4, #40] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30003ef0: e3a02003 mov r2, #3 ; 0x3 30003ef4: e5832000 str r2, [r3] _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 30003ef8: e3a03000 mov r3, #0 ; 0x0 30003efc: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f00: e5810000 str r0, [r1] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 30003f04: e129f005 msr CPSR_fc, r5 30003f08: e8bd80f0 pop {r4, r5, r6, r7, pc} } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 30003f0c: e5943010 ldr r3, [r4, #16] 30003f10: e3130c01 tst r3, #256 ; 0x100 30003f14: 0a00001a beq 30003f84 <_Event_Surrender+0x124> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 30003f18: e1500002 cmp r0, r2 30003f1c: 0a000001 beq 30003f28 <_Event_Surrender+0xc8> 30003f20: e3170002 tst r7, #2 ; 0x2 30003f24: 0a000016 beq 30003f84 <_Event_Surrender+0x124> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30003f28: e1cc3000 bic r3, ip, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f2c: e5942028 ldr r2, [r4, #40] /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30003f30: e5863000 str r3, [r6] the_thread->Wait.count = 0; 30003f34: e3a03000 mov r3, #0 ; 0x0 30003f38: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f3c: e5820000 str r0, [r2] _ISR_Flash( level ); 30003f40: e10f3000 mrs r3, CPSR 30003f44: e129f005 msr CPSR_fc, r5 30003f48: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 30003f4c: e5943050 ldr r3, [r4, #80] 30003f50: e3530002 cmp r3, #2 ; 0x2 30003f54: 0a000001 beq 30003f60 <_Event_Surrender+0x100> _ISR_Enable( level ); 30003f58: e129f005 msr CPSR_fc, r5 30003f5c: ea000004 b 30003f74 <_Event_Surrender+0x114> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 30003f60: e3a03003 mov r3, #3 ; 0x3 30003f64: e5843050 str r3, [r4, #80] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 30003f68: e129f005 msr CPSR_fc, r5 (void) _Watchdog_Remove( &the_thread->Timer ); 30003f6c: e2840048 add r0, r4, #72 ; 0x48 30003f70: eb000d41 bl 3000747c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 30003f74: e59f101c ldr r1, [pc, #28] ; 30003f98 <_Event_Surrender+0x138> 30003f78: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 30003f7c: e8bd40f0 pop {r4, r5, r6, r7, lr} 30003f80: ea0007a4 b 30005e18 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 30003f84: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30003f88: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30003f8c: 30016300 .word 0x30016300 30003f90: 30016324 .word 0x30016324 30003f94: 30016b10 .word 0x30016b10 30003f98: 1003fff8 .word 0x1003fff8 30003f9c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 30003f9c: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30003fa0: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 30003fa4: e1a0100d mov r1, sp 30003fa8: eb0008a3 bl 3000623c <_Thread_Get> switch ( location ) { 30003fac: e59d2000 ldr r2, [sp] 30003fb0: e3520000 cmp r2, #0 ; 0x0 30003fb4: 1a00001e bne 30004034 <_Event_Timeout+0x98> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 30003fb8: e10f1000 mrs r1, CPSR 30003fbc: e38130c0 orr r3, r1, #192 ; 0xc0 30003fc0: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 30003fc4: e5903024 ldr r3, [r0, #36] 30003fc8: e3530000 cmp r3, #0 ; 0x0 30003fcc: 1a000005 bne 30003fe8 <_Event_Timeout+0x4c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30003fd0: e59f2064 ldr r2, [pc, #100] ; 3000403c <_Event_Timeout+0xa0> <== NOT EXECUTED 30003fd4: e5923000 ldr r3, [r2] <== NOT EXECUTED 30003fd8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30003fdc: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 30003fe0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30003fe4: ea000012 b 30004034 <_Event_Timeout+0x98> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 30003fe8: e59f3050 ldr r3, [pc, #80] ; 30004040 <_Event_Timeout+0xa4> _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 30003fec: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 30003ff0: e5933000 ldr r3, [r3] 30003ff4: e1500003 cmp r0, r3 30003ff8: 1a000004 bne 30004010 <_Event_Timeout+0x74> Thread_blocking_operation_States sync = _Event_Sync_state; 30003ffc: e59f2040 ldr r2, [pc, #64] ; 30004044 <_Event_Timeout+0xa8> 30004000: e5923000 ldr r3, [r2] if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 30004004: e3530001 cmp r3, #1 ; 0x1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 30004008: 93a03002 movls r3, #2 ; 0x2 3000400c: 95823000 strls r3, [r2] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 30004010: e3a03006 mov r3, #6 ; 0x6 30004014: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 30004018: e129f001 msr CPSR_fc, r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000401c: e59f1024 ldr r1, [pc, #36] ; 30004048 <_Event_Timeout+0xac> 30004020: eb00077c bl 30005e18 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30004024: e59f2010 ldr r2, [pc, #16] ; 3000403c <_Event_Timeout+0xa0> 30004028: e5923000 ldr r3, [r2] 3000402c: e2433001 sub r3, r3, #1 ; 0x1 30004030: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 30004034: e28dd004 add sp, sp, #4 ; 0x4 30004038: e8bd8000 pop {pc} 3000403c: 3001626c .word 0x3001626c 30004040: 30016324 .word 0x30016324 30004044: 30016b10 .word 0x30016b10 30004048: 1003fff8 .word 0x1003fff8 30009e08 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 30009e08: e92d4070 push {r4, r5, r6, lr} 30009e0c: e1a04000 mov r4, r0 Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 30009e10: e5942014 ldr r2, [r4, #20] 30009e14: e1a00001 mov r0, r1 30009e18: e5941010 ldr r1, [r4, #16] 30009e1c: ebffed59 bl 30005388 <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 30009e20: e3500000 cmp r0, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 30009e24: 15945008 ldrne r5, [r4, #8] 30009e28: 13a06000 movne r6, #0 ; 0x0 30009e2c: 1a000012 bne 30009e7c <_Heap_Allocate+0x74> 30009e30: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 30009e34: e5953004 ldr r3, [r5, #4] 30009e38: e1530000 cmp r3, r0 30009e3c: 3a00000c bcc 30009e74 <_Heap_Allocate+0x6c> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 30009e40: e1a02000 mov r2, r0 30009e44: e1a01005 mov r1, r5 30009e48: e1a00004 mov r0, r4 30009e4c: ebffed5d bl 300053c8 <_Heap_Block_allocate> ptr = _Heap_User_area(the_block); stats->allocs += 1; stats->searches += search_count + 1; 30009e50: e594304c ldr r3, [r4, #76] if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 30009e54: e5942048 ldr r2, [r4, #72] stats->searches += search_count + 1; 30009e58: e2833001 add r3, r3, #1 ; 0x1 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 30009e5c: e2822001 add r2, r2, #1 ; 0x1 stats->searches += search_count + 1; 30009e60: e0833006 add r3, r3, r6 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 30009e64: e5842048 str r2, [r4, #72] stats->searches += search_count + 1; 30009e68: e584304c str r3, [r4, #76] 30009e6c: e2850008 add r0, r5, #8 ; 0x8 30009e70: ea000004 b 30009e88 <_Heap_Allocate+0x80> return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 30009e74: e5955008 ldr r5, [r5, #8] 30009e78: e2866001 add r6, r6, #1 ; 0x1 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 30009e7c: e1550004 cmp r5, r4 30009e80: 1affffeb bne 30009e34 <_Heap_Allocate+0x2c> 30009e84: e3a00000 mov r0, #0 ; 0x0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 30009e88: e5943044 ldr r3, [r4, #68] 30009e8c: e1530006 cmp r3, r6 stats->max_search = search_count; 30009e90: 35846044 strcc r6, [r4, #68] return ptr; } 30009e94: e8bd8070 pop {r4, r5, r6, pc} 300286fc <_Heap_Get_information>: Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 300286fc: e3a03000 mov r3, #0 ; 0x0 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 30028700: e92d4030 push {r4, r5, lr} 30028704: e1a0c001 mov ip, r1 the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; 30028708: e5813010 str r3, [r1, #16] Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3002870c: e5905024 ldr r5, [r0, #36] _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 30028710: e5813000 str r3, [r1] the_info->Free.total = 0; 30028714: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 30028718: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 3002871c: e581300c str r3, [r1, #12] the_info->Used.total = 0; 30028720: e5813014 str r3, [r1, #20] Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 30028724: e5902020 ldr r2, [r0, #32] 30028728: ea00001d b 300287a4 <_Heap_Get_information+0xa8> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3002872c: e5923004 ldr r3, [r2, #4] 30028730: e3c30001 bic r0, r3, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30028734: e0824000 add r4, r2, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 30028738: e5943004 ldr r3, [r4, #4] 3002873c: e3130001 tst r3, #1 ; 0x1 30028740: 0a000009 beq 3002876c <_Heap_Get_information+0x70> the_info->Used.number++; 30028744: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 30028748: e59c2014 ldr r2, [ip, #20] if ( the_info->Used.largest < the_size ) 3002874c: e59c1010 ldr r1, [ip, #16] while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 30028750: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 30028754: e1510000 cmp r1, r0 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 30028758: e0822000 add r2, r2, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 3002875c: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 30028760: e58c2014 str r2, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 30028764: 358c0010 strcc r0, [ip, #16] 30028768: ea00000c b 300287a0 <_Heap_Get_information+0xa4> } else { the_info->Free.number++; 3002876c: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 30028770: e99c0006 ldmib ip, {r1, r2} the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 30028774: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 30028778: e1510000 cmp r1, r0 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; the_info->Free.total += the_size; 3002877c: e0822000 add r2, r2, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 30028780: 358c0004 strcc r0, [ip, #4] the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 30028784: e58c3000 str r3, [ip] the_info->Free.total += the_size; 30028788: e58c2008 str r2, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 3002878c: e5943000 ldr r3, [r4] 30028790: e1500003 cmp r0, r3 30028794: 0a000001 beq 300287a0 <_Heap_Get_information+0xa4> 30028798: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3002879c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 300287a0: e1a02004 mov r2, r4 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 300287a4: e1520005 cmp r2, r5 300287a8: 1affffdf bne 3002872c <_Heap_Get_information+0x30> } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 300287ac: e59c3014 ldr r3, [ip, #20] 300287b0: e3a00000 mov r0, #0 ; 0x0 300287b4: e2833008 add r3, r3, #8 ; 0x8 300287b8: e58c3014 str r3, [ip, #20] return HEAP_GET_INFORMATION_SUCCESSFUL; } 300287bc: e8bd8030 pop {r4, r5, pc} 30013de8 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013de8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30013dec: e1a04001 mov r4, r1 Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 30013df0: e5901014 ldr r1, [r0, #20] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013df4: e24dd00c sub sp, sp, #12 ; 0xc Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 30013df8: e58d1004 str r1, [sp, #4] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 30013dfc: e59d1030 ldr r1, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013e00: e1a09003 mov r9, r3 uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 30013e04: e3a03000 mov r3, #0 ; 0x0 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 30013e08: e590c010 ldr ip, [r0, #16] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013e0c: e1a05000 mov r5, r0 uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 30013e10: e5893000 str r3, [r9] *avail_mem_size = 0; 30013e14: e5813000 str r3, [r1] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 30013e18: e5951010 ldr r1, [r5, #16] 30013e1c: e1a00004 mov r0, r4 void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013e20: e1a08002 mov r8, r2 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 30013e24: e58dc008 str ip, [sp, #8] 30013e28: ebfff8b5 bl 30012104 <__umodsi3> 30013e2c: e2443008 sub r3, r4, #8 ; 0x8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 30013e30: e5951020 ldr r1, [r5, #32] 30013e34: e5952024 ldr r2, [r5, #36] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 30013e38: e0607003 rsb r7, r0, r3 *old_mem_size = 0; *avail_mem_size = 0; _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 30013e3c: e1570001 cmp r7, r1 30013e40: 33a03000 movcc r3, #0 ; 0x0 30013e44: 23a03001 movcs r3, #1 ; 0x1 30013e48: e1570002 cmp r7, r2 30013e4c: 83a03000 movhi r3, #0 ; 0x0 30013e50: e3530000 cmp r3, #0 ; 0x0 30013e54: 0a000073 beq 30014028 <_Heap_Resize_block+0x240> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 30013e58: e597c004 ldr ip, [r7, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013e5c: e3cc3001 bic r3, ip, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30013e60: e0876003 add r6, r7, r3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013e64: e58d3000 str r3, [sp] old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 30013e68: e1560001 cmp r6, r1 30013e6c: 33a03000 movcc r3, #0 ; 0x0 30013e70: 23a03001 movcs r3, #1 ; 0x1 30013e74: e1560002 cmp r6, r2 30013e78: 83a03000 movhi r3, #0 ; 0x0 30013e7c: e3530000 cmp r3, #0 ; 0x0 30013e80: 0a000068 beq 30014028 <_Heap_Resize_block+0x240> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 30013e84: e5963004 ldr r3, [r6, #4] 30013e88: e3130001 tst r3, #1 ; 0x1 30013e8c: 0a000065 beq 30014028 <_Heap_Resize_block+0x240> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013e90: e3c3a001 bic sl, r3, #1 ; 0x1 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 30013e94: e1560002 cmp r6, r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30013e98: e086300a add r3, r6, sl 30013e9c: 15933004 ldrne r3, [r3, #4] 30013ea0: 03a02001 moveq r2, #1 ; 0x1 30013ea4: 12032001 andne r2, r3, #1 ; 0x1 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 30013ea8: e0643006 rsb r3, r4, r6 30013eac: e2830004 add r0, r3, #4 ; 0x4 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 30013eb0: e1580000 cmp r8, r0 /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 30013eb4: e5890000 str r0, [r9] !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 30013eb8: e202b0ff and fp, r2, #255 ; 0xff _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 30013ebc: e20c9001 and r9, ip, #1 ; 0x1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 30013ec0: 9a000019 bls 30013f2c <_Heap_Resize_block+0x144> /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 30013ec4: e35b0000 cmp fp, #0 ; 0x0 30013ec8: 1a000058 bne 30014030 <_Heap_Resize_block+0x248> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 30013ecc: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 30013ed0: e1a00004 mov r0, r4 30013ed4: e59d1008 ldr r1, [sp, #8] 30013ed8: ebfff889 bl 30012104 <__umodsi3> *value = r ? v - r + a : v; 30013edc: e3500000 cmp r0, #0 ; 0x0 30013ee0: 159dc008 ldrne ip, [sp, #8] 30013ee4: e59d2004 ldr r2, [sp, #4] 30013ee8: 1084300c addne r3, r4, ip 30013eec: 10604003 rsbne r4, r0, r3 30013ef0: e1540002 cmp r4, r2 30013ef4: 21a02004 movcs r2, r4 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 30013ef8: e152000a cmp r2, sl 30013efc: 8a00004b bhi 30014030 <_Heap_Resize_block+0x248> return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 30013f00: e1a01006 mov r1, r6 30013f04: e1a00005 mov r0, r5 30013f08: ebffc52e bl 300053c8 <_Heap_Block_allocate> _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 30013f0c: e59d1000 ldr r1, [sp] 30013f10: e0800001 add r0, r0, r1 30013f14: e1800009 orr r0, r0, r9 30013f18: e5870004 str r0, [r7, #4] --stats->used_blocks; 30013f1c: e5953040 ldr r3, [r5, #64] 30013f20: e2433001 sub r3, r3, #1 ; 0x1 30013f24: e5853040 str r3, [r5, #64] 30013f28: ea000039 b 30014014 <_Heap_Resize_block+0x22c> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 30013f2c: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 30013f30: e1a00004 mov r0, r4 30013f34: e59d1008 ldr r1, [sp, #8] 30013f38: ebfff871 bl 30012104 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 30013f3c: e0544000 subs r4, r4, r0 30013f40: 0a000033 beq 30014014 <_Heap_Resize_block+0x22c> /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 30013f44: e89d000c ldm sp, {r2, r3} 30013f48: e0640002 rsb r0, r4, r2 if (new_block_size < min_block_size) { 30013f4c: e1500003 cmp r0, r3 30013f50: 2a000005 bcs 30013f6c <_Heap_Resize_block+0x184> uint32_t delta = min_block_size - new_block_size; 30013f54: e0603003 rsb r3, r0, r3 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 30013f58: e0544003 subs r4, r4, r3 ++stats->resizes; 30013f5c: 05953054 ldreq r3, [r5, #84] 30013f60: 01a00004 moveq r0, r4 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 30013f64: 0a00002c beq 3001401c <_Heap_Resize_block+0x234> ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 30013f68: e0800003 add r0, r0, r3 <== NOT EXECUTED _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 30013f6c: e35b0000 cmp fp, #0 ; 0x0 30013f70: 1a000013 bne 30013fc4 <_Heap_Resize_block+0x1dc> /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 30013f74: e084200a add r2, r4, sl RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30013f78: e0871000 add r1, r7, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 30013f7c: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 30013f80: e3820001 orr r0, r2, #1 ; 0x1 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 30013f84: e5873004 str r3, [r7, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 30013f88: e786200a str r2, [r6, sl] _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 30013f8c: e5810004 str r0, [r1, #4] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 30013f90: e5953030 ldr r3, [r5, #48] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 30013f94: e596000c ldr r0, [r6, #12] 30013f98: e0833004 add r3, r3, r4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 30013f9c: e596c008 ldr ip, [r6, #8] 30013fa0: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 30013fa4: e59d3030 ldr r3, [sp, #48] 30013fa8: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 30013fac: e581c008 str ip, [r1, #8] block->prev = prev; 30013fb0: e581000c str r0, [r1, #12] 30013fb4: e5832000 str r2, [r3] next->prev = prev->next = block; 30013fb8: e5801008 str r1, [r0, #8] 30013fbc: e58c100c str r1, [ip, #12] 30013fc0: ea000013 b 30014014 <_Heap_Resize_block+0x22c> } else if (free_block_size >= min_block_size) { 30013fc4: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 30013fc8: e154000c cmp r4, ip <== NOT EXECUTED 30013fcc: 3a000010 bcc 30014014 <_Heap_Resize_block+0x22c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30013fd0: e0871000 add r1, r7, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 30013fd4: e1803009 orr r3, r0, r9 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 30013fd8: e3842001 orr r2, r4, #1 ; 0x1 <== NOT EXECUTED the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 30013fdc: e5873004 str r3, [r7, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 30013fe0: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 30013fe4: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30013fe8: e5952050 ldr r2, [r5, #80] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 30013fec: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30013ff0: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 30013ff4: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ _Heap_Free(the_heap, _Heap_User_area(next_block)); 30013ff8: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ --stats->frees; /* Don't count next call in stats */ 30013ffc: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 30014000: e1a00005 mov r0, r5 <== NOT EXECUTED 30014004: ebffd7a3 bl 30009e98 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 30014008: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED 3001400c: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 30014010: e5813000 str r3, [r1] <== NOT EXECUTED } } } ++stats->resizes; 30014014: e5953054 ldr r3, [r5, #84] 30014018: e3a00000 mov r0, #0 ; 0x0 3001401c: e2833001 add r3, r3, #1 ; 0x1 30014020: e5853054 str r3, [r5, #84] 30014024: ea000002 b 30014034 <_Heap_Resize_block+0x24c> return HEAP_RESIZE_SUCCESSFUL; 30014028: e3a00002 mov r0, #2 ; 0x2 3001402c: ea000000 b 30014034 <_Heap_Resize_block+0x24c> 30014030: e3a00001 mov r0, #1 ; 0x1 } 30014034: e28dd00c add sp, sp, #12 ; 0xc 30014038: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000d47c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000d47c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; 3000d480: e5907020 ldr r7, [r0, #32] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 3000d484: e2516000 subs r6, r1, #0 ; 0x0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d488: e5973004 ldr r3, [r7, #4] if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 3000d48c: b5906028 ldrlt r6, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d490: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000d494: e1a05000 mov r5, r0 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3000d498: e590b024 ldr fp, [r0, #36] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d49c: 13a04000 movne r4, #0 ; 0x0 3000d4a0: 1a000003 bne 3000d4b4 <_Heap_Walk+0x38> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 3000d4a4: e59f01a0 ldr r0, [pc, #416] ; 3000d64c <_Heap_Walk+0x1d0> <== NOT EXECUTED 3000d4a8: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d4ac: ebffdc41 bl 300045b8 <== NOT EXECUTED 3000d4b0: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 3000d4b4: e5972000 ldr r2, [r7] 3000d4b8: e5953010 ldr r3, [r5, #16] 3000d4bc: e1520003 cmp r2, r3 3000d4c0: 0a00004c beq 3000d5f8 <_Heap_Walk+0x17c> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 3000d4c4: e59f0184 ldr r0, [pc, #388] ; 3000d650 <_Heap_Walk+0x1d4> <== NOT EXECUTED 3000d4c8: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d4cc: ebffdc39 bl 300045b8 <== NOT EXECUTED 3000d4d0: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 3000d4d4: ea000047 b 3000d5f8 <_Heap_Walk+0x17c> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000d4d8: e5979004 ldr r9, [r7, #4] printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 3000d4dc: e5952020 ldr r2, [r5, #32] 3000d4e0: e3c9a001 bic sl, r9, #1 ; 0x1 3000d4e4: e5953024 ldr r3, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 3000d4e8: e087800a add r8, r7, sl 3000d4ec: e1580002 cmp r8, r2 3000d4f0: 33a01000 movcc r1, #0 ; 0x0 3000d4f4: 23a01001 movcs r1, #1 ; 0x1 3000d4f8: e1580003 cmp r8, r3 3000d4fc: 83a01000 movhi r1, #0 ; 0x0 3000d500: e3510000 cmp r1, #0 ; 0x0 3000d504: 1a000004 bne 3000d51c <_Heap_Walk+0xa0> if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 3000d508: e1a02008 mov r2, r8 <== NOT EXECUTED 3000d50c: e59f0140 ldr r0, [pc, #320] ; 3000d654 <_Heap_Walk+0x1d8> <== NOT EXECUTED 3000d510: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d514: ebffdc27 bl 300045b8 <== NOT EXECUTED 3000d518: ea000039 b 3000d604 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 3000d51c: e5983004 ldr r3, [r8, #4] 3000d520: e3130001 tst r3, #1 ; 0x1 3000d524: 1a00001e bne 3000d5a4 <_Heap_Walk+0x128> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 3000d528: e5983000 ldr r3, [r8] 3000d52c: e15a0003 cmp sl, r3 3000d530: 0a000003 beq 3000d544 <_Heap_Walk+0xc8> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 3000d534: e59f011c ldr r0, [pc, #284] ; 3000d658 <_Heap_Walk+0x1dc> <== NOT EXECUTED 3000d538: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d53c: ebffdc1d bl 300045b8 <== NOT EXECUTED 3000d540: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { 3000d544: e3190001 tst r9, #1 ; 0x1 3000d548: 1a000006 bne 3000d568 <_Heap_Walk+0xec> if (do_dump || error) printk("\n"); 3000d54c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000d550: 159f0104 ldrne r0, [pc, #260] ; 3000d65c <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000d554: 1bffdc17 blne 300045b8 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 3000d558: e59f0100 ldr r0, [pc, #256] ; 3000d660 <_Heap_Walk+0x1e4> <== NOT EXECUTED 3000d55c: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d560: ebffdc14 bl 300045b8 <== NOT EXECUTED 3000d564: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 3000d568: e5953008 ldr r3, [r5, #8] 3000d56c: ea000000 b 3000d574 <_Heap_Walk+0xf8> } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; 3000d570: e5933008 ldr r3, [r3, #8] error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 3000d574: e1530007 cmp r3, r7 3000d578: 11530005 cmpne r3, r5 3000d57c: 1afffffb bne 3000d570 <_Heap_Walk+0xf4> block = block->next; if(block != the_block) { 3000d580: e1530007 cmp r3, r7 3000d584: 0a000006 beq 3000d5a4 <_Heap_Walk+0x128> if (do_dump || error) printk("\n"); 3000d588: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000d58c: 159f00c8 ldrne r0, [pc, #200] ; 3000d65c <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000d590: 1bffdc08 blne 300045b8 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 3000d594: e59f00c8 ldr r0, [pc, #200] ; 3000d664 <_Heap_Walk+0x1e8> <== NOT EXECUTED 3000d598: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d59c: ebffdc05 bl 300045b8 <== NOT EXECUTED 3000d5a0: ea000001 b 3000d5ac <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 3000d5a4: e3540000 cmp r4, #0 ; 0x0 3000d5a8: 0a000002 beq 3000d5b8 <_Heap_Walk+0x13c> 3000d5ac: e59f00a8 ldr r0, [pc, #168] ; 3000d65c <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000d5b0: ebffdc00 bl 300045b8 <== NOT EXECUTED 3000d5b4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 3000d5b8: e5953014 ldr r3, [r5, #20] 3000d5bc: e15a0003 cmp sl, r3 printk("PASS: %d !block size is too small\n", source); 3000d5c0: 359f00a0 ldrcc r0, [pc, #160] ; 3000d668 <_Heap_Walk+0x1ec> 3000d5c4: 3a000005 bcc 3000d5e0 <_Heap_Walk+0x164> error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 3000d5c8: e1a0000a mov r0, sl 3000d5cc: e5951010 ldr r1, [r5, #16] 3000d5d0: eb0026c1 bl 300170dc <__umodsi3> 3000d5d4: e3500000 cmp r0, #0 ; 0x0 3000d5d8: 0a000003 beq 3000d5ec <_Heap_Walk+0x170> printk("PASS: %d !block size is misaligned\n", source); 3000d5dc: e59f0088 ldr r0, [pc, #136] ; 3000d66c <_Heap_Walk+0x1f0> <== NOT EXECUTED 3000d5e0: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d5e4: ebffdbf3 bl 300045b8 <== NOT EXECUTED 3000d5e8: ea000005 b 3000d604 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 3000d5ec: e3540000 cmp r4, #0 ; 0x0 3000d5f0: 1a000003 bne 3000d604 <_Heap_Walk+0x188> break; 3000d5f4: e1a07008 mov r7, r8 if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 3000d5f8: e157000b cmp r7, fp 3000d5fc: 1affffb5 bne 3000d4d8 <_Heap_Walk+0x5c> 3000d600: ea000005 b 3000d61c <_Heap_Walk+0x1a0> the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 3000d604: e1a0300b mov r3, fp <== NOT EXECUTED 3000d608: e59f0060 ldr r0, [pc, #96] ; 3000d670 <_Heap_Walk+0x1f4> <== NOT EXECUTED 3000d60c: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d610: e1a02007 mov r2, r7 <== NOT EXECUTED 3000d614: ebffdbe7 bl 300045b8 <== NOT EXECUTED 3000d618: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000d61c: e5973004 ldr r3, [r7, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 3000d620: e5950010 ldr r0, [r5, #16] 3000d624: e3c32001 bic r2, r3, #1 ; 0x1 3000d628: e1520000 cmp r2, r0 3000d62c: 0a000004 beq 3000d644 <_Heap_Walk+0x1c8> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 3000d630: e1a03000 mov r3, r0 <== NOT EXECUTED 3000d634: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d638: e59f0034 ldr r0, [pc, #52] ; 3000d674 <_Heap_Walk+0x1f8> <== NOT EXECUTED 3000d63c: ebffdbdd bl 300045b8 <== NOT EXECUTED 3000d640: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 3000d644: e1a00004 mov r0, r4 3000d648: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000d64c: 3001a1c4 .word 0x3001a1c4 3000d650: 3001a1fa .word 0x3001a1fa 3000d654: 3001a22c .word 0x3001a22c 3000d658: 3001a24f .word 0x3001a24f 3000d65c: 30019bd1 .word 0x30019bd1 3000d660: 3001a27a .word 0x3001a27a 3000d664: 3001a2a4 .word 0x3001a2a4 3000d668: 3001a2cd .word 0x3001a2cd 3000d66c: 3001a2f0 .word 0x3001a2f0 3000d670: 3001a314 .word 0x3001a314 3000d674: 3001a34f .word 0x3001a34f 3000a08c <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 3000a08c: e2400001 sub r0, r0, #1 ; 0x1 3000a090: e3500003 cmp r0, #3 ; 0x3 3000a094: 979ff100 ldrls pc, [pc, r0, lsl #2] 3000a098: ea00000b b 3000a0cc <_Objects_API_maximum_class+0x40> 3000a09c: 3000a0b4 .word 0x3000a0b4 <== NOT EXECUTED 3000a0a0: 3000a0ac .word 0x3000a0ac <== NOT EXECUTED 3000a0a4: 3000a0bc .word 0x3000a0bc <== NOT EXECUTED 3000a0a8: 3000a0c4 .word 0x3000a0c4 <== NOT EXECUTED 3000a0ac: e3a0000a mov r0, #10 ; 0xa 3000a0b0: e12fff1e bx lr 3000a0b4: e3a00002 mov r0, #2 ; 0x2 3000a0b8: e12fff1e bx lr 3000a0bc: e3a0000c mov r0, #12 ; 0xc 3000a0c0: e12fff1e bx lr case OBJECTS_INTERNAL_API: return OBJECTS_INTERNAL_CLASSES_LAST; case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; 3000a0c4: e3a00008 mov r0, #8 ; 0x8 3000a0c8: e12fff1e bx lr case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 3000a0cc: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } 3000a0d0: e12fff1e bx lr 30005580 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30005580: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 30005584: e1d060b8 ldrh r6, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005588: e1d041b0 ldrh r4, [r0, #16] */ void _Objects_Extend_information( Objects_Information *information ) { 3000558c: e24dd014 sub sp, sp, #20 ; 0x14 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005590: e1540006 cmp r4, r6 30005594: 33a07000 movcc r7, #0 ; 0x0 */ void _Objects_Extend_information( Objects_Information *information ) { 30005598: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 3000559c: 31a0a006 movcc sl, r6 300055a0: 31a08007 movcc r8, r7 300055a4: 3a00000f bcc 300055e8 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; 300055a8: e5909014 ldr r9, [r0, #20] 300055ac: e1a00004 mov r0, r4 300055b0: e1a01009 mov r1, r9 300055b4: eb00328e bl 30011ff4 <__aeabi_uidiv> 300055b8: e1a0a006 mov sl, r6 300055bc: e1a07000 mov r7, r0 300055c0: e3a08000 mov r8, #0 ; 0x0 300055c4: ea000005 b 300055e0 <_Objects_Extend_information+0x60> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 300055c8: e5953034 ldr r3, [r5, #52] 300055cc: e7933108 ldr r3, [r3, r8, lsl #2] 300055d0: e3530000 cmp r3, #0 ; 0x0 300055d4: 0a000003 beq 300055e8 <_Objects_Extend_information+0x68> break; else index_base += information->allocation_size; 300055d8: e08aa009 add sl, sl, r9 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 300055dc: e2888001 add r8, r8, #1 ; 0x1 300055e0: e1580007 cmp r8, r7 300055e4: 3afffff7 bcc 300055c8 <_Objects_Extend_information+0x48> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 300055e8: e15a0004 cmp sl, r4 300055ec: 3a000056 bcc 3000574c <_Objects_Extend_information+0x1cc> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 300055f0: e5d52012 ldrb r2, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 300055f4: e5953014 ldr r3, [r5, #20] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 300055f8: e3520000 cmp r2, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 300055fc: e0843003 add r3, r4, r3 30005600: e58d3004 str r3, [sp, #4] /* * Up the block count and maximum */ block_count++; 30005604: e2874001 add r4, r7, #1 ; 0x1 30005608: e0832006 add r2, r3, r6 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 3000560c: 0a000007 beq 30005630 <_Objects_Extend_information+0xb0> object_blocks = (void**) 30005610: e3a03003 mov r3, #3 ; 0x3 30005614: e0202493 mla r0, r3, r4, r2 30005618: e1a00100 lsl r0, r0, #2 3000561c: eb0007e8 bl 300075c4 <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 30005620: e3500000 cmp r0, #0 ; 0x0 30005624: e58d0000 str r0, [sp] 30005628: 1a000005 bne 30005644 <_Objects_Extend_information+0xc4> 3000562c: ea000078 b 30005814 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { object_blocks = (void**) 30005630: e3a03003 mov r3, #3 ; 0x3 30005634: e0202493 mla r0, r3, r4, r2 30005638: e1a00100 lsl r0, r0, #2 3000563c: eb0007e4 bl 300075d4 <_Workspace_Allocate_or_fatal_error> 30005640: e58d0000 str r0, [sp] * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005644: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005648: e59d1000 ldr r1, [sp] 3000564c: e1a02104 lsl r2, r4, #2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005650: e1530006 cmp r3, r6 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005654: e081b002 add fp, r1, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005658: 93a03000 movls r3, #0 ; 0x0 3000565c: e08b9002 add r9, fp, r2 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 30005660: 91a02003 movls r2, r3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005664: 9a000011 bls 300056b0 <_Objects_Extend_information+0x130> /* * 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, 30005668: e1a04107 lsl r4, r7, #2 3000566c: e5951034 ldr r1, [r5, #52] 30005670: e1a02004 mov r2, r4 30005674: e59d0000 ldr r0, [sp] 30005678: eb0018fc bl 3000ba70 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 3000567c: e1a02004 mov r2, r4 30005680: e5951030 ldr r1, [r5, #48] 30005684: e1a0000b mov r0, fp 30005688: eb0018f8 bl 3000ba70 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 3000568c: e1d521b0 ldrh r2, [r5, #16] 30005690: e1a00009 mov r0, r9 30005694: e0862002 add r2, r6, r2 30005698: e1a02102 lsl r2, r2, #2 3000569c: e595101c ldr r1, [r5, #28] 300056a0: eb0018f2 bl 3000ba70 300056a4: ea000003 b 300056b8 <_Objects_Extend_information+0x138> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 300056a8: e7892103 str r2, [r9, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 300056ac: e2833001 add r3, r3, #1 ; 0x1 300056b0: e1530006 cmp r3, r6 300056b4: 3afffffb bcc 300056a8 <_Objects_Extend_information+0x128> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300056b8: e3a03000 mov r3, #0 ; 0x0 inactive_per_block[block_count] = 0; 300056bc: e78b3107 str r3, [fp, r7, lsl #2] for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056c0: e5952014 ldr r2, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300056c4: e59dc000 ldr ip, [sp] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056c8: e08a0002 add r0, sl, r2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300056cc: e78c3107 str r3, [ip, r7, lsl #2] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056d0: e089110a add r1, r9, sl, lsl #2 300056d4: e1a0200a mov r2, sl 300056d8: ea000000 b 300056e0 <_Objects_Extend_information+0x160> index++ ) { local_table[ index ] = NULL; 300056dc: e5013004 str r3, [r1, #-4] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056e0: e1520000 cmp r2, r0 index++ ) { 300056e4: e2811004 add r1, r1, #4 ; 0x4 300056e8: e2822001 add r2, r2, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056ec: 3afffffa bcc 300056dc <_Objects_Extend_information+0x15c> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 300056f0: e10f0000 mrs r0, CPSR 300056f4: e38030c0 orr r3, r0, #192 ; 0xc0 300056f8: e129f003 msr CPSR_fc, r3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 300056fc: e5953000 ldr r3, [r5] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 30005700: e59dc004 ldr ip, [sp, #4] information->maximum_id = _Objects_Build_id( 30005704: e1d510b4 ldrh r1, [r5, #4] 30005708: e1a03c03 lsl r3, r3, #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 = maximum; 3000570c: e1a0280c lsl r2, ip, #16 information->maximum_id = _Objects_Build_id( 30005710: e3833801 orr r3, r3, #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 = maximum; 30005714: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 30005718: e1833d81 orr r3, r3, r1, lsl #27 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 3000571c: e59d1000 ldr r1, [sp] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 30005720: e1833002 orr r3, r3, r2 30005724: e585300c str r3, [r5, #12] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 30005728: e585b030 str fp, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 3000572c: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 30005730: e585901c str r9, [r5, #28] information->maximum = maximum; 30005734: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30005738: e5851034 str r1, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 3000573c: e129f000 msr CPSR_fc, r0 if ( old_tables ) 30005740: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 30005744: 11a00003 movne r0, r3 30005748: 1b000799 blne 300075b4 <_Workspace_Free> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 3000574c: e5d53012 ldrb r3, [r5, #18] 30005750: e5952014 ldr r2, [r5, #20] 30005754: e3530000 cmp r3, #0 ; 0x0 30005758: e5954034 ldr r4, [r5, #52] 3000575c: e5953018 ldr r3, [r5, #24] 30005760: 0a000007 beq 30005784 <_Objects_Extend_information+0x204> information->object_blocks[ block ] = 30005764: e0000392 mul r0, r2, r3 30005768: eb000795 bl 300075c4 <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 3000576c: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 30005770: e7840108 str r0, [r4, r8, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005774: e7933108 ldr r3, [r3, r8, lsl #2] 30005778: e3530000 cmp r3, #0 ; 0x0 3000577c: 1a000003 bne 30005790 <_Objects_Extend_information+0x210> 30005780: ea000023 b 30005814 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 30005784: e0000392 mul r0, r2, r3 30005788: eb000791 bl 300075d4 <_Workspace_Allocate_or_fatal_error> 3000578c: e7840108 str r0, [r4, r8, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30005790: e5953034 ldr r3, [r5, #52] 30005794: e28d4008 add r4, sp, #8 ; 0x8 30005798: e7931108 ldr r1, [r3, r8, lsl #2] 3000579c: e1a00004 mov r0, r4 300057a0: e5952014 ldr r2, [r5, #20] 300057a4: e5953018 ldr r3, [r5, #24] 300057a8: eb00111b bl 30009c1c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057ac: e1a0600a mov r6, sl /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 300057b0: e1a08108 lsl r8, r8, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057b4: e2857020 add r7, r5, #32 ; 0x20 300057b8: ea000008 b 300057e0 <_Objects_Extend_information+0x260> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 300057bc: e5953000 ldr r3, [r5] 300057c0: e1d520b4 ldrh r2, [r5, #4] 300057c4: e1a03c03 lsl r3, r3, #24 300057c8: e3833801 orr r3, r3, #65536 ; 0x10000 300057cc: e1833d82 orr r3, r3, r2, lsl #27 300057d0: e1833006 orr r3, r3, r6 300057d4: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057d8: ebfffd5b bl 30004d4c <_Chain_Append> index++; 300057dc: e2866001 add r6, r6, #1 ; 0x1 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 300057e0: e1a00004 mov r0, r4 300057e4: eb0010ff bl 30009be8 <_Chain_Get> 300057e8: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057ec: e1a0100c mov r1, ip 300057f0: e1a00007 mov r0, r7 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 300057f4: 1afffff0 bne 300057bc <_Objects_Extend_information+0x23c> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 300057f8: e5953014 ldr r3, [r5, #20] 300057fc: e5952030 ldr r2, [r5, #48] information->inactive += information->allocation_size; 30005800: e1d512bc ldrh r1, [r5, #44] _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005804: e7823008 str r3, [r2, r8] information->inactive += information->allocation_size; 30005808: e5953014 ldr r3, [r5, #20] 3000580c: e0833001 add r3, r3, r1 30005810: e1c532bc strh r3, [r5, #44] } 30005814: e28dd014 add sp, sp, #20 ; 0x14 30005818: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 300133dc <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300133dc: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 300133e0: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 300133e4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 300133e8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300133ec: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 300133f0: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300133f4: e1a05000 mov r5, r0 <== NOT EXECUTED 300133f8: e1a06002 mov r6, r2 <== NOT EXECUTED 300133fc: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 30013400: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 30013404: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 30013408: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 3001340c: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 30013410: e153000c cmp r3, ip <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 30013414: e1a01004 mov r1, r4 <== NOT EXECUTED 30013418: e1a00005 mov r0, r5 <== NOT EXECUTED 3001341c: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 30013420: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 30013424: 9a000005 bls 30013440 <_Objects_Get_next+0x64> <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 30013428: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 3001342c: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 30013430: e3e03000 mvn r3, #0 ; 0x0 <== NOT EXECUTED 30013434: e5873000 str r3, [r7] <== NOT EXECUTED 30013438: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001343c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 30013440: ebffda8b bl 30009e74 <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 30013444: e5963000 ldr r3, [r6] <== NOT EXECUTED 30013448: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001344c: 1affffec bne 30013404 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 30013450: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 30013454: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30006dd4 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 30006dd4: e92d4030 push {r4, r5, lr} Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 30006dd8: e2515000 subs r5, r1, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 30006ddc: e24dd004 sub sp, sp, #4 ; 0x4 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 30006de0: 03a00001 moveq r0, #1 ; 0x1 30006de4: 0a00001b beq 30006e58 <_Objects_Id_to_name+0x84> return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 30006de8: e3500000 cmp r0, #0 ; 0x0 30006dec: 059f3080 ldreq r3, [pc, #128] ; 30006e74 <_Objects_Id_to_name+0xa0> 30006df0: 11a01000 movne r1, r0 30006df4: 05933000 ldreq r3, [r3] 30006df8: 05931008 ldreq r1, [r3, #8] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 30006dfc: e1a03c21 lsr r3, r1, #24 30006e00: e2030007 and r0, r3, #7 ; 0x7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 30006e04: e2403001 sub r3, r0, #1 ; 0x1 30006e08: e3530003 cmp r3, #3 ; 0x3 30006e0c: 8a000010 bhi 30006e54 <_Objects_Id_to_name+0x80> 30006e10: ea000012 b 30006e60 <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 30006e14: e1a03da1 lsr r3, r1, #27 30006e18: e7900103 ldr r0, [r0, r3, lsl #2] if ( !information ) 30006e1c: e3500000 cmp r0, #0 ; 0x0 30006e20: 0a00000b beq 30006e54 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; if ( information->is_string ) 30006e24: e5d04038 ldrb r4, [r0, #56] 30006e28: e3540000 cmp r4, #0 ; 0x0 30006e2c: 1a000008 bne 30006e54 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 30006e30: e1a0200d mov r2, sp 30006e34: ebffffcb bl 30006d68 <_Objects_Get> if ( !the_object ) 30006e38: e3500000 cmp r0, #0 ; 0x0 30006e3c: 0a000004 beq 30006e54 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; *name = the_object->name; 30006e40: e590300c ldr r3, [r0, #12] 30006e44: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 30006e48: eb000216 bl 300076a8 <_Thread_Enable_dispatch> 30006e4c: e1a00004 mov r0, r4 30006e50: ea000000 b 30006e58 <_Objects_Id_to_name+0x84> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 30006e54: e3a00003 mov r0, #3 ; 0x3 } 30006e58: e28dd004 add sp, sp, #4 ; 0x4 30006e5c: e8bd8030 pop {r4, r5, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 30006e60: e59f3010 ldr r3, [pc, #16] ; 30006e78 <_Objects_Id_to_name+0xa4> 30006e64: e7930100 ldr r0, [r3, r0, lsl #2] 30006e68: e3500000 cmp r0, #0 ; 0x0 30006e6c: 1affffe8 bne 30006e14 <_Objects_Id_to_name+0x40> 30006e70: eafffff7 b 30006e54 <_Objects_Id_to_name+0x80> <== NOT EXECUTED 30006e74: 3001a744 .word 0x3001a744 30006e78: 3001a648 .word 0x3001a648 30011130 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 30011130: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 30011134: e252a000 subs sl, r2, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 30011138: e1a06000 mov r6, r0 3001113c: e1a08001 mov r8, r1 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 30011140: 03a00002 moveq r0, #2 ; 0x2 30011144: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return OBJECTS_INVALID_ADDRESS; if ( !name ) 30011148: e3510000 cmp r1, #0 ; 0x0 3001114c: 0a000016 beq 300111ac <_Objects_Name_to_id_string+0x7c> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 30011150: e1d671b0 ldrh r7, [r6, #16] 30011154: e3570000 cmp r7, #0 ; 0x0 30011158: 13a05001 movne r5, #1 ; 0x1 3001115c: 1a00000f bne 300111a0 <_Objects_Name_to_id_string+0x70> 30011160: ea000011 b 300111ac <_Objects_Name_to_id_string+0x7c> <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 30011164: e596301c ldr r3, [r6, #28] 30011168: e7934105 ldr r4, [r3, r5, lsl #2] return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 3001116c: e2855001 add r5, r5, #1 ; 0x1 the_object = information->local_table[ index ]; if ( !the_object ) 30011170: e3540000 cmp r4, #0 ; 0x0 30011174: 0a000009 beq 300111a0 <_Objects_Name_to_id_string+0x70> continue; if ( !the_object->name.name_p ) 30011178: e594300c ldr r3, [r4, #12] 3001117c: e2531000 subs r1, r3, #0 ; 0x0 30011180: 0a000006 beq 300111a0 <_Objects_Name_to_id_string+0x70> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 30011184: e1d623ba ldrh r2, [r6, #58] 30011188: eb000c19 bl 300141f4 3001118c: e3500000 cmp r0, #0 ; 0x0 30011190: 1a000002 bne 300111a0 <_Objects_Name_to_id_string+0x70> *id = the_object->id; 30011194: e5943008 ldr r3, [r4, #8] 30011198: e58a3000 str r3, [sl] 3001119c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 300111a0: e1550007 cmp r5, r7 continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 300111a4: e1a00008 mov r0, r8 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 300111a8: 9affffed bls 30011164 <_Objects_Name_to_id_string+0x34> 300111ac: e3a00001 mov r0, #1 ; 0x1 } } } return OBJECTS_INVALID_NAME; } 300111b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30004a70 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 30004a70: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 30004a74: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 30004a78: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 30004a7c: 0a000006 beq 30004a9c <_POSIX_Condition_variables_Get+0x2c> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 30004a80: e5953000 ldr r3, [r5] 30004a84: e3730001 cmn r3, #1 ; 0x1 30004a88: 1a000007 bne 30004aac <_POSIX_Condition_variables_Get+0x3c> /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 30004a8c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30004a90: eb00000b bl 30004ac4 <== NOT EXECUTED if ( status ) { 30004a94: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30004a98: 0a000003 beq 30004aac <_POSIX_Condition_variables_Get+0x3c> <== NOT EXECUTED *location = OBJECTS_ERROR; 30004a9c: e3a03001 mov r3, #1 ; 0x1 30004aa0: e5843000 str r3, [r4] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 30004aa4: e3a00000 mov r0, #0 ; 0x0 30004aa8: e8bd8030 pop {r4, r5, pc} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 30004aac: e5951000 ldr r1, [r5] 30004ab0: e59f0008 ldr r0, [pc, #8] ; 30004ac0 <_POSIX_Condition_variables_Get+0x50> 30004ab4: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 30004ab8: e8bd4030 pop {r4, r5, lr} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 30004abc: ea000b08 b 300076e4 <_Objects_Get> 30004ac0: 30015084 .word 0x30015084 30004c58 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30004c58: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30004c5c: e1a06001 mov r6, r1 30004c60: e24dd004 sub sp, sp, #4 ; 0x4 30004c64: e1a07000 mov r7, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 30004c68: e1a0100d mov r1, sp 30004c6c: e1a00006 mov r0, r6 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30004c70: e1a0a002 mov sl, r2 30004c74: e20380ff and r8, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 30004c78: eb000070 bl 30004e40 <_POSIX_Mutex_Get> 30004c7c: e3500000 cmp r0, #0 ; 0x0 30004c80: 0a000032 beq 30004d50 <_POSIX_Condition_variables_Wait_support+0xf8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30004c84: e59f30d4 ldr r3, [pc, #212] ; 30004d60 <_POSIX_Condition_variables_Wait_support+0x108> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30004c88: e1a0100d mov r1, sp 30004c8c: e5932000 ldr r2, [r3] 30004c90: e1a00007 mov r0, r7 30004c94: e2422001 sub r2, r2, #1 ; 0x1 30004c98: e5832000 str r2, [r3] 30004c9c: ebffff73 bl 30004a70 <_POSIX_Condition_variables_Get> switch ( location ) { 30004ca0: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30004ca4: e1a05000 mov r5, r0 switch ( location ) { 30004ca8: e3530000 cmp r3, #0 ; 0x0 30004cac: 1a000027 bne 30004d50 <_POSIX_Condition_variables_Wait_support+0xf8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 30004cb0: e5902014 ldr r2, [r0, #20] 30004cb4: e3520000 cmp r2, #0 ; 0x0 30004cb8: 0a000004 beq 30004cd0 <_POSIX_Condition_variables_Wait_support+0x78> 30004cbc: e5963000 ldr r3, [r6] 30004cc0: e1520003 cmp r2, r3 30004cc4: 0a000001 beq 30004cd0 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 30004cc8: eb000c89 bl 30007ef4 <_Thread_Enable_dispatch> <== NOT EXECUTED 30004ccc: ea00001f b 30004d50 <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 30004cd0: e1a00006 mov r0, r6 30004cd4: eb0000df bl 30005058 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 30004cd8: e3580000 cmp r8, #0 ; 0x0 30004cdc: 1a000015 bne 30004d38 <_POSIX_Condition_variables_Wait_support+0xe0> the_cond->Mutex = *mutex; 30004ce0: e5963000 ldr r3, [r6] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30004ce4: e59f4078 ldr r4, [pc, #120] ; 30004d64 <_POSIX_Condition_variables_Wait_support+0x10c> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 30004ce8: e5853014 str r3, [r5, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30004cec: e5942000 ldr r2, [r4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 30004cf0: e5973000 ldr r3, [r7] 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; 30004cf4: e285c018 add ip, r5, #24 ; 0x18 _Thread_Executing->Wait.id = *cond; 30004cf8: e5823020 str r3, [r2, #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; 30004cfc: e3a03001 mov r3, #1 ; 0x1 30004d00: e5853048 str r3, [r5, #72] 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; 30004d04: e582c044 str ip, [r2, #68] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30004d08: e5828034 str r8, [r2, #52] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 30004d0c: e1a0000c mov r0, ip 30004d10: e1a0100a mov r1, sl 30004d14: e59f204c ldr r2, [pc, #76] ; 30004d68 <_POSIX_Condition_variables_Wait_support+0x110> 30004d18: eb000daf bl 300083dc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 30004d1c: eb000c74 bl 30007ef4 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 30004d20: e5943000 ldr r3, [r4] 30004d24: e5934034 ldr r4, [r3, #52] if ( status && status != ETIMEDOUT ) 30004d28: e3540000 cmp r4, #0 ; 0x0 30004d2c: 13540074 cmpne r4, #116 ; 0x74 30004d30: 0a000002 beq 30004d40 <_POSIX_Condition_variables_Wait_support+0xe8> 30004d34: ea000006 b 30004d54 <_POSIX_Condition_variables_Wait_support+0xfc> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 30004d38: eb000c6d bl 30007ef4 <_Thread_Enable_dispatch> 30004d3c: e3a04074 mov r4, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 30004d40: e1a00006 mov r0, r6 30004d44: eb0000a2 bl 30004fd4 if ( mutex_status ) 30004d48: e3500000 cmp r0, #0 ; 0x0 30004d4c: 0a000000 beq 30004d54 <_POSIX_Condition_variables_Wait_support+0xfc> 30004d50: e3a04016 mov r4, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30004d54: e1a00004 mov r0, r4 30004d58: e28dd004 add sp, sp, #4 ; 0x4 30004d5c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30004d60: 30014c6c .word 0x30014c6c 30004d64: 30014d24 .word 0x30014d24 30004d68: 30008820 .word 0x30008820 3000fd60 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 3000fd60: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000fd64: e1a0a001 mov sl, r1 3000fd68: e24dd010 sub sp, sp, #16 ; 0x10 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 3000fd6c: e3a010ff mov r1, #255 ; 0xff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 3000fd70: e1a04002 mov r4, r2 3000fd74: e1a0b003 mov fp, r3 3000fd78: e1a09000 mov r9, r0 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 3000fd7c: eb0011b0 bl 30014444 if ( n > NAME_MAX ) 3000fd80: e35000ff cmp r0, #255 ; 0xff CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 3000fd84: e1a06000 mov r6, r0 if ( n > NAME_MAX ) 3000fd88: 83a0005b movhi r0, #91 ; 0x5b 3000fd8c: 8a00004b bhi 3000fec0 <_POSIX_Message_queue_Create_support+0x160> 3000fd90: e59f2130 ldr r2, [pc, #304] ; 3000fec8 <_POSIX_Message_queue_Create_support+0x168> 3000fd94: e5923000 ldr r3, [r2] 3000fd98: e2833001 add r3, r3, #1 ; 0x1 3000fd9c: e5823000 str r3, [r2] * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 3000fda0: e3540000 cmp r4, #0 ; 0x0 3000fda4: 03a08010 moveq r8, #16 ; 0x10 3000fda8: 03a0700a moveq r7, #10 ; 0xa 3000fdac: 0a00000d beq 3000fde8 <_POSIX_Message_queue_Create_support+0x88> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 3000fdb0: e5943004 ldr r3, [r4, #4] 3000fdb4: e3530000 cmp r3, #0 ; 0x0 3000fdb8: da000002 ble 3000fdc8 <_POSIX_Message_queue_Create_support+0x68> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 3000fdbc: e5943008 ldr r3, [r4, #8] 3000fdc0: e3530000 cmp r3, #0 ; 0x0 3000fdc4: ca000003 bgt 3000fdd8 <_POSIX_Message_queue_Create_support+0x78> _Thread_Enable_dispatch(); 3000fdc8: ebfff418 bl 3000ce30 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 3000fdcc: eb0009eb bl 30012580 <__errno> 3000fdd0: e3a03016 mov r3, #22 ; 0x16 3000fdd4: ea00002f b 3000fe98 <_POSIX_Message_queue_Create_support+0x138> } attr = *attr_ptr; 3000fdd8: e894000f ldm r4, {r0, r1, r2, r3} 3000fddc: e88d000f stm sp, {r0, r1, r2, r3} 3000fde0: e1a08002 mov r8, r2 3000fde4: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 3000fde8: e59f50dc ldr r5, [pc, #220] ; 3000fecc <_POSIX_Message_queue_Create_support+0x16c> 3000fdec: e1a00005 mov r0, r5 3000fdf0: ebfff0af bl 3000c0b4 <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 3000fdf4: e2504000 subs r4, r0, #0 ; 0x0 3000fdf8: 1a000003 bne 3000fe0c <_POSIX_Message_queue_Create_support+0xac> _Thread_Enable_dispatch(); 3000fdfc: ebfff40b bl 3000ce30 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 3000fe00: eb0009de bl 30012580 <__errno> <== NOT EXECUTED 3000fe04: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED 3000fe08: ea000022 b 3000fe98 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } the_mq->process_shared = pshared; the_mq->named = TRUE; 3000fe0c: e3a03001 mov r3, #1 ; 0x1 /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 3000fe10: e1a00006 mov r0, r6 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 3000fe14: e584a010 str sl, [r4, #16] the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 3000fe18: e5c43015 strb r3, [r4, #21] _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 3000fe1c: e5c43014 strb r3, [r4, #20] the_mq->open_count = 1; 3000fe20: e5843018 str r3, [r4, #24] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 3000fe24: ebfff930 bl 3000e2ec <_Workspace_Allocate> if (!name) { 3000fe28: e2506000 subs r6, r0, #0 ; 0x0 3000fe2c: 1a000006 bne 3000fe4c <_POSIX_Message_queue_Create_support+0xec> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 3000fe30: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fe34: e1a01004 mov r1, r4 <== NOT EXECUTED 3000fe38: ebfff16c bl 3000c3f0 <_Objects_Free> <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 3000fe3c: ebfff3fb bl 3000ce30 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 3000fe40: eb0009ce bl 30012580 <__errno> <== NOT EXECUTED 3000fe44: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3000fe48: ea000012 b 3000fe98 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } strcpy( name, name_arg ); 3000fe4c: e1a01009 mov r1, r9 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 3000fe50: e3a0a000 mov sl, #0 ; 0x0 if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 3000fe54: eb000f01 bl 30013a60 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 3000fe58: e584a05c str sl, [r4, #92] if ( ! _CORE_message_queue_Initialize( 3000fe5c: e1a02007 mov r2, r7 3000fe60: e1a03008 mov r3, r8 3000fe64: e284001c add r0, r4, #28 ; 0x1c 3000fe68: e284105c add r1, r4, #92 ; 0x5c 3000fe6c: eb00034a bl 30010b9c <_CORE_message_queue_Initialize> 3000fe70: e150000a cmp r0, sl 3000fe74: 1a00000a bne 3000fea4 <_POSIX_Message_queue_Create_support+0x144> 3000fe78: e1a01004 mov r1, r4 <== NOT EXECUTED 3000fe7c: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fe80: ebfff15a bl 3000c3f0 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 3000fe84: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fe88: ebfff913 bl 3000e2dc <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); 3000fe8c: ebfff3e7 bl 3000ce30 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 3000fe90: eb0009ba bl 30012580 <__errno> <== NOT EXECUTED 3000fe94: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 3000fe98: e5803000 str r3, [r0] 3000fe9c: e3e00000 mvn r0, #0 ; 0x0 3000fea0: ea000006 b 3000fec0 <_POSIX_Message_queue_Create_support+0x160> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000fea4: e595201c ldr r2, [r5, #28] 3000fea8: e1d430b8 ldrh r3, [r4, #8] 3000feac: e7824103 str r4, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 3000feb0: e584600c str r6, [r4, #12] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 3000feb4: e58b4000 str r4, [fp] _Thread_Enable_dispatch(); 3000feb8: ebfff3dc bl 3000ce30 <_Thread_Enable_dispatch> 3000febc: e1a0000a mov r0, sl return 0; } 3000fec0: e28dd010 add sp, sp, #16 ; 0x10 3000fec4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000fec8: 3002110c .word 0x3002110c 3000fecc: 30021420 .word 0x30021420 300057b0 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 300057b0: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 300057b4: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 300057b8: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 300057bc: 0a000006 beq 300057dc <_POSIX_Mutex_Get+0x2c> 300057c0: e5953000 ldr r3, [r5] 300057c4: e3730001 cmn r3, #1 ; 0x1 300057c8: 1a000007 bne 300057ec <_POSIX_Mutex_Get+0x3c> 300057cc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 300057d0: eb00001d bl 3000584c <== NOT EXECUTED 300057d4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300057d8: 0a000003 beq 300057ec <_POSIX_Mutex_Get+0x3c> <== NOT EXECUTED 300057dc: e3a03001 mov r3, #1 ; 0x1 300057e0: e5843000 str r3, [r4] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 300057e4: e3a00000 mov r0, #0 ; 0x0 300057e8: e8bd8030 pop {r4, r5, pc} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 300057ec: e5951000 ldr r1, [r5] 300057f0: e59f0008 ldr r0, [pc, #8] ; 30005800 <_POSIX_Mutex_Get+0x50> 300057f4: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 300057f8: e8bd4030 pop {r4, r5, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 300057fc: ea000adf b 30008380 <_Objects_Get> 30005800: 30016da0 .word 0x30016da0 30005754 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 30005754: e92d4070 push {r4, r5, r6, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005758: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 3000575c: e1a04001 mov r4, r1 30005760: e1a06002 mov r6, r2 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005764: 0a000006 beq 30005784 <_POSIX_Mutex_Get_interrupt_disable+0x30> 30005768: e5953000 ldr r3, [r5] 3000576c: e3730001 cmn r3, #1 ; 0x1 30005770: 1a000007 bne 30005794 <_POSIX_Mutex_Get_interrupt_disable+0x40> 30005774: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30005778: eb000033 bl 3000584c <== NOT EXECUTED 3000577c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30005780: 0a000003 beq 30005794 <_POSIX_Mutex_Get_interrupt_disable+0x40> <== NOT EXECUTED 30005784: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 30005788: e5843000 str r3, [r4] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 3000578c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30005790: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 30005794: e5951000 ldr r1, [r5] 30005798: e59f000c ldr r0, [pc, #12] ; 300057ac <_POSIX_Mutex_Get_interrupt_disable+0x58> 3000579c: e1a02004 mov r2, r4 300057a0: e1a03006 mov r3, r6 _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 300057a4: e8bd4070 pop {r4, r5, r6, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 300057a8: ea000ada b 30008318 <_Objects_Get_isr_disable> 300057ac: 30016da0 .word 0x30016da0 3000c930 <_POSIX_Semaphore_Create_support>: 3000c930: e59fc0e8 ldr ip, [pc, #232] ; 3000ca20 <_POSIX_Semaphore_Create_support+0xf0> const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 3000c934: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000c938: e59ce000 ldr lr, [ip] 3000c93c: e1a07002 mov r7, r2 3000c940: e28ee001 add lr, lr, #1 ; 0x1 3000c944: e58ce000 str lr, [ip] 3000c948: e1a08003 mov r8, r3 3000c94c: e1a06000 mov r6, r0 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 3000c950: e3510000 cmp r1, #0 ; 0x0 3000c954: 0a000003 beq 3000c968 <_POSIX_Semaphore_Create_support+0x38> _Thread_Enable_dispatch(); 3000c958: ebfff214 bl 300091b0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); 3000c95c: eb000837 bl 3000ea40 <__errno> 3000c960: e3a03058 mov r3, #88 ; 0x58 3000c964: ea00000f b 3000c9a8 <_POSIX_Semaphore_Create_support+0x78> } if ( name ) { 3000c968: e3500000 cmp r0, #0 ; 0x0 3000c96c: 0a000006 beq 3000c98c <_POSIX_Semaphore_Create_support+0x5c> if( strlen(name) > PATH_MAX ) { 3000c970: eb000f09 bl 3001059c 3000c974: e35000ff cmp r0, #255 ; 0xff 3000c978: 9a000003 bls 3000c98c <_POSIX_Semaphore_Create_support+0x5c> _Thread_Enable_dispatch(); 3000c97c: ebfff20b bl 300091b0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000c980: eb00082e bl 3000ea40 <__errno> <== NOT EXECUTED 3000c984: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000c988: ea000006 b 3000c9a8 <_POSIX_Semaphore_Create_support+0x78> <== NOT EXECUTED * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 3000c98c: e59f0090 ldr r0, [pc, #144] ; 3000ca24 <_POSIX_Semaphore_Create_support+0xf4> 3000c990: ebffeeda bl 30008500 <_Objects_Allocate> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 3000c994: e2505000 subs r5, r0, #0 ; 0x0 3000c998: 1a000005 bne 3000c9b4 <_POSIX_Semaphore_Create_support+0x84> _Thread_Enable_dispatch(); 3000c99c: ebfff203 bl 300091b0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 3000c9a0: eb000826 bl 3000ea40 <__errno> 3000c9a4: e3a0301c mov r3, #28 ; 0x1c 3000c9a8: e5803000 str r3, [r0] 3000c9ac: e3e00000 mvn r0, #0 ; 0x0 3000c9b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} } the_semaphore->process_shared = pshared; if ( name ) { 3000c9b4: e3560000 cmp r6, #0 ; 0x0 if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 3000c9b8: e3a03000 mov r3, #0 ; 0x0 3000c9bc: e5853010 str r3, [r5, #16] if ( name ) { the_semaphore->named = TRUE; 3000c9c0: 12833001 addne r3, r3, #1 ; 0x1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 3000c9c4: 15c53015 strbne r3, [r5, #21] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 3000c9c8: 15c53014 strbne r3, [r5, #20] the_semaphore->open_count = 1; 3000c9cc: 15853018 strne r3, [r5, #24] * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 3000c9d0: e3a04000 mov r4, #0 ; 0x0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 3000c9d4: e3e03000 mvn r3, #0 ; 0x0 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 3000c9d8: e285001c add r0, r5, #28 ; 0x1c if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 3000c9dc: 05c56014 strbeq r6, [r5, #20] the_semaphore->open_count = 0; 3000c9e0: 05856018 streq r6, [r5, #24] the_semaphore->linked = FALSE; 3000c9e4: 05c56015 strbeq r6, [r5, #21] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 3000c9e8: e585305c str r3, [r5, #92] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 3000c9ec: e1a02007 mov r2, r7 3000c9f0: e285105c add r1, r5, #92 ; 0x5c * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 3000c9f4: e5854060 str r4, [r5, #96] * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 3000c9f8: ebffedb5 bl 300080d4 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000c9fc: e59f3020 ldr r3, [pc, #32] ; 3000ca24 <_POSIX_Semaphore_Create_support+0xf4> 3000ca00: e1d520b8 ldrh r2, [r5, #8] 3000ca04: e593301c ldr r3, [r3, #28] 3000ca08: e7835102 str r5, [r3, r2, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 3000ca0c: e585600c str r6, [r5, #12] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 3000ca10: e5885000 str r5, [r8] _Thread_Enable_dispatch(); 3000ca14: ebfff1e5 bl 300091b0 <_Thread_Enable_dispatch> 3000ca18: e1a00004 mov r0, r4 return 0; } 3000ca1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3000ca20: 3001c4cc .word 0x3001c4cc 3000ca24: 3001c760 .word 0x3001c760 300094fc <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300094fc: e5903108 ldr r3, [r0, #264] the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 30009500: e590201c ldr r2, [r0, #28] RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 30009504: e5933084 ldr r3, [r3, #132] 30009508: e3520000 cmp r2, #0 ; 0x0 3000950c: e26310ff rsb r1, r3, #255 ; 0xff * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 30009510: e3e03000 mvn r3, #0 ; 0x0 30009514: e5803078 str r3, [r0, #120] new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 30009518: e5801018 str r1, [r0, #24] if ( the_thread->resource_count == 0 || 3000951c: 0a000002 beq 3000952c <_POSIX_Threads_Sporadic_budget_callout+0x30> 30009520: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 30009524: e1530001 cmp r3, r1 <== NOT EXECUTED 30009528: 912fff1e bxls lr <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 3000952c: e3a02001 mov r2, #1 ; 0x1 30009530: eafff1d0 b 30005c78 <_Thread_Change_priority> 3000aaa0 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 3000aaa0: e92d4070 push {r4, r5, r6, lr} POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3000aaa4: e5905108 ldr r5, [r0, #264] handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 3000aaa8: e3a03001 mov r3, #1 ; 0x1 3000aaac: e58530cc str r3, [r5, #204] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000aab0: e28560dc add r6, r5, #220 ; 0xdc 3000aab4: ea00000c b 3000aaec <_POSIX_Threads_cancel_run+0x4c> while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 3000aab8: e10f1000 mrs r1, CPSR <== NOT EXECUTED 3000aabc: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 3000aac0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 3000aac4: e5964004 ldr r4, [r6, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000aac8: e894000c ldm r4, {r2, r3} <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; 3000aacc: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000aad0: e5823004 str r3, [r2, #4] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 3000aad4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED (*handler->routine)( handler->arg ); 3000aad8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED 3000aadc: e1a0e00f mov lr, pc <== NOT EXECUTED 3000aae0: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED _Workspace_Free( handler ); 3000aae4: e1a00004 mov r0, r4 <== NOT EXECUTED 3000aae8: ebfff2b1 bl 300075b4 <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 3000aaec: e59530d8 ldr r3, [r5, #216] 3000aaf0: e1530006 cmp r3, r6 3000aaf4: 1affffef bne 3000aab8 <_POSIX_Threads_cancel_run+0x18> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 3000aaf8: e8bd8070 pop {r4, r5, r6, pc} 3000b52c <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 3000b52c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000b530: e1a08001 mov r8, r1 3000b534: e1a07002 mov r7, r2 3000b538: e1a05003 mov r5, r3 3000b53c: e1a04000 mov r4, r0 ISR_Level level; (void) _Watchdog_Remove( timer ); 3000b540: ebfff6da bl 300090b0 <_Watchdog_Remove> _ISR_Disable( level ); 3000b544: e10f6000 mrs r6, CPSR 3000b548: e38630c0 orr r3, r6, #192 ; 0xc0 3000b54c: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 3000b550: e5943008 ldr r3, [r4, #8] 3000b554: e3530000 cmp r3, #0 ; 0x0 3000b558: 0a000002 beq 3000b568 <_POSIX_Timer_Insert_helper+0x3c> _ISR_Enable( level ); 3000b55c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 3000b560: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000b564: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3000b568: e5843008 str r3, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 3000b56c: e59d3018 ldr r3, [sp, #24] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3000b570: e584501c str r5, [r4, #28] the_watchdog->id = id; 3000b574: e5847020 str r7, [r4, #32] the_watchdog->user_data = user_data; 3000b578: e5843024 str r3, [r4, #36] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000b57c: e584800c str r8, [r4, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000b580: e1a01004 mov r1, r4 3000b584: e59f000c ldr r0, [pc, #12] ; 3000b598 <_POSIX_Timer_Insert_helper+0x6c> 3000b588: ebfff66c bl 30008f40 <_Watchdog_Insert> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 3000b58c: e129f006 msr CPSR_fc, r6 3000b590: e3a00001 mov r0, #1 ; 0x1 return true; } 3000b594: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3000b598: 3001aaa4 .word 0x3001aaa4 3000564c <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 3000564c: e92d4010 push {r4, lr} bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005650: e5913068 ldr r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 30005654: e5912054 ldr r2, [r1, #84] bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005658: e2833001 add r3, r3, #1 ; 0x1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 3000565c: e3520000 cmp r2, #0 ; 0x0 /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 30005660: e24dd004 sub sp, sp, #4 ; 0x4 30005664: e1a04001 mov r4, r1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005668: e5813068 str r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 3000566c: 1a000003 bne 30005680 <_POSIX_Timer_TSR+0x34> 30005670: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED 30005674: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 30005678: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 3000567c: 0a00000a beq 300056ac <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 30005680: e5941064 ldr r1, [r4, #100] 30005684: e5942008 ldr r2, [r4, #8] 30005688: e2840010 add r0, r4, #16 ; 0x10 3000568c: e59f3038 ldr r3, [pc, #56] ; 300056cc <_POSIX_Timer_TSR+0x80> 30005690: e58d4000 str r4, [sp] 30005694: eb0017a4 bl 3000b52c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 30005698: e3500000 cmp r0, #0 ; 0x0 3000569c: 0a000008 beq 300056c4 <_POSIX_Timer_TSR+0x78> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 300056a0: e284006c add r0, r4, #108 ; 0x6c 300056a4: eb000587 bl 30006cc8 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 300056a8: e3a03003 mov r3, #3 ; 0x3 } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 300056ac: e5c4303c strb r3, [r4, #60] /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 300056b0: e5940038 ldr r0, [r4, #56] 300056b4: e5941044 ldr r1, [r4, #68] 300056b8: eb0016c2 bl 3000b1c8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 300056bc: e3a03000 mov r3, #0 ; 0x0 300056c0: e5843068 str r3, [r4, #104] } 300056c4: e28dd004 add sp, sp, #4 ; 0x4 300056c8: e8bd8010 pop {r4, pc} 300056cc: 3000564c .word 0x3000564c 30004c78 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 30004c78: e1a02000 mov r2, r0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 30004c7c: e3a01001 mov r1, #1 ; 0x1 #include int _POSIX_signals_Get_highest( sigset_t set ) { 30004c80: e3a0001b mov r0, #27 ; 0x1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 30004c84: e2403001 sub r3, r0, #1 ; 0x1 30004c88: e0123311 ands r3, r2, r1, lsl r3 30004c8c: 112fff1e bxne lr sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30004c90: e2800001 add r0, r0, #1 ; 0x1 30004c94: e3500020 cmp r0, #32 ; 0x20 30004c98: 1afffff9 bne 30004c84 <_POSIX_signals_Get_highest+0xc> 30004c9c: e3a00001 mov r0, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 30004ca0: e1a01000 mov r1, r0 30004ca4: e2403001 sub r3, r0, #1 ; 0x1 30004ca8: e0123311 ands r3, r2, r1, lsl r3 30004cac: 112fff1e bxne lr return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30004cb0: e2800001 add r0, r0, #1 ; 0x1 30004cb4: e350001b cmp r0, #27 ; 0x1b 30004cb8: 1afffff9 bne 30004ca4 <_POSIX_signals_Get_highest+0x2c> 30004cbc: e1a00003 mov r0, r3 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 30004cc0: e12fff1e bx lr <== NOT EXECUTED 300091b4 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 300091b4: e92d4070 push {r4, r5, r6, lr} POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300091b8: e5905108 ldr r5, [r0, #264] if ( !api ) 300091bc: e3550000 cmp r5, #0 ; 0x0 300091c0: 08bd8070 popeq {r4, r5, r6, pc} * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 300091c4: e59f60b0 ldr r6, [pc, #176] ; 3000927c <_POSIX_signals_Post_switch_extension+0xc8> * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); 300091c8: e10f0000 mrs r0, CPSR 300091cc: e38030c0 orr r3, r0, #192 ; 0xc0 300091d0: e129f003 msr CPSR_fc, r3 if ( !(~api->signals_blocked & 300091d4: e5963000 ldr r3, [r6] 300091d8: e59520c8 ldr r2, [r5, #200] 300091dc: e59510c4 ldr r1, [r5, #196] 300091e0: e1833002 orr r3, r3, r2 300091e4: e1d31001 bics r1, r3, r1 300091e8: 1a000001 bne 300091f4 <_POSIX_signals_Post_switch_extension+0x40> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 300091ec: e129f000 msr CPSR_fc, r0 300091f0: e8bd8070 pop {r4, r5, r6, pc} break; } _ISR_Enable( level ); 300091f4: e129f000 msr CPSR_fc, r0 300091f8: e3a0401b mov r4, #27 ; 0x1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 300091fc: e1a01004 mov r1, r4 30009200: e3a02000 mov r2, #0 ; 0x0 30009204: e1a00005 mov r0, r5 30009208: eb000667 bl 3000abac <_POSIX_signals_Check_signal> 3000920c: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009210: e1a01004 mov r1, r4 30009214: e3a02001 mov r2, #1 ; 0x1 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30009218: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 3000921c: e1a00005 mov r0, r5 } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 30009220: 1affffe8 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009224: eb000660 bl 3000abac <_POSIX_signals_Check_signal> 30009228: e3500000 cmp r0, #0 ; 0x0 3000922c: 1affffe5 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30009230: e3540020 cmp r4, #32 ; 0x20 30009234: 1afffff0 bne 300091fc <_POSIX_signals_Post_switch_extension+0x48> 30009238: e3a04001 mov r4, #1 ; 0x1 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 3000923c: e1a01004 mov r1, r4 30009240: e3a02000 mov r2, #0 ; 0x0 30009244: e1a00005 mov r0, r5 30009248: eb000657 bl 3000abac <_POSIX_signals_Check_signal> 3000924c: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009250: e1a01004 mov r1, r4 30009254: e3a02001 mov r2, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30009258: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 3000925c: e1a00005 mov r0, r5 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 30009260: 1affffd8 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009264: eb000650 bl 3000abac <_POSIX_signals_Check_signal> 30009268: e3500000 cmp r0, #0 ; 0x0 3000926c: 1affffd5 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30009270: e354001b cmp r4, #27 ; 0x1b 30009274: 1afffff0 bne 3000923c <_POSIX_signals_Post_switch_extension+0x88> 30009278: eaffffd2 b 300091c8 <_POSIX_signals_Post_switch_extension+0x14> <== NOT EXECUTED 3000927c: 3001698c .word 0x3001698c 3001f6d4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3001f6d4: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 3001f6d8: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3001f6dc: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 3001f6e0: 0a00000d beq 3001f71c <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 3001f6e4: e3510000 cmp r1, #0 ; 0x0 3001f6e8: 0a00000b beq 3001f71c <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 3001f6ec: e59f5030 ldr r5, [pc, #48] ; 3001f724 <_Protected_heap_Get_information+0x50> 3001f6f0: e5950000 ldr r0, [r5] 3001f6f4: ebffa27e bl 300080f4 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 3001f6f8: e1a01004 mov r1, r4 3001f6fc: e1a00006 mov r0, r6 3001f700: eb0023fd bl 300286fc <_Heap_Get_information> 3001f704: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 3001f708: e5950000 ldr r0, [r5] 3001f70c: ebffa294 bl 30008164 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 3001f710: e2740001 rsbs r0, r4, #1 ; 0x1 3001f714: 33a00000 movcc r0, #0 ; 0x0 3001f718: e8bd8070 pop {r4, r5, r6, pc} 3001f71c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 3001f720: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3001f724: 300566fc .word 0x300566fc 30004680 <_RTEMS_tasks_Initialize_user_tasks_body>: rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 30004680: e59f3094 ldr r3, [pc, #148] ; 3000471c <_RTEMS_tasks_Initialize_user_tasks_body+0x9c> * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 30004684: e92d40f0 push {r4, r5, r6, r7, lr} rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 30004688: e5933000 ldr r3, [r3] * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 3000468c: e24dd00c sub sp, sp, #12 ; 0xc rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 30004690: e5933040 ldr r3, [r3, #64] /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 30004694: e593002c ldr r0, [r3, #44] maximum = api_configuration->number_of_initialization_tasks; 30004698: e5936028 ldr r6, [r3, #40] if ( !user_tasks || maximum == 0 ) 3000469c: e3560000 cmp r6, #0 ; 0x0 300046a0: 13500000 cmpne r0, #0 ; 0x0 300046a4: 13a03000 movne r3, #0 ; 0x0 300046a8: 03a03001 moveq r3, #1 ; 0x1 return; 300046ac: 11a04000 movne r4, r0 300046b0: 11a05003 movne r5, r3 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 300046b4: 128d7008 addne r7, sp, #8 ; 0x8 */ user_tasks = api_configuration->User_initialization_tasks_table; maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 300046b8: 1a000013 bne 3000470c <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> 300046bc: ea000014 b 30004714 <_RTEMS_tasks_Initialize_user_tasks_body+0x94> <== NOT EXECUTED return; for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 300046c0: e594300c ldr r3, [r4, #12] 300046c4: e88d0088 stm sp, {r3, r7} 300046c8: e8940005 ldm r4, {r0, r2} 300046cc: e5941008 ldr r1, [r4, #8] 300046d0: e5943014 ldr r3, [r4, #20] 300046d4: ebffff63 bl 30004468 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 300046d8: e2502000 subs r2, r0, #0 ; 0x0 300046dc: 1a000006 bne 300046fc <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 300046e0: e5942018 ldr r2, [r4, #24] 300046e4: e5941010 ldr r1, [r4, #16] 300046e8: e59d0008 ldr r0, [sp, #8] 300046ec: eb00000b bl 30004720 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 300046f0: e2502000 subs r2, r0, #0 ; 0x0 ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 300046f4: e284401c add r4, r4, #28 ; 0x1c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 300046f8: 0a000002 beq 30004708 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 300046fc: e3a00001 mov r0, #1 ; 0x1 30004700: e1a01000 mov r1, r0 30004704: eb00035b bl 30005478 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 30004708: e2855001 add r5, r5, #1 ; 0x1 3000470c: e1550006 cmp r5, r6 30004710: 3affffea bcc 300046c0 <_RTEMS_tasks_Initialize_user_tasks_body+0x40> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 30004714: e28dd00c add sp, sp, #12 ; 0xc 30004718: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000471c: 300162fc .word 0x300162fc 30005804 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 30005804: e92d4010 push {r4, lr} 30005808: e24dd004 sub sp, sp, #4 ; 0x4 3000580c: e1a01000 mov r1, r0 30005810: e1a0200d mov r2, sp 30005814: e59f008c ldr r0, [pc, #140] ; 300058a8 <_Rate_monotonic_Timeout+0xa4> 30005818: eb000735 bl 300074f4 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 3000581c: e59d3000 ldr r3, [sp] 30005820: e1a04000 mov r4, r0 30005824: e3530000 cmp r3, #0 ; 0x0 30005828: 1a00001c bne 300058a0 <_Rate_monotonic_Timeout+0x9c> case OBJECTS_LOCAL: the_thread = the_period->owner; 3000582c: e5900050 ldr r0, [r0, #80] if ( _States_Is_waiting_for_period( the_thread->current_state ) && 30005830: e5903010 ldr r3, [r0, #16] 30005834: e3130901 tst r3, #16384 ; 0x4000 30005838: 0a000006 beq 30005858 <_Rate_monotonic_Timeout+0x54> 3000583c: e5902020 ldr r2, [r0, #32] 30005840: e5943008 ldr r3, [r4, #8] 30005844: e1520003 cmp r2, r3 30005848: 1a000002 bne 30005858 <_Rate_monotonic_Timeout+0x54> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000584c: e59f1058 ldr r1, [pc, #88] ; 300058ac <_Rate_monotonic_Timeout+0xa8> 30005850: eb00084d bl 3000798c <_Thread_Clear_state> 30005854: ea000006 b 30005874 <_Rate_monotonic_Timeout+0x70> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005858: e5943038 ldr r3, [r4, #56] 3000585c: e3530001 cmp r3, #1 ; 0x1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 30005860: 13a03004 movne r3, #4 ; 0x4 30005864: 15843038 strne r3, [r4, #56] _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005868: 1a000008 bne 30005890 <_Rate_monotonic_Timeout+0x8c> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 3000586c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30005870: e5843038 str r3, [r4, #56] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 30005874: e1a00004 mov r0, r4 30005878: ebfffe51 bl 300051c4 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000587c: e594304c ldr r3, [r4, #76] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005880: e2841010 add r1, r4, #16 ; 0x10 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005884: e584301c str r3, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005888: e59f0020 ldr r0, [pc, #32] ; 300058b0 <_Rate_monotonic_Timeout+0xac> 3000588c: eb000e21 bl 30009118 <_Watchdog_Insert> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005890: e59f201c ldr r2, [pc, #28] ; 300058b4 <_Rate_monotonic_Timeout+0xb0> 30005894: e5923000 ldr r3, [r2] 30005898: e2433001 sub r3, r3, #1 ; 0x1 3000589c: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 300058a0: e28dd004 add sp, sp, #4 ; 0x4 300058a4: e8bd8010 pop {r4, pc} 300058a8: 3001ae10 .word 0x3001ae10 300058ac: 1003fff8 .word 0x1003fff8 300058b0: 3001b004 .word 0x3001b004 300058b4: 3001af2c .word 0x3001af2c 30005124 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 30005124: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 30005128: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 3000512c: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 30005130: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 30005134: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 30005138: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 3000513c: e10f6000 mrs r6, CPSR 30005140: e38630c0 orr r3, r6, #192 ; 0xc0 30005144: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005148: e59f3038 ldr r3, [pc, #56] ; 30005188 <_TOD_Get+0x64> 3000514c: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 30005150: e59f3034 ldr r3, [pc, #52] ; 3000518c <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005154: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 30005158: e8930018 ldm r3, {r3, r4} 3000515c: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005160: 0a000002 beq 30005170 <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 30005164: e1a0e00f mov lr, pc <== NOT EXECUTED 30005168: e12fff12 bx r2 <== NOT EXECUTED 3000516c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 30005170: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 30005174: e1a00005 mov r0, r5 30005178: e1a0100d mov r1, sp 3000517c: eb000797 bl 30006fe0 <_Timespec_Add_to> } 30005180: e28dd008 add sp, sp, #8 ; 0x8 30005184: e8bd8070 pop {r4, r5, r6, pc} 30005188: 30016418 .word 0x30016418 3000518c: 300162f4 .word 0x300162f4 30009d9c <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009d9c: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 30009da0: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009da4: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 30009da8: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009dac: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 30009db0: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 30009db4: e10f6000 mrs r6, CPSR 30009db8: e38630c0 orr r3, r6, #192 ; 0xc0 30009dbc: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009dc0: e59f3038 ldr r3, [pc, #56] ; 30009e00 <_TOD_Get_uptime+0x64> 30009dc4: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009dc8: e59f3034 ldr r3, [pc, #52] ; 30009e04 <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009dcc: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009dd0: e8930018 ldm r3, {r3, r4} 30009dd4: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009dd8: 0a000002 beq 30009de8 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 30009ddc: e1a0e00f mov lr, pc <== NOT EXECUTED 30009de0: e12fff12 bx r2 <== NOT EXECUTED 30009de4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 30009de8: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 30009dec: e1a00005 mov r0, r5 30009df0: e1a0100d mov r1, sp 30009df4: ebfff479 bl 30006fe0 <_Timespec_Add_to> } 30009df8: e28dd008 add sp, sp, #8 ; 0x8 30009dfc: e8bd8070 pop {r4, r5, r6, pc} 30009e00: 30016418 .word 0x30016418 30009e04: 300162e4 .word 0x300162e4 3000b14c <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000b14c: e59f30b0 ldr r3, [pc, #176] ; 3000b204 <_Thread_Handler+0xb8> * * Output parameters: NONE */ void _Thread_Handler( void ) { 3000b150: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000b154: e5935000 ldr r5, [r3] /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 3000b158: e59530b8 ldr r3, [r5, #184] _ISR_Set_level(level); 3000b15c: e3a02000 mov r2, #0 ; 0x0 3000b160: e10f2000 mrs r2, CPSR 3000b164: e3c220c0 bic r2, r2, #192 ; 0xc0 3000b168: e1822003 orr r2, r2, r3 3000b16c: e121f002 msr CPSR_c, r2 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000b170: e59f2090 ldr r2, [pc, #144] ; 3000b208 <_Thread_Handler+0xbc> doneConstructors = 1; 3000b174: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000b178: e5d24000 ldrb r4, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 3000b17c: e1a00005 mov r0, r5 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; doneConstructors = 1; 3000b180: e5c23000 strb r3, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 3000b184: ebffefe3 bl 30007118 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 3000b188: ebffec22 bl 30006218 <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 3000b18c: e3540000 cmp r4, #0 ; 0x0 { _init (); 3000b190: 0b002482 bleq 300143a0 <__start_set_sysctl_set> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 3000b194: e59530a0 ldr r3, [r5, #160] 3000b198: e3530003 cmp r3, #3 ; 0x3 3000b19c: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000b1a0: ea000011 b 3000b1ec <_Thread_Handler+0xa0> <== NOT EXECUTED 3000b1a4: 3000b1b4 .word 0x3000b1b4 <== NOT EXECUTED 3000b1a8: 3000b1bc .word 0x3000b1bc <== NOT EXECUTED 3000b1ac: 3000b1cc .word 0x3000b1cc <== NOT EXECUTED 3000b1b0: 3000b1d8 .word 0x3000b1d8 <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = 3000b1b4: e59500a8 ldr r0, [r5, #168] 3000b1b8: ea000000 b 3000b1c0 <_Thread_Handler+0x74> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 3000b1bc: e59500a4 ldr r0, [r5, #164] 3000b1c0: e1a0e00f mov lr, pc 3000b1c4: e595f09c ldr pc, [r5, #156] 3000b1c8: ea000006 b 3000b1e8 <_Thread_Handler+0x9c> (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 3000b1cc: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED 3000b1d0: e59510a8 ldr r1, [r5, #168] <== NOT EXECUTED 3000b1d4: ea000001 b 3000b1e0 <_Thread_Handler+0x94> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 3000b1d8: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED 3000b1dc: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED 3000b1e0: e1a0e00f mov lr, pc <== NOT EXECUTED 3000b1e4: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000b1e8: e5850028 str r0, [r5, #40] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 3000b1ec: e1a00005 mov r0, r5 3000b1f0: ebffefd7 bl 30007154 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 3000b1f4: e3a00000 mov r0, #0 ; 0x0 3000b1f8: e3a01001 mov r1, #1 ; 0x1 3000b1fc: e3a02006 mov r2, #6 ; 0x6 3000b200: ebffe89c bl 30005478 <_Internal_error_Occurred> 3000b204: 30016324 .word 0x30016324 3000b208: 300160b4 .word 0x300160b4 300062e0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 300062e0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 300062e4: e2526000 subs r6, r2, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 300062e8: e1a09000 mov r9, r0 300062ec: e1a05001 mov r5, r1 300062f0: e1a04003 mov r4, r3 300062f4: e59d8024 ldr r8, [sp, #36] 300062f8: e59da02c ldr sl, [sp, #44] 300062fc: e5dd7028 ldrb r7, [sp, #40] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 30006300: 1a00000e bne 30006340 <_Thread_Initialize+0x60> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 30006304: e1a00001 mov r0, r1 30006308: e1a01003 mov r1, r3 3000630c: eb000295 bl 30006d68 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 30006310: e1500004 cmp r0, r4 30006314: 23a03000 movcs r3, #0 ; 0x0 30006318: 33a03001 movcc r3, #1 ; 0x1 3000631c: e3500000 cmp r0, #0 ; 0x0 30006320: 03833001 orreq r3, r3, #1 ; 0x1 30006324: e3530000 cmp r3, #0 ; 0x0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006328: 03a03001 moveq r3, #1 ; 0x1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 3000632c: e1a01000 mov r1, r0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006330: 05c530c0 strbeq r3, [r5, #192] actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 30006334: 0595c0cc ldreq ip, [r5, #204] if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 30006338: 0a000004 beq 30006350 <_Thread_Initialize+0x70> 3000633c: ea000017 b 300063a0 <_Thread_Initialize+0xc0> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 30006340: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30006344: e5c130c0 strb r3, [r1, #192] <== NOT EXECUTED 30006348: e1a0c006 mov ip, r6 <== NOT EXECUTED 3000634c: e1a01004 mov r1, r4 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 30006350: e59f3128 ldr r3, [pc, #296] ; 30006480 <_Thread_Initialize+0x1a0> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30006354: e3a02000 mov r2, #0 ; 0x0 30006358: e5930000 ldr r0, [r3] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 3000635c: e585c0c8 str ip, [r5, #200] 30006360: e1500002 cmp r0, r2 the_stack->size = size; 30006364: e58510c4 str r1, [r5, #196] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 30006368: e5852100 str r2, [r5, #256] 3000636c: e5852050 str r2, [r5, #80] the_watchdog->routine = routine; 30006370: e5852064 str r2, [r5, #100] the_watchdog->id = id; 30006374: e5852068 str r2, [r5, #104] the_watchdog->user_data = user_data; 30006378: e585206c str r2, [r5, #108] (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 3000637c: 01a06000 moveq r6, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 30006380: 0a000008 beq 300063a8 <_Thread_Initialize+0xc8> extensions_area = _Workspace_Allocate( 30006384: e2800001 add r0, r0, #1 ; 0x1 30006388: e1a00100 lsl r0, r0, #2 3000638c: eb00048c bl 300075c4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 30006390: e2506000 subs r6, r0, #0 ; 0x0 30006394: 1a000003 bne 300063a8 <_Thread_Initialize+0xc8> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 30006398: e1a00005 mov r0, r5 <== NOT EXECUTED 3000639c: eb00028c bl 30006dd4 <_Thread_Stack_Free> <== NOT EXECUTED 300063a0: e1a00006 mov r0, r6 300063a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 300063a8: e3560000 cmp r6, #0 ; 0x0 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 300063ac: e5856110 str r6, [r5, #272] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 300063b0: 0a00000a beq 300063e0 <_Thread_Initialize+0x100> 300063b4: e3a02000 mov r2, #0 ; 0x0 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300063b8: e59f00c0 ldr r0, [pc, #192] ; 30006480 <_Thread_Initialize+0x1a0> the_thread->extensions[i] = NULL; 300063bc: e1a01002 mov r1, r2 300063c0: ea000002 b 300063d0 <_Thread_Initialize+0xf0> 300063c4: e5953110 ldr r3, [r5, #272] 300063c8: e7831102 str r1, [r3, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300063cc: e2822001 add r2, r2, #1 ; 0x1 300063d0: e5903000 ldr r3, [r0] 300063d4: e2833001 add r3, r3, #1 ; 0x1 300063d8: e1520003 cmp r2, r3 300063dc: 3afffff8 bcc 300063c4 <_Thread_Initialize+0xe4> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 300063e0: e59d3030 ldr r3, [sp, #48] switch ( budget_algorithm ) { 300063e4: e35a0002 cmp sl, #2 ; 0x2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 300063e8: e58530b4 str r3, [r5, #180] switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 300063ec: 059f3090 ldreq r3, [pc, #144] ; 30006484 <_Thread_Initialize+0x1a4> } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 300063f0: e3a04000 mov r4, #0 ; 0x0 switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 300063f4: 05933000 ldreq r3, [r3] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 300063f8: e5c570ac strb r7, [r5, #172] switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 300063fc: 05853078 streq r3, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006400: e59d3034 ldr r3, [sp, #52] the_thread->current_state = STATES_DORMANT; 30006404: e3a07001 mov r7, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006408: e58530b8 str r3, [r5, #184] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 3000640c: e1a01008 mov r1, r8 30006410: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 30006414: e585a0b0 str sl, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 30006418: e5857010 str r7, [r5, #16] the_thread->Wait.queue = NULL; 3000641c: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 30006420: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 30006424: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 30006428: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 3000642c: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 30006430: eb0001b6 bl 30006b10 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30006434: e1d530b8 ldrh r3, [r5, #8] 30006438: e599201c ldr r2, [r9, #28] * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; the_thread->cpu_time_used.tv_nsec = 0; 3000643c: e5854088 str r4, [r5, #136] 30006440: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 30006444: e59d3038 ldr r3, [sp, #56] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 30006448: e1a00005 mov r0, r5 3000644c: e585300c str r3, [r5, #12] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 30006450: e5854084 str r4, [r5, #132] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 30006454: eb000362 bl 300071e4 <_User_extensions_Thread_create> if ( !extension_status ) { 30006458: e1500004 cmp r0, r4 3000645c: 11a00007 movne r0, r7 30006460: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc} if ( extensions_area ) 30006464: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 30006468: 11a00006 movne r0, r6 <== NOT EXECUTED 3000646c: 1b000450 blne 300075b4 <_Workspace_Free> <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 30006470: e1a00005 mov r0, r5 <== NOT EXECUTED 30006474: eb000256 bl 30006dd4 <_Thread_Stack_Free> <== NOT EXECUTED 30006478: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 3000647c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30006480: 30016304 .word 0x30016304 30006484: 30016224 .word 0x30016224 30007748 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007748: e5903010 ldr r3, [r0, #16] bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 3000774c: e92d4070 push {r4, r5, r6, lr} if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007750: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 30007754: e1a04000 mov r4, r0 30007758: e1a06001 mov r6, r1 3000775c: e1a05002 mov r5, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007760: 13a00000 movne r0, #0 ; 0x0 30007764: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 30007768: eb000083 bl 3000797c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 3000776c: e1a01006 mov r1, r6 30007770: e1a02005 mov r2, r5 30007774: e1a00004 mov r0, r4 30007778: eb000eb0 bl 3000b240 <_Thread_Reset> _Thread_Load_environment( the_thread ); 3000777c: e1a00004 mov r0, r4 30007780: eb000dd0 bl 3000aec8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 30007784: e1a00004 mov r0, r4 30007788: eb000e69 bl 3000b134 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 3000778c: e1a00004 mov r0, r4 30007790: eb0001e7 bl 30007f34 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 30007794: e59f301c ldr r3, [pc, #28] ; 300077b8 <_Thread_Restart+0x70> 30007798: e5933000 ldr r3, [r3] 3000779c: e1540003 cmp r4, r3 300077a0: 13a00001 movne r0, #1 ; 0x1 300077a4: 18bd8070 popne {r4, r5, r6, pc} #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 300077a8: e28400d0 add r0, r4, #208 ; 0xd0 300077ac: eb0002f0 bl 30008374 <_CPU_Context_restore> 300077b0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 300077b4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 300077b8: 30019be4 .word 0x30019be4 3000847c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 3000847c: e92d4030 push {r4, r5, lr} 30008480: e20110ff and r1, r1, #255 ; 0xff 30008484: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 30008488: e10f5000 mrs r5, CPSR 3000848c: e38530c0 orr r3, r5, #192 ; 0xc0 30008490: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 30008494: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; else the_thread->suspend_count--; 30008498: 05903070 ldreq r3, [r0, #112] States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; 3000849c: 13a03000 movne r3, #0 ; 0x0 else the_thread->suspend_count--; 300084a0: 02433001 subeq r3, r3, #1 ; 0x1 300084a4: e5803070 str r3, [r0, #112] if ( the_thread->suspend_count > 0 ) { 300084a8: e5903070 ldr r3, [r0, #112] 300084ac: e3530000 cmp r3, #0 ; 0x0 300084b0: 0a000001 beq 300084bc <_Thread_Resume+0x40> _ISR_Enable( level ); 300084b4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 300084b8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return; } current_state = the_thread->current_state; 300084bc: e5903010 ldr r3, [r0, #16] if ( current_state & STATES_SUSPENDED ) { 300084c0: e3130002 tst r3, #2 ; 0x2 300084c4: 0a000028 beq 3000856c <_Thread_Resume+0xf0> 300084c8: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 300084cc: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 300084d0: e5803010 str r3, [r0, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 300084d4: 1a000024 bne 3000856c <_Thread_Resume+0xf0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 300084d8: e5900090 ldr r0, [r0, #144] 300084dc: e1d429b6 ldrh r2, [r4, #150] 300084e0: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 300084e4: e594108c ldr r1, [r4, #140] 300084e8: e1833002 orr r3, r3, r2 _Priority_Major_bit_map |= the_priority_map->ready_major; 300084ec: e59fc080 ldr ip, [pc, #128] ; 30008574 <_Thread_Resume+0xf8> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 300084f0: e1c030b0 strh r3, [r0] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 300084f4: e2813004 add r3, r1, #4 ; 0x4 300084f8: e5843000 str r3, [r4] _Priority_Major_bit_map |= the_priority_map->ready_major; 300084fc: e1d429b4 ldrh r2, [r4, #148] 30008500: e1dc30b0 ldrh r3, [ip] old_last_node = the_chain->last; 30008504: e5910008 ldr r0, [r1, #8] 30008508: e1833002 orr r3, r3, r2 the_chain->last = the_node; 3000850c: e5814008 str r4, [r1, #8] 30008510: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 30008514: e5840004 str r0, [r4, #4] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 30008518: e5804000 str r4, [r0] _ISR_Flash( level ); 3000851c: e10f3000 mrs r3, CPSR 30008520: e129f005 msr CPSR_fc, r5 30008524: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 30008528: e59f1048 ldr r1, [pc, #72] ; 30008578 <_Thread_Resume+0xfc> 3000852c: e5942014 ldr r2, [r4, #20] 30008530: e5913000 ldr r3, [r1] 30008534: e5933014 ldr r3, [r3, #20] 30008538: e1520003 cmp r2, r3 3000853c: 2a00000a bcs 3000856c <_Thread_Resume+0xf0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 30008540: e59f3034 ldr r3, [pc, #52] ; 3000857c <_Thread_Resume+0x100> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 30008544: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 30008548: e5933000 ldr r3, [r3] 3000854c: e5d33076 ldrb r3, [r3, #118] 30008550: e3530000 cmp r3, #0 ; 0x0 30008554: 1a000001 bne 30008560 <_Thread_Resume+0xe4> 30008558: e3520000 cmp r2, #0 ; 0x0 3000855c: 1a000002 bne 3000856c <_Thread_Resume+0xf0> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 30008560: e59f3018 ldr r3, [pc, #24] ; 30008580 <_Thread_Resume+0x104> 30008564: e3a02001 mov r2, #1 ; 0x1 30008568: e5c32000 strb r2, [r3] } } } _ISR_Enable( level ); 3000856c: e129f005 msr CPSR_fc, r5 30008570: e8bd8030 pop {r4, r5, pc} 30008574: 300228f8 .word 0x300228f8 30008578: 300228d0 .word 0x300228d0 3000857c: 30022904 .word 0x30022904 30008580: 30022914 .word 0x30022914 30006d68 <_Thread_Stack_Allocate>: * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 30006d68: e59f305c ldr r3, [pc, #92] ; 30006dcc <_Thread_Stack_Allocate+0x64> size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006d6c: e92d4030 push {r4, r5, lr} * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 30006d70: e5932000 ldr r2, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006d74: e59f3054 ldr r3, [pc, #84] ; 30006dd0 <_Thread_Stack_Allocate+0x68> * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 30006d78: e5922020 ldr r2, [r2, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006d7c: e5933000 ldr r3, [r3] 30006d80: e1a05000 mov r5, r0 30006d84: e1510003 cmp r1, r3 30006d88: 21a04001 movcs r4, r1 30006d8c: 31a04003 movcc r4, r3 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 30006d90: e3520000 cmp r2, #0 ; 0x0 30006d94: 0a000003 beq 30006da8 <_Thread_Stack_Allocate+0x40> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 30006d98: e1a00004 mov r0, r4 <== NOT EXECUTED 30006d9c: e1a0e00f mov lr, pc <== NOT EXECUTED 30006da0: e12fff12 bx r2 <== NOT EXECUTED 30006da4: ea000002 b 30006db4 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 30006da8: e2844004 add r4, r4, #4 ; 0x4 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 30006dac: e1a00004 mov r0, r4 30006db0: eb000203 bl 300075c4 <_Workspace_Allocate> 30006db4: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 30006db8: e3500000 cmp r0, #0 ; 0x0 30006dbc: 11a00004 movne r0, r4 30006dc0: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 30006dc4: e58530cc str r3, [r5, #204] return the_stack_size; } 30006dc8: e8bd8030 pop {r4, r5, pc} 30006dcc: 300162fc .word 0x300162fc 30006dd0: 30015420 .word 0x30015420 30006dd4 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 30006dd4: e5d030c0 ldrb r3, [r0, #192] */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 30006dd8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 30006ddc: e3530000 cmp r3, #0 ; 0x0 30006de0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) 30006de4: e59f3028 ldr r3, [pc, #40] ; 30006e14 <_Thread_Stack_Free+0x40> 30006de8: e5933000 ldr r3, [r3] 30006dec: e5933024 ldr r3, [r3, #36] 30006df0: e3530000 cmp r3, #0 ; 0x0 30006df4: 0a000003 beq 30006e08 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 30006df8: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 30006dfc: e1a0e00f mov lr, pc <== NOT EXECUTED 30006e00: e12fff13 bx r3 <== NOT EXECUTED 30006e04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 30006e08: e59000c8 ldr r0, [r0, #200] } 30006e0c: e49de004 pop {lr} ; (ldr lr, [sp], #4) if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 30006e10: ea0001e7 b 300075b4 <_Workspace_Free> 30006e14: 300162fc .word 0x300162fc 300067a8 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 300067a8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 300067ac: e1a0c001 mov ip, r1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 300067b0: e5915014 ldr r5, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300067b4: e281303c add r3, r1, #60 ; 0x3c 300067b8: e58c3038 str r3, [ip, #56] the_chain->permanent_null = NULL; 300067bc: e3a03000 mov r3, #0 ; 0x0 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 300067c0: e1a04325 lsr r4, r5, #6 300067c4: e58c303c str r3, [ip, #60] header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 300067c8: e283300c add r3, r3, #12 ; 0xc 300067cc: e0260493 mla r6, r3, r4, r0 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 300067d0: e3150020 tst r5, #32 ; 0x20 the_chain->last = _Chain_Head(the_chain); 300067d4: e2811038 add r1, r1, #56 ; 0x38 300067d8: e58c1040 str r1, [ip, #64] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 300067dc: e1a09002 mov r9, r2 _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 ]; block_state = the_thread_queue->state; 300067e0: e5908038 ldr r8, [r0, #56] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 300067e4: 159fa19c ldrne sl, [pc, #412] ; 30006988 <_Thread_queue_Enqueue_priority+0x1e0> _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 300067e8: 12864008 addne r4, r6, #8 ; 0x8 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 300067ec: 1a00002d bne 300068a8 <_Thread_queue_Enqueue_priority+0x100> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300067f0: e3a03003 mov r3, #3 ; 0x3 300067f4: e0030394 mul r3, r4, r3 300067f8: e2833001 add r3, r3, #1 ; 0x1 300067fc: e0804103 add r4, r0, r3, lsl #2 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 30006800: e1a07006 mov r7, r6 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 30006804: e10f6000 mrs r6, CPSR 30006808: e38630c0 orr r3, r6, #192 ; 0xc0 3000680c: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 30006810: e3e02000 mvn r2, #0 ; 0x0 30006814: e5971000 ldr r1, [r7] 30006818: ea000011 b 30006864 <_Thread_queue_Enqueue_priority+0xbc> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 3000681c: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 30006820: e1550002 cmp r5, r2 30006824: 9a000010 bls 3000686c <_Thread_queue_Enqueue_priority+0xc4> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 30006828: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 3000682c: e1510004 cmp r1, r4 30006830: 0a00000d beq 3000686c <_Thread_queue_Enqueue_priority+0xc4> break; search_priority = search_thread->current_priority; 30006834: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 30006838: e1550002 cmp r5, r2 3000683c: 9a00000a bls 3000686c <_Thread_queue_Enqueue_priority+0xc4> break; #endif _ISR_Flash( level ); 30006840: e10f3000 mrs r3, CPSR 30006844: e129f006 msr CPSR_fc, r6 30006848: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 3000684c: e5913010 ldr r3, [r1, #16] 30006850: e1180003 tst r8, r3 30006854: 1a000001 bne 30006860 <_Thread_queue_Enqueue_priority+0xb8> _ISR_Enable( level ); 30006858: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 3000685c: eaffffe8 b 30006804 <_Thread_queue_Enqueue_priority+0x5c> <== NOT EXECUTED goto restart_forward_search; } search_thread = 30006860: e5911000 ldr r1, [r1] 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 ) ) { 30006864: e1510004 cmp r1, r4 30006868: 1affffeb bne 3000681c <_Thread_queue_Enqueue_priority+0x74> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 3000686c: e5903030 ldr r3, [r0, #48] 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 ) ) { 30006870: e1a04006 mov r4, r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 30006874: e3530001 cmp r3, #1 ; 0x1 30006878: 1a00003f bne 3000697c <_Thread_queue_Enqueue_priority+0x1d4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3000687c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006880: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006884: e5803030 str r3, [r0, #48] if ( priority == search_priority ) 30006888: 0a000031 beq 30006954 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 3000688c: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006890: e88c000a stm ip, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006894: e58c0044 str r0, [ip, #68] 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; 30006898: e583c000 str ip, [r3] search_node->previous = the_node; 3000689c: e581c004 str ip, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 300068a0: e129f006 msr CPSR_fc, r6 300068a4: ea000032 b 30006974 <_Thread_queue_Enqueue_priority+0x1cc> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 300068a8: e5da3000 ldrb r3, [sl] 300068ac: e2832001 add r2, r3, #1 ; 0x1 _ISR_Disable( level ); 300068b0: e10f7000 mrs r7, CPSR 300068b4: e38730c0 orr r3, r7, #192 ; 0xc0 300068b8: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 300068bc: e5941000 ldr r1, [r4] 300068c0: ea000011 b 3000690c <_Thread_queue_Enqueue_priority+0x164> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 300068c4: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 300068c8: e1550002 cmp r5, r2 300068cc: 2a000010 bcs 30006914 <_Thread_queue_Enqueue_priority+0x16c> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 300068d0: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 300068d4: e1510006 cmp r1, r6 300068d8: 0a00000d beq 30006914 <_Thread_queue_Enqueue_priority+0x16c> break; search_priority = search_thread->current_priority; 300068dc: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 300068e0: e1550002 cmp r5, r2 300068e4: 2a00000a bcs 30006914 <_Thread_queue_Enqueue_priority+0x16c> break; #endif _ISR_Flash( level ); 300068e8: e10f3000 mrs r3, CPSR 300068ec: e129f007 msr CPSR_fc, r7 300068f0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 300068f4: e5913010 ldr r3, [r1, #16] 300068f8: e1180003 tst r8, r3 300068fc: 1a000001 bne 30006908 <_Thread_queue_Enqueue_priority+0x160> _ISR_Enable( level ); 30006900: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 30006904: eaffffe7 b 300068a8 <_Thread_queue_Enqueue_priority+0x100> <== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 30006908: e5911004 ldr r1, [r1, #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 ) ) { 3000690c: e1510006 cmp r1, r6 30006910: 1affffeb bne 300068c4 <_Thread_queue_Enqueue_priority+0x11c> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006914: e5903030 ldr r3, [r0, #48] 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 ) ) { 30006918: e1a04007 mov r4, r7 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 3000691c: e3530001 cmp r3, #1 ; 0x1 30006920: 1a000015 bne 3000697c <_Thread_queue_Enqueue_priority+0x1d4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006924: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006928: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3000692c: e5803030 str r3, [r0, #48] if ( priority == search_priority ) 30006930: 0a000007 beq 30006954 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 30006934: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 30006938: e58c1004 str r1, [ip, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 3000693c: e58c3000 str r3, [ip] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006940: e58c0044 str r0, [ip, #68] 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; 30006944: e581c000 str ip, [r1] next_node->previous = the_node; 30006948: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 3000694c: e129f007 msr CPSR_fc, r7 30006950: ea000007 b 30006974 <_Thread_queue_Enqueue_priority+0x1cc> 30006954: e281303c add r3, r1, #60 ; 0x3c 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; 30006958: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 3000695c: e58c3000 str r3, [ip] the_node->previous = previous_node; 30006960: e58c2004 str r2, [ip, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006964: e58c0044 str r0, [ip, #68] 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; 30006968: e582c000 str ip, [r2] search_node->previous = the_node; 3000696c: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006970: e129f004 msr CPSR_fc, r4 30006974: e3a00001 mov r0, #1 ; 0x1 30006978: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 3000697c: e5900030 ldr r0, [r0, #48] <== NOT EXECUTED * 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; 30006980: e5894000 str r4, [r9] <== NOT EXECUTED return the_thread_queue->sync_state; } 30006984: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30006988: 30015424 .word 0x30015424 3000b20c <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 3000b20c: e92d4010 push {r4, lr} 3000b210: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); 3000b214: e10f0000 mrs r0, CPSR 3000b218: e38030c0 orr r3, r0, #192 ; 0xc0 3000b21c: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000b220: e59f3064 ldr r3, [pc, #100] ; 3000b28c <_Thread_queue_Extract_fifo+0x80> 3000b224: e5912010 ldr r2, [r1, #16] 3000b228: e0023003 and r3, r2, r3 3000b22c: e3530000 cmp r3, #0 ; 0x0 3000b230: 1a000001 bne 3000b23c <_Thread_queue_Extract_fifo+0x30> _ISR_Enable( level ); 3000b234: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000b238: e8bd8010 pop {r4, pc} <== NOT EXECUTED _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000b23c: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 3000b240: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000b244: e5911000 ldr r1, [r1] 3000b248: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 3000b24c: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; 3000b250: e5821000 str r1, [r2] 3000b254: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000b258: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000b25c: 0a000001 beq 3000b268 <_Thread_queue_Extract_fifo+0x5c> _ISR_Enable( level ); 3000b260: e129f000 msr CPSR_fc, r0 3000b264: ea000004 b 3000b27c <_Thread_queue_Extract_fifo+0x70> 3000b268: e3a03003 mov r3, #3 ; 0x3 3000b26c: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000b270: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); 3000b274: e2840048 add r0, r4, #72 ; 0x48 3000b278: ebfff07f bl 3000747c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000b27c: e59f100c ldr r1, [pc, #12] ; 3000b290 <_Thread_queue_Extract_fifo+0x84> 3000b280: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000b284: e8bd4010 pop {r4, lr} 3000b288: eaffeae2 b 30005e18 <_Thread_Clear_state> 3000b28c: 0003bee0 .word 0x0003bee0 3000b290: 1003fff8 .word 0x1003fff8 3000a28c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 3000a28c: e92d4070 push {r4, r5, r6, lr} 3000a290: e1a04001 mov r4, r1 3000a294: e20260ff and r6, r2, #255 ; 0xff Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 3000a298: e10fc000 mrs ip, CPSR 3000a29c: e38c30c0 orr r3, ip, #192 ; 0xc0 3000a2a0: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000a2a4: e59f30b4 ldr r3, [pc, #180] ; 3000a360 <_Thread_queue_Extract_priority_helper+0xd4> 3000a2a8: e5912010 ldr r2, [r1, #16] 3000a2ac: e0023003 and r3, r2, r3 3000a2b0: e3530000 cmp r3, #0 ; 0x0 3000a2b4: 1a000001 bne 3000a2c0 <_Thread_queue_Extract_priority_helper+0x34> _ISR_Enable( level ); 3000a2b8: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 3000a2bc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3000a2c0: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000a2c4: e284303c add r3, r4, #60 ; 0x3c 3000a2c8: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 3000a2cc: e894000c ldm r4, {r2, r3} new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 3000a2d0: 05823004 streq r3, [r2, #4] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 3000a2d4: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000a2d8: 0a00000e beq 3000a318 <_Thread_queue_Extract_priority_helper+0x8c> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 3000a2dc: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; 3000a2e0: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; 3000a2e4: e5821004 str r1, [r2, #4] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 3000a2e8: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 3000a2ec: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 3000a2f0: e5942038 ldr r2, [r4, #56] 3000a2f4: e5943040 ldr r3, [r4, #64] 3000a2f8: e1520003 cmp r2, r3 3000a2fc: 0a000005 beq 3000a318 <_Thread_queue_Extract_priority_helper+0x8c> new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 3000a300: e281203c add r2, r1, #60 ; 0x3c new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = 3000a304: e2813038 add r3, r1, #56 ; 0x38 3000a308: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 3000a30c: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; 3000a310: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 3000a314: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 3000a318: e3560000 cmp r6, #0 ; 0x0 3000a31c: 0a000001 beq 3000a328 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 3000a320: e129f00c msr CPSR_fc, ip 3000a324: e8bd8070 pop {r4, r5, r6, pc} return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000a328: e5943050 ldr r3, [r4, #80] 3000a32c: e3530002 cmp r3, #2 ; 0x2 3000a330: 0a000001 beq 3000a33c <_Thread_queue_Extract_priority_helper+0xb0> _ISR_Enable( level ); 3000a334: e129f00c msr CPSR_fc, ip 3000a338: ea000004 b 3000a350 <_Thread_queue_Extract_priority_helper+0xc4> 3000a33c: e3a03003 mov r3, #3 ; 0x3 3000a340: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000a344: e129f00c msr CPSR_fc, ip (void) _Watchdog_Remove( &the_thread->Timer ); 3000a348: e2840048 add r0, r4, #72 ; 0x48 3000a34c: ebfff44a bl 3000747c <_Watchdog_Remove> 3000a350: e59f100c ldr r1, [pc, #12] ; 3000a364 <_Thread_queue_Extract_priority_helper+0xd8> 3000a354: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000a358: e8bd4070 pop {r4, r5, r6, lr} 3000a35c: eaffeead b 30005e18 <_Thread_Clear_state> 3000a360: 0003bee0 .word 0x0003bee0 3000a364: 1003fff8 .word 0x1003fff8 3000b734 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 3000b734: e92d4010 push {r4, lr} 3000b738: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); 3000b73c: eb00122d bl 3000fff8 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 3000b740: e5943024 ldr r3, [r4, #36] 3000b744: e3530000 cmp r3, #0 ; 0x0 3000b748: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); 3000b74c: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } 3000b750: e8bd4010 pop {r4, lr} <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 3000b754: ea001227 b 3000fff8 <_Chain_Extract> <== NOT EXECUTED 3000730c <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 3000730c: e59f30fc ldr r3, [pc, #252] ; 30007410 <_Watchdog_Insert+0x104> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 30007310: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30007314: e1a0c001 mov ip, r1 30007318: e1a06000 mov r6, r0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 3000731c: e5934000 ldr r4, [r3] _ISR_Disable( level ); 30007320: e10f5000 mrs r5, CPSR 30007324: e38530c0 orr r3, r5, #192 ; 0xc0 30007328: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 3000732c: e5913008 ldr r3, [r1, #8] 30007330: e3530000 cmp r3, #0 ; 0x0 30007334: 0a000001 beq 30007340 <_Watchdog_Insert+0x34> _ISR_Enable( level ); 30007338: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3000733c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 30007340: e59f30cc ldr r3, [pc, #204] ; 30007414 <_Watchdog_Insert+0x108> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007344: e59f70cc ldr r7, [pc, #204] ; 30007418 <_Watchdog_Insert+0x10c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 30007348: e5932000 ldr r2, [r3] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 3000734c: e1a08007 mov r8, r7 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 30007350: e2822001 add r2, r2, #1 ; 0x1 30007354: e5832000 str r2, [r3] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 30007358: e3a03001 mov r3, #1 ; 0x1 3000735c: e5813008 str r3, [r1, #8] _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 30007360: e59c000c ldr r0, [ip, #12] * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 30007364: e5961000 ldr r1, [r6] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007368: e3500000 cmp r0, #0 ; 0x0 3000736c: 0a000014 beq 300073c4 <_Watchdog_Insert+0xb8> 30007370: e5913000 ldr r3, [r1] 30007374: e3530000 cmp r3, #0 ; 0x0 30007378: 0a000011 beq 300073c4 <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) { 3000737c: e5912010 ldr r2, [r1, #16] 30007380: e1500002 cmp r0, r2 after->delta_interval -= delta_interval; 30007384: 30603002 rsbcc r3, r0, r2 30007388: 35813010 strcc r3, [r1, #16] 3000738c: 3a00000c bcc 300073c4 <_Watchdog_Insert+0xb8> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 30007390: e10f3000 mrs r3, CPSR 30007394: e129f005 msr CPSR_fc, r5 30007398: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 3000739c: e59c3008 ldr r3, [ip, #8] if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 300073a0: e0620000 rsb r0, r2, r0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 300073a4: e3530001 cmp r3, #1 ; 0x1 300073a8: 1a000010 bne 300073f0 <_Watchdog_Insert+0xe4> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 300073ac: e5973000 ldr r3, [r7] 300073b0: e1530004 cmp r3, r4 _Watchdog_Sync_level = insert_isr_nest_level; 300073b4: 85884000 strhi r4, [r8] 300073b8: 8affffe8 bhi 30007360 <_Watchdog_Insert+0x54> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 300073bc: e5911000 ldr r1, [r1] 300073c0: eaffffe8 b 30007368 <_Watchdog_Insert+0x5c> the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 300073c4: e59f3050 ldr r3, [pc, #80] ; 3000741c <_Watchdog_Insert+0x110> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 300073c8: e5912004 ldr r2, [r1, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 300073cc: e5933000 ldr r3, [r3] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 300073d0: e5921000 ldr r1, [r2] 300073d4: e58c3014 str r3, [ip, #20] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 300073d8: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 300073dc: e582c000 str ip, [r2] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 300073e0: e98c000c stmib ip, {r2, r3} } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 300073e4: e58c0010 str r0, [ip, #16] before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 300073e8: e581c004 str ip, [r1, #4] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 300073ec: e58c1000 str r1, [ip] _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 300073f0: e59f3020 ldr r3, [pc, #32] ; 30007418 <_Watchdog_Insert+0x10c> _Watchdog_Sync_count--; 300073f4: e59f2018 ldr r2, [pc, #24] ; 30007414 <_Watchdog_Insert+0x108> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 300073f8: e5834000 str r4, [r3] _Watchdog_Sync_count--; 300073fc: e5923000 ldr r3, [r2] 30007400: e2433001 sub r3, r3, #1 ; 0x1 30007404: e5823000 str r3, [r2] _ISR_Enable( level ); 30007408: e129f005 msr CPSR_fc, r5 3000740c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30007410: 30016300 .word 0x30016300 30007414: 300163c0 .word 0x300163c0 30007418: 30016320 .word 0x30016320 3000741c: 300163c4 .word 0x300163c4 300075fc <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 300075fc: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007600: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 30007604: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007608: 0a000001 beq 30007614 <_Workspace_Handler_initialization+0x18> 3000760c: e2141003 ands r1, r4, #3 ; 0x3 30007610: 0a000003 beq 30007624 <_Workspace_Handler_initialization+0x28> _Internal_error_Occurred( 30007614: e3a00000 mov r0, #0 ; 0x0 30007618: e3a01001 mov r1, #1 ; 0x1 3000761c: e3a02002 mov r2, #2 ; 0x2 30007620: ea00000e b 30007660 <_Workspace_Handler_initialization+0x64> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 30007624: e59f3038 ldr r3, [pc, #56] ; 30007664 <_Workspace_Handler_initialization+0x68> 30007628: e5933000 ldr r3, [r3] 3000762c: e5d33028 ldrb r3, [r3, #40] 30007630: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, size ); 30007634: 11a02005 movne r2, r5 30007638: 1b00114b blne 3000bb6c memory_available = _Heap_Initialize( 3000763c: e1a01004 mov r1, r4 30007640: e1a02005 mov r2, r5 30007644: e59f001c ldr r0, [pc, #28] ; 30007668 <_Workspace_Handler_initialization+0x6c> 30007648: e3a03004 mov r3, #4 ; 0x4 3000764c: ebfff703 bl 30005260 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 30007650: e3500000 cmp r0, #0 ; 0x0 30007654: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 30007658: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000765c: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 30007660: ebfff784 bl 30005478 <_Internal_error_Occurred> 30007664: 300162fc .word 0x300162fc 30007668: 3001628c .word 0x3001628c 300084b0 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 300084b0: e1a03002 mov r3, r2 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 300084b4: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 300084b8: eaffffe9 b 30008464 <__assert_func> <== NOT EXECUTED 30008464 <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 30008464: e92d4010 push {r4, lr} <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 30008468: e252c000 subs ip, r2, #0 ; 0x0 <== NOT EXECUTED 3000846c: 059fc030 ldreq ip, [pc, #48] ; 300084a4 <__assert_func+0x40> <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 30008470: e1a04001 mov r4, r1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 30008474: 159fe02c ldrne lr, [pc, #44] ; 300084a8 <__assert_func+0x44> <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 30008478: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3000847c: e1a01003 mov r1, r3 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 30008480: 01a0e00c moveq lr, ip <== NOT EXECUTED 30008484: e1a02000 mov r2, r0 <== NOT EXECUTED 30008488: e1a03004 mov r3, r4 <== NOT EXECUTED 3000848c: e59f0018 ldr r0, [pc, #24] ; 300084ac <__assert_func+0x48> <== NOT EXECUTED 30008490: e58de000 str lr, [sp] <== NOT EXECUTED 30008494: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30008498: ebffe67c bl 30001e90 <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 3000849c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300084a0: ebfff13c bl 30004998 <== NOT EXECUTED 300084a4: 30014eb9 .word 0x30014eb9 300084a8: 3001502b .word 0x3001502b 300084ac: 30015038 .word 0x30015038 30013a2c <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 30013a2c: e1a04000 mov r4, r0 30013a30: eb000263 bl 300143c4 <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 30013a34: ebffffe1 bl 300139c0 rtems_shutdown_executive(status); 30013a38: e1a00004 mov r0, r4 30013a3c: eb00003a bl 30013b2c 30013a40: eafffffe b 30013a40 <_exit+0x14> <== NOT EXECUTED 30027b74 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 30027b74: e1a00001 mov r0, r1 <== NOT EXECUTED 30027b78: e1a01002 mov r1, r2 <== NOT EXECUTED 30027b7c: e1a02003 mov r2, r3 <== NOT EXECUTED 30027b80: eaffff88 b 300279a8 <== NOT EXECUTED 3001e21c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 3001e21c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3001e220: e12fff1e bx lr <== NOT EXECUTED 300088bc <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 300088bc: eaffffe6 b 3000885c <== NOT EXECUTED 3001ca00 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 3001ca00: e1a00001 mov r0, r1 <== NOT EXECUTED 3001ca04: e1a01002 mov r1, r2 <== NOT EXECUTED 3001ca08: eaffff73 b 3001c7dc <== NOT EXECUTED 3001cbc0 <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 3001cbc0: e1a00001 mov r0, r1 <== NOT EXECUTED 3001cbc4: e1a01002 mov r1, r2 <== NOT EXECUTED 3001cbc8: eaffffc8 b 3001caf0 <== NOT EXECUTED 30013b10 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 30013b10: e1a00001 mov r0, r1 <== NOT EXECUTED 30013b14: e1a01002 mov r1, r2 <== NOT EXECUTED 30013b18: ea000011 b 30013b64 <== NOT EXECUTED 3003b4b4 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3003b4b4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3003b4b8: e24dd04c sub sp, sp, #76 ; 0x4c <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3003b4bc: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3003b4c0: e1a04001 mov r4, r1 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3003b4c4: e1a0100d mov r1, sp <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3003b4c8: e1a05002 mov r5, r2 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3003b4cc: ebff2738 bl 300051b4 <== NOT EXECUTED if ( s < 0 ) 3003b4d0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3003b4d4: ba00000d blt 3003b510 <_rename_r+0x5c> <== NOT EXECUTED return s; s = link( old, new ); 3003b4d8: e1a01005 mov r1, r5 <== NOT EXECUTED 3003b4dc: e1a00004 mov r0, r4 <== NOT EXECUTED 3003b4e0: ebff84bd bl 3001c7dc <== NOT EXECUTED if ( s < 0 ) 3003b4e4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3003b4e8: ba000008 blt 3003b510 <_rename_r+0x5c> <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 3003b4ec: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3003b4f0: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 3003b4f4: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED 3003b4f8: 1a000002 bne 3003b508 <_rename_r+0x54> <== NOT EXECUTED 3003b4fc: e1a00004 mov r0, r4 <== NOT EXECUTED 3003b500: ebff877b bl 3001d2f4 <== NOT EXECUTED 3003b504: ea000001 b 3003b510 <_rename_r+0x5c> <== NOT EXECUTED 3003b508: e1a00004 mov r0, r4 <== NOT EXECUTED 3003b50c: ebff8874 bl 3001d6e4 <== NOT EXECUTED } 3003b510: e28dd04c add sp, sp, #76 ; 0x4c <== NOT EXECUTED 3003b514: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30005284 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 30005284: e1a00001 mov r0, r1 <== NOT EXECUTED 30005288: e1a01002 mov r1, r2 <== NOT EXECUTED 3000528c: eaffffc8 b 300051b4 <== NOT EXECUTED 3001d81c <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 3001d81c: e1a00001 mov r0, r1 <== NOT EXECUTED 3001d820: eaffffaf b 3001d6e4 <== NOT EXECUTED 300041e0 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 300041e0: e5900000 ldr r0, [r0] <== NOT EXECUTED 300041e4: e5911000 ldr r1, [r1] <== NOT EXECUTED 300041e8: e280000c add r0, r0, #12 ; 0xc <== NOT EXECUTED 300041ec: e281100c add r1, r1, #12 ; 0xc <== NOT EXECUTED 300041f0: ea002fed b 300101ac <== NOT EXECUTED 3001b130 : #include int chdir( const char *pathname ) { 3001b130: e92d4010 push {r4, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 3001b134: e3a01001 mov r1, #1 ; 0x1 #include int chdir( const char *pathname ) { 3001b138: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 3001b13c: e1a0200d mov r2, sp 3001b140: e1a03001 mov r3, r1 3001b144: ebffa2ac bl 30003bfc pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 3001b148: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 3001b14c: e1a0400d mov r4, sp pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 3001b150: 1a00000b bne 3001b184 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 3001b154: e59d2008 ldr r2, [sp, #8] 3001b158: e5923010 ldr r3, [r2, #16] 3001b15c: e3530000 cmp r3, #0 ; 0x0 3001b160: 1a000009 bne 3001b18c rtems_filesystem_freenode( &loc ); 3001b164: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001b168: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001b16c: 11a0000d movne r0, sp <== NOT EXECUTED 3001b170: 11a0e00f movne lr, pc <== NOT EXECUTED 3001b174: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001b178: eb003bb1 bl 3002a044 <__errno> <== NOT EXECUTED 3001b17c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001b180: e5803000 str r3, [r0] 3001b184: e3e00000 mvn r0, #0 ; 0x0 3001b188: ea00001f b 3001b20c } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 3001b18c: e1a0000d mov r0, sp 3001b190: e1a0e00f mov lr, pc 3001b194: e12fff13 bx r3 3001b198: e3500001 cmp r0, #1 ; 0x1 3001b19c: 0a00000a beq 3001b1cc rtems_filesystem_freenode( &loc ); 3001b1a0: e59d3008 ldr r3, [sp, #8] 3001b1a4: e3530000 cmp r3, #0 ; 0x0 3001b1a8: 0a000004 beq 3001b1c0 3001b1ac: e593301c ldr r3, [r3, #28] 3001b1b0: e3530000 cmp r3, #0 ; 0x0 3001b1b4: 11a0000d movne r0, sp 3001b1b8: 11a0e00f movne lr, pc 3001b1bc: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3001b1c0: eb003b9f bl 3002a044 <__errno> 3001b1c4: e3a03014 mov r3, #20 ; 0x14 3001b1c8: eaffffec b 3001b180 } rtems_filesystem_freenode( &rtems_filesystem_current ); 3001b1cc: e59f3040 ldr r3, [pc, #64] ; 3001b214 3001b1d0: e5930000 ldr r0, [r3] 3001b1d4: e590200c ldr r2, [r0, #12] 3001b1d8: e3520000 cmp r2, #0 ; 0x0 3001b1dc: 0a000004 beq 3001b1f4 3001b1e0: e592201c ldr r2, [r2, #28] 3001b1e4: e3520000 cmp r2, #0 ; 0x0 3001b1e8: 12800004 addne r0, r0, #4 ; 0x4 3001b1ec: 11a0e00f movne lr, pc 3001b1f0: 112fff12 bxne r2 rtems_filesystem_current = loc; 3001b1f4: e59f2018 ldr r2, [pc, #24] ; 3001b214 3001b1f8: e592c000 ldr ip, [r2] 3001b1fc: e89d000f ldm sp, {r0, r1, r2, r3} 3001b200: e28cc004 add ip, ip, #4 ; 0x4 3001b204: e88c000f stm ip, {r0, r1, r2, r3} 3001b208: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001b20c: e28dd010 add sp, sp, #16 ; 0x10 3001b210: e8bd8010 pop {r4, pc} 3001b214: 30041ee4 .word 0x30041ee4 300039d8 : int chmod( const char *path, mode_t mode ) { 300039d8: e92d4030 push {r4, r5, lr} 300039dc: e24dd010 sub sp, sp, #16 ; 0x10 300039e0: e1a04001 mov r4, r1 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 300039e4: e1a0200d mov r2, sp 300039e8: e3a01000 mov r1, #0 ; 0x0 300039ec: e3a03001 mov r3, #1 ; 0x1 300039f0: eb000081 bl 30003bfc if ( status != 0 ) 300039f4: e3500000 cmp r0, #0 ; 0x0 { int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 300039f8: e1a0500d mov r5, sp if ( status != 0 ) 300039fc: 1a00000d bne 30003a38 return -1; if ( !loc.handlers ){ 30003a00: e59d3004 ldr r3, [sp, #4] 30003a04: e3530000 cmp r3, #0 ; 0x0 30003a08: 1a00000c bne 30003a40 rtems_filesystem_freenode( &loc ); 30003a0c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30003a10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003a14: 0a000004 beq 30003a2c <== NOT EXECUTED 30003a18: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30003a1c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003a20: 11a0000d movne r0, sp <== NOT EXECUTED 30003a24: 11a0e00f movne lr, pc <== NOT EXECUTED 30003a28: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 30003a2c: eb009984 bl 3002a044 <__errno> <== NOT EXECUTED 30003a30: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30003a34: e5803000 str r3, [r0] <== NOT EXECUTED 30003a38: e3e04000 mvn r4, #0 ; 0x0 30003a3c: ea00001a b 30003aac } if ( !loc.handlers->fchmod_h ){ 30003a40: e593301c ldr r3, [r3, #28] 30003a44: e3530000 cmp r3, #0 ; 0x0 30003a48: 1a00000a bne 30003a78 rtems_filesystem_freenode( &loc ); 30003a4c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30003a50: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003a54: 0a000004 beq 30003a6c <== NOT EXECUTED 30003a58: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30003a5c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003a60: 11a0000d movne r0, sp <== NOT EXECUTED 30003a64: 11a0e00f movne lr, pc <== NOT EXECUTED 30003a68: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30003a6c: eb009974 bl 3002a044 <__errno> <== NOT EXECUTED 30003a70: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30003a74: eaffffee b 30003a34 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 30003a78: e1a01004 mov r1, r4 30003a7c: e1a0000d mov r0, sp 30003a80: e1a0e00f mov lr, pc 30003a84: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 30003a88: e59d3008 ldr r3, [sp, #8] if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 30003a8c: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 30003a90: e3530000 cmp r3, #0 ; 0x0 30003a94: 0a000004 beq 30003aac 30003a98: e593301c ldr r3, [r3, #28] 30003a9c: e3530000 cmp r3, #0 ; 0x0 30003aa0: 11a0000d movne r0, sp 30003aa4: 11a0e00f movne lr, pc 30003aa8: 112fff13 bxne r3 return result; } 30003aac: e1a00004 mov r0, r4 30003ab0: e28dd010 add sp, sp, #16 ; 0x10 30003ab4: e8bd8030 pop {r4, r5, pc} 3001b218 : int chown( const char *path, uid_t owner, gid_t group ) { 3001b218: e92d4070 push {r4, r5, r6, lr} 3001b21c: e24dd010 sub sp, sp, #16 ; 0x10 3001b220: e1a0c801 lsl ip, r1, #16 3001b224: e1a0e802 lsl lr, r2, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 3001b228: e3a01000 mov r1, #0 ; 0x0 3001b22c: e1a0200d mov r2, sp 3001b230: e3a03001 mov r3, #1 ; 0x1 int chown( const char *path, uid_t owner, gid_t group ) { 3001b234: e1a0482c lsr r4, ip, #16 3001b238: e1a0582e lsr r5, lr, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 3001b23c: ebffa26e bl 30003bfc 3001b240: e3500000 cmp r0, #0 ; 0x0 3001b244: e1a0600d mov r6, sp 3001b248: 1a00000b bne 3001b27c return -1; if ( !loc.ops->chown_h ) { 3001b24c: e59d3008 ldr r3, [sp, #8] 3001b250: e593c018 ldr ip, [r3, #24] 3001b254: e35c0000 cmp ip, #0 ; 0x0 3001b258: 1a000009 bne 3001b284 rtems_filesystem_freenode( &loc ); 3001b25c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001b260: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001b264: 11a0000d movne r0, sp <== NOT EXECUTED 3001b268: 11a0e00f movne lr, pc <== NOT EXECUTED 3001b26c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001b270: eb003b73 bl 3002a044 <__errno> <== NOT EXECUTED 3001b274: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001b278: e5803000 str r3, [r0] <== NOT EXECUTED 3001b27c: e3e04000 mvn r4, #0 ; 0x0 3001b280: ea00000d b 3001b2bc } result = (*loc.ops->chown_h)( &loc, owner, group ); 3001b284: e1a01004 mov r1, r4 3001b288: e1a02005 mov r2, r5 3001b28c: e1a0000d mov r0, sp 3001b290: e1a0e00f mov lr, pc 3001b294: e12fff1c bx ip rtems_filesystem_freenode( &loc ); 3001b298: e59d3008 ldr r3, [sp, #8] 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 ); 3001b29c: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001b2a0: e3530000 cmp r3, #0 ; 0x0 3001b2a4: 0a000004 beq 3001b2bc 3001b2a8: e593301c ldr r3, [r3, #28] 3001b2ac: e3530000 cmp r3, #0 ; 0x0 3001b2b0: 11a0000d movne r0, sp 3001b2b4: 11a0e00f movne lr, pc 3001b2b8: 112fff13 bxne r3 return result; } 3001b2bc: e1a00004 mov r0, r4 3001b2c0: e28dd010 add sp, sp, #16 ; 0x10 3001b2c4: e8bd8070 pop {r4, r5, r6, pc} 3001b2c8 : #include int chroot( const char *pathname ) { 3001b2c8: 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) { 3001b2cc: e59f60c8 ldr r6, [pc, #200] ; 3001b39c 3001b2d0: e59f30c8 ldr r3, [pc, #200] ; 3001b3a0 3001b2d4: e5964000 ldr r4, [r6] #include int chroot( const char *pathname ) { 3001b2d8: e24dd010 sub sp, sp, #16 ; 0x10 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) { 3001b2dc: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 3001b2e0: e1a05000 mov r5, 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) { 3001b2e4: 1a000008 bne 3001b30c rtems_libio_set_private_env(); /* try to set a new private env*/ 3001b2e8: eb000703 bl 3001cefc if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 3001b2ec: e5963000 ldr r3, [r6] 3001b2f0: e1530004 cmp r3, r4 3001b2f4: 1a000004 bne 3001b30c rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001b2f8: eb003b51 bl 3002a044 <__errno> <== NOT EXECUTED 3001b2fc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001b300: e5803000 str r3, [r0] <== NOT EXECUTED 3001b304: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001b308: ea000021 b 3001b394 <== NOT EXECUTED } result = chdir(pathname); 3001b30c: e1a00005 mov r0, r5 3001b310: ebffff86 bl 3001b130 if (result) { 3001b314: e3500000 cmp r0, #0 ; 0x0 3001b318: 1a000006 bne 3001b338 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 3001b31c: e1a01000 mov r1, r0 3001b320: e1a0200d mov r2, sp 3001b324: e59f0078 ldr r0, [pc, #120] ; 3001b3a4 3001b328: e1a03001 mov r3, r1 3001b32c: ebffa232 bl 30003bfc 3001b330: e3500000 cmp r0, #0 ; 0x0 3001b334: 0a000006 beq 3001b354 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 3001b338: eb003b41 bl 3002a044 <__errno> <== NOT EXECUTED 3001b33c: e1a04000 mov r4, r0 <== NOT EXECUTED 3001b340: eb003b3f bl 3002a044 <__errno> <== NOT EXECUTED 3001b344: e5903000 ldr r3, [r0] <== NOT EXECUTED 3001b348: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001b34c: e5843000 str r3, [r4] <== NOT EXECUTED 3001b350: ea00000f b 3001b394 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 3001b354: e59f3040 ldr r3, [pc, #64] ; 3001b39c 3001b358: e5930000 ldr r0, [r3] 3001b35c: e590201c ldr r2, [r0, #28] 3001b360: e3520000 cmp r2, #0 ; 0x0 3001b364: 0a000004 beq 3001b37c 3001b368: e592201c ldr r2, [r2, #28] 3001b36c: e3520000 cmp r2, #0 ; 0x0 3001b370: 12800014 addne r0, r0, #20 ; 0x14 3001b374: 11a0e00f movne lr, pc 3001b378: 112fff12 bxne r2 rtems_filesystem_root = loc; 3001b37c: e59f2018 ldr r2, [pc, #24] ; 3001b39c 3001b380: e592c000 ldr ip, [r2] 3001b384: e89d000f ldm sp, {r0, r1, r2, r3} 3001b388: e28cc014 add ip, ip, #20 ; 0x14 3001b38c: e88c000f stm ip, {r0, r1, r2, r3} 3001b390: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001b394: e28dd010 add sp, sp, #16 ; 0x10 3001b398: e8bd8070 pop {r4, r5, r6, pc} 3001b39c: 30041ee4 .word 0x30041ee4 3001b3a0: 30056c7c .word 0x30056c7c 3001b3a4: 3003da0d .word 0x3003da0d 30027804 : * close a directory. */ int closedir( DIR *dirp ) { 30027804: e92d4030 push {r4, r5, lr} int fd; if ( !dirp ) 30027808: e2505000 subs r5, r0, #0 ; 0x0 3002780c: 1a000004 bne 30027824 rtems_set_errno_and_return_minus_one( EBADF ); 30027810: eb000a0b bl 3002a044 <__errno> <== NOT EXECUTED 30027814: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30027818: e5803000 str r3, [r0] <== NOT EXECUTED dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); (void)free((void *)dirp); return(close(fd)); } 3002781c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30027820: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; 30027824: e3a03000 mov r3, #0 ; 0x0 30027828: e5853004 str r3, [r5, #4] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 3002782c: e3e03000 mvn r3, #0 ; 0x0 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 30027830: e5954000 ldr r4, [r5] dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 30027834: e595000c ldr r0, [r5, #12] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 30027838: e5853000 str r3, [r5] dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 3002783c: ebff713d bl 30003d38 (void)free((void *)dirp); 30027840: e1a00005 mov r0, r5 30027844: ebff713b bl 30003d38 return(close(fd)); 30027848: e1a00004 mov r0, r4 } 3002784c: e8bd4030 pop {r4, r5, lr} fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); (void)free((void *)dirp); return(close(fd)); 30027850: eaff7098 b 30003ab8 3000a68c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 3000a68c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 3000a690: e590302c ldr r3, [r0, #44] <== NOT EXECUTED int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 3000a694: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 3000a698: e88d0007 stm sp, {r0, r1, r2} <== NOT EXECUTED the_jnode = iop->file_info; status = rtems_io_control( 3000a69c: e5931054 ldr r1, [r3, #84] <== NOT EXECUTED 3000a6a0: e5930050 ldr r0, [r3, #80] <== NOT EXECUTED 3000a6a4: e1a0200d mov r2, sp <== NOT EXECUTED 3000a6a8: eb000241 bl 3000afb4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000a6ac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; 3000a6b0: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 3000a6b4: 1bffffe9 blne 3000a660 <== NOT EXECUTED return args.ioctl_return; } 3000a6b8: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 3000a6bc: e8bd8000 pop {pc} <== NOT EXECUTED 3000a714 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000a714: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 3000a718: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000a71c: e24dd018 sub sp, sp, #24 ; 0x18 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 3000a720: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 3000a724: e590e02c ldr lr, [r0, #44] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 3000a728: e58d3004 str r3, [sp, #4] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 3000a72c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 3000a730: e58d200c str r2, [sp, #12] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 3000a734: e58d1008 str r1, [sp, #8] <== NOT EXECUTED args.count = count; args.flags = iop->flags; 3000a738: e58dc010 str ip, [sp, #16] <== NOT EXECUTED args.bytes_moved = 0; 3000a73c: e58d3014 str r3, [sp, #20] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 3000a740: e58d0000 str r0, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 3000a744: e59e1054 ldr r1, [lr, #84] <== NOT EXECUTED 3000a748: e59e0050 ldr r0, [lr, #80] <== NOT EXECUTED 3000a74c: e1a0200d mov r2, sp <== NOT EXECUTED 3000a750: eb00023f bl 3000b054 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000a754: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 3000a758: 059d0014 ldreq r0, [sp, #20] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 3000a75c: 1bffffbf blne 3000a660 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 3000a760: e28dd018 add sp, sp, #24 ; 0x18 <== NOT EXECUTED 3000a764: e8bd8000 pop {pc} <== NOT EXECUTED 30002bb4 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002bb4: e59030b4 ldr r3, [r0, #180] /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002bb8: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002bbc: e3530000 cmp r3, #0 ; 0x0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002bc0: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002bc4: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 30002bc8: e10f1000 mrs r1, CPSR <== NOT EXECUTED 30002bcc: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30002bd0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 30002bd4: e3a05002 mov r5, #2 ; 0x2 <== NOT EXECUTED 30002bd8: ea00000a b 30002c08 <== NOT EXECUTED 30002bdc: e5845094 str r5, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 30002be0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 30002be4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30002be8: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 30002bec: e1a02001 mov r2, r1 <== NOT EXECUTED 30002bf0: eb0005ae bl 300042b0 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30002bf4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 30002bf8: 1b000766 blne 30004998 <== NOT EXECUTED rtems_interrupt_disable (level); 30002bfc: e10f1000 mrs r1, CPSR <== NOT EXECUTED 30002c00: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30002c04: e129f003 msr CPSR_fc, r3 <== 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) { 30002c08: e5942084 ldr r2, [r4, #132] <== NOT EXECUTED 30002c0c: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 30002c10: e1520003 cmp r2, r3 <== NOT EXECUTED 30002c14: 1afffff0 bne 30002bdc <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 30002c18: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30002c1c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30001f1c : int dup2( int fildes, int fildes2 ) { 30001f1c: e92d4070 push {r4, r5, r6, lr} 30001f20: e24dd04c sub sp, sp, #76 ; 0x4c 30001f24: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 30001f28: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 30001f2c: e1a05000 mov r5, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 30001f30: eb00018f bl 30002574 if ( status == -1 ) 30001f34: e3700001 cmn r0, #1 ; 0x1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 30001f38: e1a0600d mov r6, sp if ( status == -1 ) 30001f3c: 0a000009 beq 30001f68 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 30001f40: e1a0100d mov r1, sp 30001f44: e1a00004 mov r0, r4 30001f48: eb000189 bl 30002574 if ( status == -1 ) 30001f4c: e3700001 cmn r0, #1 ; 0x1 30001f50: 0a000004 beq 30001f68 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 30001f54: e1a00005 mov r0, r5 <== NOT EXECUTED 30001f58: e1a02004 mov r2, r4 <== NOT EXECUTED 30001f5c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30001f60: eb00007c bl 30002158 <== NOT EXECUTED 30001f64: ea000000 b 30001f6c <== NOT EXECUTED 30001f68: e3e00000 mvn r0, #0 ; 0x0 } 30001f6c: e28dd04c add sp, sp, #76 ; 0x4c 30001f70: e8bd8070 pop {r4, r5, r6, pc} 300026b8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 300026b8: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 300026bc: e591303c ldr r3, [r1, #60] <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 300026c0: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 300026c4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 300026c8: e1a04001 mov r4, r1 <== NOT EXECUTED 300026cc: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 300026d0: 0a000014 beq 30002728 <== NOT EXECUTED 300026d4: e59f305c ldr r3, [pc, #92] ; 30002738 <== NOT EXECUTED 300026d8: e2502009 subs r2, r0, #9 ; 0x9 <== NOT EXECUTED 300026dc: 13a02001 movne r2, #1 ; 0x1 <== NOT EXECUTED 300026e0: e5933000 ldr r3, [r3] <== NOT EXECUTED 300026e4: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED 300026e8: e01222a3 ands r2, r2, r3, lsr #5 <== NOT EXECUTED 300026ec: 0a00000d beq 30002728 <== NOT EXECUTED 300026f0: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 300026f4: 0a00000b beq 30002728 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 300026f8: e220c040 eor ip, 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] = '^'; 300026fc: e3a0305e mov r3, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 30002700: e28d0002 add r0, sp, #2 ; 0x2 <== NOT EXECUTED 30002704: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 30002708: e1a02004 mov r2, r4 <== 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] = '^'; 3000270c: e5cd3002 strb r3, [sp, #2] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 30002710: e5cdc003 strb ip, [sp, #3] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 30002714: ebffff4e bl 30002454 <== NOT EXECUTED tty->column += 2; 30002718: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 3000271c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30002720: e5843028 str r3, [r4, #40] <== NOT EXECUTED 30002724: ea000001 b 30002730 <== NOT EXECUTED } else { oproc (c, tty); 30002728: e1a01004 mov r1, r4 <== NOT EXECUTED 3000272c: ebffff8c bl 30002564 <== NOT EXECUTED } } 30002730: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 30002734: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30002738: 30015a14 .word 0x30015a14 3001bd70 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 3001bd70: e59f300c ldr r3, [pc, #12] ; 3001bd84 <== NOT EXECUTED 3001bd74: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001bd78: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001bd7c: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 3001bd80: ea003900 b 3002a188 <== NOT EXECUTED 3001bd84: 30055cb8 .word 0x30055cb8 3001bd88 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 3001bd88: e59f300c ldr r3, [pc, #12] ; 3001bd9c <== NOT EXECUTED 3001bd8c: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001bd90: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001bd94: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 3001bd98: ea0038fa b 3002a188 <== NOT EXECUTED 3001bd9c: 30055bd0 .word 0x30055bd0 3000273c : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 3000273c: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 30002740: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED if (tty->ccount == 0) 30002744: e3530000 cmp r3, #0 ; 0x0 <== 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) { 30002748: e1a04000 mov r4, r0 <== NOT EXECUTED 3000274c: e1a06001 mov r6, r1 <== NOT EXECUTED if (tty->ccount == 0) 30002750: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return; if (lineFlag) { 30002754: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 30002758: 0a000060 beq 300028e0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 3000275c: e590303c ldr r3, [r0, #60] <== NOT EXECUTED 30002760: e2132008 ands r2, r3, #8 ; 0x8 <== NOT EXECUTED tty->ccount = 0; 30002764: 05802020 streq r2, [r0, #32] <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 30002768: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 3000276c: e2133010 ands r3, r3, #16 ; 0x10 <== NOT EXECUTED 30002770: 1a00005a bne 300028e0 <== NOT EXECUTED tty->ccount = 0; 30002774: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 30002778: e1a01004 mov r1, r4 <== NOT EXECUTED 3000277c: e5d00044 ldrb r0, [r0, #68] <== NOT EXECUTED 30002780: ebffffcc bl 300026b8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 30002784: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 30002788: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED echo ('\n', tty); 3000278c: 11a01004 movne r1, r4 <== NOT EXECUTED 30002790: 13a0000a movne r0, #10 ; 0xa <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 30002794: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED 30002798: ea00000c b 300027d0 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 3000279c: e594203c ldr r2, [r4, #60] <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 300027a0: e2431001 sub r1, r3, #1 ; 0x1 <== NOT EXECUTED 300027a4: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 300027a8: e5841020 str r1, [r4, #32] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 300027ac: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 300027b0: e7d35001 ldrb r5, [r3, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 300027b4: 0a000046 beq 300028d4 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 300027b8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 300027bc: 1a000005 bne 300027d8 <== NOT EXECUTED 300027c0: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED 300027c4: 1a000003 bne 300027d8 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 300027c8: e5d40043 ldrb r0, [r4, #67] <== NOT EXECUTED 300027cc: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 300027d0: e8bd40f0 pop {r4, r5, r6, r7, 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); 300027d4: eaffffb7 b 300026b8 <== NOT EXECUTED } else if (c == '\t') { 300027d8: e3550009 cmp r5, #9 ; 0x9 <== NOT EXECUTED 300027dc: 1a00001f bne 30002860 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 300027e0: e202cc02 and ip, r2, #512 ; 0x200 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 300027e4: e594502c ldr r5, [r4, #44] <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 300027e8: e5970000 ldr r0, [r7] <== NOT EXECUTED 300027ec: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 300027f0: ea00000c b 30002828 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 300027f4: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 300027f8: e7d33002 ldrb r3, [r3, r2] <== NOT EXECUTED if (c == '\t') { 300027fc: e3530009 cmp r3, #9 ; 0x9 <== NOT EXECUTED col = (col | 7) + 1; 30002800: 03853007 orreq r3, r5, #7 ; 0x7 <== NOT EXECUTED 30002804: 02835001 addeq r5, r3, #1 ; 0x1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 30002808: 0a000005 beq 30002824 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 3000280c: e7d03003 ldrb r3, [r0, r3] <== NOT EXECUTED 30002810: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 30002814: 02855001 addeq r5, r5, #1 ; 0x1 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 30002818: 0a000001 beq 30002824 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 3000281c: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED col += 2; 30002820: 12855002 addne r5, r5, #2 ; 0x2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 30002824: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30002828: e1520001 cmp r2, r1 <== NOT EXECUTED 3000282c: 1afffff0 bne 300027f4 <== NOT EXECUTED 30002830: ea000003 b 30002844 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 30002834: ebffff06 bl 30002454 <== NOT EXECUTED tty->column--; 30002838: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 3000283c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002840: e5843028 str r3, [r4, #40] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 30002844: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 30002848: e59f00a4 ldr r0, [pc, #164] ; 300028f4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3000284c: e1530005 cmp r3, r5 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 30002850: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30002854: e1a02004 mov r2, r4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 30002858: cafffff5 bgt 30002834 <== NOT EXECUTED 3000285c: ea00001c b 300028d4 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 30002860: e5973000 ldr r3, [r7] <== NOT EXECUTED 30002864: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 30002868: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 3000286c: 0a000009 beq 30002898 <== NOT EXECUTED 30002870: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 30002874: 0a000007 beq 30002898 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 30002878: e59f0078 ldr r0, [pc, #120] ; 300028f8 <== NOT EXECUTED 3000287c: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 30002880: e1a02004 mov r2, r4 <== NOT EXECUTED 30002884: ebfffef2 bl 30002454 <== NOT EXECUTED if (tty->column) 30002888: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 3000288c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 30002890: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002894: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 30002898: e5973000 ldr r3, [r7] <== NOT EXECUTED 3000289c: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 300028a0: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 300028a4: 0a000002 beq 300028b4 <== NOT EXECUTED 300028a8: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 300028ac: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 300028b0: 0a000007 beq 300028d4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 300028b4: e59f003c ldr r0, [pc, #60] ; 300028f8 <== NOT EXECUTED 300028b8: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 300028bc: e1a02004 mov r2, r4 <== NOT EXECUTED 300028c0: ebfffee3 bl 30002454 <== NOT EXECUTED if (tty->column) 300028c4: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 300028c8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 300028cc: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 300028d0: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } } } if (!lineFlag) 300028d4: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 300028d8: 1a000001 bne 300028e4 <== NOT EXECUTED 300028dc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 300028e0: e59f7014 ldr r7, [pc, #20] ; 300028fc <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 300028e4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 300028e8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300028ec: 1affffaa bne 3000279c <== NOT EXECUTED 300028f0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 300028f4: 30014eb8 .word 0x30014eb8 300028f8: 30014eb6 .word 0x30014eb6 300028fc: 30015a14 .word 0x30015a14 30027854 : #include int fchdir( int fd ) { 30027854: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 30027858: e59f3138 ldr r3, [pc, #312] ; 30027998 <== NOT EXECUTED #include int fchdir( int fd ) { 3002785c: e24dd020 sub sp, sp, #32 ; 0x20 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 30027860: e5933000 ldr r3, [r3] <== NOT EXECUTED #include int fchdir( int fd ) { 30027864: e1a01000 mov r1, r0 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 30027868: e1500003 cmp r0, r3 <== NOT EXECUTED 3002786c: 2a000006 bcs 3002788c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 30027870: e59f3124 ldr r3, [pc, #292] ; 3002799c <== NOT EXECUTED 30027874: e5932000 ldr r2, [r3] <== NOT EXECUTED 30027878: e3a03034 mov r3, #52 ; 0x34 <== NOT EXECUTED 3002787c: e0202193 mla r0, r3, r1, r2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 30027880: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 30027884: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 30027888: 1a000002 bne 30027898 <== NOT EXECUTED 3002788c: eb0009ec bl 3002a044 <__errno> <== NOT EXECUTED 30027890: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30027894: ea000015 b 300278f0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 30027898: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 3002789c: 1a000002 bne 300278ac <== NOT EXECUTED 300278a0: eb0009e7 bl 3002a044 <__errno> <== NOT EXECUTED 300278a4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300278a8: ea000010 b 300278f0 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 300278ac: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED 300278b0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300278b4: 0a000002 beq 300278c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 300278b8: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 300278bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300278c0: 1a000002 bne 300278d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 300278c4: eb0009de bl 3002a044 <__errno> <== NOT EXECUTED 300278c8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300278cc: ea000007 b 300278f0 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 300278d0: e2804010 add r4, r0, #16 ; 0x10 <== NOT EXECUTED 300278d4: e1a00004 mov r0, r4 <== NOT EXECUTED 300278d8: e1a0e00f mov lr, pc <== NOT EXECUTED 300278dc: e12fff13 bx r3 <== NOT EXECUTED 300278e0: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 300278e4: 0a000004 beq 300278fc <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 300278e8: eb0009d5 bl 3002a044 <__errno> <== NOT EXECUTED 300278ec: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 300278f0: e5803000 str r3, [r0] <== NOT EXECUTED 300278f4: e3e0e000 mvn lr, #0 ; 0x0 <== NOT EXECUTED 300278f8: ea000023 b 3002798c <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 300278fc: e59f609c ldr r6, [pc, #156] ; 300279a0 <== NOT EXECUTED 30027900: e1a0500d mov r5, sp <== NOT EXECUTED 30027904: e596c000 ldr ip, [r6] <== NOT EXECUTED 30027908: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 3002790c: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 30027910: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 30027914: e894000f ldm r4, {r0, r1, r2, r3} <== NOT EXECUTED 30027918: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 3002791c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30027920: e59f007c ldr r0, [pc, #124] ; 300279a4 <== NOT EXECUTED 30027924: e28d2010 add r2, sp, #16 ; 0x10 <== NOT EXECUTED 30027928: e1a03001 mov r3, r1 <== NOT EXECUTED 3002792c: ebff70b2 bl 30003bfc <== NOT EXECUTED 30027930: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30027934: 0a000005 beq 30027950 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 30027938: e596c000 ldr ip, [r6] <== NOT EXECUTED 3002793c: e89d000f ldm sp, {r0, r1, r2, r3} <== NOT EXECUTED 30027940: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 30027944: e3e0e000 mvn lr, #0 ; 0x0 <== NOT EXECUTED 30027948: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 3002794c: ea00000e b 3002798c <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 30027950: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30027954: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30027958: 0a000004 beq 30027970 <== NOT EXECUTED 3002795c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30027960: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30027964: 11a0000d movne r0, sp <== NOT EXECUTED 30027968: 11a0e00f movne lr, pc <== NOT EXECUTED 3002796c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 30027970: e59f2028 ldr r2, [pc, #40] ; 300279a0 <== NOT EXECUTED 30027974: e28d3010 add r3, sp, #16 ; 0x10 <== NOT EXECUTED 30027978: e592c000 ldr ip, [r2] <== NOT EXECUTED 3002797c: e893000f ldm r3, {r0, r1, r2, r3} <== NOT EXECUTED 30027980: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 30027984: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 30027988: e3a0e000 mov lr, #0 ; 0x0 <== NOT EXECUTED return 0; } 3002798c: e1a0000e mov r0, lr <== NOT EXECUTED 30027990: e28dd020 add sp, sp, #32 ; 0x20 <== NOT EXECUTED 30027994: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30027998: 3004137c .word 0x3004137c 3002799c: 300564b8 .word 0x300564b8 300279a0: 30041ee4 .word 0x30041ee4 300279a4: 3003da0d .word 0x3003da0d 3001b5ac : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b5ac: e59f3080 ldr r3, [pc, #128] ; 3001b634 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 3001b5b0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b5b4: e5933000 ldr r3, [r3] <== NOT EXECUTED 3001b5b8: e1500003 cmp r0, r3 <== NOT EXECUTED 3001b5bc: 2a000006 bcs 3001b5dc <== NOT EXECUTED iop = rtems_libio_iop( fd ); 3001b5c0: e59f3070 ldr r3, [pc, #112] ; 3001b638 <== NOT EXECUTED 3001b5c4: e5932000 ldr r2, [r3] <== NOT EXECUTED 3001b5c8: e3a03034 mov r3, #52 ; 0x34 <== NOT EXECUTED 3001b5cc: e02c2093 mla ip, r3, r0, r2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 3001b5d0: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED 3001b5d4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3001b5d8: 1a000002 bne 3001b5e8 <== NOT EXECUTED 3001b5dc: eb003a98 bl 3002a044 <__errno> <== NOT EXECUTED 3001b5e0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001b5e4: ea00000a b 3001b614 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001b5e8: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 3001b5ec: 1a000002 bne 3001b5fc <== NOT EXECUTED 3001b5f0: eb003a93 bl 3002a044 <__errno> <== NOT EXECUTED 3001b5f4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001b5f8: ea000005 b 3001b614 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 3001b5fc: e59c3030 ldr r3, [ip, #48] <== NOT EXECUTED 3001b600: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001b604: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001b608: 1a000004 bne 3001b620 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001b60c: eb003a8c bl 3002a044 <__errno> <== NOT EXECUTED 3001b610: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001b614: e5803000 str r3, [r0] <== NOT EXECUTED 3001b618: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001b61c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 3001b620: e28c0010 add r0, ip, #16 ; 0x10 <== NOT EXECUTED 3001b624: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED 3001b628: e1a0e00f mov lr, pc <== NOT EXECUTED 3001b62c: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 3001b630: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001b634: 3004137c .word 0x3004137c 3001b638: 300564b8 .word 0x300564b8 3001b63c : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b63c: e59f3094 ldr r3, [pc, #148] ; 3001b6d8 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 3001b640: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b644: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 3001b648: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b64c: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 3001b650: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001b654: e1a0c000 mov ip, r0 <== NOT EXECUTED 3001b658: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 3001b65c: e1a0e822 lsr lr, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b660: 2a000006 bcs 3001b680 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 3001b664: e59f3070 ldr r3, [pc, #112] ; 3001b6dc <== NOT EXECUTED 3001b668: e5932000 ldr r2, [r3] <== NOT EXECUTED 3001b66c: e3a03034 mov r3, #52 ; 0x34 <== NOT EXECUTED 3001b670: e0202c93 mla r0, r3, ip, r2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 3001b674: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 3001b678: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3001b67c: 1a000002 bne 3001b68c <== NOT EXECUTED 3001b680: eb003a6f bl 3002a044 <__errno> <== NOT EXECUTED 3001b684: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001b688: ea00000a b 3001b6b8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001b68c: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 3001b690: 1a000002 bne 3001b6a0 <== NOT EXECUTED 3001b694: eb003a6a bl 3002a044 <__errno> <== NOT EXECUTED 3001b698: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001b69c: ea000005 b 3001b6b8 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 3001b6a0: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED 3001b6a4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 3001b6a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001b6ac: 1a000004 bne 3001b6c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001b6b0: eb003a63 bl 3002a044 <__errno> <== NOT EXECUTED 3001b6b4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001b6b8: e5803000 str r3, [r0] <== NOT EXECUTED 3001b6bc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001b6c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 3001b6c4: e1a0200e mov r2, lr <== NOT EXECUTED 3001b6c8: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED 3001b6cc: e1a0e00f mov lr, pc <== NOT EXECUTED 3001b6d0: e12fff13 bx r3 <== NOT EXECUTED } 3001b6d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001b6d8: 3004137c .word 0x3004137c 3001b6dc: 300564b8 .word 0x300564b8 300279a8 : int fcntl( int fd, int cmd, ... ) { 300279a8: e92d000e push {r1, r2, r3} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 300279ac: e59f31b0 ldr r3, [pc, #432] ; 30027b64 int fcntl( int fd, int cmd, ... ) { 300279b0: e92d40f0 push {r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 300279b4: e593c000 ldr ip, [r3] int fcntl( int fd, int cmd, ... ) { 300279b8: e59d7014 ldr r7, [sp, #20] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 300279bc: e150000c cmp r0, ip int fcntl( int fd, int cmd, ... ) { 300279c0: e28d2018 add r2, sp, #24 ; 0x18 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 300279c4: 2a000006 bcs 300279e4 iop = rtems_libio_iop( fd ); 300279c8: e59f3198 ldr r3, [pc, #408] ; 30027b68 300279cc: e5931000 ldr r1, [r3] 300279d0: e3a03034 mov r3, #52 ; 0x34 300279d4: e0261093 mla r6, r3, r0, r1 rtems_libio_check_is_open(iop); 300279d8: e596000c ldr r0, [r6, #12] 300279dc: e3100c01 tst r0, #256 ; 0x100 300279e0: 1a000002 bne 300279f0 300279e4: eb000996 bl 3002a044 <__errno> <== NOT EXECUTED 300279e8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 300279ec: ea000047 b 30027b10 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 300279f0: e3570009 cmp r7, #9 ; 0x9 300279f4: 979ff107 ldrls pc, [pc, r7, lsl #2] 300279f8: ea000042 b 30027b08 300279fc: 30027a24 .word 0x30027a24 <== NOT EXECUTED 30027a00: 30027a94 .word 0x30027a94 <== NOT EXECUTED 30027a04: 30027aa0 .word 0x30027aa0 <== NOT EXECUTED 30027a08: 30027ac4 .word 0x30027ac4 <== NOT EXECUTED 30027a0c: 30027ad0 .word 0x30027ad0 <== NOT EXECUTED 30027a10: 30027afc .word 0x30027afc <== NOT EXECUTED 30027a14: 30027afc .word 0x30027afc <== NOT EXECUTED 30027a18: 30027afc .word 0x30027afc <== NOT EXECUTED 30027a1c: 30027afc .word 0x30027afc <== NOT EXECUTED 30027a20: 30027afc .word 0x30027afc <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 30027a24: e5920000 ldr r0, [r2] if ( fd2 ) 30027a28: e3500000 cmp r0, #0 ; 0x0 30027a2c: 0a000004 beq 30027a44 diop = rtems_libio_iop( fd2 ); 30027a30: e150000c cmp r0, ip <== NOT EXECUTED 30027a34: 33a03034 movcc r3, #52 ; 0x34 <== NOT EXECUTED 30027a38: 23a05000 movcs r5, #0 ; 0x0 <== NOT EXECUTED 30027a3c: 30251093 mlacc r5, r3, r0, r1 <== NOT EXECUTED 30027a40: ea000002 b 30027a50 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 30027a44: ebff71a1 bl 300040d0 if ( diop == 0 ) { 30027a48: e2505000 subs r5, r0, #0 ; 0x0 30027a4c: 0a00003f beq 30027b50 diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 30027a50: e59f3110 ldr r3, [pc, #272] ; 30027b68 ret = -1; break; } } diop->handlers = iop->handlers; 30027a54: e5964030 ldr r4, [r6, #48] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 30027a58: e5931000 ldr r1, [r3] } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 30027a5c: e596300c ldr r3, [r6, #12] break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 30027a60: e596002c ldr r0, [r6, #44] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 30027a64: e0611005 rsb r1, r1, r5 } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 30027a68: e585300c str r3, [r5, #12] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 30027a6c: e59f30f8 ldr r3, [pc, #248] ; 30027b6c 30027a70: e1a01141 asr r1, r1, #2 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 30027a74: e285c010 add ip, r5, #16 ; 0x10 30027a78: e2862010 add r2, r6, #16 ; 0x10 ret = -1; break; } } diop->handlers = iop->handlers; 30027a7c: e5854030 str r4, [r5, #48] diop->file_info = iop->file_info; 30027a80: e585002c str r0, [r5, #44] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 30027a84: e0040193 mul r4, r3, r1 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 30027a88: e892000f ldm r2, {r0, r1, r2, r3} 30027a8c: e88c000f stm ip, {r0, r1, r2, r3} 30027a90: ea000020 b 30027b18 ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 30027a94: e1a035a0 lsr r3, r0, #11 30027a98: e2034001 and r4, r3, #1 ; 0x1 30027a9c: ea00001f b 30027b20 * 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 ) ) 30027aa0: e5922000 ldr r2, [r2] 30027aa4: e3520000 cmp r2, #0 ; 0x0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 30027aa8: 13803b02 orrne r3, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 30027aac: 03c03b02 biceq r3, r0, #2048 ; 0x800 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 30027ab0: 1586300c strne r3, [r6, #12] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 30027ab4: 0586300c streq r3, [r6, #12] 30027ab8: 01a04002 moveq r4, r2 * 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 ) ) 30027abc: 0a000017 beq 30027b20 30027ac0: ea00000b b 30027af4 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 30027ac4: ebff7118 bl 30003f2c 30027ac8: e1a04000 mov r4, r0 30027acc: ea000011 b 30027b18 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 30027ad0: e5920000 ldr r0, [r2] 30027ad4: ebff71b0 bl 3000419c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 30027ad8: e596300c ldr r3, [r6, #12] 30027adc: e59f208c ldr r2, [pc, #140] ; 30027b70 30027ae0: e3c33c02 bic r3, r3, #512 ; 0x200 30027ae4: e0002002 and r2, r0, r2 30027ae8: e3c33001 bic r3, r3, #1 ; 0x1 30027aec: e1822003 orr r2, r2, r3 30027af0: e586200c str r2, [r6, #12] 30027af4: e3a04000 mov r4, #0 ; 0x0 30027af8: ea000008 b 30027b20 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 30027afc: eb000950 bl 3002a044 <__errno> 30027b00: e3a03086 mov r3, #134 ; 0x86 30027b04: ea000001 b 30027b10 ret = -1; break; default: errno = EINVAL; 30027b08: eb00094d bl 3002a044 <__errno> 30027b0c: e3a03016 mov r3, #22 ; 0x16 30027b10: e5803000 str r3, [r0] 30027b14: ea00000d b 30027b50 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 30027b18: e3540000 cmp r4, #0 ; 0x0 30027b1c: ba00000c blt 30027b54 if (iop->handlers->fcntl_h) { 30027b20: e5963030 ldr r3, [r6, #48] 30027b24: e5933030 ldr r3, [r3, #48] 30027b28: e3530000 cmp r3, #0 ; 0x0 30027b2c: 0a000008 beq 30027b54 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 30027b30: e1a00007 mov r0, r7 30027b34: e1a01006 mov r1, r6 30027b38: e1a0e00f mov lr, pc 30027b3c: e12fff13 bx r3 if (err) { 30027b40: e2505000 subs r5, r0, #0 ; 0x0 30027b44: 0a000002 beq 30027b54 errno = err; 30027b48: eb00093d bl 3002a044 <__errno> <== NOT EXECUTED 30027b4c: e5805000 str r5, [r0] <== NOT EXECUTED 30027b50: e3e04000 mvn r4, #0 ; 0x0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 30027b54: e1a00004 mov r0, r4 30027b58: e8bd40f0 pop {r4, r5, r6, r7, lr} 30027b5c: e28dd00c add sp, sp, #12 ; 0xc 30027b60: e12fff1e bx lr 30027b64: 3004137c .word 0x3004137c 30027b68: 300564b8 .word 0x300564b8 30027b6c: c4ec4ec5 .word 0xc4ec4ec5 30027b70: 00000201 .word 0x00000201 3001d83c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 3001d83c: e59fc030 ldr ip, [pc, #48] ; 3001d874 <== NOT EXECUTED 3001d840: e49c0004 ldr r0, [ip], #4 <== NOT EXECUTED 3001d844: ea000006 b 3001d864 <== 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 ) { 3001d848: e5902014 ldr r2, [r0, #20] <== NOT EXECUTED 3001d84c: e591300c ldr r3, [r1, #12] <== NOT EXECUTED 3001d850: e1520003 cmp r2, r3 <== NOT EXECUTED 3001d854: 1a000001 bne 3001d860 <== NOT EXECUTED 3001d858: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3001d85c: e12fff1e bx lr <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 3001d860: e5900000 ldr r0, [r0] <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 3001d864: e150000c cmp r0, ip <== NOT EXECUTED 3001d868: 1afffff6 bne 3001d848 <== NOT EXECUTED 3001d86c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; } } return false; } 3001d870: e12fff1e bx lr <== NOT EXECUTED 3001d874: 30056554 .word 0x30056554 300023c0 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 300023c0: e59f3104 ldr r3, [pc, #260] ; 300024cc long fpathconf( int fd, int name ) { 300023c4: 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); 300023c8: e5933000 ldr r3, [r3] 300023cc: e1500003 cmp r0, r3 300023d0: 2a000006 bcs 300023f0 iop = rtems_libio_iop(fd); 300023d4: e59f30f4 ldr r3, [pc, #244] ; 300024d0 300023d8: e5932000 ldr r2, [r3] 300023dc: e3a03034 mov r3, #52 ; 0x34 300023e0: e02c2093 mla ip, r3, r0, r2 rtems_libio_check_is_open(iop); 300023e4: e59c300c ldr r3, [ip, #12] 300023e8: e3130c01 tst r3, #256 ; 0x100 300023ec: 1a000002 bne 300023fc 300023f0: eb002caa bl 3000d6a0 <__errno> 300023f4: e3a03009 mov r3, #9 ; 0x9 300023f8: ea000003 b 3000240c rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 300023fc: e3130002 tst r3, #2 ; 0x2 30002400: 1a000004 bne 30002418 30002404: eb002ca5 bl 3000d6a0 <__errno> <== NOT EXECUTED 30002408: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3000240c: e5803000 str r3, [r0] 30002410: e3e00000 mvn r0, #0 ; 0x0 30002414: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 30002418: e59c001c ldr r0, [ip, #28] switch ( name ) { 3000241c: e351000b cmp r1, #11 ; 0xb 30002420: 979ff101 ldrls pc, [pc, r1, lsl #2] 30002424: ea000023 b 300024b8 30002428: 30002458 .word 0x30002458 <== NOT EXECUTED 3000242c: 30002460 .word 0x30002460 <== NOT EXECUTED 30002430: 30002468 .word 0x30002468 <== NOT EXECUTED 30002434: 30002470 .word 0x30002470 <== NOT EXECUTED 30002438: 30002478 .word 0x30002478 <== NOT EXECUTED 3000243c: 30002480 .word 0x30002480 <== NOT EXECUTED 30002440: 30002488 .word 0x30002488 <== NOT EXECUTED 30002444: 30002490 .word 0x30002490 <== NOT EXECUTED 30002448: 30002498 .word 0x30002498 <== NOT EXECUTED 3000244c: 300024a0 .word 0x300024a0 <== NOT EXECUTED 30002450: 300024a8 .word 0x300024a8 <== NOT EXECUTED 30002454: 300024b0 .word 0x300024b0 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 30002458: e5900030 ldr r0, [r0, #48] 3000245c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 30002460: e5900034 ldr r0, [r0, #52] 30002464: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 30002468: e5900038 ldr r0, [r0, #56] 3000246c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NAME_MAX: return_value = the_limits->name_max; 30002470: e590003c ldr r0, [r0, #60] 30002474: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PATH_MAX: return_value = the_limits->path_max; 30002478: e5900040 ldr r0, [r0, #64] 3000247c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 30002480: e5900044 ldr r0, [r0, #68] 30002484: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 30002488: e590004c ldr r0, [r0, #76] 3000248c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 30002490: e5900050 ldr r0, [r0, #80] 30002494: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 30002498: e590005c ldr r0, [r0, #92] 3000249c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 300024a0: e5900048 ldr r0, [r0, #72] 300024a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 300024a8: e5900054 ldr r0, [r0, #84] 300024ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 300024b0: e5900058 ldr r0, [r0, #88] 300024b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 300024b8: eb002c78 bl 3000d6a0 <__errno> 300024bc: e3a03016 mov r3, #22 ; 0x16 300024c0: e5803000 str r3, [r0] 300024c4: e3e00000 mvn r0, #0 ; 0x0 break; } return return_value; } 300024c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300024cc: 30014a24 .word 0x30014a24 300024d0: 30015748 .word 0x30015748 300086bc : void free( void *ptr ) { MSBUMP(free_calls, 1); 300086bc: e59f2084 ldr r2, [pc, #132] ; 30008748 300086c0: e92d4030 push {r4, r5, lr} 300086c4: e592300c ldr r3, [r2, #12] if ( !ptr ) 300086c8: e2505000 subs r5, r0, #0 ; 0x0 void free( void *ptr ) { MSBUMP(free_calls, 1); 300086cc: e2833001 add r3, r3, #1 ; 0x1 300086d0: e582300c str r3, [r2, #12] if ( !ptr ) 300086d4: 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()) && 300086d8: e59f306c ldr r3, [pc, #108] ; 3000874c 300086dc: e5933000 ldr r3, [r3] 300086e0: e3530003 cmp r3, #3 ; 0x3 300086e4: 1a000005 bne 30008700 300086e8: eb000120 bl 30008b70 300086ec: e3500000 cmp r0, #0 ; 0x0 300086f0: 1a000002 bne 30008700 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 300086f4: e1a00005 mov r0, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 300086f8: 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); 300086fc: ea00012e b 30008bbc <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 30008700: e59f3048 ldr r3, [pc, #72] ; 30008750 30008704: e5933000 ldr r3, [r3] 30008708: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 3000870c: 11a00005 movne r0, r5 30008710: 11a0e00f movne lr, pc 30008714: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 30008718: e59f4034 ldr r4, [pc, #52] ; 30008754 3000871c: e1a01005 mov r1, r5 30008720: e1a00004 mov r0, r4 30008724: eb000679 bl 3000a110 <_Protected_heap_Free> 30008728: e3500000 cmp r0, #0 ; 0x0 3000872c: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 30008730: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 30008734: e59f001c ldr r0, [pc, #28] ; 30008758 <== NOT EXECUTED 30008738: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 3000873c: e1a01005 mov r1, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 30008740: 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", 30008744: eaffe5d1 b 30001e90 <== NOT EXECUTED 30008748: 30016150 .word 0x30016150 3000874c: 30016414 .word 0x30016414 30008750: 30015f1c .word 0x30015f1c 30008754: 300160f8 .word 0x300160f8 30008758: 3001506e .word 0x3001506e 3001cdec : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3001cdec: e59f3058 ldr r3, [pc, #88] ; 3001ce4c <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 3001cdf0: e92d4010 push {r4, lr} <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3001cdf4: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 3001cdf8: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3001cdfc: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 3001ce00: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 3001ce04: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ce08: 0a000004 beq 3001ce20 <== NOT EXECUTED 3001ce0c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001ce10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ce14: 12800004 addne r0, r0, #4 ; 0x4 <== NOT EXECUTED 3001ce18: 11a0e00f movne lr, pc <== NOT EXECUTED 3001ce1c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 3001ce20: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 3001ce24: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ce28: 0a000004 beq 3001ce40 <== NOT EXECUTED 3001ce2c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001ce30: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ce34: 12840014 addne r0, r4, #20 ; 0x14 <== NOT EXECUTED 3001ce38: 11a0e00f movne lr, pc <== NOT EXECUTED 3001ce3c: 112fff13 bxne r3 <== NOT EXECUTED free(env); 3001ce40: e1a00004 mov r0, r4 <== NOT EXECUTED } } 3001ce44: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 3001ce48: eaff9bba b 30003d38 <== NOT EXECUTED 3001ce4c: 30056c7c .word 0x30056c7c 300137e4 : int fstat( int fd, struct stat *sbuf ) { 300137e4: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 300137e8: e2515000 subs r5, r1, #0 ; 0x0 300137ec: 1a000002 bne 300137fc rtems_set_errno_and_return_minus_one( EFAULT ); 300137f0: ebffded4 bl 3000b348 <__errno> 300137f4: e3a0300e mov r3, #14 ; 0xe 300137f8: ea00001f b 3001387c /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 300137fc: e59f3084 ldr r3, [pc, #132] ; 30013888 30013800: e5933000 ldr r3, [r3] 30013804: e1500003 cmp r0, r3 30013808: 2a000019 bcs 30013874 3001380c: e59f3078 ldr r3, [pc, #120] ; 3001388c 30013810: e5932000 ldr r2, [r3] 30013814: e3a03034 mov r3, #52 ; 0x34 30013818: e0242093 mla r4, r3, r0, r2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 3001381c: e594300c ldr r3, [r4, #12] 30013820: e3130c01 tst r3, #256 ; 0x100 30013824: 0a000012 beq 30013874 if ( !iop->handlers ) 30013828: e5943030 ldr r3, [r4, #48] 3001382c: e3530000 cmp r3, #0 ; 0x0 30013830: 0a00000f beq 30013874 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 30013834: e5933018 ldr r3, [r3, #24] 30013838: e3530000 cmp r3, #0 ; 0x0 3001383c: 1a000002 bne 3001384c rtems_set_errno_and_return_minus_one( ENOTSUP ); 30013840: ebffdec0 bl 3000b348 <__errno> <== NOT EXECUTED 30013844: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30013848: ea00000b b 3001387c <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 3001384c: e3a01000 mov r1, #0 ; 0x0 30013850: e3a0204c mov r2, #76 ; 0x4c 30013854: e1a00005 mov r0, r5 30013858: ebffe0c3 bl 3000bb6c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 3001385c: e2840010 add r0, r4, #16 ; 0x10 30013860: e1a01005 mov r1, r5 30013864: e5943030 ldr r3, [r4, #48] 30013868: e1a0e00f mov lr, pc 3001386c: e593f018 ldr pc, [r3, #24] } 30013870: e8bd8030 pop {r4, r5, pc} /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 30013874: ebffdeb3 bl 3000b348 <__errno> 30013878: e3a03009 mov r3, #9 ; 0x9 3001387c: e5803000 str r3, [r0] 30013880: e3e00000 mvn r0, #0 ; 0x0 30013884: e8bd8030 pop {r4, r5, pc} 30013888: 30015378 .word 0x30015378 3001388c: 300160ec .word 0x300160ec 3001b798 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b798: e59f3084 ldr r3, [pc, #132] ; 3001b824 #include int fsync( int fd ) { 3001b79c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b7a0: e5933000 ldr r3, [r3] #include int fsync( int fd ) { 3001b7a4: e1a01000 mov r1, r0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001b7a8: e1500003 cmp r0, r3 3001b7ac: 2a00000e bcs 3001b7ec iop = rtems_libio_iop( fd ); 3001b7b0: e59f3070 ldr r3, [pc, #112] ; 3001b828 3001b7b4: e5932000 ldr r2, [r3] 3001b7b8: e3a03034 mov r3, #52 ; 0x34 3001b7bc: e0202193 mla r0, r3, r1, r2 rtems_libio_check_is_open(iop); 3001b7c0: e590300c ldr r3, [r0, #12] 3001b7c4: e3130c01 tst r3, #256 ; 0x100 3001b7c8: 0a000007 beq 3001b7ec rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001b7cc: e3130004 tst r3, #4 ; 0x4 3001b7d0: 1a000002 bne 3001b7e0 3001b7d4: eb003a1a bl 3002a044 <__errno> 3001b7d8: e3a03016 mov r3, #22 ; 0x16 3001b7dc: ea00000a b 3001b80c /* * Now process the fsync(). */ if ( !iop->handlers ) 3001b7e0: e5903030 ldr r3, [r0, #48] 3001b7e4: e3530000 cmp r3, #0 ; 0x0 3001b7e8: 1a000002 bne 3001b7f8 rtems_set_errno_and_return_minus_one( EBADF ); 3001b7ec: eb003a14 bl 3002a044 <__errno> <== NOT EXECUTED 3001b7f0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001b7f4: ea000004 b 3001b80c <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 3001b7f8: e5933028 ldr r3, [r3, #40] 3001b7fc: e3530000 cmp r3, #0 ; 0x0 3001b800: 1a000004 bne 3001b818 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001b804: eb003a0e bl 3002a044 <__errno> 3001b808: e3a03086 mov r3, #134 ; 0x86 3001b80c: e5803000 str r3, [r0] 3001b810: e3e00000 mvn r0, #0 ; 0x0 3001b814: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 3001b818: e1a0e00f mov lr, pc 3001b81c: e12fff13 bx r3 } 3001b820: e49df004 pop {pc} ; (ldr pc, [sp], #4) 3001b824: 3004137c .word 0x3004137c 3001b828: 300564b8 .word 0x300564b8 3000875c : int ftruncate( int fd, off_t length ) { 3000875c: e92d4030 push {r4, r5, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30008760: e59f30c4 ldr r3, [pc, #196] ; 3000882c int ftruncate( int fd, off_t length ) { 30008764: e24dd010 sub sp, sp, #16 ; 0x10 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30008768: e5933000 ldr r3, [r3] int ftruncate( int fd, off_t length ) { 3000876c: e1a05001 mov r5, r1 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30008770: e1500003 cmp r0, r3 30008774: 2a000006 bcs 30008794 iop = rtems_libio_iop( fd ); 30008778: e59f30b0 ldr r3, [pc, #176] ; 30008830 3000877c: e5932000 ldr r2, [r3] 30008780: e3a03034 mov r3, #52 ; 0x34 30008784: e0242093 mla r4, r3, r0, r2 rtems_libio_check_is_open(iop); 30008788: e594300c ldr r3, [r4, #12] 3000878c: e3130c01 tst r3, #256 ; 0x100 30008790: 1a000002 bne 300087a0 30008794: eb000aeb bl 3000b348 <__errno> <== NOT EXECUTED 30008798: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3000879c: ea000019 b 30008808 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 300087a0: e2843010 add r3, r4, #16 ; 0x10 300087a4: e893000f ldm r3, {r0, r1, r2, r3} 300087a8: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 300087ac: e5923010 ldr r3, [r2, #16] 300087b0: e3530000 cmp r3, #0 ; 0x0 300087b4: 0a000011 beq 30008800 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 300087b8: e1a0000d mov r0, sp 300087bc: e1a0e00f mov lr, pc 300087c0: e12fff13 bx r3 300087c4: e3500001 cmp r0, #1 ; 0x1 300087c8: 1a000002 bne 300087d8 rtems_set_errno_and_return_minus_one( EISDIR ); 300087cc: eb000add bl 3000b348 <__errno> 300087d0: e3a03015 mov r3, #21 ; 0x15 300087d4: ea00000b b 30008808 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 300087d8: e594300c ldr r3, [r4, #12] 300087dc: e3130004 tst r3, #4 ; 0x4 300087e0: 1a000002 bne 300087f0 300087e4: eb000ad7 bl 3000b348 <__errno> <== NOT EXECUTED 300087e8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300087ec: ea000005 b 30008808 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 300087f0: e5943030 ldr r3, [r4, #48] 300087f4: e5933020 ldr r3, [r3, #32] 300087f8: e3530000 cmp r3, #0 ; 0x0 300087fc: 1a000004 bne 30008814 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30008800: eb000ad0 bl 3000b348 <__errno> <== NOT EXECUTED 30008804: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008808: e5803000 str r3, [r0] 3000880c: e3e00000 mvn r0, #0 ; 0x0 30008810: ea000003 b 30008824 return (*iop->handlers->ftruncate_h)( iop, length ); 30008814: e1a00004 mov r0, r4 30008818: e1a01005 mov r1, r5 3000881c: e1a0e00f mov lr, pc 30008820: e12fff13 bx r3 } 30008824: e28dd010 add sp, sp, #16 ; 0x10 30008828: e8bd8030 pop {r4, r5, pc} 3000882c: 30015378 .word 0x30015378 30008830: 300160ec .word 0x300160ec 3001b904 : char * getcwd ( char *pt, size_t size) { 3001b904: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED * If no buffer specified by the user, allocate one as necessary. * If a buffer is specified, the size has to be non-zero. The path * is built from the end of the buffer backwards. */ if (pt) 3001b908: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED char * getcwd ( char *pt, size_t size) { 3001b90c: e24dd07c sub sp, sp, #124 ; 0x7c <== NOT EXECUTED 3001b910: e1a04001 mov r4, r1 <== NOT EXECUTED * If no buffer specified by the user, allocate one as necessary. * If a buffer is specified, the size has to be non-zero. The path * is built from the end of the buffer backwards. */ if (pt) 3001b914: 0a000008 beq 3001b93c <== NOT EXECUTED { ptsize = 0; if (!size) 3001b918: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED { errno = EINVAL; return (char *) NULL; } ept = pt + size; 3001b91c: 108a9001 addne r9, sl, r1 <== NOT EXECUTED 3001b920: 13a0b000 movne fp, #0 ; 0x0 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 3001b924: 1a00000a bne 3001b954 <== NOT EXECUTED { errno = EINVAL; 3001b928: eb0039c5 bl 3002a044 <__errno> <== NOT EXECUTED 3001b92c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001b930: e5803000 str r3, [r0] <== NOT EXECUTED 3001b934: e1a0a004 mov sl, r4 <== NOT EXECUTED 3001b938: ea0000f0 b 3001bd00 <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 3001b93c: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 3001b940: ebffa277 bl 30004324 <== NOT EXECUTED 3001b944: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 3001b948: 0a0000ec beq 3001bd00 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 3001b94c: e28a9fff add r9, sl, #1020 ; 0x3fc <== NOT EXECUTED 3001b950: e3a0bfff mov fp, #1020 ; 0x3fc <== NOT EXECUTED } bpt = ept - 1; *bpt = '\0'; 3001b954: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 3001b958: e5494001 strb r4, [r9, #-1] <== NOT EXECUTED * Allocate bytes (1024 - malloc space) for the string of "../"'s. * Should always be enough (it's 340 levels). If it's not, allocate * as necessary. Special * case the first stat, it's ".", not "..". */ if (!(up = (char *) malloc (upsize = 1024 - 4))) 3001b95c: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 3001b960: ebffa26f bl 30004324 <== NOT EXECUTED 3001b964: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; 3001b968: e2498001 sub r8, r9, #1 ; 0x1 <== NOT EXECUTED * Allocate bytes (1024 - malloc space) for the string of "../"'s. * Should always be enough (it's 340 levels). If it's not, allocate * as necessary. Special * case the first stat, it's ".", not "..". */ if (!(up = (char *) malloc (upsize = 1024 - 4))) 3001b96c: 0a0000dd beq 3001bce8 <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 3001b970: e3a0602e mov r6, #46 ; 0x2e <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 3001b974: e28d5030 add r5, sp, #48 ; 0x30 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 3001b978: e5c74001 strb r4, [r7, #1] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 3001b97c: e5c76000 strb r6, [r7] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 3001b980: e59f0390 ldr r0, [pc, #912] ; 3001bd18 <== NOT EXECUTED 3001b984: e1a01005 mov r1, r5 <== NOT EXECUTED 3001b988: ebffa609 bl 300051b4 <== NOT EXECUTED 3001b98c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 3001b990: 1a0000d4 bne 3001bce8 <== NOT EXECUTED goto err; root_dev = s.st_dev; 3001b994: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 3001b998: e891000e ldm r1, {r1, r2, r3} <== NOT EXECUTED 3001b99c: e58d100c str r1, [sp, #12] <== NOT EXECUTED 3001b9a0: e58d2008 str r2, [sp, #8] <== NOT EXECUTED root_ino = s.st_ino; 3001b9a4: e58d3020 str r3, [sp, #32] <== NOT EXECUTED errno = 0; /* XXX readdir has no error return. */ 3001b9a8: eb0039a5 bl 3002a044 <__errno> <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 3001b9ac: e2871b01 add r1, r7, #1024 ; 0x400 <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 3001b9b0: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3001b9b4: e3a03fff mov r3, #1020 ; 0x3fc <== NOT EXECUTED 3001b9b8: e5804000 str r4, [r0] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 3001b9bc: e58d1028 str r1, [sp, #40] <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 3001b9c0: e58d701c str r7, [sp, #28] <== NOT EXECUTED 3001b9c4: e58d2018 str r2, [sp, #24] <== NOT EXECUTED 3001b9c8: e58d3024 str r3, [sp, #36] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 3001b9cc: e1a00007 mov r0, r7 <== NOT EXECUTED 3001b9d0: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 3001b9d4: ebffa5f6 bl 300051b4 <== NOT EXECUTED 3001b9d8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001b9dc: 1a0000c1 bne 3001bce8 <== NOT EXECUTED goto err; /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; 3001b9e0: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 3001b9e4: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; 3001b9e8: e58d1004 str r1, [sp, #4] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 3001b9ec: e1520001 cmp r2, r1 <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 3001b9f0: e59d3038 ldr r3, [sp, #56] <== NOT EXECUTED dev = s.st_dev; 3001b9f4: e59d1034 ldr r1, [sp, #52] <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 3001b9f8: e58d3014 str r3, [sp, #20] <== NOT EXECUTED dev = s.st_dev; 3001b9fc: e58d1000 str r1, [sp] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 3001ba00: 1a000002 bne 3001ba10 <== NOT EXECUTED 3001ba04: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 3001ba08: e1520001 cmp r2, r1 <== NOT EXECUTED 3001ba0c: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 3001ba10: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED 3001ba14: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 3001ba18: e1510002 cmp r1, r2 <== NOT EXECUTED 3001ba1c: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED 3001ba20: 02003001 andeq r3, r0, #1 ; 0x1 <== NOT EXECUTED 3001ba24: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ba28: 0a000008 beq 3001ba50 <== NOT EXECUTED { *--bpt = '/'; 3001ba2c: e2481001 sub r1, r8, #1 ; 0x1 <== NOT EXECUTED 3001ba30: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED 3001ba34: e5483001 strb r3, [r8, #-1] <== NOT EXECUTED /* * It's unclear that it's a requirement to copy the * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ (void) bcopy (bpt, pt, ept - bpt); 3001ba38: e0612009 rsb r2, r1, r9 <== NOT EXECUTED 3001ba3c: e1a0000a mov r0, sl <== NOT EXECUTED 3001ba40: eb004336 bl 3002c720 <== NOT EXECUTED free (up); 3001ba44: e1a00007 mov r0, r7 <== NOT EXECUTED 3001ba48: ebffa0ba bl 30003d38 <== NOT EXECUTED 3001ba4c: ea0000ab b 3001bd00 <== NOT EXECUTED * Build pointer to the parent directory, allocating memory * as necessary. Max length is 3 for "../", the largest * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) 3001ba50: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED 3001ba54: e59d2028 ldr r2, [sp, #40] <== NOT EXECUTED 3001ba58: e2813b01 add r3, r1, #1024 ; 0x400 <== NOT EXECUTED 3001ba5c: e2833004 add r3, r3, #4 ; 0x4 <== NOT EXECUTED 3001ba60: e1520003 cmp r2, r3 <== NOT EXECUTED 3001ba64: 8a00000b bhi 3001ba98 <== NOT EXECUTED { if (!(up = (char *) realloc (up, upsize *= 2))) 3001ba68: e59d3024 ldr r3, [sp, #36] <== NOT EXECUTED 3001ba6c: e1a00007 mov r0, r7 <== NOT EXECUTED 3001ba70: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 3001ba74: e1a01003 mov r1, r3 <== NOT EXECUTED 3001ba78: e58d3024 str r3, [sp, #36] <== NOT EXECUTED 3001ba7c: eb0005d2 bl 3001d1cc <== NOT EXECUTED 3001ba80: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 3001ba84: 0a000097 beq 3001bce8 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 3001ba88: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 3001ba8c: e58d701c str r7, [sp, #28] <== NOT EXECUTED 3001ba90: e0871001 add r1, r7, r1 <== NOT EXECUTED 3001ba94: e58d1028 str r1, [sp, #40] <== NOT EXECUTED } *bup++ = '.'; 3001ba98: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED 3001ba9c: e3a0202e mov r2, #46 ; 0x2e <== NOT EXECUTED 3001baa0: e4c42001 strb r2, [r4], #1 <== NOT EXECUTED *bup++ = '.'; 3001baa4: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED *bup = '\0'; 3001baa8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 3001baac: e5c32001 strb r2, [r3, #1] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001bab0: e1a00007 mov r0, r7 <== NOT EXECUTED bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; *bup = '\0'; 3001bab4: e5c41001 strb r1, [r4, #1] <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001bab8: eb0004a6 bl 3001cd58 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 3001babc: e2842001 add r2, r4, #1 ; 0x1 <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001bac0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001bac4: e58d0010 str r0, [sp, #16] <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 3001bac8: e58d202c str r2, [sp, #44] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001bacc: 0a000085 beq 3001bce8 <== NOT EXECUTED 3001bad0: e5900000 ldr r0, [r0] <== NOT EXECUTED 3001bad4: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 3001bad8: ebffff00 bl 3001b6e0 <== NOT EXECUTED 3001badc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001bae0: 1a000089 bne 3001bd0c <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 3001bae4: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED 3001bae8: e5c43001 strb r3, [r4, #1] <== NOT EXECUTED 3001baec: e59d102c ldr r1, [sp, #44] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 3001baf0: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 3001baf4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 3001baf8: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 3001bafc: e1530002 cmp r3, r2 <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 3001bb00: e58d101c str r1, [sp, #28] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 3001bb04: 1a000003 bne 3001bb18 <== NOT EXECUTED 3001bb08: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 3001bb0c: e59d1000 ldr r1, [sp] <== NOT EXECUTED 3001bb10: e1530001 cmp r3, r1 <== NOT EXECUTED 3001bb14: 0a000001 beq 3001bb20 <== NOT EXECUTED 3001bb18: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 3001bb1c: ea000008 b 3001bb44 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 3001bb20: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 3001bb24: eb000540 bl 3001d02c <== NOT EXECUTED 3001bb28: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3001bb2c: 0a000063 beq 3001bcc0 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 3001bb30: e5953000 ldr r3, [r5] <== NOT EXECUTED 3001bb34: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 3001bb38: e1530002 cmp r3, r2 <== NOT EXECUTED 3001bb3c: 1afffff7 bne 3001bb20 <== NOT EXECUTED 3001bb40: ea00002e b 3001bc00 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 3001bb44: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 3001bb48: eb000537 bl 3001d02c <== NOT EXECUTED 3001bb4c: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3001bb50: 0a00005b beq 3001bcc4 <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 3001bb54: e5d5300c ldrb r3, [r5, #12] <== NOT EXECUTED 3001bb58: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 3001bb5c: 1a000007 bne 3001bb80 <== NOT EXECUTED 3001bb60: e5d5300d ldrb r3, [r5, #13] <== NOT EXECUTED 3001bb64: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001bb68: 0afffff5 beq 3001bb44 <== NOT EXECUTED 3001bb6c: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 3001bb70: 1a000002 bne 3001bb80 <== NOT EXECUTED 3001bb74: e5d5300e ldrb r3, [r5, #14] <== NOT EXECUTED 3001bb78: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001bb7c: 0afffff0 beq 3001bb44 <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 3001bb80: e285400c add r4, r5, #12 ; 0xc <== NOT EXECUTED 3001bb84: e1a00004 mov r0, r4 <== NOT EXECUTED 3001bb88: eb004fc3 bl 3002fa9c <== NOT EXECUTED 3001bb8c: e1a01004 mov r1, r4 <== NOT EXECUTED 3001bb90: e2802001 add r2, r0, #1 ; 0x1 <== NOT EXECUTED 3001bb94: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED 3001bb98: eb0042e0 bl 3002c720 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 3001bb9c: e1a00007 mov r0, r7 <== NOT EXECUTED 3001bba0: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 3001bba4: ebffa582 bl 300051b4 <== NOT EXECUTED 3001bba8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001bbac: 0a000007 beq 3001bbd0 <== NOT EXECUTED { if (!save_errno) 3001bbb0: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 3001bbb4: 1a000001 bne 3001bbc0 <== NOT EXECUTED save_errno = errno; 3001bbb8: eb003921 bl 3002a044 <__errno> <== NOT EXECUTED 3001bbbc: e5906000 ldr r6, [r0] <== NOT EXECUTED errno = 0; 3001bbc0: eb00391f bl 3002a044 <__errno> <== NOT EXECUTED 3001bbc4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3001bbc8: e5803000 str r3, [r0] <== NOT EXECUTED 3001bbcc: eaffffdc b 3001bb44 <== NOT EXECUTED continue; } if (s.st_dev == dev && s.st_ino == ino) 3001bbd0: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 3001bbd4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 3001bbd8: e1530001 cmp r3, r1 <== NOT EXECUTED 3001bbdc: 1affffd8 bne 3001bb44 <== NOT EXECUTED 3001bbe0: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 3001bbe4: e59d2000 ldr r2, [sp] <== NOT EXECUTED 3001bbe8: e1530002 cmp r3, r2 <== NOT EXECUTED 3001bbec: 1affffd4 bne 3001bb44 <== NOT EXECUTED 3001bbf0: e59d3038 ldr r3, [sp, #56] <== NOT EXECUTED 3001bbf4: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED 3001bbf8: e1530001 cmp r3, r1 <== NOT EXECUTED 3001bbfc: 1affffd0 bne 3001bb44 <== NOT EXECUTED /* * Check for length of the current name, preceding slash, * leading slash. */ if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2)) 3001bc00: e285400c add r4, r5, #12 ; 0xc <== NOT EXECUTED 3001bc04: e1a00004 mov r0, r4 <== NOT EXECUTED 3001bc08: eb004fa3 bl 3002fa9c <== NOT EXECUTED 3001bc0c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 3001bc10: e06a5008 rsb r5, sl, r8 <== NOT EXECUTED 3001bc14: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3001bc18: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED 3001bc1c: 03a03002 moveq r3, #2 ; 0x2 <== NOT EXECUTED 3001bc20: e0833000 add r3, r3, r0 <== NOT EXECUTED 3001bc24: e1550003 cmp r5, r3 <== NOT EXECUTED 3001bc28: 8a000011 bhi 3001bc74 <== NOT EXECUTED { size_t len, off; if (!ptsize) 3001bc2c: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED 3001bc30: 1a000003 bne 3001bc44 <== NOT EXECUTED { errno = ERANGE; 3001bc34: eb003902 bl 3002a044 <__errno> <== NOT EXECUTED 3001bc38: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED 3001bc3c: e5803000 str r3, [r0] <== NOT EXECUTED 3001bc40: ea000031 b 3001bd0c <== NOT EXECUTED goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 3001bc44: e1a0b08b lsl fp, fp, #1 <== NOT EXECUTED 3001bc48: e1a0000a mov r0, sl <== NOT EXECUTED 3001bc4c: e1a0100b mov r1, fp <== NOT EXECUTED 3001bc50: eb00055d bl 3001d1cc <== NOT EXECUTED 3001bc54: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 3001bc58: 0a00002b beq 3001bd0c <== NOT EXECUTED { errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; 3001bc5c: e0682009 rsb r2, r8, r9 <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 3001bc60: e08a900b add r9, sl, fp <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 3001bc64: e0628009 rsb r8, r2, r9 <== NOT EXECUTED 3001bc68: e08a1005 add r1, sl, r5 <== NOT EXECUTED 3001bc6c: e1a00008 mov r0, r8 <== NOT EXECUTED 3001bc70: eb0042aa bl 3002c720 <== NOT EXECUTED bpt = ept - len; } if (!first) 3001bc74: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED *--bpt = '/'; bpt -= strlen (dp->d_name); 3001bc78: e1a00004 mov r0, r4 <== NOT EXECUTED bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); bpt = ept - len; } if (!first) 3001bc7c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED *--bpt = '/'; 3001bc80: 03a0102f moveq r1, #47 ; 0x2f <== NOT EXECUTED 3001bc84: 05681001 strbeq r1, [r8, #-1]! <== NOT EXECUTED bpt -= strlen (dp->d_name); 3001bc88: eb004f83 bl 3002fa9c <== NOT EXECUTED 3001bc8c: e0608008 rsb r8, r0, r8 <== NOT EXECUTED 3001bc90: e1a02000 mov r2, r0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 3001bc94: e1a01004 mov r1, r4 <== NOT EXECUTED 3001bc98: e1a00008 mov r0, r8 <== NOT EXECUTED 3001bc9c: eb00429f bl 3002c720 <== NOT EXECUTED (void) _closedir (dir); 3001bca0: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 3001bca4: eb002ed6 bl 30027804 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 3001bca8: e59d202c ldr r2, [sp, #44] <== NOT EXECUTED 3001bcac: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3001bcb0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001bcb4: e5c23001 strb r3, [r2, #1] <== NOT EXECUTED 3001bcb8: e58d1018 str r1, [sp, #24] <== NOT EXECUTED 3001bcbc: eaffff42 b 3001b9cc <== NOT EXECUTED } 3001bcc0: e1a06005 mov r6, r5 <== NOT EXECUTED * If readdir set errno, use it, not any saved error; otherwise, * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) 3001bcc4: eb0038de bl 3002a044 <__errno> <== NOT EXECUTED 3001bcc8: e5903000 ldr r3, [r0] <== NOT EXECUTED 3001bccc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001bcd0: 1a00000d bne 3001bd0c <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; 3001bcd4: eb0038da bl 3002a044 <__errno> <== NOT EXECUTED 3001bcd8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 3001bcdc: 03a06002 moveq r6, #2 ; 0x2 <== NOT EXECUTED 3001bce0: e5806000 str r6, [r0] <== NOT EXECUTED 3001bce4: ea000008 b 3001bd0c <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 3001bce8: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED free (pt); 3001bcec: 11a0000a movne r0, sl <== NOT EXECUTED 3001bcf0: 1bffa010 blne 30003d38 <== NOT EXECUTED free (up); 3001bcf4: e1a00007 mov r0, r7 <== NOT EXECUTED 3001bcf8: ebffa00e bl 30003d38 <== NOT EXECUTED 3001bcfc: e3a0a000 mov sl, #0 ; 0x0 <== NOT EXECUTED return (char *) NULL; } 3001bd00: e1a0000a mov r0, sl <== NOT EXECUTED 3001bd04: e28dd07c add sp, sp, #124 ; 0x7c <== NOT EXECUTED 3001bd08: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 3001bd0c: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 3001bd10: eb002ebb bl 30027804 <== NOT EXECUTED 3001bd14: eafffff3 b 3001bce8 <== NOT EXECUTED 3001bd18: 3003f402 .word 0x3003f402 30027b84 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 30027b84: e59f30a0 ldr r3, [pc, #160] ; 30027c2c int getdents( int dd_fd, char *dd_buf, int dd_len ) { 30027b88: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 30027b8c: e5933000 ldr r3, [r3] int getdents( int dd_fd, char *dd_buf, int dd_len ) { 30027b90: e1a05002 mov r5, r2 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 30027b94: e1500003 cmp r0, r3 30027b98: 359f3090 ldrcc r3, [pc, #144] ; 30027c30 30027b9c: 23a04000 movcs r4, #0 ; 0x0 30027ba0: 35932000 ldrcc r2, [r3] 30027ba4: 33a03034 movcc r3, #52 ; 0x34 30027ba8: 30242093 mlacc r4, r3, r0, r2 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 30027bac: e24dd010 sub sp, sp, #16 ; 0x10 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 30027bb0: e2843010 add r3, r4, #16 ; 0x10 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 30027bb4: e1a06001 mov r6, r1 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 30027bb8: e893000f ldm r3, {r0, r1, r2, r3} 30027bbc: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 30027bc0: e5923010 ldr r3, [r2, #16] 30027bc4: e3530000 cmp r3, #0 ; 0x0 30027bc8: 0a00000d beq 30027c04 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 30027bcc: e1a0000d mov r0, sp 30027bd0: e1a0e00f mov lr, pc 30027bd4: e12fff13 bx r3 30027bd8: e3500001 cmp r0, #1 ; 0x1 30027bdc: 0a000004 beq 30027bf4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30027be0: eb000917 bl 3002a044 <__errno> 30027be4: e3a03014 mov r3, #20 ; 0x14 30027be8: e5803000 str r3, [r0] 30027bec: e3e00000 mvn r0, #0 ; 0x0 30027bf0: ea00000b b 30027c24 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 30027bf4: e5943030 ldr r3, [r4, #48] 30027bf8: e5933008 ldr r3, [r3, #8] 30027bfc: e3530000 cmp r3, #0 ; 0x0 30027c00: 1a000002 bne 30027c10 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30027c04: eb00090e bl 3002a044 <__errno> <== NOT EXECUTED 30027c08: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30027c0c: eafffff5 b 30027be8 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 30027c10: e1a00004 mov r0, r4 30027c14: e1a01006 mov r1, r6 30027c18: e1a02005 mov r2, r5 30027c1c: e1a0e00f mov lr, pc 30027c20: e12fff13 bx r3 } 30027c24: e28dd010 add sp, sp, #16 ; 0x10 30027c28: e8bd8070 pop {r4, r5, r6, pc} 30027c2c: 3004137c .word 0x3004137c 30027c30: 300564b8 .word 0x300564b8 3001bd44 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 3001bd44: e59f3008 ldr r3, [pc, #8] ; 3001bd54 <== NOT EXECUTED 3001bd48: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 3001bd4c: e1d302bc ldrh r0, [r3, #44] <== NOT EXECUTED 3001bd50: e12fff1e bx lr <== NOT EXECUTED 3001bd54: 30041ee4 .word 0x30041ee4 3001c35c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 3001c35c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 3001c360: e59da01c ldr sl, [sp, #28] <== NOT EXECUTED 3001c364: e1a06000 mov r6, r0 <== NOT EXECUTED 3001c368: e1a08001 mov r8, r1 <== NOT EXECUTED 3001c36c: e1a04002 mov r4, r2 <== NOT EXECUTED 3001c370: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 3001c374: ebffffb7 bl 3001c258 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 3001c378: e59f00a4 ldr r0, [pc, #164] ; 3001c424 <== NOT EXECUTED 3001c37c: e59f10a4 ldr r1, [pc, #164] ; 3001c428 <== NOT EXECUTED 3001c380: eb003973 bl 3002a954 <== NOT EXECUTED 3001c384: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3001c388: 1a000003 bne 3001c39c <== NOT EXECUTED errno = EINVAL; 3001c38c: eb00372c bl 3002a044 <__errno> <== NOT EXECUTED 3001c390: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001c394: e5803000 str r3, [r0] <== NOT EXECUTED 3001c398: ea00000c b 3001c3d0 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 3001c39c: e1a01004 mov r1, r4 <== NOT EXECUTED 3001c3a0: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c3a4: e1a0300a mov r3, sl <== NOT EXECUTED 3001c3a8: e1a00005 mov r0, r5 <== NOT EXECUTED 3001c3ac: ebfffeec bl 3001bf64 <== NOT EXECUTED 3001c3b0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 3001c3b4: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 3001c3b8: 1a000006 bne 3001c3d8 <== NOT EXECUTED errno = EINVAL; 3001c3bc: eb003720 bl 3002a044 <__errno> <== NOT EXECUTED 3001c3c0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001c3c4: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 3001c3c8: e1a00005 mov r0, r5 <== NOT EXECUTED 3001c3cc: eb00376d bl 3002a188 <== NOT EXECUTED 3001c3d0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001c3d4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return -1; } if (name) { 3001c3d8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 3001c3dc: 0a000004 beq 3001c3f4 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 3001c3e0: e5940000 ldr r0, [r4] <== NOT EXECUTED 3001c3e4: eb004b85 bl 3002f200 <== NOT EXECUTED 3001c3e8: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 3001c3ec: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED 3001c3f0: ea000003 b 3001c404 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); 3001c3f4: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 3001c3f8: e1530008 cmp r3, r8 <== NOT EXECUTED 3001c3fc: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 3001c400: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 3001c404: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c408: 0affffe3 beq 3001c39c <== NOT EXECUTED fclose(fp); 3001c40c: e1a00005 mov r0, r5 <== NOT EXECUTED 3001c410: eb00375c bl 3002a188 <== NOT EXECUTED *result = grp; 3001c414: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 3001c418: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001c41c: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 3001c420: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 3001c424: 3003f323 .word 0x3003f323 3001c428: 3003dabc .word 0x3003dabc 3001c0a4 : return p; } struct group *getgrent() { if (group_fp == NULL) 3001c0a4: e59f3030 ldr r3, [pc, #48] ; 3001c0dc <== NOT EXECUTED return NULL; return p; } struct group *getgrent() { 3001c0a8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (group_fp == NULL) 3001c0ac: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001c0b0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c0b4: 0a000006 beq 3001c0d4 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 3001c0b8: e59f1020 ldr r1, [pc, #32] ; 3001c0e0 <== NOT EXECUTED 3001c0bc: e59f2020 ldr r2, [pc, #32] ; 3001c0e4 <== NOT EXECUTED 3001c0c0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001c0c4: ebffffa6 bl 3001bf64 <== NOT EXECUTED 3001c0c8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c0cc: 159f000c ldrne r0, [pc, #12] ; 3001c0e0 <== NOT EXECUTED 3001c0d0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 3001c0d4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &grent; } 3001c0d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001c0dc: 30055cb8 .word 0x30055cb8 3001c0e0: 30055d84 .word 0x30055d84 3001c0e4: 30055cbc .word 0x30055cbc 3001c468 : struct group *getgrgid( gid_t gid ) { 3001c468: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c46c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 3001c470: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 3001c474: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001c478: e59f1024 ldr r1, [pc, #36] ; 3001c4a4 <== NOT EXECUTED 3001c47c: e59f2024 ldr r2, [pc, #36] ; 3001c4a8 <== NOT EXECUTED 3001c480: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001c484: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 3001c488: e58dc000 str ip, [sp] <== NOT EXECUTED 3001c48c: ebffffe6 bl 3001c42c <== NOT EXECUTED 3001c490: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c494: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001c498: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001c49c: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c4a0: e8bd8000 pop {pc} <== NOT EXECUTED 3001c4a4: 30055d84 .word 0x30055d84 3001c4a8: 30055cbc .word 0x30055cbc 3001c42c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 3001c42c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c430: e1a0c001 mov ip, r1 <== NOT EXECUTED 3001c434: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c438: e1a0e002 mov lr, r2 <== NOT EXECUTED 3001c43c: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 3001c440: e1a0200c mov r2, ip <== NOT EXECUTED 3001c444: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001c448: e58d3000 str r3, [sp] <== NOT EXECUTED 3001c44c: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 3001c450: e1a0300e mov r3, lr <== NOT EXECUTED 3001c454: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001c458: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001c45c: ebffffbe bl 3001c35c <== NOT EXECUTED } 3001c460: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c464: e8bd8000 pop {pc} <== NOT EXECUTED 3001c4dc : struct group *getgrnam( const char *name ) { 3001c4dc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c4e0: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 3001c4e4: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001c4e8: e59f1020 ldr r1, [pc, #32] ; 3001c510 <== NOT EXECUTED 3001c4ec: e59f2020 ldr r2, [pc, #32] ; 3001c514 <== NOT EXECUTED 3001c4f0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001c4f4: e58dc000 str ip, [sp] <== NOT EXECUTED 3001c4f8: ebffffeb bl 3001c4ac <== NOT EXECUTED 3001c4fc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c500: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001c504: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001c508: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c50c: e8bd8000 pop {pc} <== NOT EXECUTED 3001c510: 30055d84 .word 0x30055d84 3001c514: 30055cbc .word 0x30055cbc 3001c4ac : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 3001c4ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c4b0: e1a0c002 mov ip, r2 <== NOT EXECUTED 3001c4b4: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 3001c4b8: e58d3000 str r3, [sp] <== NOT EXECUTED 3001c4bc: e1a0300c mov r3, ip <== NOT EXECUTED 3001c4c0: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001c4c4: e1a02001 mov r2, r1 <== NOT EXECUTED 3001c4c8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001c4cc: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001c4d0: ebffffa1 bl 3001c35c <== NOT EXECUTED } 3001c4d4: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c4d8: e8bd8000 pop {pc} <== NOT EXECUTED 3001c554 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 3001c554: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 3001c558: e59da01c ldr sl, [sp, #28] <== NOT EXECUTED 3001c55c: e1a06000 mov r6, r0 <== NOT EXECUTED 3001c560: e1a08001 mov r8, r1 <== NOT EXECUTED 3001c564: e1a04002 mov r4, r2 <== NOT EXECUTED 3001c568: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 3001c56c: ebffff39 bl 3001c258 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 3001c570: e59f00a4 ldr r0, [pc, #164] ; 3001c61c <== NOT EXECUTED 3001c574: e59f10a4 ldr r1, [pc, #164] ; 3001c620 <== NOT EXECUTED 3001c578: eb0038f5 bl 3002a954 <== NOT EXECUTED 3001c57c: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3001c580: 1a000003 bne 3001c594 <== NOT EXECUTED errno = EINVAL; 3001c584: eb0036ae bl 3002a044 <__errno> <== NOT EXECUTED 3001c588: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001c58c: e5803000 str r3, [r0] <== NOT EXECUTED 3001c590: ea00000c b 3001c5c8 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 3001c594: e1a01004 mov r1, r4 <== NOT EXECUTED 3001c598: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c59c: e1a0300a mov r3, sl <== NOT EXECUTED 3001c5a0: e1a00005 mov r0, r5 <== NOT EXECUTED 3001c5a4: ebfffecf bl 3001c0e8 <== NOT EXECUTED 3001c5a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 3001c5ac: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 3001c5b0: 1a000006 bne 3001c5d0 <== NOT EXECUTED errno = EINVAL; 3001c5b4: eb0036a2 bl 3002a044 <__errno> <== NOT EXECUTED 3001c5b8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001c5bc: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 3001c5c0: e1a00005 mov r0, r5 <== NOT EXECUTED 3001c5c4: eb0036ef bl 3002a188 <== NOT EXECUTED 3001c5c8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001c5cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return -1; } if (name) { 3001c5d0: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 3001c5d4: 0a000004 beq 3001c5ec <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 3001c5d8: e5940000 ldr r0, [r4] <== NOT EXECUTED 3001c5dc: eb004b07 bl 3002f200 <== NOT EXECUTED 3001c5e0: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 3001c5e4: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED 3001c5e8: ea000003 b 3001c5fc <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); 3001c5ec: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 3001c5f0: e1530008 cmp r3, r8 <== NOT EXECUTED 3001c5f4: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 3001c5f8: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 3001c5fc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c600: 0affffe3 beq 3001c594 <== NOT EXECUTED fclose(fp); 3001c604: e1a00005 mov r0, r5 <== NOT EXECUTED 3001c608: eb0036de bl 3002a188 <== NOT EXECUTED *result = pwd; 3001c60c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 3001c610: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001c614: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 3001c618: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 3001c61c: 3003f2b0 .word 0x3003f2b0 3001c620: 3003dabc .word 0x3003dabc 3001c214 : return p; } struct passwd *getpwent() { if (passwd_fp == NULL) 3001c214: e59f3030 ldr r3, [pc, #48] ; 3001c24c <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent() { 3001c218: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (passwd_fp == NULL) 3001c21c: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001c220: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c224: 0a000006 beq 3001c244 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 3001c228: e59f1020 ldr r1, [pc, #32] ; 3001c250 <== NOT EXECUTED 3001c22c: e59f2020 ldr r2, [pc, #32] ; 3001c254 <== NOT EXECUTED 3001c230: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001c234: ebffffab bl 3001c0e8 <== NOT EXECUTED 3001c238: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c23c: 159f000c ldrne r0, [pc, #12] ; 3001c250 <== NOT EXECUTED 3001c240: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 3001c244: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &pwent; } 3001c248: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001c24c: 30055bd0 .word 0x30055bd0 3001c250: 30055c9c .word 0x30055c9c 3001c254: 30055bd4 .word 0x30055bd4 3001c6d4 : struct passwd *getpwnam( const char *name ) { 3001c6d4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c6d8: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 3001c6dc: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001c6e0: e59f1020 ldr r1, [pc, #32] ; 3001c708 <== NOT EXECUTED 3001c6e4: e59f2020 ldr r2, [pc, #32] ; 3001c70c <== NOT EXECUTED 3001c6e8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001c6ec: e58dc000 str ip, [sp] <== NOT EXECUTED 3001c6f0: ebffffeb bl 3001c6a4 <== NOT EXECUTED 3001c6f4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c6f8: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001c6fc: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001c700: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c704: e8bd8000 pop {pc} <== NOT EXECUTED 3001c708: 30055c9c .word 0x30055c9c 3001c70c: 30055bd4 .word 0x30055bd4 3001c6a4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 3001c6a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c6a8: e1a0c002 mov ip, r2 <== NOT EXECUTED 3001c6ac: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 3001c6b0: e58d3000 str r3, [sp] <== NOT EXECUTED 3001c6b4: e1a0300c mov r3, ip <== NOT EXECUTED 3001c6b8: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001c6bc: e1a02001 mov r2, r1 <== NOT EXECUTED 3001c6c0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001c6c4: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001c6c8: ebffffa1 bl 3001c554 <== NOT EXECUTED } 3001c6cc: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c6d0: e8bd8000 pop {pc} <== NOT EXECUTED 3001c660 : struct passwd *getpwuid( uid_t uid ) { 3001c660: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c664: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 3001c668: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 3001c66c: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001c670: e59f1024 ldr r1, [pc, #36] ; 3001c69c <== NOT EXECUTED 3001c674: e59f2024 ldr r2, [pc, #36] ; 3001c6a0 <== NOT EXECUTED 3001c678: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001c67c: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 3001c680: e58dc000 str ip, [sp] <== NOT EXECUTED 3001c684: ebffffe6 bl 3001c624 <== NOT EXECUTED 3001c688: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c68c: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001c690: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001c694: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c698: e8bd8000 pop {pc} <== NOT EXECUTED 3001c69c: 30055c9c .word 0x30055c9c 3001c6a0: 30055bd4 .word 0x30055bd4 3001c624 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 3001c624: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001c628: e1a0c001 mov ip, r1 <== NOT EXECUTED 3001c62c: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c630: e1a0e002 mov lr, r2 <== NOT EXECUTED 3001c634: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 3001c638: e1a0200c mov r2, ip <== NOT EXECUTED 3001c63c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001c640: e58d3000 str r3, [sp] <== NOT EXECUTED 3001c644: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 3001c648: e1a0300e mov r3, lr <== NOT EXECUTED 3001c64c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001c650: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001c654: ebffffbe bl 3001c554 <== NOT EXECUTED } 3001c658: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001c65c: e8bd8000 pop {pc} <== NOT EXECUTED 3000885c : int gettimeofday( struct timeval *tp, void * __tz ) { 3000885c: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 30008860: e2505000 subs r5, r0, #0 ; 0x0 int gettimeofday( struct timeval *tp, void * __tz ) { 30008864: e24dd008 sub sp, sp, #8 ; 0x8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 30008868: 1a000004 bne 30008880 errno = EFAULT; 3000886c: eb000ab5 bl 3000b348 <__errno> <== NOT EXECUTED 30008870: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 30008874: e5803000 str r3, [r0] <== NOT EXECUTED 30008878: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3000887c: ea00000c b 300088b4 <== NOT EXECUTED ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 30008880: e10f4000 mrs r4, CPSR 30008884: e38430c0 orr r3, r4, #192 ; 0xc0 30008888: e129f003 msr CPSR_fc, r3 _TOD_Get( &now ); 3000888c: e1a0000d mov r0, sp 30008890: ebfff223 bl 30005124 <_TOD_Get> _ISR_Enable(level); 30008894: e129f004 msr CPSR_fc, r4 time->tv_sec = now.tv_sec; 30008898: e59d3000 ldr r3, [sp] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 3000889c: e3a01ffa mov r1, #1000 ; 0x3e8 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 300088a0: e5853000 str r3, [r5] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 300088a4: e59d0004 ldr r0, [sp, #4] 300088a8: eb0025d1 bl 30011ff4 <__aeabi_uidiv> 300088ac: e5850004 str r0, [r5, #4] 300088b0: e3a00000 mov r0, #0 ; 0x0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 300088b4: e28dd008 add sp, sp, #8 ; 0x8 300088b8: e8bd8030 pop {r4, r5, pc} 30003e48 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 30003e48: e59f3008 ldr r3, [pc, #8] ; 30003e58 <== NOT EXECUTED 30003e4c: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 30003e50: e1d302ba ldrh r0, [r3, #42] <== NOT EXECUTED 30003e54: e12fff1e bx lr <== NOT EXECUTED 30003e58: 30041ee4 .word 0x30041ee4 3001c258 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 3001c258: e92d4010 push {r4, lr} <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 3001c25c: e59f2098 ldr r2, [pc, #152] ; 3001c2fc <== NOT EXECUTED 3001c260: e5d23000 ldrb r3, [r2] <== NOT EXECUTED 3001c264: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001c268: 18bd8010 popne {r4, pc} <== NOT EXECUTED return; etc_passwd_initted = 1; 3001c26c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED mkdir("/etc", 0777); 3001c270: e59f1088 ldr r1, [pc, #136] ; 3001c300 <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 3001c274: e5c23000 strb r3, [r2] <== NOT EXECUTED mkdir("/etc", 0777); 3001c278: e59f0084 ldr r0, [pc, #132] ; 3001c304 <== NOT EXECUTED 3001c27c: ebffa098 bl 300044e4 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 3001c280: e59f0080 ldr r0, [pc, #128] ; 3001c308 <== NOT EXECUTED 3001c284: e59f1080 ldr r1, [pc, #128] ; 3001c30c <== NOT EXECUTED 3001c288: eb0039b1 bl 3002a954 <== NOT EXECUTED 3001c28c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c290: 1a000008 bne 3001c2b8 <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 3001c294: e59f006c ldr r0, [pc, #108] ; 3001c308 <== NOT EXECUTED 3001c298: e59f1070 ldr r1, [pc, #112] ; 3001c310 <== NOT EXECUTED 3001c29c: eb0039ac bl 3002a954 <== NOT EXECUTED 3001c2a0: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 3001c2a4: 0a000004 beq 3001c2bc <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 3001c2a8: e59f0064 ldr r0, [pc, #100] ; 3001c314 <== NOT EXECUTED 3001c2ac: e1a01004 mov r1, r4 <== NOT EXECUTED 3001c2b0: eb0039f9 bl 3002aa9c <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 3001c2b4: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c2b8: eb0037b2 bl 3002a188 <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 3001c2bc: e59f0054 ldr r0, [pc, #84] ; 3001c318 <== NOT EXECUTED 3001c2c0: e59f1044 ldr r1, [pc, #68] ; 3001c30c <== NOT EXECUTED 3001c2c4: eb0039a2 bl 3002a954 <== NOT EXECUTED 3001c2c8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001c2cc: 1a000008 bne 3001c2f4 <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 3001c2d0: e59f0040 ldr r0, [pc, #64] ; 3001c318 <== NOT EXECUTED 3001c2d4: e59f1034 ldr r1, [pc, #52] ; 3001c310 <== NOT EXECUTED 3001c2d8: eb00399d bl 3002a954 <== NOT EXECUTED 3001c2dc: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 3001c2e0: 08bd8010 popeq {r4, pc} <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 3001c2e4: e59f0030 ldr r0, [pc, #48] ; 3001c31c <== NOT EXECUTED 3001c2e8: e1a01004 mov r1, r4 <== NOT EXECUTED 3001c2ec: eb0039ea bl 3002aa9c <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 3001c2f0: e1a00004 mov r0, r4 <== NOT EXECUTED } } 3001c2f4: e8bd4010 pop {r4, lr} <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 3001c2f8: ea0037a2 b 3002a188 <== NOT EXECUTED 3001c2fc: 30055bcc .word 0x30055bcc 3001c300: 000001ff .word 0x000001ff 3001c304: 3003f2ab .word 0x3003f2ab 3001c308: 3003f2b0 .word 0x3003f2b0 3001c30c: 3003dabc .word 0x3003dabc 3001c310: 3003d768 .word 0x3003d768 3001c314: 3003f2bc .word 0x3003f2bc 3001c318: 3003f323 .word 0x3003f323 3001c31c: 3003f32e .word 0x3003f32e 30012a30 : int ioctl( int fd, ioctl_command_t command, ... ) { 30012a30: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 30012a34: e59f3080 ldr r3, [pc, #128] ; 30012abc int ioctl( int fd, ioctl_command_t command, ... ) { 30012a38: 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 ); 30012a3c: e5933000 ldr r3, [r3] int ioctl( int fd, ioctl_command_t command, ... ) { 30012a40: e1a01000 mov r1, r0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 30012a44: e1500003 cmp r0, r3 30012a48: 2a00000a bcs 30012a78 iop = rtems_libio_iop( fd ); 30012a4c: e59f306c ldr r3, [pc, #108] ; 30012ac0 30012a50: e5932000 ldr r2, [r3] 30012a54: e3a03034 mov r3, #52 ; 0x34 30012a58: e0202193 mla r0, r3, r1, r2 rtems_libio_check_is_open(iop); 30012a5c: e590300c ldr r3, [r0, #12] 30012a60: e3130c01 tst r3, #256 ; 0x100 30012a64: 0a000003 beq 30012a78 /* * Now process the ioctl(). */ if ( !iop->handlers ) 30012a68: e5903030 ldr r3, [r0, #48] iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 30012a6c: e59d2008 ldr r2, [sp, #8] /* * Now process the ioctl(). */ if ( !iop->handlers ) 30012a70: e3530000 cmp r3, #0 ; 0x0 30012a74: 1a000002 bne 30012a84 rtems_set_errno_and_return_minus_one( EBADF ); 30012a78: eb0002e1 bl 30013604 <__errno> <== NOT EXECUTED 30012a7c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30012a80: ea000004 b 30012a98 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) 30012a84: e5933010 ldr r3, [r3, #16] 30012a88: e3530000 cmp r3, #0 ; 0x0 30012a8c: 1a000004 bne 30012aa4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30012a90: eb0002db bl 30013604 <__errno> <== NOT EXECUTED 30012a94: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30012a98: e5803000 str r3, [r0] <== NOT EXECUTED 30012a9c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30012aa0: ea000002 b 30012ab0 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 30012aa4: e59d1004 ldr r1, [sp, #4] 30012aa8: e1a0e00f mov lr, pc 30012aac: e12fff13 bx r3 return rc; } 30012ab0: e49de004 pop {lr} ; (ldr lr, [sp], #4) 30012ab4: e28dd00c add sp, sp, #12 ; 0xc 30012ab8: e12fff1e bx lr 30012abc: 300223b4 .word 0x300223b4 30012ac0: 30024264 .word 0x30024264 30002900 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 30002900: e5912030 ldr r2, [r1, #48] <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002904: e92d4030 push {r4, r5, lr} <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 30002908: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3000290c: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 30002910: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 30002914: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002918: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 3000291c: 0a000006 beq 3000293c <== NOT EXECUTED c = tolower (c); 30002920: e59f3164 ldr r3, [pc, #356] ; 30002a8c <== NOT EXECUTED 30002924: e1a00004 mov r0, r4 <== NOT EXECUTED 30002928: e5933000 ldr r3, [r3] <== NOT EXECUTED 3000292c: e7d33004 ldrb r3, [r3, r4] <== NOT EXECUTED 30002930: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 30002934: 12840020 addne r0, r4, #32 ; 0x20 <== NOT EXECUTED 30002938: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 3000293c: e354000d cmp r4, #13 ; 0xd <== NOT EXECUTED 30002940: 1a000005 bne 3000295c <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 30002944: e3120080 tst r2, #128 ; 0x80 <== NOT EXECUTED 30002948: 1a00004d bne 30002a84 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 3000294c: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 30002950: 03a0400d moveq r4, #13 ; 0xd <== NOT EXECUTED 30002954: 13a0400a movne r4, #10 ; 0xa <== NOT EXECUTED 30002958: ea000007 b 3000297c <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3000295c: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 30002960: 1a000003 bne 30002974 <== 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; 30002964: e3120040 tst r2, #64 ; 0x40 <== NOT EXECUTED 30002968: 03a0400a moveq r4, #10 ; 0xa <== NOT EXECUTED 3000296c: 13a0400d movne r4, #13 ; 0xd <== NOT EXECUTED 30002970: ea000001 b 3000297c <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 30002974: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30002978: 0a00002f beq 30002a3c <== NOT EXECUTED 3000297c: e595203c ldr r2, [r5, #60] <== NOT EXECUTED 30002980: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 30002984: 0a00002c beq 30002a3c <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 30002988: e5d53043 ldrb r3, [r5, #67] <== NOT EXECUTED 3000298c: e1530004 cmp r3, r4 <== NOT EXECUTED erase (tty, 0); 30002990: 01a00005 moveq r0, r5 <== NOT EXECUTED 30002994: 03a01000 moveq r1, #0 ; 0x0 <== 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]) { 30002998: 0a000004 beq 300029b0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3000299c: e5d53044 ldrb r3, [r5, #68] <== NOT EXECUTED 300029a0: e1530004 cmp r3, r4 <== NOT EXECUTED 300029a4: 1a000003 bne 300029b8 <== NOT EXECUTED erase (tty, 1); 300029a8: e1a00005 mov r0, r5 <== NOT EXECUTED 300029ac: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 300029b0: ebffff61 bl 3000273c <== NOT EXECUTED 300029b4: ea000030 b 30002a7c <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 300029b8: e5d53045 ldrb r3, [r5, #69] <== NOT EXECUTED 300029bc: e1530004 cmp r3, r4 <== NOT EXECUTED 300029c0: 0a00001b beq 30002a34 <== NOT EXECUTED return 1; } else if (c == '\n') { 300029c4: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 300029c8: 1a00000a bne 300029f8 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 300029cc: e3120048 tst r2, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 300029d0: 11a00004 movne r0, r4 <== NOT EXECUTED 300029d4: 11a01005 movne r1, r5 <== NOT EXECUTED 300029d8: 1bffff36 blne 300026b8 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 300029dc: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED 300029e0: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 300029e4: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED 300029e8: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED 300029ec: e7c13002 strb r3, [r1, r2] <== NOT EXECUTED 300029f0: e5850020 str r0, [r5, #32] <== NOT EXECUTED 300029f4: ea00000e b 30002a34 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 300029f8: e5d5304c ldrb r3, [r5, #76] <== NOT EXECUTED 300029fc: e1530004 cmp r3, r4 <== NOT EXECUTED 30002a00: 0a000002 beq 30002a10 <== NOT EXECUTED 30002a04: e5d53051 ldrb r3, [r5, #81] <== NOT EXECUTED 30002a08: e1530004 cmp r3, r4 <== NOT EXECUTED 30002a0c: 1a00000a bne 30002a3c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 30002a10: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED echo (c, tty); 30002a14: 11a00004 movne r0, r4 <== NOT EXECUTED 30002a18: 11a01005 movne r1, r5 <== NOT EXECUTED 30002a1c: 1bffff25 blne 300026b8 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002a20: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30002a24: e595201c ldr r2, [r5, #28] <== NOT EXECUTED 30002a28: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 30002a2c: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED 30002a30: e5851020 str r1, [r5, #32] <== NOT EXECUTED 30002a34: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30002a38: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 30002a3c: e59f304c ldr r3, [pc, #76] ; 30002a90 <== NOT EXECUTED 30002a40: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED 30002a44: e5933000 ldr r3, [r3] <== NOT EXECUTED 30002a48: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002a4c: e1520003 cmp r2, r3 <== NOT EXECUTED 30002a50: aa00000b bge 30002a84 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 30002a54: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 30002a58: e3130008 tst r3, #8 ; 0x8 <== NOT EXECUTED echo (c, tty); 30002a5c: 11a00004 movne r0, r4 <== NOT EXECUTED 30002a60: 11a01005 movne r1, r5 <== NOT EXECUTED 30002a64: 1bffff13 blne 300026b8 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002a68: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30002a6c: e595201c ldr r2, [r5, #28] <== NOT EXECUTED 30002a70: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 30002a74: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED 30002a78: e5851020 str r1, [r5, #32] <== NOT EXECUTED 30002a7c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30002a80: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30002a84: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } return 0; } 30002a88: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30002a8c: 30015a14 .word 0x30015a14 30002a90: 30015968 .word 0x30015968 3001e4fc : int killinfo( pid_t pid, int sig, const union sigval *value ) { 3001e4fc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 3001e500: e24dd00c sub sp, sp, #12 ; 0xc 3001e504: e1a04000 mov r4, r0 3001e508: e1a06001 mov r6, r1 3001e50c: e1a05002 mov r5, r2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 3001e510: ebffff3f bl 3001e214 3001e514: e1540000 cmp r4, r0 3001e518: 0a000002 beq 3001e528 rtems_set_errno_and_return_minus_one( ESRCH ); 3001e51c: ebffd438 bl 30013604 <__errno> 3001e520: e3a03003 mov r3, #3 ; 0x3 3001e524: ea000003 b 3001e538 /* * Validate the signal passed. */ if ( !sig ) 3001e528: e3560000 cmp r6, #0 ; 0x0 3001e52c: 1a000004 bne 3001e544 rtems_set_errno_and_return_minus_one( EINVAL ); 3001e530: ebffd433 bl 30013604 <__errno> 3001e534: e3a03016 mov r3, #22 ; 0x16 3001e538: e5803000 str r3, [r0] 3001e53c: e3e00000 mvn r0, #0 ; 0x0 3001e540: ea000089 b 3001e76c if ( !is_valid_signo(sig) ) 3001e544: e2460001 sub r0, r6, #1 ; 0x1 3001e548: e350001f cmp r0, #31 ; 0x1f 3001e54c: 8afffff7 bhi 3001e530 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 3001e550: e59f321c ldr r3, [pc, #540] ; 3001e774 3001e554: e3a0200c mov r2, #12 ; 0xc 3001e558: e0233692 mla r3, r2, r6, r3 3001e55c: e5933008 ldr r3, [r3, #8] 3001e560: e3530001 cmp r3, #1 ; 0x1 3001e564: 0a00007f beq 3001e768 * 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 ) ) 3001e568: e3560004 cmp r6, #4 ; 0x4 3001e56c: 13560008 cmpne r6, #8 ; 0x8 3001e570: 0a000001 beq 3001e57c 3001e574: e356000b cmp r6, #11 ; 0xb 3001e578: 1a000003 bne 3001e58c return pthread_kill( pthread_self(), sig ); 3001e57c: eb000118 bl 3001e9e4 3001e580: e1a01006 mov r1, r6 3001e584: eb0000db bl 3001e8f8 3001e588: ea000077 b 3001e76c mask = signo_to_mask( sig ); 3001e58c: e3a03001 mov r3, #1 ; 0x1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { 3001e590: e3550000 cmp r5, #0 ; 0x0 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 3001e594: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 3001e598: e58d6000 str r6, [sp] */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 3001e59c: e1a07013 lsl r7, r3, r0 3001e5a0: e59f21d0 ldr r2, [pc, #464] ; 3001e778 siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 3001e5a4: 15953000 ldrne r3, [r5] siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 3001e5a8: 058d5008 streq r5, [sp, #8] } else { siginfo->si_value = *value; 3001e5ac: 158d3008 strne r3, [sp, #8] 3001e5b0: e5923000 ldr r3, [r2] 3001e5b4: e2833001 add r3, r3, #1 ; 0x1 3001e5b8: e5823000 str r3, [r2] /* * 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; 3001e5bc: e59f31b8 ldr r3, [pc, #440] ; 3001e77c 3001e5c0: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 3001e5c4: e5903108 ldr r3, [r0, #264] 3001e5c8: e59330c4 ldr r3, [r3, #196] 3001e5cc: e1d73003 bics r3, r7, r3 3001e5d0: 1a000046 bne 3001e6f0 goto process_it; 3001e5d4: e59f11a4 ldr r1, [pc, #420] ; 3001e780 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 3001e5d8: e2814030 add r4, r1, #48 ; 0x30 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 3001e5dc: e1a0c001 mov ip, r1 3001e5e0: e49c2004 ldr r2, [ip], #4 3001e5e4: ea000008 b 3001e60c the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 3001e5e8: e5923030 ldr r3, [r2, #48] for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3001e5ec: e592e108 ldr lr, [r2, #264] if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 3001e5f0: e1170003 tst r7, r3 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 3001e5f4: e1a00002 mov r0, r2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 3001e5f8: 1a00003c bne 3001e6f0 3001e5fc: e59e30c4 ldr r3, [lr, #196] <== NOT EXECUTED 3001e600: e1d73003 bics r3, r7, r3 <== NOT EXECUTED 3001e604: 1a000039 bne 3001e6f0 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 3001e608: e5922000 ldr r2, [r2] <== NOT EXECUTED index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 3001e60c: e152000c cmp r2, ip 3001e610: 1afffff4 bne 3001e5e8 3001e614: e281100c add r1, r1, #12 ; 0xc */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 3001e618: e1510004 cmp r1, r4 3001e61c: 1affffee bne 3001e5dc * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 3001e620: e59f315c ldr r3, [pc, #348] ; 3001e784 3001e624: e59f415c ldr r4, [pc, #348] ; 3001e788 3001e628: e5d33000 ldrb r3, [r3] 3001e62c: e3a00000 mov r0, #0 ; 0x0 3001e630: e2835001 add r5, r3, #1 ; 0x1 for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 3001e634: e284900c add r9, r4, #12 ; 0xc the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 3001e638: e5943008 ldr r3, [r4, #8] 3001e63c: e3530000 cmp r3, #0 ; 0x0 3001e640: 0a000025 beq 3001e6dc continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 3001e644: e5933004 ldr r3, [r3, #4] /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 3001e648: e3530000 cmp r3, #0 ; 0x0 continue; maximum = the_info->maximum; object_table = the_info->local_table; 3001e64c: 1593a01c ldrne sl, [r3, #28] * structure for a particular manager may not be installed. */ if ( !the_info ) continue; maximum = the_info->maximum; 3001e650: 11d381b0 ldrhne r8, [r3, #16] object_table = the_info->local_table; 3001e654: 13a0e001 movne lr, #1 ; 0x1 /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 3001e658: 1a00001d bne 3001e6d4 3001e65c: ea00001e b 3001e6dc <== NOT EXECUTED maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 3001e660: e79a210e ldr r2, [sl, lr, lsl #2] if ( !the_thread ) 3001e664: e3520000 cmp r2, #0 ; 0x0 3001e668: 0a000014 beq 3001e6c0 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 3001e66c: e592c014 ldr ip, [r2, #20] 3001e670: e15c0005 cmp ip, r5 3001e674: 8a000011 bhi 3001e6c0 /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3001e678: e5923108 ldr r3, [r2, #264] if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 3001e67c: e3530000 cmp r3, #0 ; 0x0 3001e680: 0a00000e beq 3001e6c0 3001e684: e59330c4 ldr r3, [r3, #196] 3001e688: e1d73003 bics r3, r7, r3 3001e68c: 0a00000b beq 3001e6c0 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 3001e690: e15c0005 cmp ip, r5 3001e694: 3a00000b bcc 3001e6c8 * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 3001e698: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 3001e69c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 3001e6a0: 0a000006 beq 3001e6c0 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 3001e6a4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 3001e6a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e6ac: 0a000005 beq 3001e6c8 <== NOT EXECUTED * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 3001e6b0: e3110201 tst r1, #268435456 ; 0x10000000 <== NOT EXECUTED 3001e6b4: 1a000001 bne 3001e6c0 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 3001e6b8: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED 3001e6bc: 1a000001 bne 3001e6c8 <== NOT EXECUTED 3001e6c0: e1a0c005 mov ip, r5 3001e6c4: ea000000 b 3001e6cc 3001e6c8: e1a00002 mov r0, r2 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3001e6cc: e28ee001 add lr, lr, #1 ; 0x1 3001e6d0: e1a0500c mov r5, ip 3001e6d4: e15e0008 cmp lr, r8 3001e6d8: 9affffe0 bls 3001e660 3001e6dc: e2844004 add r4, r4, #4 ; 0x4 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 3001e6e0: e1540009 cmp r4, r9 3001e6e4: 1affffd3 bne 3001e638 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 3001e6e8: e3500000 cmp r0, #0 ; 0x0 3001e6ec: 0a000006 beq 3001e70c * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 3001e6f0: e3a03001 mov r3, #1 ; 0x1 3001e6f4: e5c03075 strb r3, [r0, #117] /* * 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 ) ) { 3001e6f8: e1a01006 mov r1, r6 3001e6fc: e1a0200d mov r2, sp 3001e700: eb000035 bl 3001e7dc <_POSIX_signals_Unblock_thread> 3001e704: e3500000 cmp r0, #0 ; 0x0 3001e708: 1a000015 bne 3001e764 /* * 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 ); 3001e70c: e1a00007 mov r0, r7 3001e710: eb00001f bl 3001e794 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 3001e714: e3a0300c mov r3, #12 ; 0xc 3001e718: e0040693 mul r4, r3, r6 3001e71c: e59f3050 ldr r3, [pc, #80] ; 3001e774 3001e720: e7933004 ldr r3, [r3, r4] 3001e724: e3530002 cmp r3, #2 ; 0x2 3001e728: 1a00000d bne 3001e764 psiginfo = (POSIX_signals_Siginfo_node *) 3001e72c: e59f0058 ldr r0, [pc, #88] ; 3001e78c 3001e730: ebffaac0 bl 30009238 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 3001e734: e250c000 subs ip, r0, #0 ; 0x0 3001e738: 1a000002 bne 3001e748 rtems_set_errno_and_return_minus_one( EAGAIN ); 3001e73c: ebffd3b0 bl 30013604 <__errno> <== NOT EXECUTED 3001e740: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED 3001e744: eaffff7b b 3001e538 <== NOT EXECUTED } psiginfo->Info = *siginfo; 3001e748: e28c3008 add r3, ip, #8 ; 0x8 3001e74c: e89d0007 ldm sp, {r0, r1, r2} 3001e750: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 3001e754: e59f0034 ldr r0, [pc, #52] ; 3001e790 3001e758: e1a0100c mov r1, ip 3001e75c: e0800004 add r0, r0, r4 3001e760: ebffaaa9 bl 3000920c <_Chain_Append> } _Thread_Enable_dispatch(); 3001e764: ebffb006 bl 3000a784 <_Thread_Enable_dispatch> 3001e768: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001e76c: e28dd00c add sp, sp, #12 ; 0xc 3001e770: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 3001e774: 300249ac .word 0x300249ac 3001e778: 300243ec .word 0x300243ec 3001e77c: 300244a4 .word 0x300244a4 3001e780: 30024b38 .word 0x30024b38 3001e784: 30022460 .word 0x30022460 3001e788: 300243a8 .word 0x300243a8 3001e78c: 30024b2c .word 0x30024b2c 3001e790: 30024b7c .word 0x30024b7c 3001c7dc : int link( const char *existing, const char *new ) { 3001c7dc: e92d4070 push {r4, r5, r6, lr} 3001c7e0: e24dd024 sub sp, sp, #36 ; 0x24 3001c7e4: e1a04001 mov r4, r1 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 3001c7e8: e28d2010 add r2, sp, #16 ; 0x10 3001c7ec: e3a01000 mov r1, #0 ; 0x0 3001c7f0: e3a03001 mov r3, #1 ; 0x1 3001c7f4: ebff9d00 bl 30003bfc if ( result != 0 ) 3001c7f8: e3500000 cmp r0, #0 ; 0x0 3001c7fc: 1a000024 bne 3001c894 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 3001c800: e5d43000 ldrb r3, [r4] 3001c804: e353005c cmp r3, #92 ; 0x5c 3001c808: 1353002f cmpne r3, #47 ; 0x2f 3001c80c: 13a02000 movne r2, #0 ; 0x0 3001c810: 03a02001 moveq r2, #1 ; 0x1 3001c814: 0a000001 beq 3001c820 3001c818: e3530000 cmp r3, #0 ; 0x0 3001c81c: 1a000005 bne 3001c838 3001c820: e59f31d4 ldr r3, [pc, #468] ; 3001c9fc 3001c824: e1a0c00d mov ip, sp 3001c828: e5933000 ldr r3, [r3] 3001c82c: e3a0e001 mov lr, #1 ; 0x1 3001c830: e2833014 add r3, r3, #20 ; 0x14 3001c834: ea000004 b 3001c84c 3001c838: e59f31bc ldr r3, [pc, #444] ; 3001c9fc 3001c83c: e1a0c00d mov ip, sp 3001c840: e5933000 ldr r3, [r3] 3001c844: e1a0e002 mov lr, r2 3001c848: e2833004 add r3, r3, #4 ; 0x4 3001c84c: e893000f ldm r3, {r0, r1, r2, r3} 3001c850: e88c000f stm ip, {r0, r1, r2, r3} if ( !parent_loc.ops->evalformake_h ) { 3001c854: e59d3008 ldr r3, [sp, #8] 3001c858: e5933004 ldr r3, [r3, #4] 3001c85c: e3530000 cmp r3, #0 ; 0x0 3001c860: 1a00000d bne 3001c89c rtems_filesystem_freenode( &existing_loc ); 3001c864: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 3001c868: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001c86c: 0a000005 beq 3001c888 <== NOT EXECUTED 3001c870: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001c874: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001c878: 0a000002 beq 3001c888 <== NOT EXECUTED 3001c87c: e28d0010 add r0, sp, #16 ; 0x10 <== NOT EXECUTED 3001c880: e1a0e00f mov lr, pc <== NOT EXECUTED 3001c884: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001c888: eb0035ed bl 3002a044 <__errno> <== NOT EXECUTED 3001c88c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001c890: e5803000 str r3, [r0] 3001c894: e3e04000 mvn r4, #0 ; 0x0 3001c898: ea000054 b 3001c9f0 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 3001c89c: e084000e add r0, r4, lr 3001c8a0: e1a0100d mov r1, sp 3001c8a4: e28d2020 add r2, sp, #32 ; 0x20 3001c8a8: e1a0e00f mov lr, pc 3001c8ac: e12fff13 bx r3 if ( result != 0 ) { 3001c8b0: e2504000 subs r4, r0, #0 ; 0x0 if ( !parent_loc.ops->evalformake_h ) { 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 ); 3001c8b4: e1a0600d mov r6, sp if ( result != 0 ) { 3001c8b8: 0a00000a beq 3001c8e8 rtems_filesystem_freenode( &existing_loc ); 3001c8bc: e59d3018 ldr r3, [sp, #24] 3001c8c0: e3530000 cmp r3, #0 ; 0x0 3001c8c4: 0a000004 beq 3001c8dc 3001c8c8: e593301c ldr r3, [r3, #28] 3001c8cc: e3530000 cmp r3, #0 ; 0x0 3001c8d0: 128d0010 addne r0, sp, #16 ; 0x10 3001c8d4: 11a0e00f movne lr, pc 3001c8d8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 3001c8dc: eb0035d8 bl 3002a044 <__errno> 3001c8e0: e5804000 str r4, [r0] 3001c8e4: eaffffea b 3001c894 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 3001c8e8: e59d201c ldr r2, [sp, #28] 3001c8ec: e59d300c ldr r3, [sp, #12] 3001c8f0: e1530002 cmp r3, r2 3001c8f4: 0a000012 beq 3001c944 rtems_filesystem_freenode( &existing_loc ); 3001c8f8: e59d3018 ldr r3, [sp, #24] 3001c8fc: e3530000 cmp r3, #0 ; 0x0 3001c900: 0a000004 beq 3001c918 3001c904: e593301c ldr r3, [r3, #28] 3001c908: e3530000 cmp r3, #0 ; 0x0 3001c90c: 128d0010 addne r0, sp, #16 ; 0x10 3001c910: 11a0e00f movne lr, pc 3001c914: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 3001c918: e59d3008 ldr r3, [sp, #8] 3001c91c: e3530000 cmp r3, #0 ; 0x0 3001c920: 0a000004 beq 3001c938 3001c924: e593301c ldr r3, [r3, #28] 3001c928: e3530000 cmp r3, #0 ; 0x0 3001c92c: 11a0000d movne r0, sp 3001c930: 11a0e00f movne lr, pc 3001c934: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 3001c938: eb0035c1 bl 3002a044 <__errno> 3001c93c: e3a03012 mov r3, #18 ; 0x12 3001c940: eaffffd2 b 3001c890 } if ( !parent_loc.ops->link_h ) { 3001c944: e59d3008 ldr r3, [sp, #8] 3001c948: e5933008 ldr r3, [r3, #8] 3001c94c: e3530000 cmp r3, #0 ; 0x0 3001c950: 1a00000f bne 3001c994 rtems_filesystem_freenode( &existing_loc ); 3001c954: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 3001c958: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001c95c: 0a000004 beq 3001c974 <== NOT EXECUTED 3001c960: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001c964: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001c968: 128d0010 addne r0, sp, #16 ; 0x10 <== NOT EXECUTED 3001c96c: 11a0e00f movne lr, pc <== NOT EXECUTED 3001c970: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 3001c974: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001c978: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001c97c: 0affffc1 beq 3001c888 <== NOT EXECUTED 3001c980: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001c984: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001c988: 11a0000d movne r0, sp <== NOT EXECUTED 3001c98c: 1affffbb bne 3001c880 <== NOT EXECUTED 3001c990: eaffffbc b 3001c888 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 3001c994: e28d5010 add r5, sp, #16 ; 0x10 3001c998: e1a0100d mov r1, sp 3001c99c: e1a00005 mov r0, r5 3001c9a0: e59d2020 ldr r2, [sp, #32] 3001c9a4: e1a0e00f mov lr, pc 3001c9a8: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 3001c9ac: e59d3018 ldr r3, [sp, #24] 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 ); 3001c9b0: e1a04000 mov r4, r0 rtems_filesystem_freenode( &existing_loc ); 3001c9b4: e3530000 cmp r3, #0 ; 0x0 3001c9b8: 0a000004 beq 3001c9d0 3001c9bc: e593301c ldr r3, [r3, #28] 3001c9c0: e3530000 cmp r3, #0 ; 0x0 3001c9c4: 11a00005 movne r0, r5 3001c9c8: 11a0e00f movne lr, pc 3001c9cc: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 3001c9d0: e59d3008 ldr r3, [sp, #8] 3001c9d4: e3530000 cmp r3, #0 ; 0x0 3001c9d8: 0a000004 beq 3001c9f0 3001c9dc: e593301c ldr r3, [r3, #28] 3001c9e0: e3530000 cmp r3, #0 ; 0x0 3001c9e4: 11a0000d movne r0, sp 3001c9e8: 11a0e00f movne lr, pc 3001c9ec: 112fff13 bxne r3 return result; } 3001c9f0: e1a00004 mov r0, r4 3001c9f4: e28dd024 add sp, sp, #36 ; 0x24 3001c9f8: e8bd8070 pop {r4, r5, r6, pc} 3001c9fc: 30041ee4 .word 0x30041ee4 300138d4 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 300138d4: e59f30c4 ldr r3, [pc, #196] ; 300139a0 off_t lseek( int fd, off_t offset, int whence ) { 300138d8: e92d4030 push {r4, r5, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 300138dc: e5933000 ldr r3, [r3] off_t lseek( int fd, off_t offset, int whence ) { 300138e0: e1a0c002 mov ip, r2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 300138e4: e1500003 cmp r0, r3 300138e8: 2a000006 bcs 30013908 iop = rtems_libio_iop( fd ); 300138ec: e59f30b0 ldr r3, [pc, #176] ; 300139a4 300138f0: e5932000 ldr r2, [r3] 300138f4: e3a03034 mov r3, #52 ; 0x34 300138f8: e0242093 mla r4, r3, r0, r2 rtems_libio_check_is_open(iop); 300138fc: e594300c ldr r3, [r4, #12] 30013900: e3130c01 tst r3, #256 ; 0x100 30013904: 1a000002 bne 30013914 30013908: ebffde8e bl 3000b348 <__errno> <== NOT EXECUTED 3001390c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30013910: ea000017 b 30013974 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 30013914: e5943030 ldr r3, [r4, #48] 30013918: e5933014 ldr r3, [r3, #20] 3001391c: e3530000 cmp r3, #0 ; 0x0 30013920: 1a000002 bne 30013930 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30013924: ebffde87 bl 3000b348 <__errno> <== NOT EXECUTED 30013928: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001392c: ea000010 b 30013974 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 30013930: e35c0001 cmp ip, #1 ; 0x1 /* * Now process the lseek(). */ old_offset = iop->offset; 30013934: e5945008 ldr r5, [r4, #8] switch ( whence ) { 30013938: 0a000005 beq 30013954 3001393c: e35c0002 cmp ip, #2 ; 0x2 30013940: 0a000005 beq 3001395c 30013944: e35c0000 cmp ip, #0 ; 0x0 case SEEK_SET: iop->offset = offset; 30013948: 05841008 streq r1, [r4, #8] /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 3001394c: 0a00000b beq 30013980 30013950: ea000005 b 3001396c case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 30013954: e0813005 add r3, r1, r5 30013958: ea000001 b 30013964 break; case SEEK_END: iop->offset = iop->size + offset; 3001395c: e5943004 ldr r3, [r4, #4] 30013960: e0813003 add r3, r1, r3 30013964: e5843008 str r3, [r4, #8] 30013968: ea000004 b 30013980 break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 3001396c: ebffde75 bl 3000b348 <__errno> 30013970: e3a03016 mov r3, #22 ; 0x16 30013974: e5803000 str r3, [r0] 30013978: e3e00000 mvn r0, #0 ; 0x0 3001397c: e8bd8030 pop {r4, r5, pc} /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 30013980: e1a0200c mov r2, ip 30013984: e5943030 ldr r3, [r4, #48] 30013988: e1a00004 mov r0, r4 3001398c: e1a0e00f mov lr, pc 30013990: e593f014 ldr pc, [r3, #20] if ( status == (off_t) -1 ) 30013994: e3700001 cmn r0, #1 ; 0x1 iop->offset = old_offset; 30013998: 05845008 streq r5, [r4, #8] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 3001399c: e8bd8030 pop {r4, r5, pc} 300139a0: 30015378 .word 0x30015378 300139a4: 300160ec .word 0x300160ec 3001caf0 : int _STAT_NAME( const char *path, struct stat *buf ) { 3001caf0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 3001caf4: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 3001caf8: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 3001cafc: 1a000002 bne 3001cb0c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 3001cb00: eb00354f bl 3002a044 <__errno> <== NOT EXECUTED 3001cb04: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 3001cb08: ea000014 b 3001cb60 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 3001cb0c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001cb10: e1a0200d mov r2, sp <== NOT EXECUTED 3001cb14: e1a03001 mov r3, r1 <== NOT EXECUTED 3001cb18: ebff9c37 bl 30003bfc <== NOT EXECUTED if ( status != 0 ) 3001cb1c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 3001cb20: e1a0500d mov r5, sp <== NOT EXECUTED if ( status != 0 ) 3001cb24: 1a00000e bne 3001cb64 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 3001cb28: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 3001cb2c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 3001cb30: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001cb34: 1a00000c bne 3001cb6c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3001cb38: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001cb3c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001cb40: 0a000004 beq 3001cb58 <== NOT EXECUTED 3001cb44: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001cb48: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001cb4c: 11a0000d movne r0, sp <== NOT EXECUTED 3001cb50: 11a0e00f movne lr, pc <== NOT EXECUTED 3001cb54: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001cb58: eb003539 bl 3002a044 <__errno> <== NOT EXECUTED 3001cb5c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001cb60: e5803000 str r3, [r0] <== NOT EXECUTED 3001cb64: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001cb68: ea000011 b 3001cbb4 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 3001cb6c: e1a01000 mov r1, r0 <== NOT EXECUTED 3001cb70: e3a0204c mov r2, #76 ; 0x4c <== NOT EXECUTED 3001cb74: e1a00004 mov r0, r4 <== NOT EXECUTED 3001cb78: eb003f39 bl 3002c864 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 3001cb7c: e1a01004 mov r1, r4 <== NOT EXECUTED 3001cb80: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 3001cb84: e1a0000d mov r0, sp <== NOT EXECUTED 3001cb88: e1a0e00f mov lr, pc <== NOT EXECUTED 3001cb8c: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3001cb90: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 3001cb94: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3001cb98: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001cb9c: 0a000004 beq 3001cbb4 <== NOT EXECUTED 3001cba0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001cba4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001cba8: 11a0000d movne r0, sp <== NOT EXECUTED 3001cbac: 11a0e00f movne lr, pc <== NOT EXECUTED 3001cbb0: 112fff13 bxne r3 <== NOT EXECUTED return status; } 3001cbb4: e1a00004 mov r0, r4 <== NOT EXECUTED 3001cbb8: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 3001cbbc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30008bf0 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 30008bf0: e59f20cc ldr r2, [pc, #204] ; 30008cc4 30008bf4: e92d4030 push {r4, r5, lr} 30008bf8: e5923004 ldr r3, [r2, #4] 30008bfc: e1a05000 mov r5, r0 30008c00: e2833001 add r3, r3, #1 ; 0x1 30008c04: e5823004 str r3, [r2, #4] /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 30008c08: ebffffef bl 30008bcc /* * Validate the parameters */ if ( !size ) 30008c0c: e3550000 cmp r5, #0 ; 0x0 30008c10: 0a000028 beq 30008cb8 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 30008c14: e59f30ac ldr r3, [pc, #172] ; 30008cc8 30008c18: e5933000 ldr r3, [r3] 30008c1c: e3530003 cmp r3, #3 ; 0x3 30008c20: 1a000002 bne 30008c30 30008c24: ebffffd1 bl 30008b70 30008c28: e3500000 cmp r0, #0 ; 0x0 30008c2c: 0a000021 beq 30008cb8 * Try to give a segment in the current heap if there is not * enough space then try to grow the heap. * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 30008c30: e59f0094 ldr r0, [pc, #148] ; 30008ccc 30008c34: e1a01005 mov r1, r5 30008c38: eb000525 bl 3000a0d4 <_Protected_heap_Allocate> if ( !return_this ) { 30008c3c: e2504000 subs r4, r0, #0 ; 0x0 30008c40: 1a00000d bne 30008c7c if (rtems_malloc_sbrk_helpers) 30008c44: e59f3084 ldr r3, [pc, #132] ; 30008cd0 30008c48: e5933000 ldr r3, [r3] 30008c4c: e3530000 cmp r3, #0 ; 0x0 30008c50: 0a000005 beq 30008c6c return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 30008c54: e1a00005 mov r0, r5 <== NOT EXECUTED 30008c58: e1a0e00f mov lr, pc <== NOT EXECUTED 30008c5c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 30008c60: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = ENOMEM; return (void *) 0; 30008c64: 11a04000 movne r4, r0 <== NOT EXECUTED return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { 30008c68: 1a000003 bne 30008c7c <== NOT EXECUTED errno = ENOMEM; 30008c6c: eb0009b5 bl 3000b348 <__errno> 30008c70: e3a0300c mov r3, #12 ; 0xc 30008c74: e5803000 str r3, [r0] 30008c78: ea00000f b 30008cbc } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 30008c7c: e59f3050 ldr r3, [pc, #80] ; 30008cd4 30008c80: e5933000 ldr r3, [r3] 30008c84: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_dirty_helper)( return_this, size ); 30008c88: 11a01005 movne r1, r5 30008c8c: 11a00004 movne r0, r4 30008c90: 11a0e00f movne lr, pc 30008c94: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 30008c98: e59f3038 ldr r3, [pc, #56] ; 30008cd8 30008c9c: e5933000 ldr r3, [r3] 30008ca0: e3530000 cmp r3, #0 ; 0x0 30008ca4: 0a000004 beq 30008cbc (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 30008ca8: e1a00004 mov r0, r4 <== NOT EXECUTED 30008cac: e1a0e00f mov lr, pc <== NOT EXECUTED 30008cb0: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED 30008cb4: ea000000 b 30008cbc <== NOT EXECUTED 30008cb8: e3a04000 mov r4, #0 ; 0x0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 30008cbc: e1a00004 mov r0, r4 30008cc0: e8bd8030 pop {r4, r5, pc} 30008cc4: 30016150 .word 0x30016150 30008cc8: 30016414 .word 0x30016414 30008ccc: 300160f8 .word 0x300160f8 30008cd0: 30015f20 .word 0x30015f20 30008cd4: 30015f24 .word 0x30015f24 30008cd8: 30015f1c .word 0x30015f1c 30008bbc : } void malloc_deferred_free( void *pointer ) { 30008bbc: 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 ); 30008bc0: e59f0000 ldr r0, [pc, #0] ; 30008bc8 <== NOT EXECUTED 30008bc4: eafff060 b 30004d4c <_Chain_Append> <== NOT EXECUTED 30008bc8: 300167a8 .word 0x300167a8 30008bcc : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 30008bcc: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30008bd0: ea000000 b 30008bd8 /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 30008bd4: ebfffeb8 bl 300086bc <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 30008bd8: e59f000c ldr r0, [pc, #12] ; 30008bec 30008bdc: eb000401 bl 30009be8 <_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) 30008be0: e3500000 cmp r0, #0 ; 0x0 30008be4: 1afffffa bne 30008bd4 free(to_be_freed); } 30008be8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30008bec: 300167a8 .word 0x300167a8 30022158 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 30022158: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 3002215c: e590402c ldr r4, [r0, #44] int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 30022160: e24dd008 sub sp, sp, #8 ; 0x8 * 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 ) 30022164: e5943050 ldr r3, [r4, #80] 30022168: e1510003 cmp r1, r3 3002216c: da000002 ble 3002217c return IMFS_memfile_extend( the_jnode, length ); 30022170: e1a00004 mov r0, r4 <== NOT EXECUTED 30022174: ebffffad bl 30022030 <== NOT EXECUTED 30022178: ea000007 b 3002219c <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 3002217c: e5841050 str r1, [r4, #80] iop->size = the_jnode->info.file.size; 30022180: e5801004 str r1, [r0, #4] IMFS_update_atime( the_jnode ); 30022184: e1a0000d mov r0, sp 30022188: e3a01000 mov r1, #0 ; 0x0 3002218c: ebff8711 bl 30003dd8 30022190: e59d3000 ldr r3, [sp] 30022194: e3a00000 mov r0, #0 ; 0x0 30022198: e5843040 str r3, [r4, #64] return 0; } 3002219c: e28dd008 add sp, sp, #8 ; 0x8 300221a0: e8bd8010 pop {r4, pc} 300221a4 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 300221a4: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 300221a8: e590402c ldr r4, [r0, #44] off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 300221ac: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 300221b0: e594304c ldr r3, [r4, #76] 300221b4: e3530006 cmp r3, #6 ; 0x6 300221b8: 1a000004 bne 300221d0 if (iop->offset > the_jnode->info.linearfile.size) 300221bc: e5940050 ldr r0, [r4, #80] <== NOT EXECUTED 300221c0: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 300221c4: e1530000 cmp r3, r0 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 300221c8: c5850008 strgt r0, [r5, #8] <== NOT EXECUTED 300221cc: ea00000b b 30022200 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 300221d0: e1a00004 mov r0, r4 300221d4: e5951008 ldr r1, [r5, #8] 300221d8: ebffff94 bl 30022030 300221dc: e3500000 cmp r0, #0 ; 0x0 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 300221e0: 05943050 ldreq r3, [r4, #80] 300221e4: 05853004 streq r3, [r5, #4] if (the_jnode->type == IMFS_LINEAR_FILE) { 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 )) 300221e8: 0a000004 beq 30022200 rtems_set_errno_and_return_minus_one( ENOSPC ); 300221ec: eb001f94 bl 3002a044 <__errno> <== NOT EXECUTED 300221f0: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 300221f4: e5803000 str r3, [r0] <== NOT EXECUTED 300221f8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300221fc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED iop->size = the_jnode->info.file.size; } return iop->offset; 30022200: e5950008 ldr r0, [r5, #8] } 30022204: e8bd8030 pop {r4, r5, pc} 30022458 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 30022458: e590300c ldr r3, [r0, #12] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3002245c: e92d4030 push {r4, r5, lr} the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 30022460: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30022464: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 30022468: e590402c ldr r4, [r0, #44] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 3002246c: 0a000012 beq 300224bc 30022470: e594304c ldr r3, [r4, #76] 30022474: e3530006 cmp r3, #6 ; 0x6 30022478: 1a00000f bne 300224bc && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 3002247c: e5940050 ldr r0, [r4, #80] <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 30022480: e3a01000 mov r1, #0 ; 0x0 <== 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; 30022484: e3a03005 mov r3, #5 ; 0x5 <== 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; if ((count != 0) 30022488: e1500001 cmp r0, r1 <== 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; 3002248c: e5942054 ldr r2, [r4, #84] <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 30022490: e584304c str r3, [r4, #76] <== NOT EXECUTED the_jnode->info.file.size = 0; 30022494: e5841050 str r1, [r4, #80] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 30022498: e5841058 str r1, [r4, #88] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 3002249c: e584105c str r1, [r4, #92] <== 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; 300224a0: e5841054 str r1, [r4, #84] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 300224a4: 0a000004 beq 300224bc <== NOT EXECUTED 300224a8: e1a03000 mov r3, r0 <== NOT EXECUTED 300224ac: e1a00004 mov r0, r4 <== NOT EXECUTED 300224b0: ebffff54 bl 30022208 <== NOT EXECUTED 300224b4: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 300224b8: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 300224bc: e595300c ldr r3, [r5, #12] iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 300224c0: e3a00000 mov r0, #0 ; 0x0 the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 300224c4: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 300224c8: 15943050 ldrne r3, [r4, #80] 300224cc: 15853008 strne r3, [r5, #8] iop->size = the_jnode->info.file.size; 300224d0: e5943050 ldr r3, [r4, #80] 300224d4: e5853004 str r3, [r5, #4] return 0; } 300224d8: e8bd8030 pop {r4, r5, pc} 30001550 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 30001550: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30001554: e1a04001 mov r4, r1 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) ) ) 30001558: e2111a0f ands r1, r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 3000155c: e24dd018 sub sp, sp, #24 ; 0x18 30001560: e1a06000 mov r6, r0 30001564: e1a07002 mov r7, r2 30001568: 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) ) ) 3000156c: 1a000002 bne 3000157c rtems_set_errno_and_return_minus_one( EINVAL ); 30001570: eb002774 bl 3000b348 <__errno> <== NOT EXECUTED 30001574: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30001578: ea000003 b 3000158c <== NOT EXECUTED if ( S_ISFIFO(mode) ) 3000157c: e3510a01 cmp r1, #4096 ; 0x1000 30001580: 1a000004 bne 30001598 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001584: eb00276f bl 3000b348 <__errno> 30001588: e3a03086 mov r3, #134 ; 0x86 3000158c: e5803000 str r3, [r0] 30001590: e3e04000 mvn r4, #0 ; 0x0 30001594: ea00003b b 30001688 rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 30001598: e5d03000 ldrb r3, [r0] 3000159c: e353005c cmp r3, #92 ; 0x5c 300015a0: 1353002f cmpne r3, #47 ; 0x2f 300015a4: 13a02000 movne r2, #0 ; 0x0 300015a8: 03a02001 moveq r2, #1 ; 0x1 300015ac: 0a000001 beq 300015b8 300015b0: e3530000 cmp r3, #0 ; 0x0 300015b4: 1a000005 bne 300015d0 300015b8: e59f30d4 ldr r3, [pc, #212] ; 30001694 300015bc: e28dc004 add ip, sp, #4 ; 0x4 300015c0: e5933000 ldr r3, [r3] 300015c4: e3a0e001 mov lr, #1 ; 0x1 300015c8: e2833014 add r3, r3, #20 ; 0x14 300015cc: ea000004 b 300015e4 300015d0: e59f30bc ldr r3, [pc, #188] ; 30001694 300015d4: e28dc004 add ip, sp, #4 ; 0x4 300015d8: e5933000 ldr r3, [r3] 300015dc: e1a0e002 mov lr, r2 300015e0: e2833004 add r3, r3, #4 ; 0x4 300015e4: e893000f ldm r3, {r0, r1, r2, r3} 300015e8: e88c000f stm ip, {r0, r1, r2, r3} if ( !temp_loc.ops->evalformake_h ) { 300015ec: e59d300c ldr r3, [sp, #12] 300015f0: e5933004 ldr r3, [r3, #4] 300015f4: e3530000 cmp r3, #0 ; 0x0 300015f8: 0affffe1 beq 30001584 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 300015fc: e28d5004 add r5, sp, #4 ; 0x4 30001600: e086000e add r0, r6, lr 30001604: e1a01005 mov r1, r5 30001608: e28d2014 add r2, sp, #20 ; 0x14 3000160c: e1a0e00f mov lr, pc 30001610: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 30001614: e3500000 cmp r0, #0 ; 0x0 30001618: 1affffdc bne 30001590 return -1; if ( !temp_loc.ops->mknod_h ) { 3000161c: e59d300c ldr r3, [sp, #12] 30001620: e593c014 ldr ip, [r3, #20] 30001624: e35c0000 cmp ip, #0 ; 0x0 30001628: 1a000006 bne 30001648 rtems_filesystem_freenode( &temp_loc ); 3000162c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30001630: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001634: 0affffd2 beq 30001584 <== NOT EXECUTED 30001638: e1a00005 mov r0, r5 <== NOT EXECUTED 3000163c: e1a0e00f mov lr, pc <== NOT EXECUTED 30001640: e12fff13 bx r3 <== NOT EXECUTED 30001644: eaffffce b 30001584 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 30001648: e1a01004 mov r1, r4 3000164c: e1a03008 mov r3, r8 30001650: e58d5000 str r5, [sp] 30001654: e1a02007 mov r2, r7 30001658: e59d0014 ldr r0, [sp, #20] 3000165c: e1a0e00f mov lr, pc 30001660: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 30001664: e59d300c ldr r3, [sp, #12] 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 ); 30001668: e1a04000 mov r4, r0 rtems_filesystem_freenode( &temp_loc ); 3000166c: e3530000 cmp r3, #0 ; 0x0 30001670: 0a000004 beq 30001688 30001674: e593301c ldr r3, [r3, #28] 30001678: e3530000 cmp r3, #0 ; 0x0 3000167c: 11a00005 movne r0, r5 30001680: 11a0e00f movne lr, pc 30001684: 112fff13 bxne r3 return result; } 30001688: e1a00004 mov r0, r4 3000168c: e28dd018 add sp, sp, #24 ; 0x18 30001690: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30001694: 30015980 .word 0x30015980 30008d08 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 30008d08: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 30008d0c: e2519000 subs r9, r1, #0 ; 0x0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 30008d10: e24dd010 sub sp, sp, #16 ; 0x10 30008d14: e1a08000 mov r8, r0 30008d18: e1a07002 mov r7, r2 30008d1c: e1a05003 mov r5, r3 30008d20: e59d6030 ldr r6, [sp, #48] /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 30008d24: 0a000001 beq 30008d30 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 30008d28: e3520001 cmp r2, #1 ; 0x1 30008d2c: 9a000002 bls 30008d3c options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 30008d30: eb000984 bl 3000b348 <__errno> 30008d34: e3a03016 mov r3, #22 ; 0x16 30008d38: ea000015 b 30008d94 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 30008d3c: e5994024 ldr r4, [r9, #36] 30008d40: e3540000 cmp r4, #0 ; 0x0 30008d44: 1a000005 bne 30008d60 errno = ENOTSUP; 30008d48: eb00097e bl 3000b348 <__errno> <== NOT EXECUTED 30008d4c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008d50: e1a0a004 mov sl, r4 <== NOT EXECUTED 30008d54: e5803000 str r3, [r0] <== NOT EXECUTED 30008d58: e1a05004 mov r5, r4 <== NOT EXECUTED 30008d5c: ea000064 b 30008ef4 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 30008d60: e3530000 cmp r3, #0 ; 0x0 30008d64: 03a00064 moveq r0, #100 ; 0x64 30008d68: 0a000002 beq 30008d78 size += strlen( device ) + 1; 30008d6c: e1a00003 mov r0, r3 <== NOT EXECUTED 30008d70: eb000eaa bl 3000c820 <== NOT EXECUTED 30008d74: e2800065 add r0, r0, #101 ; 0x65 <== NOT EXECUTED temp_mt_entry = malloc( size ); 30008d78: ebffff9c bl 30008bf0 if ( !temp_mt_entry ) { 30008d7c: e3500000 cmp r0, #0 ; 0x0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 30008d80: e1a04000 mov r4, r0 30008d84: e1a0a000 mov sl, r0 if ( !temp_mt_entry ) { 30008d88: 1a000003 bne 30008d9c errno = ENOMEM; 30008d8c: eb00096d bl 3000b348 <__errno> <== NOT EXECUTED 30008d90: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 30008d94: e5803000 str r3, [r0] 30008d98: ea000061 b 30008f24 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 30008d9c: e3550000 cmp r5, #0 ; 0x0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 30008da0: e5807028 str r7, [r0, #40] if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 30008da4: e5840024 str r0, [r4, #36] 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; 30008da8: 05805060 streq r5, [r0, #96] } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 30008dac: 12803064 addne r3, r0, #100 ; 0x64 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 30008db0: 11a00003 movne r0, r3 30008db4: 11a01005 movne r1, r5 } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 30008db8: 15843060 strne r3, [r4, #96] (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 30008dbc: 1b000e69 blne 3000c768 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 30008dc0: e3560000 cmp r6, #0 ; 0x0 30008dc4: 0a00002c beq 30008e7c if ( rtems_filesystem_evaluate_path( 30008dc8: e1a00006 mov r0, r6 30008dcc: e3a01007 mov r1, #7 ; 0x7 30008dd0: e1a0200d mov r2, sp 30008dd4: e3a03001 mov r3, #1 ; 0x1 30008dd8: ebffe133 bl 300012ac 30008ddc: e3700001 cmn r0, #1 ; 0x1 30008de0: 0a000042 beq 30008ef0 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 30008de4: e59d3008 ldr r3, [sp, #8] 30008de8: e5933010 ldr r3, [r3, #16] 30008dec: e3530000 cmp r3, #0 ; 0x0 30008df0: 0a000017 beq 30008e54 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 30008df4: e1a0000d mov r0, sp 30008df8: e1a0e00f mov lr, pc 30008dfc: e12fff13 bx r3 30008e00: e3500001 cmp r0, #1 ; 0x1 30008e04: 0a000004 beq 30008e1c errno = ENOTDIR; 30008e08: eb00094e bl 3000b348 <__errno> 30008e0c: e3a03014 mov r3, #20 ; 0x14 30008e10: e5803000 str r3, [r0] 30008e14: e1a0500d mov r5, sp 30008e18: ea000035 b 30008ef4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 30008e1c: e59f1134 ldr r1, [pc, #308] ; 30008f58 !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 ) 30008e20: e59d0000 ldr r0, [sp] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 30008e24: e4912004 ldr r2, [r1], #4 30008e28: ea000003 b 30008e3c !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 ) 30008e2c: e5923018 ldr r3, [r2, #24] 30008e30: e1530000 cmp r3, r0 30008e34: 0a000003 beq 30008e48 * 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 ) { 30008e38: e5922000 ldr r2, [r2] /* * 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 ); 30008e3c: e1520001 cmp r2, r1 30008e40: 1afffff9 bne 30008e2c 30008e44: ea000039 b 30008f30 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 30008e48: eb00093e bl 3000b348 <__errno> 30008e4c: e3a03010 mov r3, #16 ; 0x10 30008e50: eaffffee b 30008e10 * 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; 30008e54: eb00093b bl 3000b348 <__errno> <== NOT EXECUTED 30008e58: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008e5c: eaffffeb b 30008e10 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 30008e60: e1a00004 mov r0, r4 30008e64: e1a0e00f mov lr, pc 30008e68: e12fff11 bx r1 30008e6c: e3500000 cmp r0, #0 ; 0x0 30008e70: 01a0500d moveq r5, sp 30008e74: 0a000008 beq 30008e9c 30008e78: eaffffe5 b 30008e14 <== 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; 30008e7c: e5846018 str r6, [r4, #24] temp_mt_entry->mt_fs_root.handlers = NULL; 30008e80: e584601c str r6, [r4, #28] temp_mt_entry->mt_fs_root.ops = NULL; 30008e84: e5846020 str r6, [r4, #32] temp_mt_entry->mt_point_node.node_access = NULL; 30008e88: e5846008 str r6, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 30008e8c: e584600c str r6, [r4, #12] temp_mt_entry->mt_point_node.ops = NULL; 30008e90: e5846010 str r6, [r4, #16] temp_mt_entry->mt_point_node.mt_entry = NULL; 30008e94: e5846014 str r6, [r4, #20] 30008e98: e1a05006 mov r5, r6 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 30008e9c: e1a00004 mov r0, r4 30008ea0: e1a0e00f mov lr, pc 30008ea4: e599f024 ldr pc, [r9, #36] 30008ea8: e2506000 subs r6, r0, #0 ; 0x0 30008eac: 0a000007 beq 30008ed0 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 30008eb0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30008eb4: e5933028 ldr r3, [r3, #40] <== NOT EXECUTED 30008eb8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30008ebc: 0a00000c beq 30008ef4 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 30008ec0: e1a00004 mov r0, r4 <== NOT EXECUTED 30008ec4: e1a0e00f mov lr, pc <== NOT EXECUTED 30008ec8: e12fff13 bx r3 <== NOT EXECUTED 30008ecc: ea000008 b 30008ef4 <== 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 ); 30008ed0: e59f0080 ldr r0, [pc, #128] ; 30008f58 30008ed4: e1a01004 mov r1, r4 30008ed8: ebffef9b bl 30004d4c <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 30008edc: e3580000 cmp r8, #0 ; 0x0 30008ee0: 01a00008 moveq r0, r8 *mt_entry = temp_mt_entry; 30008ee4: 15884000 strne r4, [r8] 30008ee8: 11a00006 movne r0, r6 30008eec: ea00000d b 30008f28 30008ef0: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 30008ef4: e1a0000a mov r0, sl 30008ef8: ebfffdef bl 300086bc if ( loc_to_free ) 30008efc: e3550000 cmp r5, #0 ; 0x0 30008f00: 0a000007 beq 30008f24 rtems_filesystem_freenode( loc_to_free ); 30008f04: e5953008 ldr r3, [r5, #8] 30008f08: e3530000 cmp r3, #0 ; 0x0 30008f0c: 0a000004 beq 30008f24 30008f10: e593301c ldr r3, [r3, #28] 30008f14: e3530000 cmp r3, #0 ; 0x0 30008f18: 11a00005 movne r0, r5 30008f1c: 11a0e00f movne lr, pc 30008f20: 112fff13 bxne r3 30008f24: e3e00000 mvn r0, #0 ; 0x0 return -1; } 30008f28: e28dd010 add sp, sp, #16 ; 0x10 30008f2c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 30008f30: e99d000c ldmib sp, {r2, r3} /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 30008f34: e5931020 ldr r1, [r3, #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; 30008f38: e584200c str r2, [r4, #12] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 30008f3c: e59d200c ldr r2, [sp, #12] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 30008f40: e3510000 cmp r1, #0 ; 0x0 * 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; 30008f44: 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; 30008f48: e5842014 str r2, [r4, #20] * 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; 30008f4c: e5843010 str r3, [r4, #16] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 30008f50: 1affffc2 bne 30008e60 30008f54: eaffffbe b 30008e54 <== NOT EXECUTED 30008f58: 300167b4 .word 0x300167b4 3000f1cc : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 3000f1cc: e92d4070 push {r4, r5, r6, lr} 3000f1d0: e1a06001 mov r6, r1 3000f1d4: e1a04000 mov r4, r0 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 3000f1d8: eb0006fb bl 30010dcc <_Timespec_Is_valid> 3000f1dc: e3500000 cmp r0, #0 ; 0x0 3000f1e0: 0a000005 beq 3000f1fc * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 3000f1e4: e5943000 ldr r3, [r4] 3000f1e8: e3530000 cmp r3, #0 ; 0x0 3000f1ec: ba000002 blt 3000f1fc 3000f1f0: e5943004 ldr r3, [r4, #4] 3000f1f4: e3530000 cmp r3, #0 ; 0x0 3000f1f8: aa000002 bge 3000f208 rtems_set_errno_and_return_minus_one( EINVAL ); 3000f1fc: eb001100 bl 30013604 <__errno> 3000f200: e3a03016 mov r3, #22 ; 0x16 3000f204: ea000031 b 3000f2d0 ticks = _Timespec_To_ticks( rqtp ); 3000f208: e1a00004 mov r0, r4 3000f20c: eb0006fe bl 30010e0c <_Timespec_To_ticks> * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 3000f210: e2505000 subs r5, r0, #0 ; 0x0 3000f214: e59f20c8 ldr r2, [pc, #200] ; 3000f2e4 3000f218: 1a00000a bne 3000f248 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000f21c: e5923000 ldr r3, [r2] 3000f220: e2833001 add r3, r3, #1 ; 0x1 3000f224: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _Thread_Yield_processor(); 3000f228: ebfff0b5 bl 3000b504 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 3000f22c: ebffed54 bl 3000a784 <_Thread_Enable_dispatch> if ( rmtp ) { 3000f230: e3560000 cmp r6, #0 ; 0x0 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 3000f234: 15865004 strne r5, [r6, #4] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 3000f238: 15865000 strne r5, [r6] rmtp->tv_nsec = 0; 3000f23c: 11a00005 movne r0, r5 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 3000f240: 18bd8070 popne {r4, r5, r6, pc} 3000f244: ea000024 b 3000f2dc <== NOT EXECUTED 3000f248: e5923000 ldr r3, [r2] 3000f24c: e2833001 add r3, r3, #1 ; 0x1 3000f250: e5823000 str r3, [r2] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 3000f254: e59f408c ldr r4, [pc, #140] ; 3000f2e8 3000f258: e3a01281 mov r1, #268435464 ; 0x10000008 3000f25c: e5940000 ldr r0, [r4] 3000f260: ebffefb8 bl 3000b148 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 3000f264: e5943000 ldr r3, [r4] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3000f268: e59f207c ldr r2, [pc, #124] ; 3000f2ec 3000f26c: e5931008 ldr r1, [r3, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3000f270: e3a00000 mov r0, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; 3000f274: e5831068 str r1, [r3, #104] the_watchdog->user_data = user_data; 3000f278: e583006c str r0, [r3, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3000f27c: e5830050 str r0, [r3, #80] the_watchdog->routine = routine; 3000f280: e5832064 str r2, [r3, #100] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000f284: e2831048 add r1, r3, #72 ; 0x48 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000f288: e5835054 str r5, [r3, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000f28c: e59f005c ldr r0, [pc, #92] ; 3000f2f0 3000f290: ebfff1ad bl 3000b94c <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 3000f294: ebffed3a bl 3000a784 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 3000f298: e3560000 cmp r6, #0 ; 0x0 3000f29c: 0a00000e beq 3000f2dc ticks -= 3000f2a0: e5943000 ldr r3, [r4] _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 3000f2a4: e1a01006 mov r1, r6 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 3000f2a8: e5932060 ldr r2, [r3, #96] 3000f2ac: e593405c ldr r4, [r3, #92] 3000f2b0: e0624004 rsb r4, r2, r4 3000f2b4: e0844005 add r4, r4, r5 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 3000f2b8: e1a00004 mov r0, r4 3000f2bc: eb0006b0 bl 30010d84 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 3000f2c0: e3540000 cmp r4, #0 ; 0x0 3000f2c4: 0a000004 beq 3000f2dc rtems_set_errno_and_return_minus_one( EINTR ); 3000f2c8: eb0010cd bl 30013604 <__errno> 3000f2cc: e3a03004 mov r3, #4 ; 0x4 3000f2d0: e5803000 str r3, [r0] 3000f2d4: e3e00000 mvn r0, #0 ; 0x0 3000f2d8: e8bd8070 pop {r4, r5, r6, pc} 3000f2dc: e3a00000 mov r0, #0 ; 0x0 } return 0; } 3000f2e0: e8bd8070 pop {r4, r5, r6, pc} 3000f2e4: 300243ec .word 0x300243ec 3000f2e8: 300244a4 .word 0x300244a4 3000f2ec: 3000a5f8 .word 0x3000a5f8 3000f2f0: 300244c4 .word 0x300244c4 30001724 : */ int newlib_free_buffers( FILE *fp ) { 30001724: e92d4010 push {r4, lr} 30001728: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 3000172c: eb0027d2 bl 3000b67c 30001730: e3500002 cmp r0, #2 ; 0x2 30001734: 8a00000b bhi 30001768 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 30001738: e1d430bc ldrh r3, [r4, #12] 3000173c: e3130080 tst r3, #128 ; 0x80 30001740: 0a00000a beq 30001770 free( fp->_bf._base ); 30001744: e5940010 ldr r0, [r4, #16] 30001748: eb001bdb bl 300086bc fp->_flags &= ~__SMBF; 3000174c: e1d430bc ldrh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001750: e3a02000 mov r2, #0 ; 0x0 case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 30001754: e3c33080 bic r3, r3, #128 ; 0x80 fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001758: e5842010 str r2, [r4, #16] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 3000175c: e1c430bc strh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001760: e5842000 str r2, [r4] 30001764: ea000001 b 30001770 } break; default: fclose(fp); 30001768: e1a00004 mov r0, r4 <== NOT EXECUTED 3000176c: eb002746 bl 3000b48c <== NOT EXECUTED } return 0; } 30001770: e3a00000 mov r0, #0 ; 0x0 30001774: e8bd8010 pop {r4, pc} 30001968 : int open( const char *pathname, int flags, ... ) { 30001968: e92d000e push {r1, r2, r3} 3000196c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30001970: e24dd010 sub sp, sp, #16 ; 0x10 30001974: e59d802c ldr r8, [sp, #44] 30001978: e1a06000 mov r6, r0 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 3000197c: e2883001 add r3, r8, #1 ; 0x1 if ( ( status & _FREAD ) == _FREAD ) 30001980: e2132001 ands r2, r3, #1 ; 0x1 30001984: 01a04002 moveq r4, r2 30001988: 13a04004 movne r4, #4 ; 0x4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 3000198c: e3130002 tst r3, #2 ; 0x2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 30001990: 13844002 orrne r4, r4, #2 ; 0x2 va_start(ap, flags); mode = va_arg( ap, int ); 30001994: e59da030 ldr sl, [sp, #48] * 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(); 30001998: eb001c34 bl 30008a70 if ( iop == 0 ) { 3000199c: e2507000 subs r7, r0, #0 ; 0x0 300019a0: 03a06017 moveq r6, #23 ; 0x17 300019a4: 0a00006b beq 30001b58 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 300019a8: e1a01004 mov r1, r4 300019ac: e1a00006 mov r0, r6 300019b0: e1a0200d mov r2, sp 300019b4: e3a03001 mov r3, #1 ; 0x1 300019b8: ebfffe3b bl 300012ac pathname, eval_flags, &loc, true ); if ( status == -1 ) { 300019bc: e3700001 cmn r0, #1 ; 0x1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 300019c0: e1a0500d mov r5, sp pathname, eval_flags, &loc, true ); if ( status == -1 ) { 300019c4: 1a00001a bne 30001a34 if ( errno != ENOENT ) { 300019c8: eb00265e bl 3000b348 <__errno> 300019cc: e5900000 ldr r0, [r0] 300019d0: e3500002 cmp r0, #2 ; 0x2 300019d4: 1a00000a bne 30001a04 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 300019d8: e2183c02 ands r3, r8, #512 ; 0x200 300019dc: 01a06000 moveq r6, r0 300019e0: 01a04003 moveq r4, r3 300019e4: 0a00004e beq 30001b24 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 300019e8: e1a00006 mov r0, r6 300019ec: e38a1902 orr r1, sl, #32768 ; 0x8000 300019f0: e3a02000 mov r2, #0 ; 0x0 300019f4: e3a03000 mov r3, #0 ; 0x0 300019f8: ebfffed4 bl 30001550 if ( rc ) { 300019fc: e2504000 subs r4, r0, #0 ; 0x0 30001a00: 0a000002 beq 30001a10 rc = errno; 30001a04: eb00264f bl 3000b348 <__errno> 30001a08: e5906000 ldr r6, [r0] 30001a0c: ea000041 b 30001b18 goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true ); 30001a10: e1a00006 mov r0, r6 30001a14: e1a0200d mov r2, sp 30001a18: e1a01004 mov r1, r4 30001a1c: e3a03001 mov r3, #1 ; 0x1 30001a20: ebfffe21 bl 300012ac if ( status != 0 ) { /* The file did not exist */ 30001a24: e3500000 cmp r0, #0 ; 0x0 30001a28: 13a0600d movne r6, #13 ; 0xd 30001a2c: 1a00003c bne 30001b24 30001a30: ea000004 b 30001a48 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 30001a34: e2083c0a and r3, r8, #2560 ; 0xa00 30001a38: e3530c0a cmp r3, #2560 ; 0xa00 30001a3c: 01a0400d moveq r4, sp 30001a40: 03a06011 moveq r6, #17 ; 0x11 30001a44: 0a000036 beq 30001b24 * 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; 30001a48: e28d5010 add r5, sp, #16 ; 0x10 30001a4c: e5353010 ldr r3, [r5, #-16]! iop->flags |= rtems_libio_fcntl_flags( flags ); 30001a50: e1a00008 mov r0, r8 * 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; 30001a54: e587302c str r3, [r7, #44] /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 30001a58: e59d3004 ldr r3, [sp, #4] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001a5c: e597400c ldr r4, [r7, #12] /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 30001a60: e5873030 str r3, [r7, #48] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001a64: eb001c34 bl 30008b3c iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 30001a68: e5973030 ldr r3, [r7, #48] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001a6c: e1800004 orr r0, r0, r4 iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 30001a70: e5934000 ldr r4, [r3] */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 30001a74: e287c010 add ip, r7, #16 ; 0x10 if ( !iop->handlers->open_h ) { 30001a78: e3540000 cmp r4, #0 ; 0x0 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001a7c: e587000c str r0, [r7, #12] iop->pathinfo = loc; 30001a80: e895000f ldm r5, {r0, r1, r2, r3} 30001a84: e88c000f stm ip, {r0, r1, r2, r3} if ( !iop->handlers->open_h ) { 30001a88: 0a000040 beq 30001b90 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 30001a8c: e1a01006 mov r1, r6 30001a90: e1a0300a mov r3, sl 30001a94: e1a00007 mov r0, r7 30001a98: e1a02008 mov r2, r8 30001a9c: e1a0e00f mov lr, pc 30001aa0: e12fff14 bx r4 if ( rc ) 30001aa4: e2506000 subs r6, r0, #0 ; 0x0 30001aa8: 11a0400d movne r4, sp 30001aac: 1a00001c bne 30001b24 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 30001ab0: e3180b01 tst r8, #1024 ; 0x400 30001ab4: 0a00002b beq 30001b68 rc = ftruncate( iop - rtems_libio_iops, 0 ); 30001ab8: e59f30dc ldr r3, [pc, #220] ; 30001b9c 30001abc: e59f20dc ldr r2, [pc, #220] ; 30001ba0 30001ac0: e5933000 ldr r3, [r3] 30001ac4: e1a01006 mov r1, r6 30001ac8: e0633007 rsb r3, r3, r7 30001acc: e1a03143 asr r3, r3, #2 30001ad0: e0000392 mul r0, r2, r3 30001ad4: eb001b20 bl 3000875c if ( rc ) { 30001ad8: e2506000 subs r6, r0, #0 ; 0x0 30001adc: 0a000021 beq 30001b68 if(errno) rc = errno; 30001ae0: eb002618 bl 3000b348 <__errno> <== NOT EXECUTED 30001ae4: e5903000 ldr r3, [r0] <== NOT EXECUTED 30001ae8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001aec: 0a000001 beq 30001af8 <== NOT EXECUTED 30001af0: eb002614 bl 3000b348 <__errno> <== NOT EXECUTED 30001af4: e5906000 ldr r6, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 30001af8: e59f309c ldr r3, [pc, #156] ; 30001b9c <== NOT EXECUTED 30001afc: e59f209c ldr r2, [pc, #156] ; 30001ba0 <== NOT EXECUTED 30001b00: e5933000 ldr r3, [r3] <== NOT EXECUTED 30001b04: e0633007 rsb r3, r3, r7 <== NOT EXECUTED 30001b08: e1a03143 asr r3, r3, #2 <== NOT EXECUTED 30001b0c: e0000392 mul r0, r2, r3 <== NOT EXECUTED 30001b10: eb001abf bl 30008614 <== NOT EXECUTED 30001b14: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 30001b18: e3560000 cmp r6, #0 ; 0x0 30001b1c: 0a000011 beq 30001b68 30001b20: e3a04000 mov r4, #0 ; 0x0 if ( iop ) 30001b24: e3570000 cmp r7, #0 ; 0x0 rtems_libio_free( iop ); 30001b28: 11a00007 movne r0, r7 30001b2c: 1b001bb8 blne 30008a14 if ( loc_to_free ) 30001b30: e3540000 cmp r4, #0 ; 0x0 30001b34: 0a000007 beq 30001b58 rtems_filesystem_freenode( loc_to_free ); 30001b38: e5943008 ldr r3, [r4, #8] 30001b3c: e3530000 cmp r3, #0 ; 0x0 30001b40: 0a000004 beq 30001b58 30001b44: e593301c ldr r3, [r3, #28] 30001b48: e3530000 cmp r3, #0 ; 0x0 30001b4c: 11a00004 movne r0, r4 30001b50: 11a0e00f movne lr, pc 30001b54: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 30001b58: eb0025fa bl 3000b348 <__errno> 30001b5c: e5806000 str r6, [r0] 30001b60: e3e00000 mvn r0, #0 ; 0x0 30001b64: ea000005 b 30001b80 } return iop - rtems_libio_iops; 30001b68: e59f302c ldr r3, [pc, #44] ; 30001b9c 30001b6c: e59f202c ldr r2, [pc, #44] ; 30001ba0 30001b70: e5933000 ldr r3, [r3] 30001b74: e0633007 rsb r3, r3, r7 30001b78: e1a03143 asr r3, r3, #2 30001b7c: e0000392 mul r0, r2, r3 } 30001b80: e28dd010 add sp, sp, #16 ; 0x10 30001b84: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} 30001b88: e28dd00c add sp, sp, #12 ; 0xc 30001b8c: e12fff1e bx lr if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 30001b90: e1a0400d mov r4, sp <== NOT EXECUTED 30001b94: e3a06086 mov r6, #134 ; 0x86 <== NOT EXECUTED 30001b98: eaffffe1 b 30001b24 <== NOT EXECUTED 30001b9c: 300160ec .word 0x300160ec 30001ba0: c4ec4ec5 .word 0xc4ec4ec5 30001904 : int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 30001904: e3a01000 mov r1, #0 ; 0x0 /* * This is a replaceable stub */ void open_dev_console(void) { 30001908: e52de004 push {lr} ; (str lr, [sp, #-4]!) int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 3000190c: e59f0048 ldr r0, [pc, #72] ; 3000195c 30001910: e1a02001 mov r2, r1 30001914: eb000013 bl 30001968 30001918: e3700001 cmn r0, #1 ; 0x1 3000191c: 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) 30001920: e59f0034 ldr r0, [pc, #52] ; 3000195c 30001924: e3a01001 mov r1, #1 ; 0x1 30001928: e3a02000 mov r2, #0 ; 0x0 3000192c: eb00000d bl 30001968 30001930: e3700001 cmn r0, #1 ; 0x1 rtems_fatal_error_occurred( error_code | '1' ); 30001934: 059f0024 ldreq r0, [pc, #36] ; 30001960 /* * 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) 30001938: 0a000006 beq 30001958 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 3000193c: e59f0018 ldr r0, [pc, #24] ; 3000195c 30001940: e3a01001 mov r1, #1 ; 0x1 30001944: e3a02000 mov r2, #0 ; 0x0 30001948: eb000006 bl 30001968 3000194c: e3700001 cmn r0, #1 ; 0x1 30001950: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( error_code | '2' ); 30001954: e59f0008 ldr r0, [pc, #8] ; 30001964 <== NOT EXECUTED 30001958: eb000c0e bl 30004998 <== NOT EXECUTED 3000195c: 30014e3d .word 0x30014e3d 30001960: 53544431 .word 0x53544431 30001964: 53544432 .word 0x53544432 3001cd58 : * open a directory. */ DIR * opendir( const char *name ) { 3001cd58: e92d4030 push {r4, r5, lr} register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 3001cd5c: e3a01000 mov r1, #0 ; 0x0 3001cd60: ebff9f85 bl 30004b7c 3001cd64: e3700001 cmn r0, #1 ; 0x1 3001cd68: e1a05000 mov r5, r0 3001cd6c: 0a00000a beq 3001cd9c return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 3001cd70: e3a01002 mov r1, #2 ; 0x2 3001cd74: e3a02001 mov r2, #1 ; 0x1 3001cd78: eb002b0a bl 300279a8 3001cd7c: e3700001 cmn r0, #1 ; 0x1 3001cd80: 0a000003 beq 3001cd94 3001cd84: e3a00018 mov r0, #24 ; 0x18 3001cd88: ebff9d65 bl 30004324 3001cd8c: e2504000 subs r4, r0, #0 ; 0x0 3001cd90: 1a000003 bne 3001cda4 (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) { close (fd); 3001cd94: e1a00005 mov r0, r5 <== NOT EXECUTED 3001cd98: ebff9b46 bl 30003ab8 <== NOT EXECUTED 3001cd9c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 3001cda0: ea00000f b 3001cde4 <== NOT EXECUTED * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 3001cda4: e3a00c02 mov r0, #512 ; 0x200 3001cda8: ebff9d5d bl 30004324 dirp->dd_len = 512; 3001cdac: e3a03c02 mov r3, #512 ; 0x200 if (dirp->dd_buf == NULL) { 3001cdb0: e3500000 cmp r0, #0 ; 0x0 * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 3001cdb4: e1a02000 mov r2, r0 dirp->dd_len = 512; 3001cdb8: e5843010 str r3, [r4, #16] * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 3001cdbc: e584000c str r0, [r4, #12] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 3001cdc0: 1a000003 bne 3001cdd4 close (fd); 3001cdc4: e1a00005 mov r0, r5 <== NOT EXECUTED 3001cdc8: e1a04002 mov r4, r2 <== NOT EXECUTED 3001cdcc: ebff9b39 bl 30003ab8 <== NOT EXECUTED 3001cdd0: ea000003 b 3001cde4 <== NOT EXECUTED return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 3001cdd4: e3a03000 mov r3, #0 ; 0x0 if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; 3001cdd8: e5845000 str r5, [r4] dirp->dd_loc = 0; dirp->dd_seek = 0; 3001cddc: e5843014 str r3, [r4, #20] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 3001cde0: e5843004 str r3, [r4, #4] dirp->dd_seek = 0; /* * Set up seek point for rewinddir. */ return dirp; } 3001cde4: e1a00004 mov r0, r4 3001cde8: e8bd8030 pop {r4, r5, pc} 30002564 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 30002564: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 30002568: e5912034 ldr r2, [r1, #52] /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3000256c: e24dd004 sub sp, sp, #4 ; 0x4 int i; if (tty->termios.c_oflag & OPOST) { 30002570: e3120001 tst r2, #1 ; 0x1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 30002574: e1a04001 mov r4, r1 30002578: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 3000257c: 0a000044 beq 30002694 switch (c) { 30002580: e5dd1000 ldrb r1, [sp] 30002584: e2413008 sub r3, r1, #8 ; 0x8 30002588: e3530005 cmp r3, #5 ; 0x5 3000258c: 979ff103 ldrls pc, [pc, r3, lsl #2] 30002590: ea00002d b 3000264c 30002594: 30002638 .word 0x30002638 <== NOT EXECUTED 30002598: 3000260c .word 0x3000260c <== NOT EXECUTED 3000259c: 300025ac .word 0x300025ac <== NOT EXECUTED 300025a0: 3000264c .word 0x3000264c <== NOT EXECUTED 300025a4: 3000264c .word 0x3000264c <== NOT EXECUTED 300025a8: 300025d8 .word 0x300025d8 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 300025ac: e3120020 tst r2, #32 ; 0x20 tty->column = 0; 300025b0: 13a03000 movne r3, #0 ; 0x0 300025b4: 15843028 strne r3, [r4, #40] if (tty->termios.c_oflag & ONLCR) { 300025b8: e5943034 ldr r3, [r4, #52] 300025bc: e3130004 tst r3, #4 ; 0x4 300025c0: 0a000033 beq 30002694 rtems_termios_puts ("\r", 1, tty); 300025c4: e59f00e0 ldr r0, [pc, #224] ; 300026ac 300025c8: e3a01001 mov r1, #1 ; 0x1 300025cc: e1a02004 mov r2, r4 300025d0: ebffff9f bl 30002454 300025d4: ea00000a b 30002604 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 300025d8: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED 300025dc: 0a000002 beq 300025ec <== NOT EXECUTED 300025e0: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 300025e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300025e8: 0a00002d beq 300026a4 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 300025ec: e2123008 ands r3, r2, #8 ; 0x8 <== NOT EXECUTED 300025f0: 0a000026 beq 30002690 <== NOT EXECUTED c = '\n'; 300025f4: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 300025f8: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { c = '\n'; 300025fc: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 30002600: 0a000023 beq 30002694 <== NOT EXECUTED tty->column = 0; 30002604: e3a03000 mov r3, #0 ; 0x0 30002608: ea000020 b 30002690 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3000260c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30002610: e2022b06 and r2, r2, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30002614: e2031007 and r1, r3, #7 ; 0x7 <== NOT EXECUTED 30002618: e2611008 rsb r1, r1, #8 ; 0x8 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3000261c: e3520b06 cmp r2, #6144 ; 0x1800 <== NOT EXECUTED 30002620: e0813003 add r3, r1, r3 <== NOT EXECUTED 30002624: 1a000019 bne 30002690 <== NOT EXECUTED tty->column += i; 30002628: e5843028 str r3, [r4, #40] <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 3000262c: e1a02004 mov r2, r4 <== NOT EXECUTED 30002630: e59f0078 ldr r0, [pc, #120] ; 300026b0 <== NOT EXECUTED 30002634: ea000019 b 300026a0 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 30002638: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 3000263c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 30002640: c2433001 subgt r3, r3, #1 ; 0x1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 30002644: ca000011 bgt 30002690 <== NOT EXECUTED 30002648: ea000011 b 30002694 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 3000264c: e3120002 tst r2, #2 ; 0x2 30002650: 0a000006 beq 30002670 c = toupper(c); 30002654: e59f3058 ldr r3, [pc, #88] ; 300026b4 <== NOT EXECUTED 30002658: e1a02001 mov r2, r1 <== NOT EXECUTED 3000265c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30002660: e7d33001 ldrb r3, [r3, r1] <== NOT EXECUTED 30002664: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 30002668: 12412020 subne r2, r1, #32 ; 0x20 <== NOT EXECUTED 3000266c: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 30002670: e59f303c ldr r3, [pc, #60] ; 300026b4 30002674: e5dd2000 ldrb r2, [sp] 30002678: e5933000 ldr r3, [r3] 3000267c: e7d33002 ldrb r3, [r3, r2] 30002680: e3130020 tst r3, #32 ; 0x20 30002684: 1a000002 bne 30002694 tty->column++; 30002688: e5943028 ldr r3, [r4, #40] 3000268c: e2833001 add r3, r3, #1 ; 0x1 30002690: e5843028 str r3, [r4, #40] break; } } rtems_termios_puts (&c, 1, tty); 30002694: e1a02004 mov r2, r4 30002698: e1a0000d mov r0, sp 3000269c: e3a01001 mov r1, #1 ; 0x1 300026a0: ebffff6b bl 30002454 } 300026a4: e28dd004 add sp, sp, #4 ; 0x4 300026a8: e8bd8010 pop {r4, pc} 300026ac: 30014fd0 .word 0x30014fd0 300026b0: 30014ead .word 0x30014ead 300026b4: 30015a14 .word 0x30015a14 30004be8 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 30004be8: e92d4030 push {r4, r5, lr} 30004bec: e24dd004 sub sp, sp, #4 ; 0x4 30004bf0: e1a04000 mov r4, r0 30004bf4: e1a05001 mov r5, r1 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 30004bf8: e1a00002 mov r0, r2 30004bfc: e1a0100d mov r1, sp 30004c00: eb000125 bl 3000509c <_POSIX_Absolute_timeout_to_ticks> 30004c04: e3500003 cmp r0, #3 ; 0x3 30004c08: 979ff100 ldrls pc, [pc, r0, lsl #2] 30004c0c: ea000008 b 30004c34 <== NOT EXECUTED 30004c10: 30004c20 .word 0x30004c20 <== NOT EXECUTED 30004c14: 30004c28 .word 0x30004c28 <== NOT EXECUTED 30004c18: 30004c28 .word 0x30004c28 <== NOT EXECUTED 30004c1c: 30004c30 .word 0x30004c30 <== NOT EXECUTED 30004c20: e3a00016 mov r0, #22 ; 0x16 30004c24: ea000006 b 30004c44 30004c28: e3a03001 mov r3, #1 ; 0x1 30004c2c: ea000000 b 30004c34 30004c30: e3a03000 mov r3, #0 ; 0x0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 30004c34: e1a00004 mov r0, r4 30004c38: e1a01005 mov r1, r5 30004c3c: e59d2000 ldr r2, [sp] 30004c40: eb000004 bl 30004c58 <_POSIX_Condition_variables_Wait_support> cond, mutex, ticks, already_timedout ); } 30004c44: e28dd004 add sp, sp, #4 ; 0x4 30004c48: e8bd8030 pop {r4, r5, pc} 30005004 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 30005004: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 30005008: e3520000 cmp r2, #0 ; 0x0 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 3000500c: e24dd040 sub sp, sp, #64 ; 0x40 30005010: e58d0024 str r0, [sp, #36] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 30005014: e58d2020 str r2, [sp, #32] pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 30005018: e58d301c str r3, [sp, #28] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 3000501c: 03a0000e moveq r0, #14 ; 0xe 30005020: 0a0000a0 beq 300052a8 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 30005024: e59f3284 ldr r3, [pc, #644] ; 300052b0 30005028: e3510000 cmp r1, #0 ; 0x0 3000502c: 11a06001 movne r6, r1 30005030: 01a06003 moveq r6, r3 if ( !the_attr->is_initialized ) 30005034: e5963000 ldr r3, [r6] 30005038: e3530000 cmp r3, #0 ; 0x0 3000503c: 0a000098 beq 300052a4 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 30005040: e5963004 ldr r3, [r6, #4] 30005044: e3530000 cmp r3, #0 ; 0x0 30005048: 0a000004 beq 30005060 3000504c: e59f2260 ldr r2, [pc, #608] ; 300052b4 30005050: e5963008 ldr r3, [r6, #8] 30005054: e5922000 ldr r2, [r2] 30005058: e1530002 cmp r3, r2 3000505c: 3a000090 bcc 300052a4 * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 30005060: e5963010 ldr r3, [r6, #16] 30005064: e3530001 cmp r3, #1 ; 0x1 30005068: 0a000002 beq 30005078 3000506c: e3530002 cmp r3, #2 ; 0x2 30005070: 1a00008b bne 300052a4 30005074: ea000006 b 30005094 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30005078: e59f3238 ldr r3, [pc, #568] ; 300052b8 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 3000507c: e28d4028 add r4, sp, #40 ; 0x28 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30005080: e5933000 ldr r3, [r3] 30005084: e5933108 ldr r3, [r3, #264] schedpolicy = api->schedpolicy; schedparam = api->schedparam; 30005088: e283c080 add ip, r3, #128 ; 0x80 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 3000508c: e593807c ldr r8, [r3, #124] 30005090: ea000002 b 300050a0 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 30005094: e5968014 ldr r8, [r6, #20] schedparam = the_attr->schedparam; 30005098: e28d4028 add r4, sp, #40 ; 0x28 3000509c: e286c018 add ip, r6, #24 ; 0x18 300050a0: e8bc000f ldm ip!, {r0, r1, r2, r3} 300050a4: e8a4000f stmia r4!, {r0, r1, r2, r3} 300050a8: e89c0003 ldm ip, {r0, r1} 300050ac: e8840003 stm r4, {r0, r1} /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 300050b0: e596300c ldr r3, [r6, #12] 300050b4: e3530000 cmp r3, #0 ; 0x0 300050b8: 13a00086 movne r0, #134 ; 0x86 300050bc: 1a000079 bne 300052a8 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 300050c0: e59da028 ldr sl, [sp, #40] 300050c4: e24a3001 sub r3, sl, #1 ; 0x1 300050c8: e35300fd cmp r3, #253 ; 0xfd 300050cc: 8a000074 bhi 300052a4 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 300050d0: e3580003 cmp r8, #3 ; 0x3 300050d4: 979ff108 ldrls pc, [pc, r8, lsl #2] 300050d8: ea000071 b 300052a4 300050dc: 300050f8 .word 0x300050f8 <== NOT EXECUTED 300050e0: 300050ec .word 0x300050ec <== NOT EXECUTED 300050e4: 30005100 .word 0x30005100 <== NOT EXECUTED 300050e8: 3000510c .word 0x3000510c <== NOT EXECUTED 300050ec: e3a04000 mov r4, #0 ; 0x0 300050f0: e1a05004 mov r5, r4 300050f4: ea000012 b 30005144 300050f8: e3a04001 mov r4, #1 ; 0x1 300050fc: ea000000 b 30005104 30005100: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED 30005104: e3a05000 mov r5, #0 ; 0x0 30005108: ea00000d b 30005144 case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 3000510c: e28d4028 add r4, sp, #40 ; 0x28 30005110: e2840008 add r0, r4, #8 ; 0x8 30005114: eb000feb bl 300090c8 <_Timespec_To_ticks> 30005118: e1a05000 mov r5, r0 3000511c: e2840010 add r0, r4, #16 ; 0x10 30005120: eb000fe8 bl 300090c8 <_Timespec_To_ticks> 30005124: e1550000 cmp r5, r0 30005128: 3a00005d bcc 300052a4 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 3000512c: e59d302c ldr r3, [sp, #44] 30005130: e2433001 sub r3, r3, #1 ; 0x1 30005134: e35300fd cmp r3, #253 ; 0xfd 30005138: 8a000059 bhi 300052a4 3000513c: e59f5178 ldr r5, [pc, #376] ; 300052bc 30005140: e3a04003 mov r4, #3 ; 0x3 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 30005144: e59f9174 ldr r9, [pc, #372] ; 300052c0 30005148: e5990000 ldr r0, [r9] 3000514c: eb000696 bl 30006bac <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 30005150: e59f016c ldr r0, [pc, #364] ; 300052c4 30005154: eb0008db bl 300074c8 <_Objects_Allocate> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 30005158: e2507000 subs r7, r0, #0 ; 0x0 3000515c: 0a000018 beq 300051c4 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 30005160: e59f314c ldr r3, [pc, #332] ; 300052b4 30005164: e3a0b001 mov fp, #1 ; 0x1 30005168: e5933000 ldr r3, [r3] 3000516c: e5961008 ldr r1, [r6, #8] 30005170: e1a03b13 lsl r3, r3, fp 30005174: e26a20ff rsb r2, sl, #255 ; 0xff /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ 30005178: e3a0a000 mov sl, #0 ; 0x0 status = _Thread_Initialize( 3000517c: e58d2004 str r2, [sp, #4] 30005180: e58d400c str r4, [sp, #12] 30005184: e58d5010 str r5, [sp, #16] 30005188: e58da000 str sl, [sp] 3000518c: e58db008 str fp, [sp, #8] 30005190: e58da014 str sl, [sp, #20] 30005194: e58da018 str sl, [sp, #24] 30005198: e1530001 cmp r3, r1 3000519c: 31a03001 movcc r3, r1 300051a0: e59f011c ldr r0, [pc, #284] ; 300052c4 300051a4: e1a01007 mov r1, r7 300051a8: e5962004 ldr r2, [r6, #4] 300051ac: eb000c39 bl 30008298 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 300051b0: e150000a cmp r0, sl 300051b4: 1a000006 bne 300051d4 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 300051b8: e1a01007 mov r1, r7 300051bc: e59f0100 ldr r0, [pc, #256] ; 300052c4 300051c0: eb00098f bl 30007804 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 300051c4: e5990000 ldr r0, [r9] 300051c8: eb000693 bl 30006c1c <_API_Mutex_Unlock> 300051cc: e3a0000b mov r0, #11 ; 0xb 300051d0: ea000034 b 300052a8 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300051d4: e5974108 ldr r4, [r7, #264] api->Attributes = *the_attr; 300051d8: e1a0c006 mov ip, r6 300051dc: e1a0e004 mov lr, r4 300051e0: e8bc000f ldm ip!, {r0, r1, r2, r3} 300051e4: e8ae000f stmia lr!, {r0, r1, r2, r3} 300051e8: e8bc000f ldm ip!, {r0, r1, r2, r3} 300051ec: e8ae000f stmia lr!, {r0, r1, r2, r3} 300051f0: e8bc000f ldm ip!, {r0, r1, r2, r3} 300051f4: e8ae000f stmia lr!, {r0, r1, r2, r3} 300051f8: e89c0003 ldm ip, {r0, r1} 300051fc: e88e0003 stm lr, {r0, r1} api->detachstate = the_attr->detachstate; 30005200: e5963034 ldr r3, [r6, #52] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 30005204: e284e080 add lr, r4, #128 ; 0x80 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 30005208: e584807c str r8, [r4, #124] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 3000520c: e5843038 str r3, [r4, #56] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 30005210: e28dc028 add ip, sp, #40 ; 0x28 30005214: e8bc000f ldm ip!, {r0, r1, r2, r3} 30005218: e8ae000f stmia lr!, {r0, r1, r2, r3} * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 3000521c: e5c7b075 strb fp, [r7, #117] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 30005220: e89c0003 ldm ip, {r0, r1} /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 30005224: e59d2020 ldr r2, [sp, #32] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 30005228: e88e0003 stm lr, {r0, r1} /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 3000522c: e59d301c ldr r3, [sp, #28] 30005230: e1a0100b mov r1, fp 30005234: e1a00007 mov r0, r7 30005238: e58da000 str sl, [sp] 3000523c: eb000ef5 bl 30008e18 <_Thread_Start> start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 30005240: e3580003 cmp r8, #3 ; 0x3 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 30005244: e1a05000 mov r5, r0 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 30005248: 1a000005 bne 30005264 _Watchdog_Insert_ticks( 3000524c: e2840088 add r0, r4, #136 ; 0x88 30005250: eb000f9c bl 300090c8 <_Timespec_To_ticks> 30005254: e284109c add r1, r4, #156 ; 0x9c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005258: e58400a8 str r0, [r4, #168] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000525c: e59f0064 ldr r0, [pc, #100] ; 300052c8 30005260: eb001087 bl 30009484 <_Watchdog_Insert> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 30005264: e3550000 cmp r5, #0 ; 0x0 30005268: e59f4050 ldr r4, [pc, #80] ; 300052c0 3000526c: 1a000005 bne 30005288 30005270: e1a01007 mov r1, r7 <== NOT EXECUTED 30005274: e59f0048 ldr r0, [pc, #72] ; 300052c4 <== NOT EXECUTED 30005278: eb000961 bl 30007804 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 3000527c: e5940000 ldr r0, [r4] <== NOT EXECUTED 30005280: eb000665 bl 30006c1c <_API_Mutex_Unlock> <== NOT EXECUTED 30005284: ea000006 b 300052a4 <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 30005288: e5973008 ldr r3, [r7, #8] 3000528c: e59d2024 ldr r2, [sp, #36] _RTEMS_Unlock_allocator(); 30005290: e5940000 ldr r0, [r4] /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 30005294: e5823000 str r3, [r2] _RTEMS_Unlock_allocator(); 30005298: eb00065f bl 30006c1c <_API_Mutex_Unlock> 3000529c: e3a00000 mov r0, #0 ; 0x0 300052a0: ea000000 b 300052a8 return 0; 300052a4: e3a00016 mov r0, #22 ; 0x16 } 300052a8: e28dd040 add sp, sp, #64 ; 0x40 300052ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 300052b0: 30017d00 .word 0x30017d00 300052b4: 30019670 .word 0x30019670 300052b8: 3001a544 .word 0x3001a544 300052bc: 30005630 .word 0x30005630 300052c0: 3001a53c .word 0x3001a53c 300052c4: 3001a6a0 .word 0x3001a6a0 300052c8: 3001a564 .word 0x3001a564 30004078 : 30004078: e59f2100 ldr r2, [pc, #256] ; 30004180 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 3000407c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30004080: e5923000 ldr r3, [r2] 30004084: e1a08000 mov r8, r0 30004088: e2833001 add r3, r3, #1 ; 0x1 3000408c: e1a04001 mov r4, r1 30004090: e5823000 str r3, [r2] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 30004094: e59f00e8 ldr r0, [pc, #232] ; 30004184 30004098: eb0008e2 bl 30006428 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 3000409c: e2506000 subs r6, r0, #0 ; 0x0 300040a0: 1a000002 bne 300040b0 _Thread_Enable_dispatch(); 300040a4: eb000c0b bl 300070d8 <_Thread_Enable_dispatch> 300040a8: e3a0000b mov r0, #11 ; 0xb 300040ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 300040b0: e59fa0d0 ldr sl, [pc, #208] ; 30004188 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 300040b4: e5864014 str r4, [r6, #20] 300040b8: e1a07006 mov r7, r6 300040bc: e3a05001 mov r5, #1 ; 0x1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 300040c0: e79a3105 ldr r3, [sl, r5, lsl #2] 300040c4: e3530000 cmp r3, #0 ; 0x0 300040c8: 0a00001a beq 30004138 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 300040cc: e5933004 ldr r3, [r3, #4] 300040d0: e1d341b0 ldrh r4, [r3, #16] 300040d4: e2844001 add r4, r4, #1 ; 0x1 300040d8: e1a04104 lsl r4, r4, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 300040dc: e1a00004 mov r0, r4 300040e0: eb001135 bl 300085bc <_Workspace_Allocate> if ( !table ) { 300040e4: e2503000 subs r3, r0, #0 ; 0x0 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 300040e8: e1a02004 mov r2, r4 300040ec: e3a01000 mov r1, #0 ; 0x0 ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { 300040f0: 1a00000d bne 3000412c 300040f4: e2853005 add r3, r5, #5 ; 0x5 300040f8: e0864103 add r4, r6, r3, lsl #2 300040fc: ea000001 b 30004108 for ( --the_api; the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 30004100: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 30004104: eb001128 bl 300085ac <_Workspace_Free> <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 30004108: e2555001 subs r5, r5, #1 ; 0x1 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 3000410c: e2444004 sub r4, r4, #4 ; 0x4 bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 30004110: 1afffffa bne 30004100 RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 30004114: e59f0068 ldr r0, [pc, #104] ; 30004184 30004118: e1a01006 mov r1, r6 3000411c: eb000990 bl 30006764 <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 30004120: eb000bec bl 300070d8 <_Thread_Enable_dispatch> 30004124: e3a0000c mov r0, #12 ; 0xc 30004128: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return ENOMEM; } the_key->Values[ the_api ] = table; 3000412c: e587301c str r3, [r7, #28] memset( table, '\0', bytes_to_allocate ); 30004130: eb002226 bl 3000c9d0 30004134: ea000000 b 3000413c } else { the_key->Values[ the_api ] = NULL; 30004138: e587301c str r3, [r7, #28] * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 3000413c: e2855001 add r5, r5, #1 ; 0x1 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 30004140: e3550005 cmp r5, #5 ; 0x5 the_api++ ) { 30004144: e2877004 add r7, r7, #4 ; 0x4 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 30004148: 1affffdc bne 300040c0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000414c: e59f3030 ldr r3, [pc, #48] ; 30004184 30004150: e5961008 ldr r1, [r6, #8] 30004154: e593201c ldr r2, [r3, #28] 30004158: e1d630b8 ldrh r3, [r6, #8] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 3000415c: e3a04000 mov r4, #0 ; 0x0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30004160: e7826103 str r6, [r2, r3, lsl #2] } } the_key->is_active = TRUE; 30004164: e3a03001 mov r3, #1 ; 0x1 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 30004168: e586400c str r4, [r6, #12] 3000416c: e5c63010 strb r3, [r6, #16] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 30004170: e5881000 str r1, [r8] _Thread_Enable_dispatch(); 30004174: eb000bd7 bl 300070d8 <_Thread_Enable_dispatch> 30004178: e1a00004 mov r0, r4 return 0; } 3000417c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30004180: 3001416c .word 0x3001416c 30004184: 30014544 .word 0x30014544 30004188: 30014128 .word 0x30014128 300046b8 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 300046b8: e92d40f0 push {r4, r5, r6, r7, lr} const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 300046bc: e2507000 subs r7, r0, #0 ; 0x0 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 300046c0: e24dd00c sub sp, sp, #12 ; 0xc const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 300046c4: 0a000023 beq 30004758 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 300046c8: e3510000 cmp r1, #0 ; 0x0 300046cc: 1a000003 bne 300046e0 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 300046d0: e1a0000d mov r0, sp <== NOT EXECUTED 300046d4: eb00028c bl 3000510c <== NOT EXECUTED 300046d8: e1a0400d mov r4, sp <== NOT EXECUTED 300046dc: e1a0100d mov r1, sp <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 300046e0: e5913000 ldr r3, [r1] 300046e4: e3530000 cmp r3, #0 ; 0x0 300046e8: 0a00001a beq 30004758 return EINVAL; switch ( the_attr->process_shared ) { 300046ec: e5915004 ldr r5, [r1, #4] 300046f0: e3550000 cmp r5, #0 ; 0x0 300046f4: 1a000017 bne 30004758 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300046f8: e59f2064 ldr r2, [pc, #100] ; 30004764 300046fc: e5923000 ldr r3, [r2] 30004700: e2833001 add r3, r3, #1 ; 0x1 30004704: e5823000 str r3, [r2] * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 30004708: e59f6058 ldr r6, [pc, #88] ; 30004768 3000470c: e1a00006 mov r0, r6 30004710: eb0009f6 bl 30006ef0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 30004714: e2504000 subs r4, r0, #0 ; 0x0 30004718: 1a000002 bne 30004728 _Thread_Enable_dispatch(); 3000471c: eb000d1f bl 30007ba0 <_Thread_Enable_dispatch> 30004720: e3a0000b mov r0, #11 ; 0xb 30004724: ea00000c b 3000475c return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 30004728: e2840010 add r0, r4, #16 ; 0x10 3000472c: e28d1008 add r1, sp, #8 ; 0x8 30004730: eb00081c bl 300067a8 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30004734: e596301c ldr r3, [r6, #28] 30004738: e5941008 ldr r1, [r4, #8] 3000473c: e1d420b8 ldrh r2, [r4, #8] 30004740: e7834102 str r4, [r3, r2, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 30004744: e584500c str r5, [r4, #12] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 30004748: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 3000474c: eb000d13 bl 30007ba0 <_Thread_Enable_dispatch> 30004750: e1a00005 mov r0, r5 30004754: ea000000 b 3000475c return 0; 30004758: e3a00016 mov r0, #22 ; 0x16 } 3000475c: e28dd00c add sp, sp, #12 ; 0xc 30004760: e8bd80f0 pop {r4, r5, r6, r7, pc} 30004764: 3001858c .word 0x3001858c 30004768: 30018760 .word 0x30018760 300047d8 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300047d8: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300047dc: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300047e0: e24dd00c sub sp, sp, #12 ; 0xc 300047e4: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300047e8: 0a000027 beq 3000488c * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 300047ec: e28d1004 add r1, sp, #4 ; 0x4 300047f0: eb00199f bl 3000ae74 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 300047f4: e3500002 cmp r0, #2 ; 0x2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 300047f8: e1a05000 mov r5, r0 switch (status) { 300047fc: 93a04000 movls r4, #0 ; 0x0 30004800: 9a000002 bls 30004810 30004804: e3500003 cmp r0, #3 ; 0x3 30004808: 13a04000 movne r4, #0 ; 0x0 3000480c: 03a04001 moveq r4, #1 ; 0x1 30004810: e59f0080 ldr r0, [pc, #128] ; 30004898 30004814: e5961000 ldr r1, [r6] 30004818: e28d2008 add r2, sp, #8 ; 0x8 3000481c: eb000adb bl 30007390 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30004820: e59d3008 ldr r3, [sp, #8] 30004824: e3530000 cmp r3, #0 ; 0x0 30004828: 1a000017 bne 3000488c case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 3000482c: e58d3000 str r3, [sp] 30004830: e2800010 add r0, r0, #16 ; 0x10 30004834: e5961000 ldr r1, [r6] 30004838: e1a02004 mov r2, r4 3000483c: e59d3004 ldr r3, [sp, #4] 30004840: eb0007e0 bl 300067c8 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30004844: eb000cd5 bl 30007ba0 <_Thread_Enable_dispatch> if ( !do_wait && 30004848: e3540000 cmp r4, #0 ; 0x0 3000484c: 1a000009 bne 30004878 30004850: e59f3044 ldr r3, [pc, #68] ; 3000489c <== NOT EXECUTED 30004854: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004858: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 3000485c: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30004860: 1a000004 bne 30004878 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 30004864: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30004868: 0a000007 beq 3000488c <== NOT EXECUTED 3000486c: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 30004870: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 30004874: 9a000005 bls 30004890 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30004878: e59f301c ldr r3, [pc, #28] ; 3000489c 3000487c: e5933000 ldr r3, [r3] 30004880: e5930034 ldr r0, [r3, #52] 30004884: eb000037 bl 30004968 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30004888: ea000000 b 30004890 3000488c: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30004890: e28dd00c add sp, sp, #12 ; 0xc 30004894: e8bd8070 pop {r4, r5, r6, pc} 30004898: 30018760 .word 0x30018760 3000489c: 30018644 .word 0x30018644 300048a0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300048a0: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300048a4: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300048a8: e24dd00c sub sp, sp, #12 ; 0xc 300048ac: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300048b0: 0a000027 beq 30004954 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 300048b4: e28d1004 add r1, sp, #4 ; 0x4 300048b8: eb00196d bl 3000ae74 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 300048bc: e3500002 cmp r0, #2 ; 0x2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 300048c0: e1a05000 mov r5, r0 switch (status) { 300048c4: 93a04000 movls r4, #0 ; 0x0 300048c8: 9a000002 bls 300048d8 300048cc: e3500003 cmp r0, #3 ; 0x3 300048d0: 13a04000 movne r4, #0 ; 0x0 300048d4: 03a04001 moveq r4, #1 ; 0x1 300048d8: e59f0080 ldr r0, [pc, #128] ; 30004960 300048dc: e5961000 ldr r1, [r6] 300048e0: e28d2008 add r2, sp, #8 ; 0x8 300048e4: eb000aa9 bl 30007390 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 300048e8: e59d3008 ldr r3, [sp, #8] 300048ec: e3530000 cmp r3, #0 ; 0x0 300048f0: 1a000017 bne 30004954 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 300048f4: e58d3000 str r3, [sp] 300048f8: e2800010 add r0, r0, #16 ; 0x10 300048fc: e5961000 ldr r1, [r6] 30004900: e1a02004 mov r2, r4 30004904: e59d3004 ldr r3, [sp, #4] 30004908: eb0007e3 bl 3000689c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 3000490c: eb000ca3 bl 30007ba0 <_Thread_Enable_dispatch> if ( !do_wait && 30004910: e3540000 cmp r4, #0 ; 0x0 30004914: 1a000009 bne 30004940 30004918: e59f3044 ldr r3, [pc, #68] ; 30004964 <== NOT EXECUTED 3000491c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004920: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 30004924: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30004928: 1a000004 bne 30004940 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 3000492c: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30004930: 0a000007 beq 30004954 <== NOT EXECUTED 30004934: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 30004938: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 3000493c: 9a000005 bls 30004958 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30004940: e59f301c ldr r3, [pc, #28] ; 30004964 30004944: e5933000 ldr r3, [r3] 30004948: e5930034 ldr r0, [r3, #52] 3000494c: eb000005 bl 30004968 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30004950: ea000000 b 30004958 30004954: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30004958: e28dd00c add sp, sp, #12 ; 0xc 3000495c: e8bd8070 pop {r4, r5, r6, pc} 30004960: 30018760 .word 0x30018760 30004964: 30018644 .word 0x30018644 3000428c : * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 3000428c: e59f30a4 ldr r3, [pc, #164] ; 30004338 int pthread_setcancelstate( int state, int *oldstate ) { 30004290: e92d4010 push {r4, lr} * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 30004294: e5933000 ldr r3, [r3] int pthread_setcancelstate( int state, int *oldstate ) { 30004298: e1a0c001 mov ip, r1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 3000429c: e3530000 cmp r3, #0 ; 0x0 300042a0: 13a00047 movne r0, #71 ; 0x47 300042a4: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldstate ) 300042a8: e3510000 cmp r1, #0 ; 0x0 300042ac: 0a00001f beq 30004330 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 300042b0: e3500001 cmp r0, #1 ; 0x1 300042b4: 8a00001d bhi 30004330 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300042b8: e59f107c ldr r1, [pc, #124] ; 3000433c return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 300042bc: e59f207c ldr r2, [pc, #124] ; 30004340 300042c0: e5913000 ldr r3, [r1] 300042c4: e5922000 ldr r2, [r2] 300042c8: e2833001 add r3, r3, #1 ; 0x1 300042cc: e5813000 str r3, [r1] 300042d0: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 300042d4: e59230cc ldr r3, [r2, #204] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 300042d8: e3500000 cmp r0, #0 ; 0x0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 300042dc: e58c3000 str r3, [ip] thread_support->cancelability_state = state; 300042e0: e58200cc str r0, [r2, #204] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 300042e4: 1a000006 bne 30004304 300042e8: e59230d0 ldr r3, [r2, #208] 300042ec: e3530001 cmp r3, #1 ; 0x1 300042f0: 1a000003 bne 30004304 300042f4: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED 300042f8: e2534000 subs r4, r3, #0 ; 0x0 <== NOT EXECUTED 300042fc: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED 30004300: ea000000 b 30004308 <== NOT EXECUTED 30004304: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 30004308: eb000a25 bl 30006ba4 <_Thread_Enable_dispatch> if ( cancel ) 3000430c: e3540000 cmp r4, #0 ; 0x0 30004310: 01a00004 moveq r0, r4 30004314: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 30004318: e59f3020 ldr r3, [pc, #32] ; 30004340 <== NOT EXECUTED 3000431c: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 30004320: e5930000 ldr r0, [r3] <== NOT EXECUTED 30004324: ebfffed4 bl 30003e7c <_POSIX_Thread_Exit> <== NOT EXECUTED 30004328: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000432c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30004330: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 30004334: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30004338: 300140a0 .word 0x300140a0 3000433c: 3001400c .word 0x3001400c 30004340: 300140c4 .word 0x300140c4 30004344 : * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 30004344: e59f30a4 ldr r3, [pc, #164] ; 300043f0 int pthread_setcanceltype( int type, int *oldtype ) { 30004348: e92d4010 push {r4, lr} * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 3000434c: e5933000 ldr r3, [r3] int pthread_setcanceltype( int type, int *oldtype ) { 30004350: e1a0c001 mov ip, r1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 30004354: e3530000 cmp r3, #0 ; 0x0 30004358: 13a00047 movne r0, #71 ; 0x47 3000435c: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldtype ) 30004360: e3510000 cmp r1, #0 ; 0x0 30004364: 0a00001f beq 300043e8 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 30004368: e3500001 cmp r0, #1 ; 0x1 3000436c: 8a00001d bhi 300043e8 30004370: e59f107c ldr r1, [pc, #124] ; 300043f4 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30004374: e59f207c ldr r2, [pc, #124] ; 300043f8 30004378: e5913000 ldr r3, [r1] 3000437c: e5922000 ldr r2, [r2] 30004380: e2833001 add r3, r3, #1 ; 0x1 30004384: e5813000 str r3, [r1] 30004388: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 3000438c: e59230d0 ldr r3, [r2, #208] 30004390: e58c3000 str r3, [ip] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 30004394: e59230cc ldr r3, [r2, #204] thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; 30004398: e58200d0 str r0, [r2, #208] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 3000439c: e3530000 cmp r3, #0 ; 0x0 300043a0: 1a000005 bne 300043bc 300043a4: e3500001 cmp r0, #1 ; 0x1 300043a8: 1a000003 bne 300043bc 300043ac: e59230d4 ldr r3, [r2, #212] 300043b0: e2534000 subs r4, r3, #0 ; 0x0 300043b4: 13a04001 movne r4, #1 ; 0x1 300043b8: ea000000 b 300043c0 300043bc: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 300043c0: eb0009f7 bl 30006ba4 <_Thread_Enable_dispatch> if ( cancel ) 300043c4: e3540000 cmp r4, #0 ; 0x0 300043c8: 01a00004 moveq r0, r4 300043cc: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 300043d0: e59f3020 ldr r3, [pc, #32] ; 300043f8 <== NOT EXECUTED 300043d4: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 300043d8: e5930000 ldr r0, [r3] <== NOT EXECUTED 300043dc: ebfffea6 bl 30003e7c <_POSIX_Thread_Exit> <== NOT EXECUTED 300043e0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300043e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300043e8: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 300043ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300043f0: 300140a0 .word 0x300140a0 300043f4: 3001400c .word 0x3001400c 300043f8: 300140c4 .word 0x300140c4 3000630c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 3000630c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Check all the parameters */ if ( !param ) 30006310: e2526000 subs r6, r2, #0 ; 0x0 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 30006314: e24dd004 sub sp, sp, #4 ; 0x4 30006318: e1a05000 mov r5, r0 3000631c: e1a0a001 mov sl, r1 /* * Check all the parameters */ if ( !param ) 30006320: 0a000051 beq 3000646c return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 30006324: e5963000 ldr r3, [r6] 30006328: e2433001 sub r3, r3, #1 ; 0x1 3000632c: e35300fd cmp r3, #253 ; 0xfd 30006330: 8a00004d bhi 3000646c return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 30006334: e3510003 cmp r1, #3 ; 0x3 30006338: 979ff101 ldrls pc, [pc, r1, lsl #2] 3000633c: ea00004a b 3000646c 30006340: 3000635c .word 0x3000635c <== NOT EXECUTED 30006344: 30006350 .word 0x30006350 <== NOT EXECUTED 30006348: 30006364 .word 0x30006364 <== NOT EXECUTED 3000634c: 30006370 .word 0x30006370 <== NOT EXECUTED 30006350: e3a07000 mov r7, #0 ; 0x0 30006354: e1a08007 mov r8, r7 30006358: ea000011 b 300063a4 3000635c: e3a07001 mov r7, #1 ; 0x1 30006360: ea000000 b 30006368 30006364: e3a07002 mov r7, #2 ; 0x2 30006368: e3a08000 mov r8, #0 ; 0x0 3000636c: ea00000c b 300063a4 case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 30006370: e2860008 add r0, r6, #8 ; 0x8 30006374: eb000dbe bl 30009a74 <_Timespec_To_ticks> 30006378: e1a04000 mov r4, r0 3000637c: e2860010 add r0, r6, #16 ; 0x10 30006380: eb000dbb bl 30009a74 <_Timespec_To_ticks> 30006384: e1540000 cmp r4, r0 30006388: 3a000037 bcc 3000646c _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 3000638c: e5963004 ldr r3, [r6, #4] 30006390: e2433001 sub r3, r3, #1 ; 0x1 30006394: e35300fd cmp r3, #253 ; 0xfd 30006398: 8a000033 bhi 3000646c 3000639c: e59f80d4 ldr r8, [pc, #212] ; 30006478 300063a0: e3a07003 mov r7, #3 ; 0x3 300063a4: e1a01005 mov r1, r5 300063a8: e59f00cc ldr r0, [pc, #204] ; 3000647c 300063ac: e1a0200d mov r2, sp 300063b0: eb0007f2 bl 30008380 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 300063b4: e59d3000 ldr r3, [sp] 300063b8: e1a05000 mov r5, r0 300063bc: e3530000 cmp r3, #0 ; 0x0 300063c0: 13a00003 movne r0, #3 ; 0x3 300063c4: 1a000029 bne 30006470 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300063c8: e5954108 ldr r4, [r5, #264] if ( api->schedpolicy == SCHED_SPORADIC ) 300063cc: e594307c ldr r3, [r4, #124] 300063d0: e3530003 cmp r3, #3 ; 0x3 (void) _Watchdog_Remove( &api->Sporadic_timer ); 300063d4: 0284009c addeq r0, r4, #156 ; 0x9c 300063d8: 0b000ef0 bleq 30009fa0 <_Watchdog_Remove> api->schedpolicy = policy; 300063dc: e584a07c str sl, [r4, #124] api->schedparam = *param; 300063e0: e284c080 add ip, r4, #128 ; 0x80 300063e4: e1a0e006 mov lr, r6 300063e8: e8be000f ldm lr!, {r0, r1, r2, r3} 300063ec: e8ac000f stmia ip!, {r0, r1, r2, r3} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 300063f0: e35a0000 cmp sl, #0 ; 0x0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 300063f4: e89e0003 ldm lr, {r0, r1} the_thread->budget_algorithm = budget_algorithm; 300063f8: e585707c str r7, [r5, #124] the_thread->budget_callout = budget_callout; 300063fc: e5858080 str r8, [r5, #128] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 30006400: e88c0003 stm ip, {r0, r1} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 30006404: ba000015 blt 30006460 30006408: e35a0002 cmp sl, #2 ; 0x2 3000640c: da000002 ble 3000641c 30006410: e35a0003 cmp sl, #3 ; 0x3 30006414: 1a000011 bne 30006460 30006418: ea000009 b 30006444 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000641c: e59f305c ldr r3, [pc, #92] ; 30006480 30006420: e5941080 ldr r1, [r4, #128] 30006424: e5933000 ldr r3, [r3] 30006428: e26110ff rsb r1, r1, #255 ; 0xff 3000642c: e5853078 str r3, [r5, #120] the_thread->real_priority = 30006430: e5851018 str r1, [r5, #24] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 30006434: e1a00005 mov r0, r5 30006438: e3a02001 mov r2, #1 ; 0x1 3000643c: eb00086b bl 300085f0 <_Thread_Change_priority> 30006440: ea000006 b 30006460 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 30006444: e5943080 ldr r3, [r4, #128] _Watchdog_Remove( &api->Sporadic_timer ); 30006448: e284009c add r0, r4, #156 ; 0x9c TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 3000644c: e5843098 str r3, [r4, #152] _Watchdog_Remove( &api->Sporadic_timer ); 30006450: eb000ed2 bl 30009fa0 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 30006454: e1a01005 mov r1, r5 30006458: e3a00000 mov r0, #0 ; 0x0 3000645c: ebffff87 bl 30006280 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); 30006460: eb0009ca bl 30008b90 <_Thread_Enable_dispatch> 30006464: e3a00000 mov r0, #0 ; 0x0 30006468: ea000000 b 30006470 return 0; 3000646c: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return ESRCH; } 30006470: e28dd004 add sp, sp, #4 ; 0x4 30006474: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30006478: 30006248 .word 0x30006248 3000647c: 30016c60 .word 0x30016c60 30006480: 30016a04 .word 0x30016a04 30013a44 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013a44: e59f30ac ldr r3, [pc, #172] ; 30013af8 ssize_t read( int fd, void *buffer, size_t count ) { 30013a48: e92d4070 push {r4, r5, r6, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013a4c: e5933000 ldr r3, [r3] ssize_t read( int fd, void *buffer, size_t count ) { 30013a50: e1a0c000 mov ip, r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013a54: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 30013a58: e1a06001 mov r6, r1 30013a5c: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013a60: 2a000006 bcs 30013a80 iop = rtems_libio_iop( fd ); 30013a64: e59f3090 ldr r3, [pc, #144] ; 30013afc 30013a68: e5930000 ldr r0, [r3] 30013a6c: e3a03034 mov r3, #52 ; 0x34 30013a70: e0240c93 mla r4, r3, ip, r0 rtems_libio_check_is_open( iop ); 30013a74: e594300c ldr r3, [r4, #12] 30013a78: e3130c01 tst r3, #256 ; 0x100 30013a7c: 1a000002 bne 30013a8c 30013a80: ebffde30 bl 3000b348 <__errno> <== NOT EXECUTED 30013a84: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30013a88: ea00000f b 30013acc <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 30013a8c: e3510000 cmp r1, #0 ; 0x0 30013a90: 0a000004 beq 30013aa8 rtems_libio_check_count( count ); 30013a94: e3520000 cmp r2, #0 ; 0x0 30013a98: 01a00002 moveq r0, r2 30013a9c: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 30013aa0: e3130002 tst r3, #2 ; 0x2 30013aa4: 1a000002 bne 30013ab4 30013aa8: ebffde26 bl 3000b348 <__errno> <== NOT EXECUTED 30013aac: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30013ab0: ea000005 b 30013acc <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 30013ab4: e5943030 ldr r3, [r4, #48] 30013ab8: e5933008 ldr r3, [r3, #8] 30013abc: e3530000 cmp r3, #0 ; 0x0 30013ac0: 1a000004 bne 30013ad8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30013ac4: ebffde1f bl 3000b348 <__errno> <== NOT EXECUTED 30013ac8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30013acc: e5803000 str r3, [r0] <== NOT EXECUTED 30013ad0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30013ad4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 30013ad8: e1a00004 mov r0, r4 30013adc: e1a0e00f mov lr, pc 30013ae0: e12fff13 bx r3 if ( rc > 0 ) 30013ae4: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 30013ae8: c5943008 ldrgt r3, [r4, #8] 30013aec: c0833000 addgt r3, r3, r0 30013af0: c5843008 strgt r3, [r4, #8] return rc; } 30013af4: e8bd8070 pop {r4, r5, r6, pc} 30013af8: 30015378 .word 0x30015378 30013afc: 300160ec .word 0x300160ec 3001d0c4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 3001d0c4: e92d4070 push {r4, r5, r6, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 3001d0c8: e2514000 subs r4, r1, #0 ; 0x0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 3001d0cc: e24dd010 sub sp, sp, #16 ; 0x10 3001d0d0: e1a06002 mov r6, r2 rtems_filesystem_location_info_t loc; int result; if (!buf) 3001d0d4: 1a000002 bne 3001d0e4 rtems_set_errno_and_return_minus_one( EFAULT ); 3001d0d8: eb0033d9 bl 3002a044 <__errno> <== NOT EXECUTED 3001d0dc: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 3001d0e0: ea000025 b 3001d17c <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001d0e4: e3a01000 mov r1, #0 ; 0x0 3001d0e8: e1a0200d mov r2, sp 3001d0ec: e1a03001 mov r3, r1 3001d0f0: ebff9ac1 bl 30003bfc if ( result != 0 ) 3001d0f4: e3500000 cmp r0, #0 ; 0x0 int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001d0f8: e1a0500d mov r5, sp if ( result != 0 ) 3001d0fc: 1a00001f bne 3001d180 return -1; if ( !loc.ops->node_type_h ){ 3001d100: e59d2008 ldr r2, [sp, #8] 3001d104: e5923010 ldr r3, [r2, #16] 3001d108: e3530000 cmp r3, #0 ; 0x0 rtems_filesystem_freenode( &loc ); 3001d10c: 0592301c ldreq r3, [r2, #28] result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ 3001d110: 0a000013 beq 3001d164 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 3001d114: e1a0000d mov r0, sp 3001d118: e1a0e00f mov lr, pc 3001d11c: e12fff13 bx r3 3001d120: e3500004 cmp r0, #4 ; 0x4 3001d124: e59d3008 ldr r3, [sp, #8] 3001d128: 0a000009 beq 3001d154 rtems_filesystem_freenode( &loc ); 3001d12c: e3530000 cmp r3, #0 ; 0x0 3001d130: 0a000004 beq 3001d148 3001d134: e593301c ldr r3, [r3, #28] 3001d138: e3530000 cmp r3, #0 ; 0x0 3001d13c: 11a0000d movne r0, sp 3001d140: 11a0e00f movne lr, pc 3001d144: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 3001d148: eb0033bd bl 3002a044 <__errno> 3001d14c: e3a03016 mov r3, #22 ; 0x16 3001d150: ea000009 b 3001d17c } if ( !loc.ops->readlink_h ){ 3001d154: e593c03c ldr ip, [r3, #60] 3001d158: e35c0000 cmp ip, #0 ; 0x0 3001d15c: 1a000009 bne 3001d188 rtems_filesystem_freenode( &loc ); 3001d160: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001d164: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d168: 11a0000d movne r0, sp <== NOT EXECUTED 3001d16c: 11a0e00f movne lr, pc <== NOT EXECUTED 3001d170: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001d174: eb0033b2 bl 3002a044 <__errno> <== NOT EXECUTED 3001d178: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001d17c: e5803000 str r3, [r0] 3001d180: e3e04000 mvn r4, #0 ; 0x0 3001d184: ea00000d b 3001d1c0 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 3001d188: e1a01004 mov r1, r4 3001d18c: e1a02006 mov r2, r6 3001d190: e1a0000d mov r0, sp 3001d194: e1a0e00f mov lr, pc 3001d198: e12fff1c bx ip rtems_filesystem_freenode( &loc ); 3001d19c: e59d3008 ldr r3, [sp, #8] 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 ); 3001d1a0: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001d1a4: e3530000 cmp r3, #0 ; 0x0 3001d1a8: 0a000004 beq 3001d1c0 3001d1ac: e593301c ldr r3, [r3, #28] 3001d1b0: e3530000 cmp r3, #0 ; 0x0 3001d1b4: 11a0000d movne r0, sp 3001d1b8: 11a0e00f movne lr, pc 3001d1bc: 112fff13 bxne r3 return result; } 3001d1c0: e1a00004 mov r0, r4 3001d1c4: e28dd010 add sp, sp, #16 ; 0x10 3001d1c8: e8bd8070 pop {r4, r5, r6, pc} 30013b64 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 30013b64: e92d4070 push {r4, r5, r6, lr} 30013b68: e59fc108 ldr ip, [pc, #264] ; 30013c78 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30013b6c: e59f3108 ldr r3, [pc, #264] ; 30013c7c { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 30013b70: e59c2010 ldr r2, [ip, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30013b74: e5933000 ldr r3, [r3] { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 30013b78: e2822001 add r2, r2, #1 ; 0x1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30013b7c: e3530003 cmp r3, #3 ; 0x3 { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 30013b80: e24dd004 sub sp, sp, #4 ; 0x4 30013b84: e58c2010 str r2, [ip, #16] 30013b88: e1a04000 mov r4, r0 30013b8c: e1a05001 mov r5, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30013b90: 1a000007 bne 30013bb4 if (_Thread_Dispatch_disable_level > 0) 30013b94: e59f30e4 ldr r3, [pc, #228] ; 30013c80 30013b98: e5933000 ldr r3, [r3] 30013b9c: e3530000 cmp r3, #0 ; 0x0 30013ba0: 1a000030 bne 30013c68 return (void *) 0; if (_ISR_Nest_level > 0) 30013ba4: e59f30d8 ldr r3, [pc, #216] ; 30013c84 30013ba8: e5933000 ldr r3, [r3] 30013bac: e3530000 cmp r3, #0 ; 0x0 30013bb0: 1a00002c bne 30013c68 } /* * Continue with realloc(). */ if ( !ptr ) 30013bb4: e3540000 cmp r4, #0 ; 0x0 30013bb8: 1a000003 bne 30013bcc return malloc( size ); 30013bbc: e1a00005 mov r0, r5 <== NOT EXECUTED 30013bc0: ebffd40a bl 30008bf0 <== NOT EXECUTED 30013bc4: e1a04000 mov r4, r0 <== NOT EXECUTED 30013bc8: ea000027 b 30013c6c <== NOT EXECUTED if ( !size ) { 30013bcc: e3550000 cmp r5, #0 ; 0x0 30013bd0: 1a000003 bne 30013be4 free( ptr ); 30013bd4: e1a00004 mov r0, r4 <== NOT EXECUTED 30013bd8: ebffd2b7 bl 300086bc <== NOT EXECUTED 30013bdc: e1a04005 mov r4, r5 <== NOT EXECUTED 30013be0: ea000021 b 30013c6c <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 30013be4: e59f009c ldr r0, [pc, #156] ; 30013c88 30013be8: e1a01004 mov r1, r4 30013bec: e1a0200d mov r2, sp 30013bf0: eb000054 bl 30013d48 <_Protected_heap_Get_block_size> 30013bf4: e2506000 subs r6, r0, #0 ; 0x0 30013bf8: 1a000003 bne 30013c0c errno = EINVAL; 30013bfc: ebffddd1 bl 3000b348 <__errno> 30013c00: e3a03016 mov r3, #22 ; 0x16 30013c04: e5803000 str r3, [r0] 30013c08: ea000014 b 30013c60 #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 ) ) { 30013c0c: e59f0074 ldr r0, [pc, #116] ; 30013c88 30013c10: e1a01004 mov r1, r4 30013c14: e1a02005 mov r2, r5 30013c18: eb00005b bl 30013d8c <_Protected_heap_Resize_block> 30013c1c: e3500000 cmp r0, #0 ; 0x0 30013c20: 1a000011 bne 30013c6c * 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 ); 30013c24: e1a00005 mov r0, r5 30013c28: ebffd3f0 bl 30008bf0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 30013c2c: e59f2044 ldr r2, [pc, #68] ; 30013c78 if ( !new_area ) { 30013c30: e2506000 subs r6, r0, #0 ; 0x0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 30013c34: e5923004 ldr r3, [r2, #4] 30013c38: e2433001 sub r3, r3, #1 ; 0x1 30013c3c: e5823004 str r3, [r2, #4] if ( !new_area ) { 30013c40: 0a000008 beq 30013c68 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 30013c44: e59d2000 ldr r2, [sp] 30013c48: e1a01004 mov r1, r4 30013c4c: e1550002 cmp r5, r2 30013c50: 31a02005 movcc r2, r5 30013c54: ebffdf85 bl 3000ba70 free( ptr ); 30013c58: e1a00004 mov r0, r4 30013c5c: ebffd296 bl 300086bc 30013c60: e1a04006 mov r4, r6 30013c64: ea000000 b 30013c6c return new_area; 30013c68: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED } 30013c6c: e1a00004 mov r0, r4 30013c70: e28dd004 add sp, sp, #4 ; 0x4 30013c74: e8bd8070 pop {r4, r5, r6, pc} 30013c78: 30016150 .word 0x30016150 30013c7c: 30016414 .word 0x30016414 30013c80: 3001626c .word 0x3001626c 30013c84: 30016300 .word 0x30016300 30013c88: 300160f8 .word 0x300160f8 3001d2f4 : #include int rmdir( const char *pathname ) { 3001d2f4: e92d4030 push {r4, r5, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001d2f8: e3a01000 mov r1, #0 ; 0x0 #include int rmdir( const char *pathname ) { 3001d2fc: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001d300: e1a0200d mov r2, sp 3001d304: e1a03001 mov r3, r1 3001d308: ebff9a3b bl 30003bfc if ( result != 0 ) 3001d30c: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001d310: e1a0500d mov r5, sp if ( result != 0 ) 3001d314: 1a00003f bne 3001d418 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 3001d318: e2800002 add r0, r0, #2 ; 0x2 3001d31c: e1a0100d mov r1, sp 3001d320: ebff9a0e bl 30003b60 if (result != 0) { 3001d324: e3500000 cmp r0, #0 ; 0x0 3001d328: e59d3008 ldr r3, [sp, #8] 3001d32c: 0a000008 beq 3001d354 rtems_filesystem_freenode( &loc ); 3001d330: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d334: 0a000037 beq 3001d418 <== NOT EXECUTED 3001d338: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001d33c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d340: 0a000034 beq 3001d418 <== NOT EXECUTED 3001d344: e1a0000d mov r0, sp <== NOT EXECUTED 3001d348: e1a0e00f mov lr, pc <== NOT EXECUTED 3001d34c: e12fff13 bx r3 <== NOT EXECUTED 3001d350: ea000030 b 3001d418 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 3001d354: e5932010 ldr r2, [r3, #16] 3001d358: e3520000 cmp r2, #0 ; 0x0 3001d35c: 0a000016 beq 3001d3bc rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 3001d360: e1a0000d mov r0, sp 3001d364: e1a0e00f mov lr, pc 3001d368: e12fff12 bx r2 3001d36c: e3500001 cmp r0, #1 ; 0x1 3001d370: 0a00000a beq 3001d3a0 rtems_filesystem_freenode( &loc ); 3001d374: e59d3008 ldr r3, [sp, #8] 3001d378: e3530000 cmp r3, #0 ; 0x0 3001d37c: 0a000004 beq 3001d394 3001d380: e593301c ldr r3, [r3, #28] 3001d384: e3530000 cmp r3, #0 ; 0x0 3001d388: 11a0000d movne r0, sp 3001d38c: 11a0e00f movne lr, pc 3001d390: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3001d394: eb00332a bl 3002a044 <__errno> 3001d398: e3a03014 mov r3, #20 ; 0x14 3001d39c: ea00000d b 3001d3d8 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 3001d3a0: e59d3004 ldr r3, [sp, #4] 3001d3a4: e5933034 ldr r3, [r3, #52] 3001d3a8: e3530000 cmp r3, #0 ; 0x0 3001d3ac: 1a00000b bne 3001d3e0 rtems_filesystem_freenode( &loc ); 3001d3b0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001d3b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d3b8: 0a000004 beq 3001d3d0 <== NOT EXECUTED 3001d3bc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001d3c0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d3c4: 11a0000d movne r0, sp <== NOT EXECUTED 3001d3c8: 11a0e00f movne lr, pc <== NOT EXECUTED 3001d3cc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001d3d0: eb00331b bl 3002a044 <__errno> <== NOT EXECUTED 3001d3d4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001d3d8: e5803000 str r3, [r0] 3001d3dc: ea00000d b 3001d418 } result = (*loc.handlers->rmnod_h)( &loc ); 3001d3e0: e1a0000d mov r0, sp 3001d3e4: e1a0e00f mov lr, pc 3001d3e8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3001d3ec: e59d3008 ldr r3, [sp, #8] if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 3001d3f0: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001d3f4: e3530000 cmp r3, #0 ; 0x0 3001d3f8: 0a000007 beq 3001d41c 3001d3fc: e593301c ldr r3, [r3, #28] 3001d400: e3530000 cmp r3, #0 ; 0x0 3001d404: 0a000004 beq 3001d41c 3001d408: e1a0000d mov r0, sp 3001d40c: e1a0e00f mov lr, pc 3001d410: e12fff13 bx r3 3001d414: ea000000 b 3001d41c 3001d418: e3e04000 mvn r4, #0 ; 0x0 return result; } 3001d41c: e1a00004 mov r0, r4 3001d420: e28dd010 add sp, sp, #16 ; 0x10 3001d424: e8bd8030 pop {r4, r5, pc} 300129b0 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 300129b0: e59f0000 ldr r0, [pc, #0] ; 300129b8 <== NOT EXECUTED 300129b4: e12fff1e bx lr <== NOT EXECUTED 300129b8: 30023460 .word 0x30023460 3000e5fc : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 3000e5fc: e92d4010 push {r4, lr} <== NOT EXECUTED 3000e600: e1a04001 mov r4, r1 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 3000e604: eb000006 bl 3000e624 <== NOT EXECUTED if (nap) 3000e608: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3000e60c: 0a000001 beq 3000e618 <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 3000e610: e5900000 ldr r0, [r0] <== NOT EXECUTED 3000e614: e8bd8010 pop {r4, pc} <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 3000e618: e1a00004 mov r0, r4 <== NOT EXECUTED } 3000e61c: 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); 3000e620: ea0010e2 b 300129b0 <== NOT EXECUTED 3000aa8c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 3000aa8c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 3000aa90: eb0001ff bl 3000b294 <== NOT EXECUTED if (nap) 3000aa94: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return nap->remote_value; 3000aa98: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } 3000aa9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30003a34 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 30003a34: e92d4010 push {r4, lr} if ( !time_buffer ) 30003a38: e2514000 subs r4, r1, #0 ; 0x0 30003a3c: 03a00009 moveq r0, #9 ; 0x9 30003a40: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 30003a44: e3500004 cmp r0, #4 ; 0x4 30003a48: 979ff100 ldrls pc, [pc, r0, lsl #2] 30003a4c: ea000004 b 30003a64 30003a50: 30003a6c .word 0x30003a6c <== NOT EXECUTED 30003a54: 30003a78 .word 0x30003a78 <== NOT EXECUTED 30003a58: 30003a84 .word 0x30003a84 <== NOT EXECUTED 30003a5c: 30003a8c .word 0x30003a8c <== NOT EXECUTED 30003a60: 30003a9c .word 0x30003a9c <== NOT EXECUTED 30003a64: e3a0000a mov r0, #10 ; 0xa 30003a68: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 30003a6c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003a70: e8bd4010 pop {r4, lr} if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 30003a74: ea000025 b 30003b10 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 30003a78: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003a7c: e8bd4010 pop {r4, lr} switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 30003a80: ea000008 b 30003aa8 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 30003a84: eb00001d bl 30003b00 30003a88: ea000000 b 30003a90 return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 30003a8c: eb000013 bl 30003ae0 30003a90: e5840000 str r0, [r4] 30003a94: e3a00000 mov r0, #0 ; 0x0 30003a98: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 30003a9c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003aa0: e8bd4010 pop {r4, lr} *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 30003aa4: ea00004b b 30003bd8 30001f40 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 30001f40: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 30001f44: e251a000 subs sl, r1, #0 ; 0x0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 30001f48: e24dd040 sub sp, sp, #64 ; 0x40 30001f4c: e1a08000 mov r8, r0 struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 30001f50: 0a000058 beq 300020b8 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 30001f54: e28d4030 add r4, sp, #48 ; 0x30 30001f58: e1a00004 mov r0, r4 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 30001f5c: e28d5028 add r5, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 30001f60: eb001259 bl 300068cc <_TOD_Get_uptime> _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 30001f64: e1a01004 mov r1, r4 30001f68: e1a02005 mov r2, r5 30001f6c: e59f014c ldr r0, [pc, #332] ; 300020c0 30001f70: eb001b4d bl 30008cac <_Timespec_Subtract> } } } #endif (*print)( context, "CPU Usage by thread\n" 30001f74: e1a00008 mov r0, r8 30001f78: e59f1144 ldr r1, [pc, #324] ; 300020c4 30001f7c: e1a0e00f mov lr, pc 30001f80: e12fff1a bx sl 30001f84: e59f613c ldr r6, [pc, #316] ; 300020c8 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 30001f88: e28db020 add fp, sp, #32 ; 0x20 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 30001f8c: e5963004 ldr r3, [r6, #4] 30001f90: e3530000 cmp r3, #0 ; 0x0 30001f94: 0a00003a beq 30002084 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 30001f98: e5937004 ldr r7, [r3, #4] if ( information ) { 30001f9c: e3570000 cmp r7, #0 ; 0x0 30001fa0: 13a05001 movne r5, #1 ; 0x1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { struct timespec used; _Timespec_Subtract( 30001fa4: 128d9018 addne r9, sp, #24 ; 0x18 api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 30001fa8: 1a000030 bne 30002070 30001fac: ea000034 b 30002084 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 30001fb0: e597301c ldr r3, [r7, #28] 30001fb4: e7934105 ldr r4, [r3, r5, lsl #2] api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30001fb8: e2855001 add r5, r5, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 30001fbc: e3540000 cmp r4, #0 ; 0x0 30001fc0: 0a00002a beq 30002070 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 30001fc4: e5940008 ldr r0, [r4, #8] 30001fc8: eb000d52 bl 30005518 (*print)( 30001fcc: e28d300b add r3, sp, #11 ; 0xb 30001fd0: e59f10f4 ldr r1, [pc, #244] ; 300020cc 30001fd4: e5942008 ldr r2, [r4, #8] 30001fd8: e1a00008 mov r0, r8 30001fdc: e1a0e00f mov lr, pc 30001fe0: e12fff1a bx sl /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 30001fe4: e59f00e4 ldr r0, [pc, #228] ; 300020d0 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 30001fe8: e5943088 ldr r3, [r4, #136] 30001fec: e5941084 ldr r1, [r4, #132] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 30001ff0: e5902000 ldr r2, [r0] #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 30001ff4: e58d3024 str r3, [sp, #36] 30001ff8: e58d1020 str r1, [sp, #32] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 30001ffc: e5922008 ldr r2, [r2, #8] 30002000: e5943008 ldr r3, [r4, #8] 30002004: e1520003 cmp r2, r3 30002008: 1a000006 bne 30002028 struct timespec used; _Timespec_Subtract( 3000200c: e59f00c0 ldr r0, [pc, #192] ; 300020d4 30002010: e28d1030 add r1, sp, #48 ; 0x30 30002014: e1a02009 mov r2, r9 30002018: eb001b23 bl 30008cac <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 3000201c: e1a0000b mov r0, fp 30002020: e1a01009 mov r1, r9 30002024: eb001ae1 bl 30008bb0 <_Timespec_Add_to> }; _Timespec_Divide( &ran, &total, &ival, &fval ); 30002028: e28d203c add r2, sp, #60 ; 0x3c 3000202c: e28d3038 add r3, sp, #56 ; 0x38 30002030: e1a0000b mov r0, fp 30002034: e28d1028 add r1, sp, #40 ; 0x28 30002038: eb001af5 bl 30008c14 <_Timespec_Divide> /* * Print the information */ (*print)( context, 3000203c: e3a01ffa mov r1, #1000 ; 0x3e8 30002040: e59d0024 ldr r0, [sp, #36] 30002044: eb004d40 bl 3001554c <__aeabi_uidiv> 30002048: e59d203c ldr r2, [sp, #60] 3000204c: e1a03000 mov r3, r0 30002050: e58d2000 str r2, [sp] 30002054: e59d2038 ldr r2, [sp, #56] 30002058: e1a00008 mov r0, r8 3000205c: e58d2004 str r2, [sp, #4] 30002060: e59f1070 ldr r1, [pc, #112] ; 300020d8 30002064: e59d2020 ldr r2, [sp, #32] 30002068: e1a0e00f mov lr, pc 3000206c: e12fff1a bx sl api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30002070: e1d731b0 ldrh r3, [r7, #16] the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 30002074: e3a0100d mov r1, #13 ; 0xd api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30002078: e1550003 cmp r5, r3 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 3000207c: e28d200b add r2, sp, #11 ; 0xb api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30002080: 9affffca bls 30001fb0 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 30002084: e59f3050 ldr r3, [pc, #80] ; 300020dc api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30002088: e2866004 add r6, r6, #4 ; 0x4 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 3000208c: e1560003 cmp r6, r3 30002090: 1affffbd bne 30001f8c } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 30002094: e3a01ffa mov r1, #1000 ; 0x3e8 30002098: e59d002c ldr r0, [sp, #44] 3000209c: eb004d2a bl 3001554c <__aeabi_uidiv> 300020a0: e59f1038 ldr r1, [pc, #56] ; 300020e0 300020a4: e1a03000 mov r3, r0 300020a8: e59d2028 ldr r2, [sp, #40] 300020ac: e1a00008 mov r0, r8 300020b0: e1a0e00f mov lr, pc 300020b4: e12fff1a bx sl "Ticks since last reset = %" PRId32 "\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset ); (*print)( context, "Total Units = %" PRId32 "\n", total_units ); #endif } 300020b8: e28dd040 add sp, sp, #64 ; 0x40 300020bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 300020c0: 30022d88 .word 0x30022d88 300020c4: 30018b82 .word 0x30018b82 300020c8: 30022808 .word 0x30022808 300020cc: 30018bc7 .word 0x30018bc7 300020d0: 30022904 .word 0x30022904 300020d4: 3002290c .word 0x3002290c 300020d8: 30018bda .word 0x30018bda 300020dc: 30022818 .word 0x30022818 300020e0: 30018bf2 .word 0x30018bf2 3000a660 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 3000a660: e92d4010 push {r4, lr} <== NOT EXECUTED 3000a664: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 3000a668: e59f0018 ldr r0, [pc, #24] ; 3000a688 <== NOT EXECUTED 3000a66c: eb000106 bl 3000aa8c <== NOT EXECUTED 3000a670: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 3000a674: 0a000001 beq 3000a680 <== NOT EXECUTED { errno = rc; 3000a678: eb000332 bl 3000b348 <__errno> <== NOT EXECUTED 3000a67c: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } 3000a680: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3000a684: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3000a688: 300148ac .word 0x300148ac 300050a4 : int rtems_error( int error_flag, const char *printf_format, ... ) { 300050a4: e92d000e push {r1, r2, r3} <== NOT EXECUTED 300050a8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 300050ac: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 300050b0: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 300050b4: ebffff85 bl 30004ed0 <== NOT EXECUTED va_end(arglist); return chars_written; } 300050b8: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 300050bc: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 300050c0: e12fff1e bx lr <== NOT EXECUTED 30001210 : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 30001210: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 30001214: e3510000 cmp r1, #0 ; 0x0 int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 30001218: e24dd010 sub sp, sp, #16 ; 0x10 3000121c: e1a0e000 mov lr, r0 rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 30001220: 1a000002 bne 30001230 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 30001224: eb002847 bl 3000b348 <__errno> <== NOT EXECUTED 30001228: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 3000122c: ea000005 b 30001248 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 30001230: e5913008 ldr r3, [r1, #8] 30001234: e593c000 ldr ip, [r3] 30001238: e35c0000 cmp ip, #0 ; 0x0 3000123c: 1a000004 bne 30001254 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001240: eb002840 bl 3000b348 <__errno> <== NOT EXECUTED 30001244: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001248: e5803000 str r3, [r0] <== NOT EXECUTED 3000124c: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 30001250: ea000011 b 3000129c <== NOT EXECUTED parent = *pathloc; 30001254: e891000f ldm r1, {r0, r1, r2, r3} 30001258: e88d000f stm sp, {r0, r1, r2, r3} result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 3000125c: e1a0100e mov r1, lr 30001260: e59f0040 ldr r0, [pc, #64] ; 300012a8 30001264: e1a0200d mov r2, sp 30001268: e1a0e00f mov lr, pc 3000126c: e12fff1c bx ip if (result != 0){ 30001270: e2504000 subs r4, r0, #0 ; 0x0 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 30001274: e1a0500d mov r5, sp result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 30001278: 1afffff3 bne 3000124c return -1; } rtems_filesystem_freenode( &parent ); 3000127c: e59d3008 ldr r3, [sp, #8] 30001280: e3530000 cmp r3, #0 ; 0x0 30001284: 0a000004 beq 3000129c 30001288: e593301c ldr r3, [r3, #28] 3000128c: e3530000 cmp r3, #0 ; 0x0 30001290: 11a0000d movne r0, sp 30001294: 11a0e00f movne lr, pc 30001298: 112fff13 bxne r3 return result; } 3000129c: e1a00004 mov r0, r4 300012a0: e28dd010 add sp, sp, #16 ; 0x10 300012a4: e8bd8030 pop {r4, r5, pc} 300012a8: 30014e97 .word 0x30014e97 300012ac : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 300012ac: e92d4070 push {r4, r5, r6, lr} /* * Verify Input parameters. */ if ( !pathname ) 300012b0: e250e000 subs lr, r0, #0 ; 0x0 const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 300012b4: e1a06001 mov r6, r1 300012b8: e1a04002 mov r4, r2 300012bc: e1a05003 mov r5, r3 /* * Verify Input parameters. */ if ( !pathname ) 300012c0: 1a000002 bne 300012d0 rtems_set_errno_and_return_minus_one( EFAULT ); 300012c4: eb00281f bl 3000b348 <__errno> 300012c8: e3a0300e mov r3, #14 ; 0xe 300012cc: ea00003c b 300013c4 if ( !pathloc ) 300012d0: e3520000 cmp r2, #0 ; 0x0 300012d4: 1a000002 bne 300012e4 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 300012d8: eb00281a bl 3000b348 <__errno> <== NOT EXECUTED 300012dc: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 300012e0: ea000037 b 300013c4 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 300012e4: e5de3000 ldrb r3, [lr] 300012e8: e353005c cmp r3, #92 ; 0x5c 300012ec: 1353002f cmpne r3, #47 ; 0x2f 300012f0: 13a02000 movne r2, #0 ; 0x0 300012f4: 03a02001 moveq r2, #1 ; 0x1 300012f8: 0a000001 beq 30001304 300012fc: e3530000 cmp r3, #0 ; 0x0 30001300: 1a000004 bne 30001318 30001304: e59f30d8 ldr r3, [pc, #216] ; 300013e4 30001308: e3a0c001 mov ip, #1 ; 0x1 3000130c: e5933000 ldr r3, [r3] 30001310: e2833014 add r3, r3, #20 ; 0x14 30001314: ea000003 b 30001328 30001318: e59f30c4 ldr r3, [pc, #196] ; 300013e4 3000131c: e1a0c002 mov ip, r2 30001320: e5933000 ldr r3, [r3] 30001324: e2833004 add r3, r3, #4 ; 0x4 30001328: e893000f ldm r3, {r0, r1, r2, r3} 3000132c: e884000f stm r4, {r0, r1, r2, r3} if ( !pathloc->ops->evalpath_h ) 30001330: e5943008 ldr r3, [r4, #8] 30001334: e5933000 ldr r3, [r3] 30001338: e3530000 cmp r3, #0 ; 0x0 3000133c: 0a00001e beq 300013bc rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 30001340: e08e000c add r0, lr, ip 30001344: e1a01006 mov r1, r6 30001348: e1a02004 mov r2, r4 3000134c: e1a0e00f mov lr, pc 30001350: e12fff13 bx r3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 30001354: e2703001 rsbs r3, r0, #1 ; 0x1 30001358: 33a03000 movcc r3, #0 ; 0x0 3000135c: e3550000 cmp r5, #0 ; 0x0 30001360: 03a03000 moveq r3, #0 ; 0x0 30001364: e3530000 cmp r3, #0 ; 0x0 30001368: 08bd8070 popeq {r4, r5, r6, pc} if ( !pathloc->ops->node_type_h ){ 3000136c: e5943008 ldr r3, [r4, #8] 30001370: e5932010 ldr r2, [r3, #16] 30001374: e3520000 cmp r2, #0 ; 0x0 30001378: 0a00000a beq 300013a8 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 3000137c: e1a00004 mov r0, r4 30001380: e1a0e00f mov lr, pc 30001384: e12fff12 bx r2 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 30001388: e2400003 sub r0, r0, #3 ; 0x3 3000138c: e3500001 cmp r0, #1 ; 0x1 30001390: 83a00000 movhi r0, #0 ; 0x0 30001394: 88bd8070 pophi {r4, r5, r6, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 30001398: e5943008 ldr r3, [r4, #8] 3000139c: e5932034 ldr r2, [r3, #52] 300013a0: e3520000 cmp r2, #0 ; 0x0 300013a4: 1a000009 bne 300013d0 rtems_filesystem_freenode( pathloc ); 300013a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 300013ac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300013b0: 11a00004 movne r0, r4 <== NOT EXECUTED 300013b4: 11a0e00f movne lr, pc <== NOT EXECUTED 300013b8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 300013bc: eb0027e1 bl 3000b348 <__errno> <== NOT EXECUTED 300013c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300013c4: e5803000 str r3, [r0] 300013c8: e3e00000 mvn r0, #0 ; 0x0 300013cc: e8bd8070 pop {r4, r5, r6, pc} * 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 ); 300013d0: e1a00004 mov r0, r4 300013d4: e1a01006 mov r1, r6 300013d8: e1a0e00f mov lr, pc 300013dc: e12fff12 bx r2 } } return result; } 300013e0: e8bd8070 pop {r4, r5, r6, pc} 300013e4: 30015980 .word 0x30015980 300084bc : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 300084bc: e92d4030 push {r4, r5, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 300084c0: e59f50dc ldr r5, [pc, #220] ; 300085a4 300084c4: e3a03012 mov r3, #18 ; 0x12 300084c8: e5952000 ldr r2, [r5] * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 300084cc: e24dd018 sub sp, sp, #24 ; 0x18 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 300084d0: e5823024 str r3, [r2, #36] init_fs_mount_table(); 300084d4: eb000204 bl 30008cec /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 300084d8: e59f30c8 ldr r3, [pc, #200] ; 300085a8 300084dc: e5933000 ldr r3, [r3] 300084e0: e3530000 cmp r3, #0 ; 0x0 rtems_fatal_error_occurred( 0xABCD0001 ); 300084e4: 059f00c0 ldreq r0, [pc, #192] ; 300085ac /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 300084e8: 0a000009 beq 30008514 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 300084ec: e59f30bc ldr r3, [pc, #188] ; 300085b0 status = mount( 300084f0: e28d0014 add r0, sp, #20 ; 0x14 */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 300084f4: e5932000 ldr r2, [r3] status = mount( 300084f8: e592300c ldr r3, [r2, #12] 300084fc: e58d3000 str r3, [sp] 30008500: e892000e ldm r2, {r1, r2, r3} 30008504: eb0001ff bl 30008d08 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 30008508: e3700001 cmn r0, #1 ; 0x1 3000850c: 1a000001 bne 30008518 rtems_fatal_error_occurred( 0xABCD0002 ); 30008510: e59f009c ldr r0, [pc, #156] ; 300085b4 <== NOT EXECUTED 30008514: ebfff11f bl 30004998 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 30008518: e595e000 ldr lr, [r5] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 3000851c: e59d3014 ldr r3, [sp, #20] 30008520: e28ec014 add ip, lr, #20 ; 0x14 30008524: e2833018 add r3, r3, #24 ; 0x18 30008528: e893000f ldm r3, {r0, r1, r2, r3} /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 3000852c: e28d4004 add r4, sp, #4 ; 0x4 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 30008530: e88c000f stm ip, {r0, r1, r2, r3} /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 30008534: e3a01000 mov r1, #0 ; 0x0 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 30008538: e3a03000 mov r3, #0 ; 0x0 3000853c: e1ce32b8 strh r3, [lr, #40] * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 30008540: e1a02004 mov r2, r4 30008544: e1a03001 mov r3, r1 30008548: e59f0068 ldr r0, [pc, #104] ; 300085b8 3000854c: ebffe356 bl 300012ac rtems_filesystem_root = loc; 30008550: e894000f ldm r4, {r0, r1, r2, r3} 30008554: e595c000 ldr ip, [r5] 30008558: e28cc014 add ip, ip, #20 ; 0x14 3000855c: e88c000f stm ip, {r0, r1, r2, r3} /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 30008560: e3a01000 mov r1, #0 ; 0x0 30008564: e1a02004 mov r2, r4 30008568: e1a03001 mov r3, r1 3000856c: e59f0044 ldr r0, [pc, #68] ; 300085b8 30008570: ebffe34d bl 300012ac rtems_filesystem_current = loc; 30008574: e894000f ldm r4, {r0, r1, r2, r3} 30008578: e595c000 ldr ip, [r5] 3000857c: e28cc004 add ip, ip, #4 ; 0x4 30008580: e88c000f stm ip, {r0, r1, r2, r3} * * 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); 30008584: e59f0030 ldr r0, [pc, #48] ; 300085bc 30008588: e59f1030 ldr r1, [pc, #48] ; 300085c0 3000858c: eb0001d2 bl 30008cdc if ( status != 0 ) 30008590: e3500000 cmp r0, #0 ; 0x0 rtems_fatal_error_occurred( 0xABCD0003 ); 30008594: 159f0028 ldrne r0, [pc, #40] ; 300085c4 * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) 30008598: 1affffdd bne 30008514 * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ #endif } 3000859c: e28dd018 add sp, sp, #24 ; 0x18 300085a0: e8bd8030 pop {r4, r5, pc} 300085a4: 30015980 .word 0x30015980 300085a8: 300143f0 .word 0x300143f0 300085ac: abcd0001 .word 0xabcd0001 300085b0: 30015380 .word 0x30015380 300085b4: abcd0002 .word 0xabcd0002 300085b8: 30015067 .word 0x30015067 300085bc: 30015069 .word 0x30015069 300085c0: 000001ff .word 0x000001ff 300085c4: abcd0003 .word 0xabcd0003 3001d824 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 3001d824: e5903000 ldr r3, [r0] <== NOT EXECUTED 3001d828: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 3001d82c: e1530000 cmp r3, r0 <== NOT EXECUTED 3001d830: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 3001d834: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 3001d838: e12fff1e bx lr <== NOT EXECUTED 300010e0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 300010e0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 300010e4: e24dd010 sub sp, sp, #16 ; 0x10 <== 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, 0x00, &loc, true ); 300010e8: e1a0200d mov r2, sp <== NOT EXECUTED 300010ec: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 300010f0: e1a05001 mov r5, r1 <== 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, 0x00, &loc, true ); 300010f4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 300010f8: e1a06000 mov r6, r0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); 300010fc: eb00006a bl 300012ac <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 30001100: e59d2008 ldr r2, [sp, #8] <== 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, 0x00, &loc, true ); 30001104: e1a0800d mov r8, sp <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 30001108: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); 3000110c: e1a04000 mov r4, r0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 30001110: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); the_jnode = loc.node_access; 30001114: e59d7000 ldr r7, [sp] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 30001118: 1a000009 bne 30001144 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3000111c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30001120: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001124: 11a0000d movne r0, sp <== NOT EXECUTED 30001128: 11a0e00f movne lr, pc <== NOT EXECUTED 3000112c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001130: eb002884 bl 3000b348 <__errno> <== NOT EXECUTED 30001134: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001138: e5803000 str r3, [r0] <== NOT EXECUTED 3000113c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30001140: ea000026 b 300011e0 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 30001144: e1a0000d mov r0, sp <== NOT EXECUTED 30001148: e1a0e00f mov lr, pc <== NOT EXECUTED 3000114c: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 30001150: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 30001154: 03540000 cmpeq r4, #0 ; 0x0 <== NOT EXECUTED 30001158: 03a0a000 moveq sl, #0 ; 0x0 <== NOT EXECUTED 3000115c: 13a0a001 movne sl, #1 ; 0x1 <== NOT EXECUTED 30001160: e59d4008 ldr r4, [sp, #8] <== NOT EXECUTED 30001164: 0a000008 beq 3000118c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30001168: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000116c: 0a000018 beq 300011d4 <== NOT EXECUTED 30001170: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 30001174: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001178: 0a000015 beq 300011d4 <== NOT EXECUTED 3000117c: e1a0000d mov r0, sp <== NOT EXECUTED 30001180: e1a0e00f mov lr, pc <== NOT EXECUTED 30001184: e12fff13 bx r3 <== NOT EXECUTED 30001188: ea000011 b 300011d4 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 3000118c: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 30001190: e1a00006 mov r0, r6 <== NOT EXECUTED 30001194: eb002da1 bl 3000c820 <== NOT EXECUTED 30001198: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 3000119c: e5973050 ldr r3, [r7, #80] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 300011a0: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; 300011a4: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 300011a8: e5973054 ldr r3, [r7, #84] <== NOT EXECUTED 300011ac: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 300011b0: 0a000009 beq 300011dc <== NOT EXECUTED 300011b4: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 300011b8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300011bc: 0a000006 beq 300011dc <== NOT EXECUTED 300011c0: e1a0000d mov r0, sp <== NOT EXECUTED 300011c4: e1a0e00f mov lr, pc <== NOT EXECUTED 300011c8: e12fff13 bx r3 <== NOT EXECUTED 300011cc: e1a0000a mov r0, sl <== NOT EXECUTED 300011d0: ea000002 b 300011e0 <== NOT EXECUTED 300011d4: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED 300011d8: ea000000 b 300011e0 <== NOT EXECUTED 300011dc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 300011e0: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 300011e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 30006d04 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 30006d04: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 30006d08: e2507000 subs r7, r0, #0 ; 0x0 30006d0c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; 30006d10: e59f6054 ldr r6, [pc, #84] ; 30006d6c for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 30006d14: e2868010 add r8, r6, #16 ; 0x10 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 30006d18: e5963004 ldr r3, [r6, #4] 30006d1c: e3530000 cmp r3, #0 ; 0x0 30006d20: 0a00000d beq 30006d5c continue; information = _Objects_Information_table[ api_index ][ 1 ]; 30006d24: e5935004 ldr r5, [r3, #4] if ( information ) { 30006d28: e3550000 cmp r5, #0 ; 0x0 30006d2c: 13a04001 movne r4, #1 ; 0x1 30006d30: 1a000006 bne 30006d50 30006d34: ea000008 b 30006d5c <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 30006d38: e595301c ldr r3, [r5, #28] 30006d3c: e7933104 ldr r3, [r3, r4, lsl #2] api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30006d40: e2844001 add r4, r4, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 30006d44: e2530000 subs r0, r3, #0 ; 0x0 continue; (*routine)(the_thread); 30006d48: 11a0e00f movne lr, pc 30006d4c: 112fff17 bxne r7 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30006d50: e1d531b0 ldrh r3, [r5, #16] 30006d54: e1540003 cmp r4, r3 30006d58: 9afffff6 bls 30006d38 30006d5c: e2866004 add r6, r6, #4 ; 0x4 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 30006d60: e1560008 cmp r6, r8 30006d64: 1affffeb bne 30006d18 30006d68: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30006d6c: 30022808 .word 0x30022808 300013e8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 300013e8: e92d4010 push {r4, lr} rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 300013ec: e59f4098 ldr r4, [pc, #152] ; 3000148c * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 300013f0: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 300013f4: e5940000 ldr r0, [r4] 300013f8: e3500000 cmp r0, #0 ; 0x0 300013fc: 0a000015 beq 30001458 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 30001400: e3a01034 mov r1, #52 ; 0x34 30001404: eb001c6f bl 300085c8 30001408: e59f3080 ldr r3, [pc, #128] ; 30001490 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 3000140c: e3500000 cmp r0, #0 ; 0x0 int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 30001410: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 30001414: 0280001a addeq r0, r0, #26 ; 0x1a 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) 30001418: 0a000017 beq 3000147c rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 3000141c: e59f3070 ldr r3, [pc, #112] ; 30001494 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 30001420: e5942000 ldr r2, [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; 30001424: e5830000 str r0, [r3] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 30001428: e3a01000 mov r1, #0 ; 0x0 3000142c: e1a03000 mov r3, r0 30001430: ea000000 b 30001438 iop->data1 = iop + 1; 30001434: e503300c str r3, [r3, #-12] 30001438: e2811001 add r1, r1, #1 ; 0x1 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 < (rtems_libio_number_iops - 1) ; i++, iop++) 3000143c: e1510002 cmp r1, r2 iop->data1 = iop + 1; 30001440: e2833034 add r3, r3, #52 ; 0x34 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 < (rtems_libio_number_iops - 1) ; i++, iop++) 30001444: 1afffffa bne 30001434 iop->data1 = iop + 1; iop->data1 = NULL; 30001448: e3a03034 mov r3, #52 ; 0x34 3000144c: e0220193 mla r2, r3, r1, r0 30001450: e3a03000 mov r3, #0 ; 0x0 30001454: e502300c str r3, [r2, #-12] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 30001458: e59fc038 ldr ip, [pc, #56] ; 30001498 3000145c: e59f0038 ldr r0, [pc, #56] ; 3000149c 30001460: e3a01001 mov r1, #1 ; 0x1 30001464: e3a02054 mov r2, #84 ; 0x54 30001468: e3a03000 mov r3, #0 ; 0x0 3000146c: e58dc000 str ip, [sp] 30001470: eb000af5 bl 3000404c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 30001474: e3500000 cmp r0, #0 ; 0x0 30001478: 0a000000 beq 30001480 rtems_fatal_error_occurred( rc ); 3000147c: eb000d45 bl 30004998 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); } 30001480: e28dd004 add sp, sp, #4 ; 0x4 30001484: e8bd4010 pop {r4, lr} /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 30001488: ea001c0b b 300084bc 3000148c: 30015378 .word 0x30015378 30001490: 300160ec .word 0x300160ec 30001494: 300160f0 .word 0x300160f0 30001498: 300160f4 .word 0x300160f4 3000149c: 4c42494f .word 0x4c42494f 3001cefc : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 3001cefc: 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); 3001cf00: e3a00000 mov r0, #0 ; 0x0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 3001cf04: e24dd014 sub sp, sp, #20 ; 0x14 rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 3001cf08: e1a01000 mov r1, r0 3001cf0c: e28d2010 add r2, sp, #16 ; 0x10 3001cf10: eb000672 bl 3001e8e0 if (sc != RTEMS_SUCCESSFUL) return sc; 3001cf14: e2507000 subs r7, r0, #0 ; 0x0 3001cf18: 1a00003b bne 3001d00c /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 3001cf1c: e59f60f4 ldr r6, [pc, #244] ; 3001d018 3001cf20: e59f30f4 ldr r3, [pc, #244] ; 3001d01c 3001cf24: e5962000 ldr r2, [r6] 3001cf28: e1520003 cmp r2, r3 3001cf2c: 1a00000f bne 3001cf70 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 3001cf30: e2800040 add r0, r0, #64 ; 0x40 3001cf34: ebff9cfa bl 30004324 if (!tmp) 3001cf38: e2505000 subs r5, r0, #0 ; 0x0 3001cf3c: 03a0701a moveq r7, #26 ; 0x1a 3001cf40: 0a000031 beq 3001d00c #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); 3001cf44: e1a00007 mov r0, r7 3001cf48: e1a01006 mov r1, r6 3001cf4c: e59f20cc ldr r2, [pc, #204] ; 3001d020 3001cf50: eb000765 bl 3001ecec if (sc != RTEMS_SUCCESSFUL) { 3001cf54: e2504000 subs r4, r0, #0 ; 0x0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 3001cf58: 05865000 streq r5, [r6] #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { 3001cf5c: 0a000003 beq 3001cf70 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 3001cf60: e1a00005 mov r0, r5 <== NOT EXECUTED 3001cf64: ebff9b73 bl 30003d38 <== NOT EXECUTED 3001cf68: e1a07004 mov r7, r4 <== NOT EXECUTED 3001cf6c: ea000026 b 3001d00c <== NOT EXECUTED return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 3001cf70: e59f60a0 ldr r6, [pc, #160] ; 3001d018 3001cf74: e59f30a0 ldr r3, [pc, #160] ; 3001d01c 3001cf78: e5964000 ldr r4, [r6] 3001cf7c: e1a0c003 mov ip, r3 3001cf80: e1a0e004 mov lr, r4 3001cf84: e8bc000f ldm ip!, {r0, r1, r2, r3} 3001cf88: e8ae000f stmia lr!, {r0, r1, r2, r3} 3001cf8c: e8bc000f ldm ip!, {r0, r1, r2, r3} 3001cf90: e8ae000f stmia lr!, {r0, r1, r2, r3} 3001cf94: e8bc000f ldm ip!, {r0, r1, r2, r3} 3001cf98: e8ae000f stmia lr!, {r0, r1, r2, r3} 3001cf9c: e89c000f ldm ip, {r0, r1, r2, r3} 3001cfa0: e88e000f stm lr, {r0, r1, r2, r3} rtems_current_user_env->task_id=task_id; /* mark the local values*/ 3001cfa4: e59d3010 ldr r3, [sp, #16] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 3001cfa8: e1a0500d mov r5, sp } 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*/ 3001cfac: e4843014 str r3, [r4], #20 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 3001cfb0: e59f306c ldr r3, [pc, #108] ; 3001d024 3001cfb4: e5933000 ldr r3, [r3] 3001cfb8: e2833018 add r3, r3, #24 ; 0x18 3001cfbc: e893000f ldm r3, {r0, r1, r2, r3} 3001cfc0: e884000f stm r4, {r0, r1, r2, r3} * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 3001cfc4: e3a01000 mov r1, #0 ; 0x0 3001cfc8: e1a0200d mov r2, sp 3001cfcc: e1a03001 mov r3, r1 3001cfd0: e59f0050 ldr r0, [pc, #80] ; 3001d028 3001cfd4: ebff9b08 bl 30003bfc rtems_filesystem_root = loc; 3001cfd8: e89d000f ldm sp, {r0, r1, r2, r3} 3001cfdc: e596c000 ldr ip, [r6] 3001cfe0: e28cc014 add ip, ip, #20 ; 0x14 3001cfe4: e88c000f stm ip, {r0, r1, r2, r3} rtems_filesystem_evaluate_path("/", 0, &loc, 0); 3001cfe8: e3a01000 mov r1, #0 ; 0x0 3001cfec: e1a0200d mov r2, sp 3001cff0: e1a03001 mov r3, r1 3001cff4: e59f002c ldr r0, [pc, #44] ; 3001d028 3001cff8: ebff9aff bl 30003bfc rtems_filesystem_current = loc; 3001cffc: e89d000f ldm sp, {r0, r1, r2, r3} 3001d000: e596c000 ldr ip, [r6] 3001d004: e28cc004 add ip, ip, #4 ; 0x4 3001d008: e88c000f stm ip, {r0, r1, r2, r3} return RTEMS_SUCCESSFUL; } 3001d00c: e1a00007 mov r0, r7 3001d010: e28dd014 add sp, sp, #20 ; 0x14 3001d014: e8bd80f0 pop {r4, r5, r6, r7, pc} 3001d018: 30041ee4 .word 0x30041ee4 3001d01c: 30056c7c .word 0x30056c7c 3001d020: 3001cdec .word 0x3001cdec 3001d024: 30056554 .word 0x30056554 3001d028: 3003f402 .word 0x3003f402 3001ce50 : * 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) { 3001ce50: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3001ce54: e1a05000 mov r5, r0 <== NOT EXECUTED 3001ce58: e24dd008 sub sp, sp, #8 ; 0x8 <== 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); 3001ce5c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001ce60: e1a01000 mov r1, r0 <== NOT EXECUTED 3001ce64: e1a0200d mov r2, sp <== NOT EXECUTED 3001ce68: eb00069c bl 3001e8e0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 3001ce6c: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 3001ce70: 1a00001b bne 3001cee4 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 3001ce74: e59f1074 ldr r1, [pc, #116] ; 3001cef0 <== NOT EXECUTED 3001ce78: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3001ce7c: e5914000 ldr r4, [r1] <== NOT EXECUTED 3001ce80: e5942000 ldr r2, [r4] <== NOT EXECUTED 3001ce84: e1520003 cmp r2, r3 <== NOT EXECUTED 3001ce88: 1a000004 bne 3001cea0 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 3001ce8c: eb0007c1 bl 3001ed98 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 3001ce90: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 3001ce94: 1a000012 bne 3001cee4 <== NOT EXECUTED free_user_env(tmp); 3001ce98: e1a00004 mov r0, r4 <== NOT EXECUTED 3001ce9c: ebffffd2 bl 3001cdec <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 3001cea0: e59f4048 ldr r4, [pc, #72] ; 3001cef0 <== NOT EXECUTED 3001cea4: e1a00005 mov r0, r5 <== NOT EXECUTED 3001cea8: e1a01004 mov r1, r4 <== NOT EXECUTED 3001ceac: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 3001ceb0: eb0007d8 bl 3001ee18 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 3001ceb4: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 3001ceb8: 1a000006 bne 3001ced8 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 3001cebc: e1a01004 mov r1, r4 <== NOT EXECUTED 3001cec0: e59f202c ldr r2, [pc, #44] ; 3001cef4 <== NOT EXECUTED 3001cec4: eb000788 bl 3001ecec <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 3001cec8: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 3001cecc: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED 3001ced0: 05843000 streq r3, [r4] <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 3001ced4: 0a000002 beq 3001cee4 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 3001ced8: e59f2018 ldr r2, [pc, #24] ; 3001cef8 <== NOT EXECUTED 3001cedc: e59f300c ldr r3, [pc, #12] ; 3001cef0 <== NOT EXECUTED 3001cee0: e5832000 str r2, [r3] <== NOT EXECUTED return sc; } 3001cee4: e1a00001 mov r0, r1 <== NOT EXECUTED 3001cee8: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001ceec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3001cef0: 30041ee4 .word 0x30041ee4 3001cef4: 3001cdec .word 0x3001cdec 3001cef8: 30056c7c .word 0x30056c7c 30004410 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 30004410: e92d4010 push {r4, lr} <== NOT EXECUTED 30004414: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 30004418: e1a01000 mov r1, r0 <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 3000441c: e1a0200d mov r2, sp <== NOT EXECUTED 30004420: e59f0030 ldr r0, [pc, #48] ; 30004458 <== NOT EXECUTED 30004424: eb001379 bl 30009210 <_Protected_heap_Get_block_size> <== NOT EXECUTED 30004428: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3000442c: 0a000007 beq 30004450 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 30004430: e59f1024 ldr r1, [pc, #36] ; 3000445c <== NOT EXECUTED 30004434: e59d2000 ldr r2, [sp] <== NOT EXECUTED 30004438: e2813024 add r3, r1, #36 ; 0x24 <== NOT EXECUTED 3000443c: e8930018 ldm r3, {r3, r4} <== NOT EXECUTED 30004440: e0933002 adds r3, r3, r2 <== NOT EXECUTED 30004444: e2a44000 adc r4, r4, #0 ; 0x0 <== NOT EXECUTED 30004448: e5813024 str r3, [r1, #36] <== NOT EXECUTED 3000444c: e5814028 str r4, [r1, #40] <== NOT EXECUTED } } 30004450: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 30004454: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30004458: 300564d0 .word 0x300564d0 3000445c: 30056528 .word 0x30056528 30004460 : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 30004460: e92d4010 push {r4, lr} <== NOT EXECUTED size_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 30004464: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED } void rtems_malloc_statistics_at_malloc( void *pointer ) { 30004468: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED size_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 3000446c: 0a000013 beq 300044c0 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 30004470: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30004474: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 30004478: 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); 3000447c: e1a01000 mov r1, r0 <== NOT EXECUTED 30004480: e1a0200d mov r2, sp <== NOT EXECUTED 30004484: e59f003c ldr r0, [pc, #60] ; 300044c8 <== NOT EXECUTED 30004488: eb001360 bl 30009210 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 3000448c: e59f0038 ldr r0, [pc, #56] ; 300044cc <== NOT EXECUTED 30004490: e59d2000 ldr r2, [sp] <== NOT EXECUTED 30004494: e280301c add r3, r0, #28 ; 0x1c <== NOT EXECUTED 30004498: e8930018 ldm r3, {r3, r4} <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 3000449c: e5901024 ldr r1, [r0, #36] <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 300044a0: e0933002 adds r3, r3, r2 <== NOT EXECUTED 300044a4: e2a44000 adc r4, r4, #0 ; 0x0 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) 300044a8: e5902018 ldr r2, [r0, #24] <== NOT EXECUTED _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); current_depth = s->lifetime_allocated - s->lifetime_freed; 300044ac: e0611003 rsb r1, r1, r3 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 300044b0: e580301c str r3, [r0, #28] <== NOT EXECUTED 300044b4: e5804020 str r4, [r0, #32] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) 300044b8: e1510002 cmp r1, r2 <== NOT EXECUTED s->max_depth = current_depth; 300044bc: 85801018 strhi r1, [r0, #24] <== NOT EXECUTED } 300044c0: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 300044c4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300044c8: 300564d0 .word 0x300564d0 300044cc: 30056528 .word 0x30056528 300044d0 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 300044d0: e59f0008 ldr r0, [pc, #8] ; 300044e0 <== NOT EXECUTED 300044d4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 300044d8: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 300044dc: ea00a0e0 b 3002c864 <== NOT EXECUTED 300044e0: 30056528 .word 0x30056528 30005080 : void rtems_panic( const char *printf_format, ... ) { 30005080: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 30005084: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 30005088: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 3000508c: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 30005090: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED 30005094: ebffff8d bl 30004ed0 <== NOT EXECUTED va_end(arglist); } 30005098: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 3000509c: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 300050a0: e12fff1e bx lr <== NOT EXECUTED 3000f630 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 3000f630: e92d40f0 push {r4, r5, r6, r7, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 3000f634: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 3000f638: e1a04000 mov r4, r0 3000f63c: e24dd008 sub sp, sp, #8 ; 0x8 3000f640: e1a06002 mov r6, r2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 3000f644: 03a04009 moveq r4, #9 ; 0x9 3000f648: 0a000029 beq 3000f6f4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 3000f64c: e59f30ac ldr r3, [pc, #172] ; 3000f700 3000f650: e5930000 ldr r0, [r3] 3000f654: eb0008ec bl 30011a0c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 3000f658: e1a01004 mov r1, r4 3000f65c: e59f00a0 ldr r0, [pc, #160] ; 3000f704 3000f660: e1a0200d mov r2, sp 3000f664: eb000f64 bl 300133fc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 3000f668: e59d5000 ldr r5, [sp] 3000f66c: e1a04000 mov r4, r0 3000f670: e3550000 cmp r5, #0 ; 0x0 3000f674: 0a000003 beq 3000f688 3000f678: e3550001 cmp r5, #1 ; 0x1 3000f67c: 03a04004 moveq r4, #4 ; 0x4 3000f680: 1a000017 bne 3000f6e4 3000f684: ea000017 b 3000f6e8 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 3000f688: e1a01007 mov r1, r7 3000f68c: e1a02006 mov r2, r6 3000f690: e2800068 add r0, r0, #104 ; 0x68 3000f694: e28d3004 add r3, sp, #4 ; 0x4 3000f698: eb000bd6 bl 300125f8 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 3000f69c: e3500001 cmp r0, #1 ; 0x1 3000f6a0: 03a04009 moveq r4, #9 ; 0x9 3000f6a4: 0a00000f beq 3000f6e8 3000f6a8: 3a000002 bcc 3000f6b8 3000f6ac: e3500002 cmp r0, #2 ; 0x2 3000f6b0: 1a00000b bne 3000f6e4 3000f6b4: ea000008 b 3000f6dc case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6b8: e59d1004 ldr r1, [sp, #4] 3000f6bc: e5942054 ldr r2, [r4, #84] the_region->maximum_segment_size += amount_extended; 3000f6c0: e594305c ldr r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6c4: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 3000f6c8: e0833001 add r3, r3, r1 3000f6cc: e584305c str r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6d0: e5842054 str r2, [r4, #84] the_region->maximum_segment_size += amount_extended; 3000f6d4: e1a04005 mov r4, r5 3000f6d8: ea000002 b 3000f6e8 return_status = RTEMS_SUCCESSFUL; break; 3000f6dc: e3a04018 mov r4, #24 ; 0x18 3000f6e0: ea000000 b 3000f6e8 3000f6e4: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000f6e8: e59f3010 ldr r3, [pc, #16] ; 3000f700 3000f6ec: e5930000 ldr r0, [r3] 3000f6f0: eb0008e1 bl 30011a7c <_API_Mutex_Unlock> return return_status; } 3000f6f4: e1a00004 mov r0, r4 3000f6f8: e28dd008 add sp, sp, #8 ; 0x8 3000f6fc: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000f700: 3003019c .word 0x3003019c 3000f704: 3002ff8c .word 0x3002ff8c 3000fa2c : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 3000fa2c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 3000fa30: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 3000fa34: e24dd010 sub sp, sp, #16 ; 0x10 3000fa38: e1a04000 mov r4, r0 3000fa3c: e1a06001 mov r6, r1 3000fa40: e1a07002 mov r7, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 3000fa44: 0a000029 beq 3000faf0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 3000fa48: e59f80b0 ldr r8, [pc, #176] ; 3000fb00 3000fa4c: e5980000 ldr r0, [r8] 3000fa50: eb0007ed bl 30011a0c <_API_Mutex_Lock> 3000fa54: e1a01004 mov r1, r4 3000fa58: e59f00a4 ldr r0, [pc, #164] ; 3000fb04 3000fa5c: e28d2008 add r2, sp, #8 ; 0x8 3000fa60: eb000e65 bl 300133fc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 3000fa64: e59d3008 ldr r3, [sp, #8] 3000fa68: e1a05000 mov r5, r0 3000fa6c: e3530000 cmp r3, #0 ; 0x0 3000fa70: 0a000005 beq 3000fa8c 3000fa74: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000fa78: e5980000 ldr r0, [r8] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 3000fa7c: 03a04004 moveq r4, #4 ; 0x4 3000fa80: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000fa84: eb0007fc bl 30011a7c <_API_Mutex_Unlock> 3000fa88: ea000019 b 3000faf4 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 3000fa8c: e28d3004 add r3, sp, #4 ; 0x4 3000fa90: e28dc00c add ip, sp, #12 ; 0xc 3000fa94: e1a01006 mov r1, r6 3000fa98: e1a02007 mov r2, r7 3000fa9c: e2800068 add r0, r0, #104 ; 0x68 3000faa0: e58dc000 str ip, [sp] 3000faa4: eb000c51 bl 30012bf0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3000faa8: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 3000faac: e2504000 subs r4, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3000fab0: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 3000fab4: 1a000005 bne 3000fad0 3000fab8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3000fabc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000fac0: 0a000002 beq 3000fad0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 3000fac4: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fac8: eb001f52 bl 30017818 <_Region_Process_queue> <== NOT EXECUTED 3000facc: ea000008 b 3000faf4 <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 3000fad0: e59f3028 ldr r3, [pc, #40] ; 3000fb00 3000fad4: e5930000 ldr r0, [r3] 3000fad8: eb0007e7 bl 30011a7c <_API_Mutex_Unlock> return 3000fadc: e3540000 cmp r4, #0 ; 0x0 3000fae0: 0a000003 beq 3000faf4 3000fae4: e3540001 cmp r4, #1 ; 0x1 3000fae8: 0284400c addeq r4, r4, #12 ; 0xc 3000faec: 0a000000 beq 3000faf4 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 3000faf0: e3a04009 mov r4, #9 ; 0x9 } 3000faf4: e1a00004 mov r0, r4 3000faf8: e28dd010 add sp, sp, #16 ; 0x10 3000fafc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3000fb00: 3003019c .word 0x3003019c 3000fb04: 3002ff8c .word 0x3002ff8c 3000404c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 3000404c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 30004050: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 30004054: e24dd018 sub sp, sp, #24 ; 0x18 30004058: e1a07001 mov r7, r1 3000405c: e1a04002 mov r4, r2 30004060: e1a08003 mov r8, r3 30004064: e59d9038 ldr r9, [sp, #56] register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 30004068: 02800003 addeq r0, r0, #3 ; 0x3 3000406c: 0a000062 beq 300041fc return RTEMS_INVALID_NAME; if ( !id ) 30004070: e3590000 cmp r9, #0 ; 0x0 30004074: 03a00009 moveq r0, #9 ; 0x9 30004078: 0a00005f beq 300041fc return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 3000407c: e21220c0 ands r2, r2, #192 ; 0xc0 30004080: 0a000008 beq 300040a8 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 30004084: e2043030 and r3, r4, #48 ; 0x30 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 30004088: e3530010 cmp r3, #16 ; 0x10 3000408c: 0a000001 beq 30004098 30004090: e3530020 cmp r3, #32 ; 0x20 30004094: 1a000057 bne 300041f8 30004098: e3140004 tst r4, #4 ; 0x4 3000409c: 0a000055 beq 300041f8 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 300040a0: e35200c0 cmp r2, #192 ; 0xc0 300040a4: 0a000053 beq 300041f8 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 300040a8: e2146030 ands r6, r4, #48 ; 0x30 300040ac: 0a000002 beq 300040bc 300040b0: e3570001 cmp r7, #1 ; 0x1 300040b4: 83a0000a movhi r0, #10 ; 0xa 300040b8: 8a00004f bhi 300041fc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300040bc: e59f2140 ldr r2, [pc, #320] ; 30004204 300040c0: e5923000 ldr r3, [r2] 300040c4: e2833001 add r3, r3, #1 ; 0x1 300040c8: e5823000 str r3, [r2] * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 300040cc: e59f0134 ldr r0, [pc, #308] ; 30004208 300040d0: eb000502 bl 300054e0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 300040d4: e2505000 subs r5, r0, #0 ; 0x0 300040d8: 1a000002 bne 300040e8 _Thread_Enable_dispatch(); 300040dc: eb00084d bl 30006218 <_Thread_Enable_dispatch> 300040e0: e3a00005 mov r0, #5 ; 0x5 300040e4: ea000044 b 300041fc * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 300040e8: e3560000 cmp r6, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 300040ec: e5854010 str r4, [r5, #16] * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 300040f0: 0a000029 beq 3000419c CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 300040f4: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 300040f8: 13a03002 movne r3, #2 ; 0x2 */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 300040fc: 1a000004 bne 30004114 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 30004100: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 30004104: 13a03003 movne r3, #3 ; 0x3 if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 30004108: 1a000001 bne 30004114 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 3000410c: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 30004110: 13a03001 movne r3, #1 ; 0x1 else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 30004114: e3560010 cmp r6, #16 ; 0x10 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 30004118: e58d3008 str r3, [sp, #8] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 3000411c: 13a03002 movne r3, #2 ; 0x2 30004120: 158d3000 strne r3, [sp] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 30004124: 1a00000b bne 30004158 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 30004128: e59d2008 ldr r2, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 3000412c: e3a03000 mov r3, #0 ; 0x0 30004130: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 30004134: e3520003 cmp r2, #3 ; 0x3 30004138: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000413c: ea000007 b 30004160 <== NOT EXECUTED 30004140: 30004158 .word 0x30004158 <== NOT EXECUTED 30004144: 30004158 .word 0x30004158 <== NOT EXECUTED 30004148: 30004150 .word 0x30004150 <== NOT EXECUTED 3000414c: 30004150 .word 0x30004150 <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 30004150: e3a03001 mov r3, #1 ; 0x1 30004154: ea000000 b 3000415c break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 30004158: e3a03000 mov r3, #0 ; 0x0 3000415c: e5cd3004 strb r3, [sp, #4] } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 30004160: e3570001 cmp r7, #1 ; 0x1 30004164: 13a02000 movne r2, #0 ; 0x0 30004168: 03a02001 moveq r2, #1 ; 0x1 3000416c: e2850014 add r0, r5, #20 ; 0x14 30004170: e1a0100d mov r1, sp } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 30004174: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 30004178: eb0002ff bl 30004d7c <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 3000417c: e3500006 cmp r0, #6 ; 0x6 30004180: 1a000012 bne 300041d0 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 30004184: e59f007c ldr r0, [pc, #124] ; 30004208 <== NOT EXECUTED 30004188: e1a01005 mov r1, r5 <== NOT EXECUTED 3000418c: eb0005a2 bl 3000581c <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 30004190: eb000820 bl 30006218 <_Thread_Enable_dispatch> <== NOT EXECUTED 30004194: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 30004198: ea000017 b 300041fc <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 3000419c: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 300041a0: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 300041a4: e3a0c000 mov ip, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 300041a8: 158d3014 strne r3, [sp, #20] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 300041ac: e1a02007 mov r2, r7 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 300041b0: e3e03000 mvn r3, #0 ; 0x0 */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 300041b4: e2850014 add r0, r5, #20 ; 0x14 300041b8: e28d1010 add r1, sp, #16 ; 0x10 } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; else the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 300041bc: 058d6014 streq r6, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 300041c0: e58d3010 str r3, [sp, #16] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 300041c4: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 300041c8: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 300041cc: eb0003b8 bl 300050b4 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300041d0: e59f3030 ldr r3, [pc, #48] ; 30004208 300041d4: e1d510b8 ldrh r1, [r5, #8] 300041d8: e593301c ldr r3, [r3, #28] 300041dc: e5952008 ldr r2, [r5, #8] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 300041e0: e585a00c str sl, [r5, #12] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300041e4: e7835101 str r5, [r3, r1, lsl #2] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 300041e8: e5892000 str r2, [r9] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 300041ec: eb000809 bl 30006218 <_Thread_Enable_dispatch> 300041f0: e3a00000 mov r0, #0 ; 0x0 300041f4: ea000000 b 300041fc return RTEMS_SUCCESSFUL; 300041f8: e3a0000b mov r0, #11 ; 0xb } 300041fc: e28dd018 add sp, sp, #24 ; 0x18 30004200: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 30004204: 3001626c .word 0x3001626c 30004208: 30016188 .word 0x30016188 3001e838 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 3001e838: e52de004 push {lr} ; (str lr, [sp, #-4]!) 3001e83c: e24dd004 sub sp, sp, #4 ; 0x4 3001e840: e1a01000 mov r1, r0 3001e844: e1a0200d mov r2, sp 3001e848: e59f0048 ldr r0, [pc, #72] ; 3001e898 3001e84c: ebffa9c8 bl 30008f74 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 3001e850: e59d2000 ldr r2, [sp] 3001e854: e3520000 cmp r2, #0 ; 0x0 3001e858: 13a00004 movne r0, #4 ; 0x4 3001e85c: 1a00000b bne 3001e890 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 3001e860: e5903010 ldr r3, [r0, #16] 3001e864: e2800014 add r0, r0, #20 ; 0x14 3001e868: e2131030 ands r1, r3, #48 ; 0x30 3001e86c: 0a000003 beq 3001e880 _CORE_mutex_Flush( 3001e870: e1a01002 mov r1, r2 3001e874: e3a02001 mov r2, #1 ; 0x1 3001e878: ebffa65d bl 300081f4 <_CORE_mutex_Flush> 3001e87c: ea000001 b 3001e888 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 3001e880: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3001e884: ebffa728 bl 3000852c <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 3001e888: ebffabfa bl 30009878 <_Thread_Enable_dispatch> 3001e88c: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001e890: e28dd004 add sp, sp, #4 ; 0x4 3001e894: e8bd8000 pop {pc} 3001e898: 3005656c .word 0x3005656c 30013b2c : */ void rtems_shutdown_executive( uint32_t result ) { 30013b2c: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30013b30: e59f2024 ldr r2, [pc, #36] ; 30013b5c */ void rtems_shutdown_executive( uint32_t result ) { 30013b34: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30013b38: e5923000 ldr r3, [r2] 30013b3c: e3530004 cmp r3, #4 ; 0x4 30013b40: 13a03004 movne r3, #4 ; 0x4 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 30013b44: 11a0000d movne r0, sp 30013b48: 159f1010 ldrne r1, [pc, #16] ; 30013b60 30013b4c: 15823000 strne r3, [r2] 30013b50: 1bffcec5 blne 3000766c <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 30013b54: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 30013b58: e8bd8000 pop {pc} <== NOT EXECUTED 30013b5c: 30016414 .word 0x30016414 30013b60: 3001623c .word 0x3001623c 30002a38 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30002a38: e59f3084 ldr r3, [pc, #132] ; 30002ac4 <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30002a3c: e1a0c00d mov ip, sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30002a40: e5933000 ldr r3, [r3] <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30002a44: e92dd810 push {r4, fp, ip, lr, pc} <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 30002a48: e59300c8 ldr r0, [r3, #200] <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30002a4c: e24cb004 sub fp, ip, #4 ; 0x4 <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 30002a50: e15b0000 cmp fp, r0 <== NOT EXECUTED 30002a54: 33a04000 movcc r4, #0 ; 0x0 <== NOT EXECUTED 30002a58: 3a000004 bcc 30002a70 <== NOT EXECUTED 30002a5c: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 30002a60: e0803003 add r3, r0, r3 <== NOT EXECUTED 30002a64: e15b0003 cmp fp, r3 <== NOT EXECUTED 30002a68: 83a04000 movhi r4, #0 ; 0x0 <== NOT EXECUTED 30002a6c: 93a04001 movls r4, #1 ; 0x1 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 30002a70: e59f3050 ldr r3, [pc, #80] ; 30002ac8 <== NOT EXECUTED 30002a74: e5933000 ldr r3, [r3] <== NOT EXECUTED 30002a78: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002a7c: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED 30002a80: 0a000005 beq 30002a9c <== NOT EXECUTED pattern_ok = (!memcmp( 30002a84: e59f1040 ldr r1, [pc, #64] ; 30002acc <== NOT EXECUTED 30002a88: e2800008 add r0, r0, #8 ; 0x8 <== NOT EXECUTED 30002a8c: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 30002a90: eb00a6b8 bl 3002c578 <== NOT EXECUTED 30002a94: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 30002a98: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 30002a9c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30002aa0: 0a000002 beq 30002ab0 <== NOT EXECUTED 30002aa4: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 30002aa8: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 30002aac: 189da810 ldmne sp, {r4, fp, sp, pc} <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 30002ab0: e59f300c ldr r3, [pc, #12] ; 30002ac4 <== NOT EXECUTED 30002ab4: e5930000 ldr r0, [r3] <== NOT EXECUTED 30002ab8: ebffffc4 bl 300029d0 <== NOT EXECUTED 30002abc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return true; } 30002ac0: e89da810 ldm sp, {r4, fp, sp, pc} <== NOT EXECUTED 30002ac4: 30056704 .word 0x30056704 30002ac8: 3004345c .word 0x3004345c 30002acc: 300564a0 .word 0x300564a0 300029c0 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 300029c0: e59f1004 ldr r1, [pc, #4] ; 300029cc <== NOT EXECUTED 300029c4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300029c8: eaffffe1 b 30002954 <== NOT EXECUTED 300029cc: 300050c4 .word 0x300050c4 30002954 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 30002954: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED print_context = context; 30002958: e59f704c ldr r7, [pc, #76] ; 300029ac <== NOT EXECUTED print_handler = print; 3000295c: e59f604c ldr r6, [pc, #76] ; 300029b0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 30002960: e1a04001 mov r4, r1 <== NOT EXECUTED 30002964: e1a05000 mov r5, r0 <== NOT EXECUTED print_context = context; print_handler = print; 30002968: e5861000 str r1, [r6] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 3000296c: e5870000 str r0, [r7] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 30002970: e59f103c ldr r1, [pc, #60] ; 300029b4 <== NOT EXECUTED 30002974: e1a0e00f mov lr, pc <== NOT EXECUTED 30002978: e12fff14 bx r4 <== NOT EXECUTED (*print)( context, 3000297c: e59f1034 ldr r1, [pc, #52] ; 300029b8 <== NOT EXECUTED 30002980: e1a00005 mov r0, r5 <== NOT EXECUTED 30002984: e1a0e00f mov lr, pc <== NOT EXECUTED 30002988: e12fff14 bx r4 <== 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 ); 3000298c: e59f0028 ldr r0, [pc, #40] ; 300029bc <== NOT EXECUTED 30002990: eb0017f1 bl 3000895c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 30002994: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30002998: ebffff96 bl 300027f8 <== NOT EXECUTED print_context = NULL; 3000299c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED print_handler = NULL; 300029a0: e5863000 str r3, [r6] <== 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; 300029a4: e5873000 str r3, [r7] <== NOT EXECUTED print_handler = NULL; } 300029a8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 300029ac: 30043460 .word 0x30043460 300029b0: 30043464 .word 0x30043464 300029b4: 3003d3e7 .word 0x3003d3e7 300029b8: 3003d3fe .word 0x3003d3fe 300029bc: 300027f8 .word 0x300027f8 30002ad0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 30002ad0: e1a0c00d mov ip, sp 30002ad4: e92dd830 push {r4, r5, fp, ip, lr, pc} 30002ad8: 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; 30002adc: e59000c8 ldr r0, [r0, #200] */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 30002ae0: e24cb004 sub fp, ip, #4 ; 0x4 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 30002ae4: e15b0000 cmp fp, r0 30002ae8: 33a05000 movcc r5, #0 ; 0x0 30002aec: 3a000004 bcc 30002b04 30002af0: e59430c4 ldr r3, [r4, #196] 30002af4: e0803003 add r3, r0, r3 30002af8: e15b0003 cmp fp, r3 30002afc: 83a05000 movhi r5, #0 ; 0x0 30002b00: 93a05001 movls r5, #1 ; 0x1 /* * 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, 30002b04: e59f102c ldr r1, [pc, #44] ; 30002b38 30002b08: e2800008 add r0, r0, #8 ; 0x8 30002b0c: e3a02010 mov r2, #16 ; 0x10 30002b10: eb00a698 bl 3002c578 30002b14: e2701001 rsbs r1, r0, #1 ; 0x1 30002b18: 33a01000 movcc r1, #0 ; 0x0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 30002b1c: e3550000 cmp r5, #0 ; 0x0 30002b20: 0a000001 beq 30002b2c 30002b24: e3510000 cmp r1, #0 ; 0x0 30002b28: 189da830 ldmne sp, {r4, r5, fp, sp, pc} Stack_check_report_blown_task( running, pattern_ok ); 30002b2c: e1a00004 mov r0, r4 <== NOT EXECUTED } } 30002b30: e89d6830 ldm sp, {r4, r5, fp, sp, lr} <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 30002b34: eaffffa5 b 300029d0 <== NOT EXECUTED 30002b38: 300564a0 .word 0x300564a0 30004ec0 : const char * rtems_status_text( rtems_status_code status ) { 30004ec0: e1a01000 mov r1, r0 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 30004ec4: e59f0000 ldr r0, [pc, #0] ; 30004ecc <== NOT EXECUTED 30004ec8: ea0025cb b 3000e5fc <== NOT EXECUTED 30004ecc: 3001eb40 .word 0x3001eb40 3001ecec : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 3001ecec: e92d40f0 push {r4, r5, r6, r7, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 3001ecf0: e2516000 subs r6, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 3001ecf4: e24dd004 sub sp, sp, #4 ; 0x4 3001ecf8: e1a07002 mov r7, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 3001ecfc: 03a00009 moveq r0, #9 ; 0x9 3001ed00: 0a000022 beq 3001ed90 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001ed04: e1a0100d mov r1, sp 3001ed08: ebffaae3 bl 3000989c <_Thread_Get> switch (location) { 3001ed0c: e59d3000 ldr r3, [sp] rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001ed10: e1a05000 mov r5, r0 switch (location) { 3001ed14: e3530000 cmp r3, #0 ; 0x0 3001ed18: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 3001ed1c: 05954114 ldreq r4, [r5, #276] if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 3001ed20: 0a000008 beq 3001ed48 3001ed24: ea000019 b 3001ed90 <== NOT EXECUTED /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 3001ed28: e5943004 ldr r3, [r4, #4] 3001ed2c: e1530006 cmp r3, r6 3001ed30: 1a000003 bne 3001ed44 tvp->dtor = dtor; 3001ed34: e5847010 str r7, [r4, #16] _Thread_Enable_dispatch(); 3001ed38: ebffaace bl 30009878 <_Thread_Enable_dispatch> 3001ed3c: e3a00000 mov r0, #0 ; 0x0 3001ed40: ea000012 b 3001ed90 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 3001ed44: e5944000 ldr r4, [r4] case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 3001ed48: e3540000 cmp r4, #0 ; 0x0 3001ed4c: 1afffff5 bne 3001ed28 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 3001ed50: e3a00014 mov r0, #20 ; 0x14 3001ed54: ebffafb2 bl 3000ac24 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 3001ed58: e3500000 cmp r0, #0 ; 0x0 3001ed5c: 1a000002 bne 3001ed6c _Thread_Enable_dispatch(); 3001ed60: ebffaac4 bl 30009878 <_Thread_Enable_dispatch> 3001ed64: e3a0001a mov r0, #26 ; 0x1a 3001ed68: ea000008 b 3001ed90 } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 3001ed6c: e5952114 ldr r2, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 3001ed70: e5963000 ldr r3, [r6] new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 3001ed74: e5850114 str r0, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 3001ed78: e5803008 str r3, [r0, #8] new->ptr = ptr; 3001ed7c: e5806004 str r6, [r0, #4] new->dtor = dtor; 3001ed80: e5807010 str r7, [r0, #16] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 3001ed84: e5802000 str r2, [r0] the_thread->task_variables = new; _Thread_Enable_dispatch(); 3001ed88: ebffaaba bl 30009878 <_Thread_Enable_dispatch> 3001ed8c: e1a00004 mov r0, r4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001ed90: e28dd004 add sp, sp, #4 ; 0x4 3001ed94: e8bd80f0 pop {r4, r5, r6, r7, pc} 3001ed98 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 3001ed98: e92d4010 push {r4, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 3001ed9c: e2514000 subs r4, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 3001eda0: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 3001eda4: 0a000018 beq 3001ee0c return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 3001eda8: e1a0100d mov r1, sp 3001edac: ebffaaba bl 3000989c <_Thread_Get> switch (location) { 3001edb0: e59d3000 ldr r3, [sp] 3001edb4: e3530000 cmp r3, #0 ; 0x0 3001edb8: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 3001edbc: 01a02003 moveq r2, r3 3001edc0: 05901114 ldreq r1, [r0, #276] return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 3001edc4: 0a00000d beq 3001ee00 3001edc8: ea000010 b 3001ee10 <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 3001edcc: e5913004 ldr r3, [r1, #4] 3001edd0: e1530004 cmp r3, r4 3001edd4: 1a000007 bne 3001edf8 3001edd8: e5913000 ldr r3, [r1] if (prev) 3001eddc: e3520000 cmp r2, #0 ; 0x0 prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 3001ede0: 05803114 streq r3, [r0, #276] case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 3001ede4: 15823000 strne r3, [r2] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 3001ede8: eb000028 bl 3001ee90 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 3001edec: ebffaaa1 bl 30009878 <_Thread_Enable_dispatch> 3001edf0: e3a00000 mov r0, #0 ; 0x0 3001edf4: ea000005 b 3001ee10 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 3001edf8: e1a02001 mov r2, r1 3001edfc: e5911000 ldr r1, [r1] the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 3001ee00: e3510000 cmp r1, #0 ; 0x0 3001ee04: 1afffff0 bne 3001edcc return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 3001ee08: ebffaa9a bl 30009878 <_Thread_Enable_dispatch> 3001ee0c: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001ee10: e28dd004 add sp, sp, #4 ; 0x4 3001ee14: e8bd8010 pop {r4, pc} 3001ee18 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 3001ee18: e92d4030 push {r4, r5, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 3001ee1c: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 3001ee20: e24dd004 sub sp, sp, #4 ; 0x4 3001ee24: e1a04002 mov r4, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 3001ee28: 0a000015 beq 3001ee84 return RTEMS_INVALID_ADDRESS; if ( !result ) 3001ee2c: e3520000 cmp r2, #0 ; 0x0 3001ee30: 0a000013 beq 3001ee84 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001ee34: e1a0100d mov r1, sp 3001ee38: ebffaa97 bl 3000989c <_Thread_Get> switch (location) { 3001ee3c: e59d3000 ldr r3, [sp] 3001ee40: e3530000 cmp r3, #0 ; 0x0 3001ee44: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 3001ee48: 05900114 ldreq r0, [r0, #276] if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 3001ee4c: 0a000009 beq 3001ee78 3001ee50: ea00000c b 3001ee88 <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 3001ee54: e5903004 ldr r3, [r0, #4] 3001ee58: e1530005 cmp r3, r5 3001ee5c: 1a000004 bne 3001ee74 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 3001ee60: e590300c ldr r3, [r0, #12] 3001ee64: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 3001ee68: ebffaa82 bl 30009878 <_Thread_Enable_dispatch> 3001ee6c: e3a00000 mov r0, #0 ; 0x0 3001ee70: ea000004 b 3001ee88 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 3001ee74: e5900000 ldr r0, [r0] case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 3001ee78: e3500000 cmp r0, #0 ; 0x0 3001ee7c: 1afffff4 bne 3001ee54 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 3001ee80: ebffaa7c bl 30009878 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 3001ee84: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001ee88: e28dd004 add sp, sp, #4 ; 0x4 3001ee8c: e8bd8030 pop {r4, r5, pc} 30001ef4 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 30001ef4: e59f3018 ldr r3, [pc, #24] ; 30001f14 <== NOT EXECUTED 30001ef8: e5830000 str r0, [r3] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 30001efc: e59f3014 ldr r3, [pc, #20] ; 30001f18 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 30001f00: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 30001f04: e5831000 str r1, [r3] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 30001f08: e59f300c ldr r3, [pc, #12] ; 30001f1c <== NOT EXECUTED 30001f0c: e5832000 str r2, [r3] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 30001f10: e12fff1e bx lr <== NOT EXECUTED 30001f14: 30015968 .word 0x30015968 30001f18: 3001596c .word 0x3001596c 30001f1c: 30015970 .word 0x30015970 30003388 : { 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); 30003388: e59f316c ldr r3, [pc, #364] ; 300034fc rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3000338c: e590c000 ldr ip, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30003390: e3a01000 mov r1, #0 ; 0x0 } } rtems_status_code rtems_termios_close (void *arg) { 30003394: e92d4030 push {r4, r5, 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); 30003398: e1a02001 mov r2, r1 } } rtems_status_code rtems_termios_close (void *arg) { 3000339c: e1a05000 mov r5, r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 300033a0: e5930000 ldr r0, [r3] rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 300033a4: e59c4028 ldr r4, [ip, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 300033a8: eb0003c0 bl 300042b0 if (sc != RTEMS_SUCCESSFUL) 300033ac: e3500000 cmp r0, #0 ; 0x0 300033b0: 1a00001d bne 3000342c rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 300033b4: e5943008 ldr r3, [r4, #8] 300033b8: e2433001 sub r3, r3, #1 ; 0x1 300033bc: e3530000 cmp r3, #0 ; 0x0 300033c0: e5843008 str r3, [r4, #8] 300033c4: 1a000047 bne 300034e8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300033c8: e59420cc ldr r2, [r4, #204] 300033cc: e59f312c ldr r3, [pc, #300] ; 30003500 300033d0: e0833282 add r3, r3, r2, lsl #5 300033d4: e5933004 ldr r3, [r3, #4] 300033d8: e3530000 cmp r3, #0 ; 0x0 300033dc: 0a000003 beq 300033f0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 300033e0: e1a00004 mov r0, r4 <== NOT EXECUTED 300033e4: e1a0e00f mov lr, pc <== NOT EXECUTED 300033e8: e12fff13 bx r3 <== NOT EXECUTED 300033ec: ea000001 b 300033f8 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 300033f0: e1a00004 mov r0, r4 300033f4: ebfffdee bl 30002bb4 } if (tty->device.outputUsesInterrupts 300033f8: e59430b4 ldr r3, [r4, #180] 300033fc: e3530002 cmp r3, #2 ; 0x2 30003400: 1a00000a bne 30003430 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 30003404: e59400c4 ldr r0, [r4, #196] <== NOT EXECUTED 30003408: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000340c: eb00027d bl 30003e08 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 30003410: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003414: 1a000004 bne 3000342c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 30003418: e59400c8 ldr r0, [r4, #200] <== NOT EXECUTED 3000341c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30003420: eb000278 bl 30003e08 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 30003424: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003428: 0a000000 beq 30003430 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3000342c: eb000559 bl 30004998 <== NOT EXECUTED } if (tty->device.lastClose) 30003430: e594309c ldr r3, [r4, #156] 30003434: e3530000 cmp r3, #0 ; 0x0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 30003438: 11a02005 movne r2, r5 3000343c: 1594000c ldrne r0, [r4, #12] 30003440: 15941010 ldrne r1, [r4, #16] 30003444: 11a0e00f movne lr, pc 30003448: 112fff13 bxne r3 if (tty->forw == NULL) { 3000344c: e8940006 ldm r4, {r1, r2} 30003450: e3510000 cmp r1, #0 ; 0x0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 30003454: 15812004 strne r2, [r1, #4] if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { 30003458: 1a000003 bne 3000346c rtems_termios_ttyTail = tty->back; 3000345c: e59f30a0 ldr r3, [pc, #160] ; 30003504 if ( rtems_termios_ttyTail != NULL ) { 30003460: e3520000 cmp r2, #0 ; 0x0 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; 30003464: e5832000 str r2, [r3] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 30003468: 15821000 strne r1, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3000346c: e5941004 ldr r1, [r4, #4] 30003470: e5942000 ldr r2, [r4] 30003474: e3510000 cmp r1, #0 ; 0x0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 30003478: 15812000 strne r2, [r1] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3000347c: 1a000003 bne 30003490 rtems_termios_ttyHead = tty->forw; 30003480: e59f3080 ldr r3, [pc, #128] ; 30003508 if ( rtems_termios_ttyHead != NULL ) { 30003484: e3520000 cmp r2, #0 ; 0x0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 30003488: e5832000 str r2, [r3] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 3000348c: 15821004 strne r1, [r2, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 30003490: e5940014 ldr r0, [r4, #20] 30003494: eb00035c bl 3000420c rtems_semaphore_delete (tty->osem); 30003498: e5940018 ldr r0, [r4, #24] 3000349c: eb00035a bl 3000420c rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 300034a0: e594008c ldr r0, [r4, #140] 300034a4: eb000358 bl 3000420c if ((tty->device.pollRead == NULL) || 300034a8: e59430a0 ldr r3, [r4, #160] 300034ac: e3530000 cmp r3, #0 ; 0x0 300034b0: 0a000002 beq 300034c0 300034b4: e59430b4 ldr r3, [r4, #180] 300034b8: e3530002 cmp r3, #2 ; 0x2 300034bc: 1a000001 bne 300034c8 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 300034c0: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 300034c4: eb000350 bl 3000420c <== NOT EXECUTED free (tty->rawInBuf.theBuf); 300034c8: e5940058 ldr r0, [r4, #88] 300034cc: eb00147a bl 300086bc free (tty->rawOutBuf.theBuf); 300034d0: e594007c ldr r0, [r4, #124] 300034d4: eb001478 bl 300086bc free (tty->cbuf); 300034d8: e594001c ldr r0, [r4, #28] 300034dc: eb001476 bl 300086bc free (tty); 300034e0: e1a00004 mov r0, r4 300034e4: eb001474 bl 300086bc } rtems_semaphore_release (rtems_termios_ttyMutex); 300034e8: e59f300c ldr r3, [pc, #12] ; 300034fc 300034ec: e5930000 ldr r0, [r3] 300034f0: eb0003b4 bl 300043c8 return RTEMS_SUCCESSFUL; } 300034f4: e3a00000 mov r0, #0 ; 0x0 300034f8: e8bd8030 pop {r4, r5, pc} 300034fc: 3001617c .word 0x3001617c 30003500: 30015f70 .word 0x30015f70 30003504: 30016180 .word 0x30016180 30003508: 30016184 .word 0x30016184 30002118 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 30002118: e5903090 ldr r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3000211c: e590c0b4 ldr ip, [r0, #180] <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 30002120: e0833001 add r3, r3, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002124: e35c0002 cmp ip, #2 ; 0x2 <== NOT EXECUTED * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 30002128: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 3000212c: e5803090 str r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002130: 1a000005 bne 3000214c <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 30002134: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 30002138: e1a0100c mov r1, ip <== NOT EXECUTED 3000213c: eb000731 bl 30003e08 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 30002140: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30002144: 0a00000c beq 3000217c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 30002148: eb000a12 bl 30004998 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 3000214c: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED 30002150: e3530005 cmp r3, #5 ; 0x5 <== NOT EXECUTED 30002154: 1a000006 bne 30002174 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30002158: e59f3024 ldr r3, [pc, #36] ; 30002184 <== NOT EXECUTED 3000215c: e59330b4 ldr r3, [r3, #180] <== NOT EXECUTED 30002160: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002164: 0a000004 beq 3000217c <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 30002168: e1a0e00f mov lr, pc <== NOT EXECUTED 3000216c: e12fff13 bx r3 <== NOT EXECUTED 30002170: ea000001 b 3000217c <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 30002174: 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); 30002178: eaffff6b b 30001f2c <== NOT EXECUTED } } 3000217c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30002180: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30002184: 30015f70 .word 0x30015f70 30002188 : * 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) { 30002188: 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) { 3000218c: e59fc2b8 ldr ip, [pc, #696] ; 3000244c <== NOT EXECUTED 30002190: e59030cc ldr r3, [r0, #204] <== 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) { 30002194: e1a04000 mov r4, r0 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 30002198: e08c3283 add r3, ip, r3, lsl #5 <== NOT EXECUTED 3000219c: e5930010 ldr r0, [r3, #16] <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 300021a0: e24dd00c sub sp, sp, #12 ; 0xc <== 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) { 300021a4: e3500000 cmp r0, #0 ; 0x0 <== 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) { 300021a8: e58d1000 str r1, [sp] <== NOT EXECUTED 300021ac: e1a08002 mov r8, r2 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 300021b0: 11a0600c movne r6, ip <== 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) { 300021b4: 13a05000 movne r5, #0 ; 0x0 <== NOT EXECUTED 300021b8: 1a00000d bne 300021f4 <== 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, 300021bc: e284204a add r2, r4, #74 ; 0x4a <== 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); 300021c0: e2843030 add r3, r4, #48 ; 0x30 <== NOT EXECUTED 300021c4: e1a05000 mov r5, r0 <== 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, 300021c8: e98d000c stmib sp, {r2, r3} <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 300021cc: e1a0a000 mov sl, r0 <== NOT EXECUTED 300021d0: e1a09000 mov r9, r0 <== NOT EXECUTED 300021d4: ea000090 b 3000241c <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 300021d8: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 300021dc: e59d2000 ldr r2, [sp] <== NOT EXECUTED 300021e0: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED 300021e4: e7d20005 ldrb r0, [r2, r5] <== NOT EXECUTED 300021e8: e1a0e00f mov lr, pc <== NOT EXECUTED 300021ec: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 300021f0: e2855001 add r5, r5, #1 ; 0x1 <== 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--) { 300021f4: e2588001 subs r8, r8, #1 ; 0x1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 300021f8: e1a01004 mov r1, r4 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 300021fc: 2afffff5 bcs 300021d8 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 30002200: e59450e4 ldr r5, [r4, #228] <== NOT EXECUTED 30002204: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30002208: 1a00008b bne 3000243c <== NOT EXECUTED 3000220c: e59430dc ldr r3, [r4, #220] <== NOT EXECUTED 30002210: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002214: 0a000088 beq 3000243c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 30002218: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 3000221c: e59410e0 ldr r1, [r4, #224] <== NOT EXECUTED 30002220: e1a0e00f mov lr, pc <== NOT EXECUTED 30002224: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 30002228: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 3000222c: e58430e4 str r3, [r4, #228] <== NOT EXECUTED 30002230: ea000082 b 30002440 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 30002234: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 30002238: e59d2000 ldr r2, [sp] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 3000223c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 30002240: e7d27009 ldrb r7, [r2, r9] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 30002244: 0a00000f beq 30002288 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 30002248: e5d4304a ldrb r3, [r4, #74] <== NOT EXECUTED 3000224c: e5d42049 ldrb r2, [r4, #73] <== NOT EXECUTED 30002250: e1530007 cmp r3, r7 <== NOT EXECUTED 30002254: 1a000005 bne 30002270 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 30002258: e1520003 cmp r2, r3 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 3000225c: 059430b8 ldreq r3, [r4, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 30002260: 159430b8 ldrne r3, [r4, #184] <== 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; 30002264: 02233010 eoreq r3, r3, #16 ; 0x10 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 30002268: 13833010 orrne r3, r3, #16 ; 0x10 <== NOT EXECUTED 3000226c: ea000003 b 30002280 <== NOT EXECUTED } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 30002270: e1520007 cmp r2, r7 <== NOT EXECUTED 30002274: 1a000003 bne 30002288 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 30002278: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 3000227c: e3c33010 bic r3, r3, #16 ; 0x10 <== NOT EXECUTED 30002280: e58430b8 str r3, [r4, #184] <== NOT EXECUTED 30002284: ea000001 b 30002290 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 30002288: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED 3000228c: 0a000016 beq 300022ec <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 30002290: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002294: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 30002298: e3530020 cmp r3, #32 ; 0x20 <== NOT EXECUTED 3000229c: 1a000010 bne 300022e4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 300022a0: e10f6000 mrs r6, CPSR <== NOT EXECUTED 300022a4: e38630c0 orr r3, r6, #192 ; 0xc0 <== NOT EXECUTED 300022a8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 300022ac: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300022b0: e5942094 ldr r2, [r4, #148] <== 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; 300022b4: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300022b8: e3520000 cmp r2, #0 ; 0x0 <== 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; 300022bc: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300022c0: 0a000006 beq 300022e0 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 300022c4: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 300022c8: e594107c ldr r1, [r4, #124] <== NOT EXECUTED 300022cc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300022d0: e0811003 add r1, r1, r3 <== NOT EXECUTED 300022d4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 300022d8: e1a0e00f mov lr, pc <== NOT EXECUTED 300022dc: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 300022e0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 300022e4: e3a0a001 mov sl, #1 ; 0x1 <== NOT EXECUTED 300022e8: ea00004a b 30002418 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 300022ec: e5940060 ldr r0, [r4, #96] <== NOT EXECUTED 300022f0: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 300022f4: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 300022f8: eb003f81 bl 30012104 <__umodsi3> <== NOT EXECUTED 300022fc: e1a06000 mov r6, r0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 30002300: e10fb000 mrs fp, CPSR <== NOT EXECUTED 30002304: e38b30c0 orr r3, fp, #192 ; 0xc0 <== NOT EXECUTED 30002308: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 3000230c: e594305c ldr r3, [r4, #92] <== NOT EXECUTED 30002310: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 30002314: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 30002318: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 3000231c: e0800006 add r0, r0, r6 <== NOT EXECUTED 30002320: eb003f77 bl 30012104 <__umodsi3> <== NOT EXECUTED 30002324: e59430c0 ldr r3, [r4, #192] <== NOT EXECUTED 30002328: e1500003 cmp r0, r3 <== NOT EXECUTED 3000232c: 9a000025 bls 300023c8 <== NOT EXECUTED 30002330: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002334: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 30002338: 1a000022 bne 300023c8 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 3000233c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 30002340: e59f2108 ldr r2, [pc, #264] ; 30002450 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 30002344: e3833001 orr r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002348: e58430b8 str r3, [r4, #184] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 3000234c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002350: e0032002 and r2, r3, r2 <== NOT EXECUTED 30002354: e3520b01 cmp r2, #1024 ; 0x400 <== NOT EXECUTED 30002358: 1a00000e bne 30002398 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 3000235c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002360: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 30002364: 1a000002 bne 30002374 <== NOT EXECUTED 30002368: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 3000236c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002370: 1a000014 bne 300023c8 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 30002374: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED (*tty->device.write)(tty->minor, 30002378: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 3000237c: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 30002380: e58430b8 str r3, [r4, #184] <== NOT EXECUTED (*tty->device.write)(tty->minor, 30002384: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 30002388: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3000238c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002390: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 30002394: ea00000b b 300023c8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 30002398: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 3000239c: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 300023a0: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 300023a4: 1a000007 bne 300023c8 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 300023a8: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 300023ac: e59420ac ldr r2, [r4, #172] <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 300023b0: e3833004 orr r3, r3, #4 ; 0x4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 300023b4: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 300023b8: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 300023bc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 300023c0: 11a0e00f movne lr, pc <== NOT EXECUTED 300023c4: 112fff12 bxne r2 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 300023c8: e129f00b msr CPSR_fc, fp <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 300023cc: e594305c ldr r3, [r4, #92] <== NOT EXECUTED 300023d0: e1560003 cmp r6, r3 <== NOT EXECUTED dropped++; 300023d4: 02855001 addeq r5, r5, #1 ; 0x1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 300023d8: 0a00000e beq 30002418 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 300023dc: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED 300023e0: e7c37006 strb r7, [r3, r6] <== 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 )) { 300023e4: e59430e4 ldr r3, [r4, #228] <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 300023e8: e5846060 str r6, [r4, #96] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 300023ec: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300023f0: 1a000008 bne 30002418 <== NOT EXECUTED 300023f4: e59430dc ldr r3, [r4, #220] <== NOT EXECUTED 300023f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300023fc: 0a000005 beq 30002418 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 30002400: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 30002404: e59410e0 ldr r1, [r4, #224] <== NOT EXECUTED 30002408: e1a0e00f mov lr, pc <== NOT EXECUTED 3000240c: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 30002410: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 30002414: e58430e4 str r3, [r4, #228] <== NOT EXECUTED 30002418: e2899001 add r9, r9, #1 ; 0x1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 3000241c: e2588001 subs r8, r8, #1 ; 0x1 <== NOT EXECUTED 30002420: 2affff83 bcs 30002234 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 30002424: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 30002428: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 3000242c: e0833005 add r3, r3, r5 <== NOT EXECUTED 30002430: e5843078 str r3, [r4, #120] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 30002434: eb0007e3 bl 300043c8 <== NOT EXECUTED 30002438: ea000000 b 30002440 <== NOT EXECUTED return dropped; 3000243c: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED } 30002440: e1a00005 mov r0, r5 <== NOT EXECUTED 30002444: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 30002448: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 3000244c: 30015f70 .word 0x30015f70 30002450: 00000402 .word 0x00000402 30002fc4 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 30002fc4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002fc8: e5903000 ldr r3, [r0] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 30002fcc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002fd0: e5935028 ldr r5, [r3, #40] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 30002fd4: e580100c str r1, [r0, #12] <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 30002fd8: e1a06000 mov r6, r0 <== NOT EXECUTED 30002fdc: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 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); 30002fe0: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30002fe4: e1a02001 mov r2, r1 <== NOT EXECUTED 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; 30002fe8: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002fec: eb0004af bl 300042b0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 30002ff0: e2508000 subs r8, r0, #0 ; 0x0 <== NOT EXECUTED 30002ff4: 1a0000dc bne 3000336c <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 30002ff8: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED 30002ffc: e3520004 cmp r2, #4 ; 0x4 <== NOT EXECUTED 30003000: 0a0000b0 beq 300032c8 <== NOT EXECUTED 30003004: 8a000005 bhi 30003020 <== NOT EXECUTED 30003008: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 3000300c: 0a000029 beq 300030b8 <== NOT EXECUTED 30003010: 8a0000a5 bhi 300032ac <== NOT EXECUTED 30003014: e3520001 cmp r2, #1 ; 0x1 <== NOT EXECUTED 30003018: 1a000010 bne 30003060 <== NOT EXECUTED 3000301c: ea00001b b 30003090 <== NOT EXECUTED 30003020: e59f3354 ldr r3, [pc, #852] ; 3000337c <== NOT EXECUTED 30003024: e1520003 cmp r2, r3 <== NOT EXECUTED 30003028: 0a0000c2 beq 30003338 <== NOT EXECUTED 3000302c: 8a000002 bhi 3000303c <== NOT EXECUTED 30003030: e3520005 cmp r2, #5 ; 0x5 <== NOT EXECUTED 30003034: 1a000009 bne 30003060 <== NOT EXECUTED 30003038: ea00009e b 300032b8 <== NOT EXECUTED 3000303c: e59f333c ldr r3, [pc, #828] ; 30003380 <== NOT EXECUTED 30003040: e1520003 cmp r2, r3 <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 30003044: 05962008 ldreq r2, [r6, #8] <== NOT EXECUTED 30003048: 059530cc ldreq r3, [r5, #204] <== NOT EXECUTED 3000304c: 05823000 streq r3, [r2] <== 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) { 30003050: 0a0000c3 beq 30003364 <== NOT EXECUTED 30003054: e2833105 add r3, r3, #1073741825 ; 0x40000001 <== NOT EXECUTED 30003058: e1520003 cmp r2, r3 <== NOT EXECUTED 3000305c: 0a00009d beq 300032d8 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 30003060: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED 30003064: e59f3318 ldr r3, [pc, #792] ; 30003384 <== NOT EXECUTED 30003068: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3000306c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 30003070: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003074: 03a0800a moveq r8, #10 ; 0xa <== NOT EXECUTED 30003078: 0a0000b9 beq 30003364 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 3000307c: e1a00005 mov r0, r5 <== NOT EXECUTED 30003080: e1a01006 mov r1, r6 <== NOT EXECUTED 30003084: e1a0e00f mov lr, pc <== NOT EXECUTED 30003088: e12fff13 bx r3 <== NOT EXECUTED 3000308c: ea0000a7 b 30003330 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 30003090: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED 30003094: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED 30003098: e1a0e004 mov lr, r4 <== NOT EXECUTED 3000309c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 300030a0: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 300030a4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 300030a8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 300030ac: e59c3000 ldr r3, [ip] <== NOT EXECUTED 300030b0: e58e3000 str r3, [lr] <== NOT EXECUTED 300030b4: ea0000aa b 30003364 <== NOT EXECUTED break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 300030b8: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED 300030bc: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED 300030c0: e1a0e003 mov lr, r3 <== NOT EXECUTED 300030c4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 300030c8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 300030cc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 300030d0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 300030d4: e59530b8 ldr r3, [r5, #184] <== 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; 300030d8: e59e2000 ldr r2, [lr] <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 300030dc: e3130c02 tst r3, #512 ; 0x200 <== 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; 300030e0: e58c2000 str r2, [ip] <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 300030e4: 0a000019 beq 30003150 <== NOT EXECUTED 300030e8: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 300030ec: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 300030f0: 1a000016 bne 30003150 <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 300030f4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 300030f8: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 300030fc: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 30003100: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003104: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 30003108: 0a000010 beq 30003150 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 3000310c: e10f4000 mrs r4, CPSR <== NOT EXECUTED 30003110: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED 30003114: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 30003118: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3000311c: e5952094 ldr r2, [r5, #148] <== 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; 30003120: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30003124: e3520000 cmp r2, #0 ; 0x0 <== 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; 30003128: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3000312c: 0a000006 beq 3000314c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 30003130: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 30003134: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 30003138: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3000313c: e0811003 add r1, r1, r3 <== NOT EXECUTED 30003140: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30003144: e1a0e00f mov lr, pc <== NOT EXECUTED 30003148: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 3000314c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 30003150: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003154: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 30003158: 0a000008 beq 30003180 <== NOT EXECUTED 3000315c: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 30003160: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30003164: 1a000005 bne 30003180 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 30003168: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3000316c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30003170: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 30003174: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003178: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED 3000317c: e58530b8 str r3, [r5, #184] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 30003180: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003184: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 30003188: 0a000010 beq 300031d0 <== NOT EXECUTED 3000318c: e5953038 ldr r3, [r5, #56] <== NOT EXECUTED 30003190: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003194: ba00000d blt 300031d0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30003198: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3000319c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 300031a0: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 300031a4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 300031a8: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 300031ac: 0a000004 beq 300031c4 <== NOT EXECUTED 300031b0: e59530b0 ldr r3, [r5, #176] <== NOT EXECUTED 300031b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 300031b8: 15950010 ldrne r0, [r5, #16] <== NOT EXECUTED 300031bc: 11a0e00f movne lr, pc <== NOT EXECUTED 300031c0: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 300031c4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 300031c8: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED 300031cc: e58530b8 str r3, [r5, #184] <== 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) { 300031d0: e5953038 ldr r3, [r5, #56] <== NOT EXECUTED 300031d4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; 300031d8: b59530b8 ldrlt r3, [r5, #184] <== NOT EXECUTED 300031dc: b3833c01 orrlt r3, r3, #256 ; 0x100 <== NOT EXECUTED 300031e0: b58530b8 strlt r3, [r5, #184] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 300031e4: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 300031e8: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 300031ec: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 300031f0: 13833b01 orrne r3, r3, #1024 ; 0x400 <== NOT EXECUTED 300031f4: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 300031f8: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 300031fc: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 30003200: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 30003204: 13833c02 orrne r3, r3, #512 ; 0x200 <== NOT EXECUTED 30003208: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED 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) { 3000320c: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 30003210: e2137002 ands r7, r3, #2 ; 0x2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003214: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003218: 15853074 strne r3, [r5, #116] <== NOT EXECUTED /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3000321c: 1585306c strne r3, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 30003220: 15853070 strne r3, [r5, #112] <== NOT EXECUTED 30003224: 1a000018 bne 3000328c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 30003228: e1a0100d mov r1, sp <== NOT EXECUTED 3000322c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 30003230: eb0001ff bl 30003a34 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 30003234: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30003238: e5d54046 ldrb r4, [r5, #70] <== NOT EXECUTED 3000323c: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 30003240: e0000493 mul r0, r3, r4 <== NOT EXECUTED 30003244: eb003b6a bl 30011ff4 <__aeabi_uidiv> <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 30003248: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 3000324c: e5850054 str r0, [r5, #84] <== NOT EXECUTED 30003250: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 30003254: 0a000006 beq 30003274 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003258: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000325c: 01a03000 moveq r3, r0 <== NOT EXECUTED 30003260: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003264: e585706c str r7, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003268: e5853074 str r3, [r5, #116] <== NOT EXECUTED rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 3000326c: e5850070 str r0, [r5, #112] <== NOT EXECUTED 30003270: ea000005 b 3000328c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 30003274: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 30003278: 03a03001 moveq r3, #1 ; 0x1 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3000327c: 15854074 strne r4, [r5, #116] <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003280: 1585406c strne r4, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 30003284: 15854070 strne r4, [r5, #112] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 30003288: 0585306c streq r3, [r5, #108] <== NOT EXECUTED } } } if (tty->device.setAttributes) 3000328c: e59530a8 ldr r3, [r5, #168] <== NOT EXECUTED 30003290: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003294: 0a000032 beq 30003364 <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 30003298: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3000329c: e2851030 add r1, r5, #48 ; 0x30 <== NOT EXECUTED 300032a0: e1a0e00f mov lr, pc <== NOT EXECUTED 300032a4: e12fff13 bx r3 <== NOT EXECUTED 300032a8: ea00002d b 30003364 <== NOT EXECUTED break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 300032ac: e1a00005 mov r0, r5 <== NOT EXECUTED 300032b0: ebfffe3f bl 30002bb4 <== NOT EXECUTED 300032b4: ea00002a b 30003364 <== NOT EXECUTED break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 300032b8: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 300032bc: e58530d8 str r3, [r5, #216] <== NOT EXECUTED 300032c0: e58520d4 str r2, [r5, #212] <== NOT EXECUTED 300032c4: ea000026 b 30003364 <== NOT EXECUTED break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 300032c8: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 300032cc: e58530e0 str r3, [r5, #224] <== NOT EXECUTED 300032d0: e58520dc str r2, [r5, #220] <== NOT EXECUTED 300032d4: ea000022 b 30003364 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300032d8: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED 300032dc: e59f30a0 ldr r3, [pc, #160] ; 30003384 <== NOT EXECUTED 300032e0: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 300032e4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 300032e8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300032ec: 0a000003 beq 30003300 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 300032f0: e1a00005 mov r0, r5 <== NOT EXECUTED 300032f4: e1a0e00f mov lr, pc <== NOT EXECUTED 300032f8: e12fff13 bx r3 <== NOT EXECUTED 300032fc: e1a08000 mov r8, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 30003300: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED 30003304: 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) { 30003308: e59f3074 ldr r3, [pc, #116] ; 30003384 <== 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); 3000330c: e58520cc str r2, [r5, #204] <== 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) { 30003310: e7931282 ldr r1, [r3, r2, lsl #5] <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 30003314: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 30003318: e1510003 cmp r1, r3 <== 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 */ 3000331c: e58530d0 str r3, [r5, #208] <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 30003320: 0a00000f beq 30003364 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 30003324: e1a00005 mov r0, r5 <== NOT EXECUTED 30003328: e1a0e00f mov lr, pc <== NOT EXECUTED 3000332c: e12fff11 bx r1 <== NOT EXECUTED 30003330: e1a08000 mov r8, r0 <== NOT EXECUTED 30003334: ea00000a b 30003364 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 30003338: e5952060 ldr r2, [r5, #96] <== NOT EXECUTED 3000333c: e595305c ldr r3, [r5, #92] <== NOT EXECUTED if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003340: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) 30003344: e0520003 subs r0, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 30003348: 45953064 ldrmi r3, [r5, #100] <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3000334c: e5952024 ldr r2, [r5, #36] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 30003350: 40800003 addmi r0, r0, r3 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003354: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30003358: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 3000335c: e0833000 add r3, r3, r0 <== NOT EXECUTED 30003360: e5813000 str r3, [r1] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 30003364: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30003368: eb000416 bl 300043c8 <== NOT EXECUTED args->ioctl_return = sc; 3000336c: e586800c str r8, [r6, #12] <== NOT EXECUTED return sc; } 30003370: e1a00008 mov r0, r8 <== NOT EXECUTED 30003374: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 30003378: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3000337c: 4004667f .word 0x4004667f 30003380: 4004741a .word 0x4004741a 30003384: 30015f70 .word 0x30015f70 3000350c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3000350c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30003510: e24dd00c sub sp, sp, #12 ; 0xc 30003514: e58d2008 str r2, [sp, #8] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003518: e59f23e4 ldr r2, [pc, #996] ; 30003904 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3000351c: e1a0b001 mov fp, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003520: e3a01000 mov r1, #0 ; 0x0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30003524: e1a09000 mov r9, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003528: e5920000 ldr r0, [r2] 3000352c: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30003530: e1a07003 mov r7, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003534: eb00035d bl 300042b0 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30003538: e250a000 subs sl, r0, #0 ; 0x0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 3000353c: 059f33c4 ldreq r3, [pc, #964] ; 30003908 30003540: 05935000 ldreq r5, [r3] /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30003544: 0a000007 beq 30003568 30003548: ea0000e2 b 300038d8 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 3000354c: e595300c ldr r3, [r5, #12] 30003550: e1530009 cmp r3, r9 30003554: 1a000002 bne 30003564 30003558: e5953010 ldr r3, [r5, #16] 3000355c: e153000b cmp r3, fp 30003560: 0a0000ba beq 30003850 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 30003564: e5955000 ldr r5, [r5] <== NOT EXECUTED 30003568: e3550000 cmp r5, #0 ; 0x0 3000356c: 1afffff6 bne 3000354c 30003570: ea0000db b 300038e4 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 30003574: e59f3390 ldr r3, [pc, #912] ; 3000390c 30003578: e5933000 ldr r3, [r3] 3000357c: e5853064 str r3, [r5, #100] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 30003580: e5950064 ldr r0, [r5, #100] 30003584: eb001599 bl 30008bf0 if (tty->rawInBuf.theBuf == NULL) { 30003588: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3000358c: e5850058 str r0, [r5, #88] if (tty->rawInBuf.theBuf == NULL) { 30003590: 0a000011 beq 300035dc return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 30003594: e59f3374 ldr r3, [pc, #884] ; 30003910 30003598: e5933000 ldr r3, [r3] 3000359c: e5853088 str r3, [r5, #136] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 300035a0: e5950088 ldr r0, [r5, #136] 300035a4: eb001591 bl 30008bf0 if (tty->rawOutBuf.theBuf == NULL) { 300035a8: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 300035ac: e585007c str r0, [r5, #124] if (tty->rawOutBuf.theBuf == NULL) { 300035b0: 0a000007 beq 300035d4 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 300035b4: e59f3358 ldr r3, [pc, #856] ; 30003914 300035b8: e5930000 ldr r0, [r3] 300035bc: eb00158b bl 30008bf0 if (tty->cbuf == NULL) { 300035c0: e3500000 cmp r0, #0 ; 0x0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 300035c4: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 300035c8: 1a000007 bne 300035ec free((void *)(tty->rawOutBuf.theBuf)); 300035cc: e595007c ldr r0, [r5, #124] <== NOT EXECUTED 300035d0: eb001439 bl 300086bc <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 300035d4: e5950058 ldr r0, [r5, #88] <== NOT EXECUTED 300035d8: eb001437 bl 300086bc <== NOT EXECUTED free(tty); 300035dc: e1a00005 mov r0, r5 <== NOT EXECUTED 300035e0: eb001435 bl 300086bc <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 300035e4: e3a0a01a mov sl, #26 ; 0x1a <== NOT EXECUTED 300035e8: ea0000b7 b 300038cc <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 300035ec: e59f3314 ldr r3, [pc, #788] ; 30003908 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 300035f0: e3a02000 mov r2, #0 ; 0x0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 300035f4: e5933000 ldr r3, [r3] tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 300035f8: e59f1318 ldr r1, [pc, #792] ; 30003918 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 300035fc: e1530002 cmp r3, r2 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 30003600: e5852004 str r2, [r5, #4] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 30003604: e5853000 str r3, [r5] tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 30003608: 15835004 strne r5, [r3, #4] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3000360c: e59f8308 ldr r8, [pc, #776] ; 3000391c */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 30003610: e59f32f0 ldr r3, [pc, #752] ; 30003908 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 30003614: e58520d4 str r2, [r5, #212] tty->tty_snd.sw_arg = NULL; 30003618: e58520d8 str r2, [r5, #216] tty->tty_rcv.sw_pfn = NULL; 3000361c: e58520dc str r2, [r5, #220] tty->tty_rcv.sw_arg = NULL; 30003620: e58520e0 str r2, [r5, #224] tty->tty_rcvwakeup = 0; 30003624: e58520e4 str r2, [r5, #228] 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) 30003628: e5912000 ldr r2, [r1] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3000362c: e5834000 str r4, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003630: e59f02e8 ldr r0, [pc, #744] ; 30003920 30003634: e5d83000 ldrb r3, [r8] 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) 30003638: e3520000 cmp r2, #0 ; 0x0 rtems_termios_ttyTail = tty; 3000363c: 05814000 streq r4, [r1] tty->minor = minor; 30003640: e584b010 str fp, [r4, #16] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003644: e1830000 orr r0, r3, r0 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 30003648: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3000364c: e284c014 add ip, r4, #20 ; 0x14 30003650: e3a03000 mov r3, #0 ; 0x0 30003654: e3a01001 mov r1, #1 ; 0x1 30003658: e3a02054 mov r2, #84 ; 0x54 3000365c: e58dc000 str ip, [sp] 30003660: eb000279 bl 3000404c 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) 30003664: e2503000 subs r3, r0, #0 ; 0x0 30003668: 1a000096 bne 300038c8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3000366c: e5d82000 ldrb r2, [r8] 30003670: e59f02ac ldr r0, [pc, #684] ; 30003924 30003674: e284c018 add ip, r4, #24 ; 0x18 30003678: e1820000 orr r0, r2, r0 3000367c: e3a01001 mov r1, #1 ; 0x1 30003680: e3a02054 mov r2, #84 ; 0x54 30003684: e58dc000 str ip, [sp] 30003688: eb00026f bl 3000404c 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) 3000368c: e2501000 subs r1, r0, #0 ; 0x0 30003690: 1a00008c bne 300038c8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30003694: e5d83000 ldrb r3, [r8] 30003698: e59f0288 ldr r0, [pc, #648] ; 30003928 3000369c: e284c08c add ip, r4, #140 ; 0x8c 300036a0: e1830000 orr r0, r3, r0 300036a4: e3a02020 mov r2, #32 ; 0x20 300036a8: e1a03001 mov r3, r1 300036ac: e58dc000 str ip, [sp] 300036b0: eb000265 bl 3000404c rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 300036b4: e2506000 subs r6, r0, #0 ; 0x0 300036b8: 1a000082 bne 300038c8 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 300036bc: e284c098 add ip, r4, #152 ; 0x98 300036c0: e1a0e007 mov lr, r7 300036c4: e8be000f ldm lr!, {r0, r1, r2, r3} 300036c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300036cc: e89e000f ldm lr, {r0, r1, r2, r3} 300036d0: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300036d4: e59430b4 ldr r3, [r4, #180] 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; 300036d8: e5846094 str r6, [r4, #148] tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300036dc: e3530002 cmp r3, #2 ; 0x2 300036e0: 1a000016 bne 30003740 sc = rtems_task_create ( 300036e4: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 300036e8: e59f023c ldr r0, [pc, #572] ; 3000392c <== NOT EXECUTED 300036ec: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 300036f0: e1830000 orr r0, r3, r0 <== NOT EXECUTED 300036f4: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 300036f8: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 300036fc: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 30003700: e88d1040 stm sp, {r6, ip} <== NOT EXECUTED 30003704: eb000357 bl 30004468 <== 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) 30003708: e250e000 subs lr, r0, #0 ; 0x0 <== NOT EXECUTED 3000370c: 1a00006d bne 300038c8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 30003710: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 30003714: e59f0214 ldr r0, [pc, #532] ; 30003930 <== NOT EXECUTED 30003718: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3000371c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30003720: e3a01009 mov r1, #9 ; 0x9 <== NOT EXECUTED 30003724: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 30003728: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3000372c: e58de000 str lr, [sp] <== NOT EXECUTED 30003730: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30003734: eb00034b bl 30004468 <== 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) 30003738: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3000373c: 1a000061 bne 300038c8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 30003740: e59430a0 ldr r3, [r4, #160] 30003744: e3530000 cmp r3, #0 ; 0x0 30003748: 0a000002 beq 30003758 3000374c: e59430b4 ldr r3, [r4, #180] 30003750: e3530002 cmp r3, #2 ; 0x2 30003754: 1a00000b bne 30003788 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 30003758: e59f31bc ldr r3, [pc, #444] ; 3000391c <== NOT EXECUTED 3000375c: e59f01d0 ldr r0, [pc, #464] ; 30003934 <== NOT EXECUTED 30003760: e5d33000 ldrb r3, [r3] <== NOT EXECUTED 30003764: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30003768: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3000376c: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 30003770: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 30003774: e1a03001 mov r3, r1 <== NOT EXECUTED 30003778: e58dc000 str ip, [sp] <== NOT EXECUTED 3000377c: eb000232 bl 3000404c <== 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) 30003780: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003784: 1a00004f bne 300038c8 <== NOT EXECUTED tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 30003788: e3a02000 mov r2, #0 ; 0x0 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; 3000378c: e58420b8 str r2, [r4, #184] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 30003790: e5940064 ldr r0, [r4, #100] tty->highwater = tty->rawInBuf.Size * 3/4; 30003794: e5943064 ldr r3, [r4, #100] tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 30003798: e3a0c003 mov ip, #3 ; 0x3 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; 3000379c: e001039c mul r1, ip, r3 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 300037a0: e3a0301c mov r3, #28 ; 0x1c 300037a4: e5c43042 strb r3, [r4, #66] tty->termios.c_cc[VERASE] = '\177'; 300037a8: e2833063 add r3, r3, #99 ; 0x63 300037ac: e5c43043 strb r3, [r4, #67] tty->termios.c_cc[VKILL] = '\025'; 300037b0: e3a03015 mov r3, #21 ; 0x15 300037b4: e5c43044 strb r3, [r4, #68] tty->termios.c_cc[VEOF] = '\004'; 300037b8: e3a03004 mov r3, #4 ; 0x4 300037bc: e5c43045 strb r3, [r4, #69] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 300037c0: e283300d add r3, r3, #13 ; 0xd 300037c4: e5c43049 strb r3, [r4, #73] tty->termios.c_cc[VSTOP] = '\023'; 300037c8: e2833002 add r3, r3, #2 ; 0x2 300037cc: e5c4304a strb r3, [r4, #74] tty->termios.c_cc[VSUSP] = '\032'; 300037d0: e2833007 add r3, r3, #7 ; 0x7 300037d4: e5c4304b strb r3, [r4, #75] tty->termios.c_cc[VREPRINT] = '\022'; 300037d8: e3a03012 mov r3, #18 ; 0x12 300037dc: e5c4304d strb r3, [r4, #77] tty->termios.c_cc[VDISCARD] = '\017'; 300037e0: e3a0300f mov r3, #15 ; 0xf 300037e4: e5c4304e strb r3, [r4, #78] tty->termios.c_cc[VWERASE] = '\027'; 300037e8: e2833008 add r3, r3, #8 ; 0x8 300037ec: e5c4304f strb r3, [r4, #79] tty->termios.c_cc[VLNEXT] = '\026'; 300037f0: e3a03016 mov r3, #22 ; 0x16 300037f4: e5c43050 strb r3, [r4, #80] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 300037f8: e59fe11c ldr lr, [pc, #284] ; 3000391c } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 300037fc: e59f3134 ldr r3, [pc, #308] ; 30003938 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 30003800: e5c4c041 strb ip, [r4, #65] 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'; 30003804: e5c4204c strb r2, [r4, #76] tty->termios.c_cc[VEOL2] = '\000'; 30003808: e5c42051 strb r2, [r4, #81] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3000380c: e5de2000 ldrb r2, [lr] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 30003810: e5843030 str r3, [r4, #48] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 30003814: e59f3120 ldr r3, [pc, #288] ; 3000393c tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003818: e352007a cmp r2, #122 ; 0x7a /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3000381c: e5843034 str r3, [r4, #52] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 30003820: e59f3118 ldr r3, [pc, #280] ; 30003940 /* 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; 30003824: e1a000a0 lsr r0, r0, #1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 30003828: e5843038 str r3, [r4, #56] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3000382c: e59f3110 ldr r3, [pc, #272] ; 30003944 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; 30003830: e1a01121 lsr r1, r1, #2 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 30003834: e584303c str r3, [r4, #60] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003838: e2822001 add r2, r2, #1 ; 0x1 c = 'a'; 3000383c: 03a03061 moveq r3, #97 ; 0x61 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; 30003840: e58410c0 str r1, [r4, #192] /* 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; 30003844: e58400bc str r0, [r4, #188] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003848: e5ce2000 strb r2, [lr] c = 'a'; 3000384c: 05ce3000 strbeq r3, [lr] } args->iop->data1 = tty; 30003850: e59d1008 ldr r1, [sp, #8] if (!tty->refcount++) { 30003854: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 30003858: e5912000 ldr r2, [r1] if (!tty->refcount++) { 3000385c: e3530000 cmp r3, #0 ; 0x0 30003860: e2833001 add r3, r3, #1 ; 0x1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 30003864: e5825028 str r5, [r2, #40] if (!tty->refcount++) { 30003868: e5853008 str r3, [r5, #8] 3000386c: 1a000016 bne 300038cc if (tty->device.firstOpen) 30003870: e5953098 ldr r3, [r5, #152] 30003874: e3530000 cmp r3, #0 ; 0x0 (*tty->device.firstOpen)(major, minor, arg); 30003878: 11a00009 movne r0, r9 3000387c: 11a0100b movne r1, fp 30003880: 159d2008 ldrne r2, [sp, #8] 30003884: 11a0e00f movne lr, pc 30003888: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3000388c: e59530b4 ldr r3, [r5, #180] 30003890: e3530002 cmp r3, #2 ; 0x2 30003894: 1a00000c bne 300038cc sc = rtems_task_start(tty->rxTaskId, 30003898: e59500c4 ldr r0, [r5, #196] <== NOT EXECUTED 3000389c: e59f10a4 ldr r1, [pc, #164] ; 30003948 <== NOT EXECUTED 300038a0: e1a02005 mov r2, r5 <== NOT EXECUTED 300038a4: eb00039d bl 30004720 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 300038a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300038ac: 1a000005 bne 300038c8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 300038b0: e1a02005 mov r2, r5 <== NOT EXECUTED 300038b4: e59500c8 ldr r0, [r5, #200] <== NOT EXECUTED 300038b8: e59f108c ldr r1, [pc, #140] ; 3000394c <== NOT EXECUTED 300038bc: eb000397 bl 30004720 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 300038c0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300038c4: 0a000000 beq 300038cc <== NOT EXECUTED rtems_fatal_error_occurred (sc); 300038c8: eb000432 bl 30004998 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 300038cc: e59f3030 ldr r3, [pc, #48] ; 30003904 300038d0: e5930000 ldr r0, [r3] 300038d4: eb0002bb bl 300043c8 return RTEMS_SUCCESSFUL; } 300038d8: e1a0000a mov r0, sl 300038dc: e28dd00c add sp, sp, #12 ; 0xc 300038e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 300038e4: e3a00001 mov r0, #1 ; 0x1 300038e8: e3a010e8 mov r1, #232 ; 0xe8 300038ec: eb001335 bl 300085c8 if (tty == NULL) { 300038f0: e3500000 cmp r0, #0 ; 0x0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 300038f4: e1a05000 mov r5, r0 300038f8: e1a04000 mov r4, r0 if (tty == NULL) { 300038fc: 1affff1c bne 30003574 30003900: eaffff37 b 300035e4 <== NOT EXECUTED 30003904: 3001617c .word 0x3001617c 30003908: 30016184 .word 0x30016184 3000390c: 3001596c .word 0x3001596c 30003910: 30015970 .word 0x30015970 30003914: 30015968 .word 0x30015968 30003918: 30016180 .word 0x30016180 3000391c: 30015974 .word 0x30015974 30003920: 54526900 .word 0x54526900 30003924: 54526f00 .word 0x54526f00 30003928: 54527800 .word 0x54527800 3000392c: 54785400 .word 0x54785400 30003930: 52785400 .word 0x52785400 30003934: 54527200 .word 0x54527200 30003938: 00002502 .word 0x00002502 3000393c: 00001805 .word 0x00001805 30003940: 000008bd .word 0x000008bd 30003944: 0000823b .word 0x0000823b 30003948: 300039c0 .word 0x300039c0 3000394c: 30003950 .word 0x30003950 30002454 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 30002454: e59230b4 ldr r3, [r2, #180] * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 30002458: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 3000245c: e3530000 cmp r3, #0 ; 0x0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 30002460: e1a04002 mov r4, r2 30002464: e1a0a000 mov sl, r0 30002468: e1a07001 mov r7, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 3000246c: 1a000005 bne 30002488 (*tty->device.write)(tty->minor, (void *)buf, len); 30002470: e1a01000 mov r1, r0 30002474: e1a02007 mov r2, r7 30002478: e5940010 ldr r0, [r4, #16] 3000247c: e1a0e00f mov lr, pc 30002480: e594f0a4 ldr pc, [r4, #164] 30002484: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return; } newHead = tty->rawOutBuf.Head; 30002488: e5926080 ldr r6, [r2, #128] <== NOT EXECUTED 3000248c: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 30002490: e3a0b002 mov fp, #2 ; 0x2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 30002494: e3a09001 mov r9, #1 ; 0x1 <== NOT EXECUTED 30002498: ea00002e b 30002558 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 3000249c: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 300024a0: e2860001 add r0, r6, #1 ; 0x1 <== NOT EXECUTED 300024a4: eb003f16 bl 30012104 <__umodsi3> <== NOT EXECUTED 300024a8: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_interrupt_disable (level); 300024ac: e10f5000 mrs r5, CPSR <== NOT EXECUTED 300024b0: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 300024b4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 300024b8: ea00000a b 300024e8 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 300024bc: e584b094 str fp, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 300024c0: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 300024c4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 300024c8: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 300024cc: e1a02001 mov r2, r1 <== NOT EXECUTED 300024d0: eb000776 bl 300042b0 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 300024d4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 300024d8: 1b00092e blne 30004998 <== NOT EXECUTED rtems_interrupt_disable (level); 300024dc: e10f5000 mrs r5, CPSR <== NOT EXECUTED 300024e0: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 300024e4: 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) { 300024e8: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 300024ec: e1560003 cmp r6, r3 <== NOT EXECUTED 300024f0: 0afffff1 beq 300024bc <== 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++; 300024f4: e5941080 ldr r1, [r4, #128] <== NOT EXECUTED 300024f8: e7da2008 ldrb r2, [sl, r8] <== NOT EXECUTED 300024fc: e594307c ldr r3, [r4, #124] <== NOT EXECUTED 30002500: e7c32001 strb r2, [r3, r1] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 30002504: e5943094 ldr r3, [r4, #148] <== 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; 30002508: e5846080 str r6, [r4, #128] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 3000250c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002510: 1a00000d bne 3000254c <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 30002514: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002518: e3130010 tst r3, #16 ; 0x10 <== 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; 3000251c: 159430b8 ldrne r3, [r4, #184] <== NOT EXECUTED 30002520: 13833020 orrne r3, r3, #32 ; 0x20 <== NOT EXECUTED 30002524: 158430b8 strne r3, [r4, #184] <== 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)) { 30002528: 1a000006 bne 30002548 <== NOT EXECUTED (*tty->device.write)(tty->minor, 3000252c: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 30002530: e594107c ldr r1, [r4, #124] <== NOT EXECUTED 30002534: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002538: e0811003 add r1, r1, r3 <== NOT EXECUTED 3000253c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30002540: e1a0e00f mov lr, pc <== NOT EXECUTED 30002544: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 30002548: e5849094 str r9, [r4, #148] <== NOT EXECUTED } rtems_interrupt_enable (level); 3000254c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED len--; 30002550: e2477001 sub r7, r7, #1 ; 0x1 <== NOT EXECUTED 30002554: e2888001 add r8, r8, #1 ; 0x1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 30002558: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 3000255c: 1affffce bne 3000249c <== NOT EXECUTED 30002560: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30002c20 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002c20: 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; 30002c24: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002c28: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002c2c: e5934028 ldr r4, [r3, #40] <== 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); 30002c30: e3a01000 mov r1, #0 ; 0x0 <== 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; 30002c34: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002c38: e24dd00c sub sp, sp, #12 ; 0xc <== 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); 30002c3c: e1a02001 mov r2, r1 <== NOT EXECUTED 30002c40: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 30002c44: e597800c ldr r8, [r7, #12] <== NOT EXECUTED char *buffer = args->buffer; 30002c48: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002c4c: eb000597 bl 300042b0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 30002c50: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 30002c54: 1a0000d4 bne 30002fac <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 30002c58: e59420cc ldr r2, [r4, #204] <== NOT EXECUTED 30002c5c: e59f3354 ldr r3, [pc, #852] ; 30002fb8 <== NOT EXECUTED 30002c60: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 30002c64: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 30002c68: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002c6c: 0a000005 beq 30002c88 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 30002c70: e1a01007 mov r1, r7 <== NOT EXECUTED 30002c74: e1a00004 mov r0, r4 <== NOT EXECUTED 30002c78: e1a0e00f mov lr, pc <== NOT EXECUTED 30002c7c: e12fff13 bx r3 <== NOT EXECUTED 30002c80: e1a0a000 mov sl, r0 <== NOT EXECUTED 30002c84: ea0000c4 b 30002f9c <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 30002c88: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 30002c8c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002c90: e1520003 cmp r2, r3 <== NOT EXECUTED 30002c94: 1a0000ad bne 30002f50 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 30002c98: e59430a0 ldr r3, [r4, #160] <== 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; 30002c9c: e5942028 ldr r2, [r4, #40] <== NOT EXECUTED if (tty->device.pollRead != NULL 30002ca0: e3530000 cmp r3, #0 ; 0x0 <== 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; 30002ca4: e584202c str r2, [r4, #44] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 30002ca8: e584a020 str sl, [r4, #32] <== NOT EXECUTED 30002cac: e584a024 str sl, [r4, #36] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 30002cb0: 0a00004a beq 30002de0 <== NOT EXECUTED 30002cb4: e59430b4 ldr r3, [r4, #180] <== NOT EXECUTED 30002cb8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002cbc: 1a000047 bne 30002de0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 30002cc0: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 30002cc4: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 30002cc8: 0a00000d beq 30002d04 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 30002ccc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002cd0: e1a0e00f mov lr, pc <== NOT EXECUTED 30002cd4: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED if (n < 0) { 30002cd8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 30002cdc: e1a01004 mov r1, r4 <== NOT EXECUTED 30002ce0: 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) { 30002ce4: aa000002 bge 30002cf4 <== NOT EXECUTED rtems_task_wake_after (1); 30002ce8: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30002cec: eb0006a5 bl 30004788 <== NOT EXECUTED 30002cf0: eafffff5 b 30002ccc <== NOT EXECUTED } else { if (siproc (n, tty)) 30002cf4: ebffff66 bl 30002a94 <== NOT EXECUTED 30002cf8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30002cfc: 0afffff2 beq 30002ccc <== NOT EXECUTED 30002d00: ea000092 b 30002f50 <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 30002d04: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 30002d08: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002d0c: 1a000004 bne 30002d24 <== NOT EXECUTED 30002d10: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 30002d14: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 30002d18: 13a00002 movne r0, #2 ; 0x2 <== NOT EXECUTED 30002d1c: 128d1008 addne r1, sp, #8 ; 0x8 <== NOT EXECUTED 30002d20: 1b000343 blne 30003a34 <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 30002d24: e28d6008 add r6, sp, #8 ; 0x8 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 30002d28: e28d5004 add r5, sp, #4 ; 0x4 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 30002d2c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002d30: e1a0e00f mov lr, pc <== NOT EXECUTED 30002d34: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED if (n < 0) { 30002d38: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30002d3c: aa000017 bge 30002da0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 30002d40: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 30002d44: e5d42046 ldrb r2, [r4, #70] <== NOT EXECUTED 30002d48: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002d4c: 0a000005 beq 30002d68 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 30002d50: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30002d54: 0a00000e beq 30002d94 <== NOT EXECUTED 30002d58: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002d5c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002d60: 0a00000b beq 30002d94 <== NOT EXECUTED 30002d64: ea000001 b 30002d70 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 30002d68: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30002d6c: 0a000077 beq 30002f50 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 30002d70: e1a01005 mov r1, r5 <== NOT EXECUTED 30002d74: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 30002d78: eb00032d bl 30003a34 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 30002d7c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 30002d80: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 30002d84: e5941054 ldr r1, [r4, #84] <== NOT EXECUTED 30002d88: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 30002d8c: e1530001 cmp r3, r1 <== NOT EXECUTED 30002d90: 8a00006e bhi 30002f50 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 30002d94: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30002d98: eb00067a bl 30004788 <== NOT EXECUTED 30002d9c: eaffffe2 b 30002d2c <== NOT EXECUTED } else { siproc (n, tty); 30002da0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 30002da4: e1a01004 mov r1, r4 <== NOT EXECUTED 30002da8: ebffff39 bl 30002a94 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30002dac: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 30002db0: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002db4: e1530002 cmp r3, r2 <== NOT EXECUTED 30002db8: aa000064 bge 30002f50 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 30002dbc: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30002dc0: 0affffd9 beq 30002d2c <== NOT EXECUTED 30002dc4: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 30002dc8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002dcc: 0affffd6 beq 30002d2c <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 30002dd0: e1a01006 mov r1, r6 <== NOT EXECUTED 30002dd4: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 30002dd8: eb000315 bl 30003a34 <== NOT EXECUTED 30002ddc: eaffffd2 b 30002d2c <== 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; 30002de0: e5945074 ldr r5, [r4, #116] <== 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, 30002de4: e2849049 add r9, r4, #73 ; 0x49 <== NOT EXECUTED 30002de8: e3a06001 mov r6, #1 ; 0x1 <== 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)) 30002dec: e59fb1c8 ldr fp, [pc, #456] ; 30002fbc <== NOT EXECUTED 30002df0: ea000054 b 30002f48 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 30002df4: e594005c ldr r0, [r4, #92] <== NOT EXECUTED 30002df8: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 30002dfc: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 30002e00: eb003cbf bl 30012104 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 30002e04: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 30002e08: e1a02000 mov r2, r0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 30002e0c: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 30002e10: e584005c str r0, [r4, #92] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 30002e14: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 30002e18: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 30002e1c: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 30002e20: e0800003 add r0, r0, r3 <== NOT EXECUTED 30002e24: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 30002e28: eb003cb5 bl 30012104 <__umodsi3> <== NOT EXECUTED 30002e2c: e59430bc ldr r3, [r4, #188] <== NOT EXECUTED 30002e30: e1500003 cmp r0, r3 <== NOT EXECUTED 30002e34: 2a00001e bcs 30002eb4 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 30002e38: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30002e3c: e59f2178 ldr r2, [pc, #376] ; 30002fbc <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 30002e40: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002e44: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30002e48: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002e4c: e0032002 and r2, r3, r2 <== NOT EXECUTED 30002e50: e152000b cmp r2, fp <== NOT EXECUTED 30002e54: 1a00000b bne 30002e88 <== NOT EXECUTED 30002e58: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 30002e5c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002e60: 0a000002 beq 30002e70 <== NOT EXECUTED 30002e64: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002e68: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 30002e6c: 0a000005 beq 30002e88 <== 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, 30002e70: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002e74: e1a01009 mov r1, r9 <== NOT EXECUTED 30002e78: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30002e7c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002e80: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 30002e84: ea00000a b 30002eb4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 30002e88: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002e8c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 30002e90: 0a000007 beq 30002eb4 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 30002e94: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 30002e98: e59420b0 ldr r2, [r4, #176] <== 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; 30002e9c: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 30002ea0: e3520000 cmp r2, #0 ; 0x0 <== 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; 30002ea4: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 30002ea8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30002eac: 11a0e00f movne lr, pc <== NOT EXECUTED 30002eb0: 112fff12 bxne r2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 30002eb4: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 30002eb8: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 30002ebc: 0a000005 beq 30002ed8 <== NOT EXECUTED if (siproc (c, tty)) 30002ec0: e1a00005 mov r0, r5 <== NOT EXECUTED 30002ec4: e1a01004 mov r1, r4 <== NOT EXECUTED 30002ec8: ebfffef1 bl 30002a94 <== NOT EXECUTED 30002ecc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30002ed0: 1a000007 bne 30002ef4 <== NOT EXECUTED 30002ed4: ea000007 b 30002ef8 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 30002ed8: e1a00005 mov r0, r5 <== NOT EXECUTED 30002edc: e1a01004 mov r1, r4 <== NOT EXECUTED 30002ee0: ebfffeeb bl 30002a94 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30002ee4: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 30002ee8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002eec: e1530002 cmp r3, r2 <== NOT EXECUTED 30002ef0: ba000000 blt 30002ef8 <== NOT EXECUTED 30002ef4: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 30002ef8: e5941070 ldr r1, [r4, #112] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 30002efc: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 30002f00: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 30002f04: e1520003 cmp r2, r3 <== NOT EXECUTED 30002f08: 0a000005 beq 30002f24 <== NOT EXECUTED 30002f0c: e59f20ac ldr r2, [pc, #172] ; 30002fc0 <== NOT EXECUTED 30002f10: e5923000 ldr r3, [r2] <== NOT EXECUTED 30002f14: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30002f18: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002f1c: e1520003 cmp r2, r3 <== NOT EXECUTED 30002f20: baffffb3 blt 30002df4 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 30002f24: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 30002f28: e1a05001 mov r5, r1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 30002f2c: 0a000007 beq 30002f50 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 30002f30: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 30002f34: e594106c ldr r1, [r4, #108] <== NOT EXECUTED 30002f38: e1a02005 mov r2, r5 <== NOT EXECUTED 30002f3c: eb0004db bl 300042b0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 30002f40: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30002f44: 1a000001 bne 30002f50 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 30002f48: e1a01005 mov r1, r5 <== NOT EXECUTED 30002f4c: eaffffea b 30002efc <== NOT EXECUTED 30002f50: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30002f54: ea000006 b 30002f74 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 30002f58: e594301c ldr r3, [r4, #28] <== NOT EXECUTED count--; 30002f5c: e2488001 sub r8, r8, #1 ; 0x1 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 30002f60: e7d33002 ldrb r3, [r3, r2] <== NOT EXECUTED 30002f64: e59d2000 ldr r2, [sp] <== NOT EXECUTED 30002f68: e7c23001 strb r3, [r2, r1] <== NOT EXECUTED 30002f6c: e5840024 str r0, [r4, #36] <== NOT EXECUTED count--; 30002f70: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30002f74: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 30002f78: 0a000004 beq 30002f90 <== NOT EXECUTED 30002f7c: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 30002f80: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30002f84: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30002f88: e1520003 cmp r2, r3 <== NOT EXECUTED 30002f8c: bafffff1 blt 30002f58 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 30002f90: e597300c ldr r3, [r7, #12] <== NOT EXECUTED 30002f94: e0683003 rsb r3, r8, r3 <== NOT EXECUTED 30002f98: e5873014 str r3, [r7, #20] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 30002f9c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30002fa0: e58430e4 str r3, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 30002fa4: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 30002fa8: eb000506 bl 300043c8 <== NOT EXECUTED return sc; } 30002fac: e1a0000a mov r0, sl <== NOT EXECUTED 30002fb0: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 30002fb4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30002fb8: 30015f70 .word 0x30015f70 30002fbc: 00000202 .word 0x00000202 30002fc0: 30015968 .word 0x30015968 30001f2c : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 30001f2c: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 30001f30: e59f21d8 ldr r2, [pc, #472] ; 30002110 <== 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) { 30001f34: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 30001f38: e0032002 and r2, r3, r2 <== NOT EXECUTED 30001f3c: e59f31d0 ldr r3, [pc, #464] ; 30002114 <== 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) { 30001f40: 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)) 30001f44: e1520003 cmp r2, r3 <== NOT EXECUTED 30001f48: 1a00000f bne 30001f8c <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 30001f4c: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 30001f50: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30001f54: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30001f58: e1a0e00f mov lr, pc <== NOT EXECUTED 30001f5c: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 30001f60: e10f1000 mrs r1, CPSR <== NOT EXECUTED 30001f64: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30001f68: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 30001f6c: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 30001f70: e59430b8 ldr r3, [r4, #184] <== 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--; 30001f74: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 30001f78: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 30001f7c: e58430b8 str r3, [r4, #184] <== 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--; 30001f80: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 30001f84: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30001f88: ea000012 b 30001fd8 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 30001f8c: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 30001f90: e2033003 and r3, r3, #3 ; 0x3 <== NOT EXECUTED 30001f94: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30001f98: 1a000010 bne 30001fe0 <== 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, 30001f9c: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 30001fa0: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30001fa4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30001fa8: e1a0e00f mov lr, pc <== NOT EXECUTED 30001fac: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 30001fb0: e10f1000 mrs r1, CPSR <== NOT EXECUTED 30001fb4: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30001fb8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 30001fbc: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 30001fc0: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 30001fc4: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 30001fc8: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED 30001fcc: e58430b8 str r3, [r4, #184] <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 30001fd0: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 30001fd4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30001fd8: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED 30001fdc: ea000049 b 30002108 <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 30001fe0: e5902080 ldr r2, [r0, #128] <== NOT EXECUTED 30001fe4: e5903084 ldr r3, [r0, #132] <== NOT EXECUTED 30001fe8: e1520003 cmp r2, r3 <== NOT EXECUTED 30001fec: 1a000006 bne 3000200c <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 30001ff0: e5903094 ldr r3, [r0, #148] <== NOT EXECUTED 30001ff4: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30001ff8: 1a000001 bne 30002004 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 30001ffc: e590008c ldr r0, [r0, #140] <== NOT EXECUTED 30002000: eb0008f0 bl 300043c8 <== NOT EXECUTED 30002004: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 30002008: ea00003e b 30002108 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 3000200c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30002010: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 30002014: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 30002018: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 3000201c: e590c090 ldr ip, [r0, #144] <== NOT EXECUTED tty->t_dqlen = 0; 30002020: e5803090 str r3, [r0, #144] <== NOT EXECUTED rtems_interrupt_enable(level); 30002024: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 30002028: e5900084 ldr r0, [r0, #132] <== NOT EXECUTED 3000202c: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 30002030: e08c0000 add r0, ip, r0 <== NOT EXECUTED 30002034: eb004032 bl 30012104 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 30002038: e5943094 ldr r3, [r4, #148] <== 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; 3000203c: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 30002040: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 30002044: e5840084 str r0, [r4, #132] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 30002048: 0594008c ldreq r0, [r4, #140] <== NOT EXECUTED 3000204c: 0b0008dd bleq 300043c8 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 30002050: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 30002054: e1560003 cmp r6, r3 <== NOT EXECUTED 30002058: 1a00000a bne 30002088 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 3000205c: e59420d4 ldr r2, [r4, #212] <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 30002060: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 30002064: e1520005 cmp r2, r5 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 30002068: e5845094 str r5, [r4, #148] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 3000206c: 01a05002 moveq r5, r2 <== NOT EXECUTED 30002070: 0a000023 beq 30002104 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 30002074: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 30002078: e59410d8 ldr r1, [r4, #216] <== NOT EXECUTED 3000207c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002080: e12fff12 bx r2 <== NOT EXECUTED 30002084: ea00001e b 30002104 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 30002088: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 3000208c: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 30002090: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 30002094: 1a00000a bne 300020c4 <== NOT EXECUTED == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 30002098: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3000209c: e38320c0 orr r2, r3, #192 ; 0xc0 <== NOT EXECUTED 300020a0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 300020a4: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED 300020a8: e3822020 orr r2, r2, #32 ; 0x20 <== NOT EXECUTED 300020ac: e58420b8 str r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 300020b0: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 300020b4: e5842094 str r2, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable(level); 300020b8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 300020bc: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 300020c0: ea00000f b 30002104 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 300020c4: e5943080 ldr r3, [r4, #128] <== 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, 300020c8: e594107c ldr r1, [r4, #124] <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 300020cc: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 300020d0: 85943088 ldrhi r3, [r4, #136] <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 300020d4: 95943080 ldrls r3, [r4, #128] <== 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, 300020d8: e0811006 add r1, r1, r6 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 300020dc: e0665003 rsb r5, r6, r3 <== 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)) { 300020e0: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 300020e4: e5940010 ldr r0, [r4, #16] <== 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)) { 300020e8: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 300020ec: 13a05001 movne r5, #1 ; 0x1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 300020f0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 300020f4: e5843094 str r3, [r4, #148] <== NOT EXECUTED (*tty->device.write)(tty->minor, 300020f8: e1a02005 mov r2, r5 <== NOT EXECUTED 300020fc: e1a0e00f mov lr, pc <== NOT EXECUTED 30002100: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 30002104: e5846084 str r6, [r4, #132] <== NOT EXECUTED } return nToSend; } 30002108: e1a00005 mov r0, r5 <== NOT EXECUTED 3000210c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30002110: 00000403 .word 0x00000403 30002114: 00000401 .word 0x00000401 300039c0 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 300039c0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 300039c4: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 300039c8: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 300039cc: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 300039d0: e28d6007 add r6, sp, #7 ; 0x7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 300039d4: e1a0300d mov r3, sp <== NOT EXECUTED 300039d8: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 300039dc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 300039e0: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 300039e4: eb0000a7 bl 30003c88 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 300039e8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300039ec: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 300039f0: 0a000003 beq 30003a04 <== NOT EXECUTED tty->rxTaskId = 0; 300039f4: e58450c4 str r5, [r4, #196] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 300039f8: e1a00005 mov r0, r5 <== NOT EXECUTED 300039fc: eb0002e9 bl 300045a8 <== NOT EXECUTED 30003a00: eafffff3 b 300039d4 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 30003a04: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30003a08: e1a0e00f mov lr, pc <== NOT EXECUTED 30003a0c: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED 30003a10: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 30003a14: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 30003a18: e1a01006 mov r1, r6 <== NOT EXECUTED 30003a1c: e1a00004 mov r0, r4 <== NOT EXECUTED 30003a20: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 30003a24: 0affffea beq 300039d4 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 30003a28: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 30003a2c: ebfff9d5 bl 30002188 <== NOT EXECUTED 30003a30: eaffffe7 b 300039d4 <== NOT EXECUTED 30001f20 : 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); 30001f20: e59000c4 ldr r0, [r0, #196] <== NOT EXECUTED 30001f24: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 30001f28: ea0007b6 b 30003e08 <== NOT EXECUTED 30003950 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 30003950: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30003954: e59f7060 ldr r7, [pc, #96] ; 300039bc <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 30003958: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 3000395c: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 30003960: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 30003964: e1a0300d mov r3, sp <== NOT EXECUTED 30003968: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3000396c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30003970: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 30003974: eb0000c3 bl 30003c88 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 30003978: e59d3000 ldr r3, [sp] <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); 3000397c: 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) { 30003980: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 30003984: 0a000003 beq 30003998 <== NOT EXECUTED tty->txTaskId = 0; 30003988: e58450c8 str r5, [r4, #200] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3000398c: e1a00005 mov r0, r5 <== NOT EXECUTED 30003990: eb000304 bl 300045a8 <== NOT EXECUTED 30003994: eafffff2 b 30003964 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30003998: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 3000399c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 300039a0: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 300039a4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 300039a8: 11a0e00f movne lr, pc <== NOT EXECUTED 300039ac: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 300039b0: e1a00004 mov r0, r4 <== NOT EXECUTED 300039b4: ebfff95c bl 30001f2c <== NOT EXECUTED 300039b8: eaffffe9 b 30003964 <== NOT EXECUTED 300039bc: 30015f70 .word 0x30015f70 30002af4 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002af4: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30002af8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002afc: e5937028 ldr r7, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002b00: e3a01000 mov r1, #0 ; 0x0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30002b04: e1a04000 mov r4, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002b08: e1a02001 mov r2, r1 30002b0c: e5970018 ldr r0, [r7, #24] 30002b10: eb0005e6 bl 300042b0 if (sc != RTEMS_SUCCESSFUL) 30002b14: e2508000 subs r8, r0, #0 ; 0x0 30002b18: 1a000022 bne 30002ba8 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 30002b1c: e59720cc ldr r2, [r7, #204] 30002b20: e59f3088 ldr r3, [pc, #136] ; 30002bb0 30002b24: e0833282 add r3, r3, r2, lsl #5 30002b28: e593300c ldr r3, [r3, #12] 30002b2c: e3530000 cmp r3, #0 ; 0x0 30002b30: 0a000005 beq 30002b4c sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 30002b34: e1a01004 mov r1, r4 <== NOT EXECUTED 30002b38: e1a00007 mov r0, r7 <== NOT EXECUTED 30002b3c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002b40: e12fff13 bx r3 <== NOT EXECUTED 30002b44: e1a08000 mov r8, r0 <== NOT EXECUTED 30002b48: ea000014 b 30002ba0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 30002b4c: e5973034 ldr r3, [r7, #52] 30002b50: e3130001 tst r3, #1 ; 0x1 uint32_t count = args->count; 30002b54: 1594600c ldrne r6, [r4, #12] char *buffer = args->buffer; 30002b58: 1594a008 ldrne sl, [r4, #8] 30002b5c: 11a05008 movne r5, r8 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) { 30002b60: 1a000003 bne 30002b74 30002b64: ea000007 b 30002b88 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 30002b68: e7da0005 ldrb r0, [sl, r5] 30002b6c: ebfffe7c bl 30002564 30002b70: e2855001 add r5, r5, #1 ; 0x1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 30002b74: e3560000 cmp r6, #0 ; 0x0 oproc (*buffer++, tty); 30002b78: e1a01007 mov r1, r7 30002b7c: e2466001 sub r6, r6, #1 ; 0x1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 30002b80: 1afffff8 bne 30002b68 30002b84: ea000003 b 30002b98 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 30002b88: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 30002b8c: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 30002b90: e1a02007 mov r2, r7 <== NOT EXECUTED 30002b94: ebfffe2e bl 30002454 <== NOT EXECUTED args->bytes_moved = args->count; 30002b98: e594300c ldr r3, [r4, #12] 30002b9c: e5843014 str r3, [r4, #20] } rtems_semaphore_release (tty->osem); 30002ba0: e5970018 ldr r0, [r7, #24] 30002ba4: eb000607 bl 300043c8 return sc; } 30002ba8: e1a00008 mov r0, r8 30002bac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30002bb0: 30015f70 .word 0x30015f70 300053cc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 300053cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 300053d0: e251a000 subs sl, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 300053d4: e1a07000 mov r7, r0 300053d8: e24dd004 sub sp, sp, #4 ; 0x4 300053dc: e1a06002 mov r6, r2 300053e0: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 300053e4: 03a0000a moveq r0, #10 ; 0xa 300053e8: 0a000022 beq 30005478 return RTEMS_INVALID_NUMBER; if ( !routine ) 300053ec: e3520000 cmp r2, #0 ; 0x0 300053f0: 03a00009 moveq r0, #9 ; 0x9 300053f4: 0a00001f beq 30005478 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 300053f8: e59f0080 ldr r0, [pc, #128] ; 30005480 300053fc: e1a01007 mov r1, r7 30005400: e1a0200d mov r2, sp 30005404: eb0004ab bl 300066b8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30005408: e59d3000 ldr r3, [sp] 3000540c: e1a04000 mov r4, r0 30005410: e3530000 cmp r3, #0 ; 0x0 30005414: 13a00004 movne r0, #4 ; 0x4 30005418: 1a000016 bne 30005478 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 3000541c: e2845010 add r5, r4, #16 ; 0x10 30005420: e1a00005 mov r0, r5 30005424: eb000b67 bl 300081c8 <_Watchdog_Remove> _ISR_Disable( level ); 30005428: e10f2000 mrs r2, CPSR 3000542c: e38230c0 orr r3, r2, #192 ; 0xc0 30005430: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 30005434: e5943018 ldr r3, [r4, #24] 30005438: e3530000 cmp r3, #0 ; 0x0 3000543c: 0a000001 beq 30005448 _ISR_Enable( level ); 30005440: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 30005444: ea000009 b 30005470 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30005448: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 3000544c: e584602c str r6, [r4, #44] the_watchdog->id = id; 30005450: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 30005454: e5848034 str r8, [r4, #52] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 30005458: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 3000545c: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005460: e59f001c ldr r0, [pc, #28] ; 30005484 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005464: e584a01c str sl, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005468: e1a01005 mov r1, r5 3000546c: eb000af9 bl 30008058 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 30005470: eb000694 bl 30006ec8 <_Thread_Enable_dispatch> 30005474: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30005478: e28dd004 add sp, sp, #4 ; 0x4 3000547c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30005480: 30015184 .word 0x30015184 30005484: 30014d04 .word 0x30014d04 30010c30 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 30010c30: e92d4030 push {r4, r5, lr} 30010c34: e24dd004 sub sp, sp, #4 ; 0x4 30010c38: e1a01000 mov r1, r0 30010c3c: e1a0200d mov r2, sp 30010c40: e59f00a4 ldr r0, [pc, #164] ; 30010cec 30010c44: eb0009fd bl 30013440 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30010c48: e59d3000 ldr r3, [sp] 30010c4c: e1a04000 mov r4, r0 30010c50: e3530000 cmp r3, #0 ; 0x0 30010c54: 13a00004 movne r0, #4 ; 0x4 30010c58: 1a000021 bne 30010ce4 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 30010c5c: e5943038 ldr r3, [r4, #56] 30010c60: e3530004 cmp r3, #4 ; 0x4 30010c64: 979ff103 ldrls pc, [pc, r3, lsl #2] 30010c68: ea00001b b 30010cdc <== NOT EXECUTED 30010c6c: 30010c80 .word 0x30010c80 <== NOT EXECUTED 30010c70: 30010c9c .word 0x30010c9c <== NOT EXECUTED 30010c74: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED 30010c78: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED 30010c7c: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 30010c80: e2844010 add r4, r4, #16 ; 0x10 30010c84: e1a00004 mov r0, r4 30010c88: eb0011e0 bl 30015410 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 30010c8c: e1a01004 mov r1, r4 30010c90: e59f0058 ldr r0, [pc, #88] ; 30010cf0 30010c94: eb001181 bl 300152a0 <_Watchdog_Insert> 30010c98: ea00000f b 30010cdc break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 30010c9c: e59f5050 ldr r5, [pc, #80] ; 30010cf4 30010ca0: e5953000 ldr r3, [r5] 30010ca4: e3530000 cmp r3, #0 ; 0x0 30010ca8: 1a000002 bne 30010cb8 _Thread_Enable_dispatch(); 30010cac: eb000c09 bl 30013cd8 <_Thread_Enable_dispatch> <== NOT EXECUTED 30010cb0: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED 30010cb4: ea00000a b 30010ce4 <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 30010cb8: e2840010 add r0, r4, #16 ; 0x10 30010cbc: eb0011d3 bl 30015410 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 30010cc0: e1a00004 mov r0, r4 30010cc4: e1a0e00f mov lr, pc 30010cc8: e595f000 ldr pc, [r5] 30010ccc: ea000002 b 30010cdc break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 30010cd0: eb000c00 bl 30013cd8 <_Thread_Enable_dispatch> 30010cd4: e3a0000b mov r0, #11 ; 0xb 30010cd8: ea000001 b 30010ce4 return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 30010cdc: eb000bfd bl 30013cd8 <_Thread_Enable_dispatch> 30010ce0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30010ce4: e28dd004 add sp, sp, #4 ; 0x4 30010ce8: e8bd8030 pop {r4, r5, pc} 30010cec: 300309dc .word 0x300309dc 30010cf0: 300301c4 .word 0x300301c4 30010cf4: 30030a1c .word 0x30030a1c 30010cf8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010cf8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30010cfc: e1a06000 mov r6, r0 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d00: e59f00c0 ldr r0, [pc, #192] ; 30010dc8 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d04: e24dd004 sub sp, sp, #4 ; 0x4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d08: e5900000 ldr r0, [r0] Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d0c: e1a07001 mov r7, r1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d10: e3500000 cmp r0, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d14: e1a05002 mov r5, r2 30010d18: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d1c: 0280000e addeq r0, r0, #14 ; 0xe 30010d20: 0a000026 beq 30010dc0 return RTEMS_INCORRECT_STATE; if ( !routine ) 30010d24: e3520000 cmp r2, #0 ; 0x0 30010d28: 03a00009 moveq r0, #9 ; 0x9 30010d2c: 0a000023 beq 30010dc0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 30010d30: e3510000 cmp r1, #0 ; 0x0 30010d34: 03a0000a moveq r0, #10 ; 0xa 30010d38: 0a000020 beq 30010dc0 30010d3c: e59f0088 ldr r0, [pc, #136] ; 30010dcc 30010d40: e1a01006 mov r1, r6 30010d44: e1a0200d mov r2, sp 30010d48: eb0009bc bl 30013440 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30010d4c: e59d3000 ldr r3, [sp] 30010d50: e1a04000 mov r4, r0 30010d54: e3530000 cmp r3, #0 ; 0x0 30010d58: 13a00004 movne r0, #4 ; 0x4 30010d5c: 1a000017 bne 30010dc0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 30010d60: e2840010 add r0, r4, #16 ; 0x10 30010d64: eb0011a9 bl 30015410 <_Watchdog_Remove> _ISR_Disable( level ); 30010d68: e10f1000 mrs r1, CPSR 30010d6c: e38130c0 orr r3, r1, #192 ; 0xc0 30010d70: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 30010d74: e5942018 ldr r2, [r4, #24] 30010d78: e3520000 cmp r2, #0 ; 0x0 30010d7c: 0a000001 beq 30010d88 _ISR_Enable( level ); 30010d80: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30010d84: ea00000b b 30010db8 <== NOT EXECUTED /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 30010d88: e3a03001 mov r3, #1 ; 0x1 30010d8c: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30010d90: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 30010d94: e584502c str r5, [r4, #44] the_watchdog->id = id; 30010d98: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 30010d9c: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 30010da0: e584701c str r7, [r4, #28] _ISR_Enable( level ); 30010da4: e129f001 msr CPSR_fc, r1 /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 30010da8: e59f3020 ldr r3, [pc, #32] ; 30010dd0 30010dac: e1a00004 mov r0, r4 30010db0: e1a0e00f mov lr, pc 30010db4: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 30010db8: eb000bc6 bl 30013cd8 <_Thread_Enable_dispatch> 30010dbc: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30010dc0: e28dd004 add sp, sp, #4 ; 0x4 30010dc4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30010dc8: 30030a20 .word 0x30030a20 30010dcc: 300309dc .word 0x300309dc 30010dd0: 30030a1c .word 0x30030a1c 30004ed0 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 30004ed0: 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) 30004ed4: e2109202 ands r9, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 30004ed8: e1a08000 mov r8, r0 <== NOT EXECUTED 30004edc: e1a05001 mov r5, r1 <== NOT EXECUTED 30004ee0: e1a0a002 mov sl, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 30004ee4: 0a00000d beq 30004f20 <== NOT EXECUTED { if (rtems_panic_in_progress++) 30004ee8: e59f2168 ldr r2, [pc, #360] ; 30005058 <== NOT EXECUTED 30004eec: e5923000 ldr r3, [r2] <== NOT EXECUTED 30004ef0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30004ef4: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30004ef8: e5823000 str r3, [r2] <== NOT EXECUTED 30004efc: 0a000003 beq 30004f10 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30004f00: e59f2154 ldr r2, [pc, #340] ; 3000505c <== NOT EXECUTED 30004f04: e5923000 ldr r3, [r2] <== NOT EXECUTED 30004f08: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30004f0c: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 30004f10: e59f3140 ldr r3, [pc, #320] ; 30005058 <== NOT EXECUTED 30004f14: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004f18: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30004f1c: ca00004b bgt 30005050 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30004f20: e59f3138 ldr r3, [pc, #312] ; 30005060 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 30004f24: e3c86207 bic r6, r8, #1879048192 ; 0x70000000 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30004f28: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004f2c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30004f30: eb003a73 bl 30013904 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 30004f34: e2180101 ands r0, r8, #1073741824 ; 0x40000000 <== NOT EXECUTED 30004f38: 01a07000 moveq r7, r0 <== NOT EXECUTED 30004f3c: 0a000001 beq 30004f48 <== NOT EXECUTED local_errno = errno; 30004f40: eb0039af bl 30013604 <__errno> <== NOT EXECUTED 30004f44: e5907000 ldr r7, [r0] <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 30004f48: e59f4110 ldr r4, [pc, #272] ; 30005060 <== NOT EXECUTED 30004f4c: e1a01005 mov r1, r5 <== NOT EXECUTED 30004f50: e5943000 ldr r3, [r4] <== NOT EXECUTED 30004f54: e1a0200a mov r2, sl <== NOT EXECUTED 30004f58: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30004f5c: eb00535a bl 30019ccc <== NOT EXECUTED if (status) 30004f60: e3560000 cmp r6, #0 ; 0x0 <== 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); 30004f64: e1a05000 mov r5, r0 <== NOT EXECUTED if (status) 30004f68: 0a000009 beq 30004f94 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30004f6c: e5943000 ldr r3, [r4] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 30004f70: e1a01006 mov r1, r6 <== NOT EXECUTED 30004f74: e59f00e8 ldr r0, [pc, #232] ; 30005064 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30004f78: e593400c ldr r4, [r3, #12] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 30004f7c: eb00259e bl 3000e5fc <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30004f80: e59f10e0 ldr r1, [pc, #224] ; 30005068 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 30004f84: e1a02000 mov r2, r0 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30004f88: e1a00004 mov r0, r4 <== NOT EXECUTED 30004f8c: eb003baf bl 30013e50 <== NOT EXECUTED 30004f90: e0855000 add r5, r5, r0 <== NOT EXECUTED if (local_errno) 30004f94: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 30004f98: 0a000015 beq 30004ff4 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 30004f9c: da00000d ble 30004fd8 <== NOT EXECUTED 30004fa0: e1a00007 mov r0, r7 <== NOT EXECUTED 30004fa4: eb004733 bl 30016c78 <== NOT EXECUTED 30004fa8: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 30004fac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30004fb0: 0a000008 beq 30004fd8 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 30004fb4: e59f30a4 ldr r3, [pc, #164] ; 30005060 <== NOT EXECUTED 30004fb8: e1a00007 mov r0, r7 <== NOT EXECUTED 30004fbc: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004fc0: e593400c ldr r4, [r3, #12] <== NOT EXECUTED 30004fc4: eb00472b bl 30016c78 <== NOT EXECUTED 30004fc8: e59f109c ldr r1, [pc, #156] ; 3000506c <== NOT EXECUTED 30004fcc: e1a02000 mov r2, r0 <== NOT EXECUTED 30004fd0: e1a00004 mov r0, r4 <== NOT EXECUTED 30004fd4: ea000004 b 30004fec <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 30004fd8: e59f3080 ldr r3, [pc, #128] ; 30005060 <== NOT EXECUTED 30004fdc: e59f108c ldr r1, [pc, #140] ; 30005070 <== NOT EXECUTED 30004fe0: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004fe4: e1a02007 mov r2, r7 <== NOT EXECUTED 30004fe8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30004fec: eb003b97 bl 30013e50 <== NOT EXECUTED 30004ff0: e0855000 add r5, r5, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 30004ff4: e59f4064 ldr r4, [pc, #100] ; 30005060 <== NOT EXECUTED 30004ff8: e59f1074 ldr r1, [pc, #116] ; 30005074 <== NOT EXECUTED 30004ffc: e5943000 ldr r3, [r4] <== NOT EXECUTED 30005000: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30005004: eb003b91 bl 30013e50 <== NOT EXECUTED (void) fflush(stderr); 30005008: e5943000 ldr r3, [r4] <== 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"); 3000500c: e1a06000 mov r6, r0 <== NOT EXECUTED (void) fflush(stderr); 30005010: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30005014: eb003a3a bl 30013904 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 30005018: e3180203 tst r8, #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"); 3000501c: 00860005 addeq r0, r6, r5 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 30005020: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 30005024: e3590000 cmp r9, #0 ; 0x0 <== NOT EXECUTED 30005028: 0a000004 beq 30005040 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 3000502c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30005030: e59f1040 ldr r1, [pc, #64] ; 30005078 <== NOT EXECUTED 30005034: eb00001a bl 300050a4 <== NOT EXECUTED _exit(local_errno); 30005038: e1a00007 mov r0, r7 <== NOT EXECUTED 3000503c: eb0001e0 bl 300057c4 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 30005040: e59f1034 ldr r1, [pc, #52] ; 3000507c <== NOT EXECUTED 30005044: e1a00009 mov r0, r9 <== NOT EXECUTED 30005048: eb000015 bl 300050a4 <== NOT EXECUTED abort(); 3000504c: eb003963 bl 300135e0 <== NOT EXECUTED 30005050: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } } return chars_written; } 30005054: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30005058: 30024260 .word 0x30024260 3000505c: 300243ec .word 0x300243ec 30005060: 3002348c .word 0x3002348c 30005064: 3001eb40 .word 0x3001eb40 30005068: 300203a6 .word 0x300203a6 3000506c: 300203b4 .word 0x300203b4 30005070: 300203c1 .word 0x300203c1 30005074: 30020886 .word 0x30020886 30005078: 300203d5 .word 0x300203d5 3000507c: 300203ea .word 0x300203ea 300050ac : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 300050ac: e92d4010 push {r4, lr} void *ptr; /* * check the arguments */ if ( !pointer ) 300050b0: e2514000 subs r4, r1, #0 ; 0x0 300050b4: 0a000008 beq 300050dc return false; if ( !bytes ) 300050b8: e3500000 cmp r0, #0 ; 0x0 300050bc: 0a000006 beq 300050dc return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 300050c0: e1a01000 mov r1, r0 300050c4: e59f0018 ldr r0, [pc, #24] ; 300050e4 300050c8: eb00051e bl 30006548 <_Protected_heap_Allocate> if (!ptr) 300050cc: e3500000 cmp r0, #0 ; 0x0 return false; *pointer = ptr; 300050d0: 15840000 strne r0, [r4] 300050d4: 13a00001 movne r0, #1 ; 0x1 /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 300050d8: 18bd8010 popne {r4, pc} return false; *pointer = ptr; return true; 300050dc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 300050e0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300050e4: 3001ac0c .word 0x3001ac0c 3000509c : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 3000509c: e1a01000 mov r1, r0 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 300050a0: e59f0000 ldr r0, [pc, #0] ; 300050a8 <== NOT EXECUTED 300050a4: ea000536 b 30006584 <_Protected_heap_Free> <== NOT EXECUTED 300050a8: 3001ac0c .word 0x3001ac0c 3001bda0 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 3001bda0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 3001bda4: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 3001bda8: e59fb0cc ldr fp, [pc, #204] ; 3001be7c <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 3001bdac: e1a06000 mov r6, r0 <== NOT EXECUTED 3001bdb0: e1a0a001 mov sl, r1 <== NOT EXECUTED 3001bdb4: e3e08102 mvn r8, #-2147483648 ; 0x80000000 <== NOT EXECUTED 3001bdb8: e1a05007 mov r5, r7 <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 3001bdbc: e3a0900a mov r9, #10 ; 0xa <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 3001bdc0: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED 3001bdc4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3001bdc8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001bdcc: e5863004 str r3, [r6, #4] <== NOT EXECUTED 3001bdd0: a5963000 ldrge r3, [r6] <== NOT EXECUTED 3001bdd4: a4d34001 ldrbge r4, [r3], #1 <== NOT EXECUTED 3001bdd8: a5863000 strge r3, [r6] <== NOT EXECUTED 3001bddc: aa000004 bge 3001bdf4 <== NOT EXECUTED 3001bde0: e59f3098 ldr r3, [pc, #152] ; 3001be80 <== NOT EXECUTED 3001bde4: e1a01006 mov r1, r6 <== NOT EXECUTED 3001bde8: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001bdec: eb004afa bl 3002e9dc <__srget_r> <== NOT EXECUTED 3001bdf0: e1a04000 mov r4, r0 <== NOT EXECUTED if (c == ':') 3001bdf4: e354003a cmp r4, #58 ; 0x3a <== NOT EXECUTED 3001bdf8: 0a000018 beq 3001be60 <== NOT EXECUTED break; if (sign == 0) { 3001bdfc: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 3001be00: 1a000004 bne 3001be18 <== NOT EXECUTED if (c == '-') { 3001be04: e354002d cmp r4, #45 ; 0x2d <== NOT EXECUTED sign = -1; limit++; 3001be08: 02888001 addeq r8, r8, #1 ; 0x1 <== NOT EXECUTED 3001be0c: 03e05000 mvneq r5, #0 ; 0x0 <== NOT EXECUTED for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 3001be10: 0affffea beq 3001bdc0 <== NOT EXECUTED sign = -1; limit++; continue; 3001be14: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 3001be18: e59b3000 ldr r3, [fp] <== NOT EXECUTED 3001be1c: e7d33004 ldrb r3, [r3, r4] <== NOT EXECUTED 3001be20: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 3001be24: 0a000012 beq 3001be74 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 3001be28: e1a00008 mov r0, r8 <== NOT EXECUTED 3001be2c: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 3001be30: eb007905 bl 3003a24c <__aeabi_uidiv> <== NOT EXECUTED 3001be34: e1570000 cmp r7, r0 <== NOT EXECUTED 3001be38: 8a00000d bhi 3001be74 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 3001be3c: e2444030 sub r4, r4, #48 ; 0x30 <== NOT EXECUTED if ((i > (limit / 10)) 3001be40: 1a000004 bne 3001be58 <== NOT EXECUTED 3001be44: e1a00008 mov r0, r8 <== NOT EXECUTED 3001be48: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 3001be4c: eb007992 bl 3003a49c <__umodsi3> <== NOT EXECUTED 3001be50: e1540000 cmp r4, r0 <== NOT EXECUTED 3001be54: 8a000006 bhi 3001be74 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 3001be58: e0274799 mla r7, r9, r7, r4 <== NOT EXECUTED 3001be5c: eaffffd7 b 3001bdc0 <== NOT EXECUTED } if (sign == 0) 3001be60: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED return 0; *val = i * sign; 3001be64: 10030597 mulne r3, r7, r5 <== NOT EXECUTED 3001be68: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 3001be6c: 158a3000 strne r3, [sl] <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 3001be70: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED return 0; *val = i * sign; return 1; 3001be74: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001be78: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 3001be7c: 30042e1c .word 0x30042e1c 3001be80: 30042e28 .word 0x30042e28 3001be84 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 3001be84: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 3001be88: e1a04002 mov r4, r2 <== NOT EXECUTED int c; *name = *bufp; 3001be8c: e5922000 ldr r2, [r2] <== NOT EXECUTED /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 3001be90: e59d7018 ldr r7, [sp, #24] <== NOT EXECUTED int c; *name = *bufp; for (;;) { c = getc(fp); 3001be94: e59f80c4 ldr r8, [pc, #196] ; 3001bf60 <== NOT EXECUTED static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 3001be98: e5812000 str r2, [r1] <== NOT EXECUTED /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 3001be9c: e1a05000 mov r5, r0 <== NOT EXECUTED 3001bea0: e1a06003 mov r6, r3 <== NOT EXECUTED int c; *name = *bufp; for (;;) { c = getc(fp); 3001bea4: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 3001bea8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3001beac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001beb0: e5853004 str r3, [r5, #4] <== NOT EXECUTED 3001beb4: a5953000 ldrge r3, [r5] <== NOT EXECUTED 3001beb8: a4d30001 ldrbge r0, [r3], #1 <== NOT EXECUTED 3001bebc: a5853000 strge r3, [r5] <== NOT EXECUTED 3001bec0: b5980000 ldrlt r0, [r8] <== NOT EXECUTED 3001bec4: b1a01005 movlt r1, r5 <== NOT EXECUTED 3001bec8: bb004ac3 bllt 3002e9dc <__srget_r> <== NOT EXECUTED if (c == ':') { 3001becc: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 3001bed0: 1a000002 bne 3001bee0 <== NOT EXECUTED if (nlFlag) 3001bed4: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 3001bed8: 0a000013 beq 3001bf2c <== NOT EXECUTED 3001bedc: ea00001d b 3001bf58 <== NOT EXECUTED return 0; break; } if (c == '\n') { 3001bee0: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 3001bee4: 1a000002 bne 3001bef4 <== NOT EXECUTED if (!nlFlag) 3001bee8: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 3001beec: 1a00000e bne 3001bf2c <== NOT EXECUTED 3001bef0: ea000018 b 3001bf58 <== NOT EXECUTED return 0; break; } if (c == EOF) 3001bef4: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 3001bef8: 0a000016 beq 3001bf58 <== NOT EXECUTED return 0; if (*nleft < 2) 3001befc: e5963000 ldr r3, [r6] <== NOT EXECUTED 3001bf00: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 3001bf04: 9a000013 bls 3001bf58 <== NOT EXECUTED return 0; **bufp = c; 3001bf08: e5943000 ldr r3, [r4] <== NOT EXECUTED 3001bf0c: e5c30000 strb r0, [r3] <== NOT EXECUTED ++(*bufp); 3001bf10: e5943000 ldr r3, [r4] <== NOT EXECUTED --(*nleft); 3001bf14: e5962000 ldr r2, [r6] <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 3001bf18: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 3001bf1c: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 3001bf20: e5843000 str r3, [r4] <== NOT EXECUTED --(*nleft); 3001bf24: e5862000 str r2, [r6] <== NOT EXECUTED 3001bf28: eaffffdd b 3001bea4 <== NOT EXECUTED } **bufp = '\0'; 3001bf2c: e5942000 ldr r2, [r4] <== NOT EXECUTED 3001bf30: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3001bf34: e5c23000 strb r3, [r2] <== NOT EXECUTED ++(*bufp); 3001bf38: e5943000 ldr r3, [r4] <== NOT EXECUTED --(*nleft); 3001bf3c: e5962000 ldr r2, [r6] <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 3001bf40: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 3001bf44: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 3001bf48: e5843000 str r3, [r4] <== NOT EXECUTED --(*nleft); 3001bf4c: e5862000 str r2, [r6] <== NOT EXECUTED 3001bf50: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3001bf54: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return 1; 3001bf58: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001bf5c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3001bf60: 30042e28 .word 0x30042e28 300041f4 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 300041f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 300041f8: e24dd050 sub sp, sp, #80 ; 0x50 300041fc: e58d1000 str r1, [sp] 30004200: e1a09002 mov r9, r2 30004204: e1a0b003 mov fp, r3 struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 30004208: ebfffdff bl 30003a0c 3000420c: e250a000 subs sl, r0, #0 ; 0x0 30004210: 0a00005b beq 30004384 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 30004214: e28d4004 add r4, sp, #4 ; 0x4 30004218: e59a0000 ldr r0, [sl] 3000421c: e1a01004 mov r1, r4 30004220: eb001ac3 bl 3000ad34 30004224: e3500000 cmp r0, #0 ; 0x0 30004228: ba000046 blt 30004348 /* * estimate the array size by taking the size of the directory file * and dividing it by a multiple of the minimum size entry. */ arraysz = (stb.st_size / 24); 3000422c: e59d0024 ldr r0, [sp, #36] 30004230: e3a01018 mov r1, #24 ; 0x18 30004234: eb003885 bl 30012450 <__aeabi_idiv> 30004238: e1a08000 mov r8, r0 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 3000423c: e1a00100 lsl r0, r0, #2 30004240: ebfffc10 bl 30003288 if (names == NULL) 30004244: e2505000 subs r5, r0, #0 ; 0x0 30004248: 13a06000 movne r6, #0 ; 0x0 3000424c: 1a00002c bne 30004304 30004250: ea00003d b 3000434c goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { if (select != NULL && !(*select)(d)) 30004254: e3590000 cmp r9, #0 ; 0x0 30004258: 0a000003 beq 3000426c 3000425c: e1a0e00f mov lr, pc 30004260: e12fff19 bx r9 30004264: e3500000 cmp r0, #0 ; 0x0 30004268: 0a000025 beq 30004304 continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 3000426c: e1d400ba ldrh r0, [r4, #10] 30004270: e2800004 add r0, r0, #4 ; 0x4 30004274: e3c00003 bic r0, r0, #3 ; 0x3 30004278: e280000c add r0, r0, #12 ; 0xc 3000427c: ebfffc01 bl 30003288 if (p == NULL) 30004280: e2507000 subs r7, r0, #0 ; 0x0 goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 30004284: e284100c add r1, r4, #12 ; 0xc 30004288: e287000c add r0, r7, #12 ; 0xc continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) 3000428c: 0a00002f beq 30004350 goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; 30004290: e1d4c0ba ldrh ip, [r4, #10] * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; 30004294: e5943000 ldr r3, [r4] p->d_reclen = d->d_reclen; 30004298: e1d440b8 ldrh r4, [r4, #8] p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 3000429c: e28c2001 add r2, ip, #1 ; 0x1 * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; 300042a0: e5873000 str r3, [r7] strncpy(p->d_name, d->d_name, p->d_namlen + 1); /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 300042a4: e2866001 add r6, r6, #1 ; 0x1 */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; 300042a8: e1c740b8 strh r4, [r7, #8] p->d_namlen = d->d_namlen; 300042ac: e1c7c0ba strh ip, [r7, #10] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 300042b0: eb003060 bl 30010438 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 300042b4: e1560008 cmp r6, r8 300042b8: 3a00000d bcc 300042f4 if (fstat(dirp->dd_fd, &stb) < 0) 300042bc: e28d1004 add r1, sp, #4 ; 0x4 <== NOT EXECUTED 300042c0: e59a0000 ldr r0, [sl] <== NOT EXECUTED 300042c4: eb001a9a bl 3000ad34 <== NOT EXECUTED 300042c8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 300042cc: e3a0100c mov r1, #12 ; 0xc <== NOT EXECUTED /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { if (fstat(dirp->dd_fd, &stb) < 0) 300042d0: ba00001e blt 30004350 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 300042d4: e59d0024 ldr r0, [sp, #36] <== NOT EXECUTED 300042d8: eb00385c bl 30012450 <__aeabi_idiv> <== NOT EXECUTED 300042dc: e1a08000 mov r8, r0 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 300042e0: e1a01108 lsl r1, r8, #2 <== NOT EXECUTED 300042e4: e1a00005 mov r0, r5 <== NOT EXECUTED 300042e8: eb001b2b bl 3000af9c <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 300042ec: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 300042f0: 0a000016 beq 30004350 <== NOT EXECUTED goto cleanup_and_bail; } names[nitems-1] = p; 300042f4: e2663001 rsb r3, r6, #1 ; 0x1 300042f8: e3e02003 mvn r2, #3 ; 0x3 300042fc: e0030392 mul r3, r2, r3 30004300: e7857003 str r7, [r5, r3] arraysz = (stb.st_size / 24); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 30004304: e1a0000a mov r0, sl 30004308: ebffff36 bl 30003fe8 3000430c: e2504000 subs r4, r0, #0 ; 0x0 30004310: 1affffcf bne 30004254 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 30004314: e1a0000a mov r0, sl 30004318: ebfff90f bl 3000275c if (nitems && dcomp != NULL){ 3000431c: e3560000 cmp r6, #0 ; 0x0 30004320: 135b0000 cmpne fp, #0 ; 0x0 qsort(names, nitems, sizeof(struct dirent *), 30004324: 11a0300b movne r3, fp 30004328: 11a00005 movne r0, r5 3000432c: 11a01006 movne r1, r6 30004330: 13a02004 movne r2, #4 ; 0x4 30004334: 1b002cfe blne 3000f734 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 30004338: e59d3000 ldr r3, [sp] return(nitems); 3000433c: e1a00006 mov r0, r6 closedir(dirp); if (nitems && dcomp != NULL){ qsort(names, nitems, sizeof(struct dirent *), (int (*)(const void *, const void *)) dcomp); } *namelist = names; 30004340: e5835000 str r5, [r3] 30004344: ea00000f b 30004388 return(nitems); 30004348: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 3000434c: e1a06005 mov r6, r5 cleanup_and_bail: if ( dirp ) closedir( dirp ); 30004350: e1a0000a mov r0, sl 30004354: ebfff900 bl 3000275c if ( names ) { 30004358: e3550000 cmp r5, #0 ; 0x0 3000435c: 13a04000 movne r4, #0 ; 0x0 30004360: 0a000007 beq 30004384 30004364: ea000002 b 30004374 <== NOT EXECUTED for (i=0; i < nitems; i++ ) free( names[i] ); 30004368: e7950104 ldr r0, [r5, r4, lsl #2] <== NOT EXECUTED 3000436c: ebfffa25 bl 30002c08 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 30004370: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED 30004374: e1540006 cmp r4, r6 <== NOT EXECUTED 30004378: 3afffffa bcc 30004368 <== NOT EXECUTED free( names[i] ); free( names ); 3000437c: e1a00005 mov r0, r5 <== NOT EXECUTED 30004380: ebfffa20 bl 30002c08 <== NOT EXECUTED 30004384: e3e00000 mvn r0, #0 ; 0x0 } return(-1); } 30004388: e28dd050 add sp, sp, #80 ; 0x50 3000438c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3001bf64 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 3001bf64: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 3001bf68: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3001bf6c: e28d6008 add r6, sp, #8 ; 0x8 <== NOT EXECUTED 3001bf70: e28d7004 add r7, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 3001bf74: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 3001bf78: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3001bf7c: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED 3001bf80: e1a02006 mov r2, r6 <== NOT EXECUTED 3001bf84: e1a03007 mov r3, r7 <== NOT EXECUTED 3001bf88: e58d8000 str r8, [sp] <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 3001bf8c: e1a04000 mov r4, r0 <== NOT EXECUTED 3001bf90: e1a05001 mov r5, r1 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3001bf94: ebffffba bl 3001be84 <== NOT EXECUTED 3001bf98: e1500008 cmp r0, r8 <== NOT EXECUTED 3001bf9c: 0a00003d beq 3001c098 <== NOT EXECUTED 3001bfa0: e1a00004 mov r0, r4 <== NOT EXECUTED 3001bfa4: e2851004 add r1, r5, #4 ; 0x4 <== NOT EXECUTED 3001bfa8: e1a02006 mov r2, r6 <== NOT EXECUTED 3001bfac: e1a03007 mov r3, r7 <== NOT EXECUTED 3001bfb0: e58d8000 str r8, [sp] <== NOT EXECUTED 3001bfb4: ebffffb2 bl 3001be84 <== NOT EXECUTED 3001bfb8: e1500008 cmp r0, r8 <== NOT EXECUTED 3001bfbc: 0a000035 beq 3001c098 <== NOT EXECUTED 3001bfc0: e1a00004 mov r0, r4 <== NOT EXECUTED 3001bfc4: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 3001bfc8: ebffff74 bl 3001bda0 <== NOT EXECUTED 3001bfcc: e1500008 cmp r0, r8 <== NOT EXECUTED 3001bfd0: 0a000030 beq 3001c098 <== NOT EXECUTED 3001bfd4: e1a00004 mov r0, r4 <== NOT EXECUTED 3001bfd8: e1a02006 mov r2, r6 <== NOT EXECUTED 3001bfdc: e1a03007 mov r3, r7 <== NOT EXECUTED 3001bfe0: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 3001bfe4: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 3001bfe8: e58d4000 str r4, [sp] <== NOT EXECUTED 3001bfec: ebffffa4 bl 3001be84 <== NOT EXECUTED 3001bff0: e1500008 cmp r0, r8 <== NOT EXECUTED 3001bff4: 0a000027 beq 3001c098 <== NOT EXECUTED || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 3001bff8: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001bffc: e1a02008 mov r2, r8 <== NOT EXECUTED 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; 3001c000: e1c530b8 strh r3, [r5, #8] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001c004: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED 3001c008: e1a03004 mov r3, r4 <== NOT EXECUTED 3001c00c: ea000001 b 3001c018 <== NOT EXECUTED if(*cp == ',') 3001c010: e351002c cmp r1, #44 ; 0x2c <== NOT EXECUTED memcount++; 3001c014: 02833001 addeq r3, r3, #1 ; 0x1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001c018: e7d01002 ldrb r1, [r0, r2] <== NOT EXECUTED if(*cp == ',') memcount++; 3001c01c: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001c020: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 3001c024: 1afffff9 bne 3001c010 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 3001c028: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 3001c02c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 3001c030: e2833013 add r3, r3, #19 ; 0x13 <== NOT EXECUTED 3001c034: e1520003 cmp r2, r3 <== NOT EXECUTED 3001c038: 3a000016 bcc 3001c098 <== NOT EXECUTED return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 3001c03c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 3001c040: e1a0e001 mov lr, r1 <== NOT EXECUTED /* * 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); 3001c044: e283300f add r3, r3, #15 ; 0xf <== NOT EXECUTED 3001c048: e3c3300f bic r3, r3, #15 ; 0xf <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 3001c04c: e5830000 str r0, [r3] <== NOT EXECUTED /* * 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); 3001c050: e585300c str r3, [r5, #12] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 3001c054: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3001c058: e3a0c001 mov ip, #1 ; 0x1 <== NOT EXECUTED 3001c05c: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 3001c060: ea000005 b 3001c07c <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 3001c064: e352002c cmp r2, #44 ; 0x2c <== NOT EXECUTED *cp = '\0'; 3001c068: 0541e001 strbeq lr, [r1, #-1] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 3001c06c: 0595300c ldreq r3, [r5, #12] <== NOT EXECUTED 3001c070: 0783110c streq r1, [r3, ip, lsl #2] <== NOT EXECUTED 3001c074: 028cc001 addeq ip, ip, #1 ; 0x1 <== NOT EXECUTED 3001c078: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001c07c: e5512001 ldrb r2, [r1, #-1] <== NOT EXECUTED 3001c080: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3001c084: 1afffff6 bne 3001c064 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 3001c088: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 3001c08c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3001c090: e783210c str r2, [r3, ip, lsl #2] <== NOT EXECUTED 3001c094: ea000000 b 3001c09c <== NOT EXECUTED return 1; 3001c098: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001c09c: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 3001c0a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3001c0e8 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 3001c0e8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 3001c0ec: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3001c0f0: e28d7008 add r7, sp, #8 ; 0x8 <== NOT EXECUTED 3001c0f4: e28d8004 add r8, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 3001c0f8: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 3001c0fc: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3001c100: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 3001c104: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c108: e1a03008 mov r3, r8 <== NOT EXECUTED 3001c10c: e58d6000 str r6, [sp] <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 3001c110: e1a04000 mov r4, r0 <== NOT EXECUTED 3001c114: e1a05001 mov r5, r1 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3001c118: ebffff59 bl 3001be84 <== NOT EXECUTED 3001c11c: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c120: 0a000038 beq 3001c208 <== NOT EXECUTED 3001c124: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c128: e2851004 add r1, r5, #4 ; 0x4 <== NOT EXECUTED 3001c12c: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c130: e1a03008 mov r3, r8 <== NOT EXECUTED 3001c134: e58d6000 str r6, [sp] <== NOT EXECUTED 3001c138: ebffff51 bl 3001be84 <== NOT EXECUTED 3001c13c: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c140: 0a000030 beq 3001c208 <== NOT EXECUTED 3001c144: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c148: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 3001c14c: ebffff13 bl 3001bda0 <== NOT EXECUTED 3001c150: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c154: 0a00002b beq 3001c208 <== NOT EXECUTED 3001c158: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c15c: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 3001c160: ebffff0e bl 3001bda0 <== NOT EXECUTED 3001c164: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c168: 0a000026 beq 3001c208 <== NOT EXECUTED 3001c16c: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c170: e285100c add r1, r5, #12 ; 0xc <== NOT EXECUTED 3001c174: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c178: e1a03008 mov r3, r8 <== NOT EXECUTED 3001c17c: e58d6000 str r6, [sp] <== NOT EXECUTED 3001c180: ebffff3f bl 3001be84 <== NOT EXECUTED 3001c184: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c188: 0a00001e beq 3001c208 <== NOT EXECUTED 3001c18c: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c190: e2851010 add r1, r5, #16 ; 0x10 <== NOT EXECUTED 3001c194: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c198: e1a03008 mov r3, r8 <== NOT EXECUTED 3001c19c: e58d6000 str r6, [sp] <== NOT EXECUTED 3001c1a0: ebffff37 bl 3001be84 <== NOT EXECUTED 3001c1a4: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c1a8: 0a000016 beq 3001c208 <== NOT EXECUTED 3001c1ac: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c1b0: e2851014 add r1, r5, #20 ; 0x14 <== NOT EXECUTED 3001c1b4: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c1b8: e1a03008 mov r3, r8 <== NOT EXECUTED 3001c1bc: e58d6000 str r6, [sp] <== NOT EXECUTED 3001c1c0: ebffff2f bl 3001be84 <== NOT EXECUTED 3001c1c4: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c1c8: 0a00000e beq 3001c208 <== NOT EXECUTED 3001c1cc: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c1d0: e1a02007 mov r2, r7 <== NOT EXECUTED 3001c1d4: e1a03008 mov r3, r8 <== NOT EXECUTED 3001c1d8: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 3001c1dc: e2851018 add r1, r5, #24 ; 0x18 <== NOT EXECUTED 3001c1e0: e58d4000 str r4, [sp] <== NOT EXECUTED 3001c1e4: ebffff26 bl 3001be84 <== NOT EXECUTED 3001c1e8: e1500006 cmp r0, r6 <== NOT EXECUTED 3001c1ec: 0a000005 beq 3001c208 <== NOT EXECUTED || !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; 3001c1f0: e1dd30bc ldrh r3, [sp, #12] <== NOT EXECUTED 3001c1f4: e1a00004 mov r0, r4 <== NOT EXECUTED 3001c1f8: e1c530ba strh r3, [r5, #10] <== NOT EXECUTED || !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; 3001c1fc: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED 3001c200: e1c530b8 strh r3, [r5, #8] <== NOT EXECUTED 3001c204: ea000000 b 3001c20c <== NOT EXECUTED pwd->pw_gid = pwgid; return 1; 3001c208: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001c20c: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 3001c210: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 30006818 : */ int sem_destroy( sem_t *sem ) { 30006818: e92d4010 push {r4, lr} 3000681c: e24dd004 sub sp, sp, #4 ; 0x4 30006820: e5901000 ldr r1, [r0] 30006824: e1a0200d mov r2, sp 30006828: e59f0048 ldr r0, [pc, #72] ; 30006878 3000682c: eb00085b bl 300089a0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 30006830: e59d3000 ldr r3, [sp] 30006834: e3530000 cmp r3, #0 ; 0x0 30006838: 1a000008 bne 30006860 case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 3000683c: e5d04014 ldrb r4, [r0, #20] 30006840: e3540000 cmp r4, #0 ; 0x0 30006844: 0a000001 beq 30006850 _Thread_Enable_dispatch(); 30006848: eb000a58 bl 300091b0 <_Thread_Enable_dispatch> <== NOT EXECUTED 3000684c: ea000003 b 30006860 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 30006850: eb001874 bl 3000ca28 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 30006854: eb000a55 bl 300091b0 <_Thread_Enable_dispatch> 30006858: e1a00004 mov r0, r4 3000685c: ea000003 b 30006870 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 30006860: eb002076 bl 3000ea40 <__errno> 30006864: e3a03016 mov r3, #22 ; 0x16 30006868: e5803000 str r3, [r0] 3000686c: e3e00000 mvn r0, #0 ; 0x0 } 30006870: e28dd004 add sp, sp, #4 ; 0x4 30006874: e8bd8010 pop {r4, pc} 30006878: 3001c760 .word 0x3001c760 300068d4 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 300068d4: e92d4010 push {r4, lr} int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 300068d8: e2504000 subs r4, r0, #0 ; 0x0 int sem_init( sem_t *sem, int pshared, unsigned int value ) { 300068dc: e24dd004 sub sp, sp, #4 ; 0x4 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 300068e0: 1a000004 bne 300068f8 rtems_set_errno_and_return_minus_one( EINVAL ); 300068e4: eb002055 bl 3000ea40 <__errno> <== NOT EXECUTED 300068e8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300068ec: e5803000 str r3, [r0] <== NOT EXECUTED 300068f0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300068f4: ea000006 b 30006914 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 300068f8: e1a0300d mov r3, sp 300068fc: e3a00000 mov r0, #0 ; 0x0 30006900: eb00180a bl 3000c930 <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 30006904: e3700001 cmn r0, #1 ; 0x1 *sem = the_semaphore->Object.id; 30006908: 159d3000 ldrne r3, [sp] 3000690c: 15933008 ldrne r3, [r3, #8] 30006910: 15843000 strne r3, [r4] return status; } 30006914: e28dd004 add sp, sp, #4 ; 0x4 30006918: e8bd8010 pop {r4, pc} 3001bd58 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 3001bd58: e59f300c ldr r3, [pc, #12] ; 3001bd6c <== NOT EXECUTED 3001bd5c: e5933000 ldr r3, [r3] <== NOT EXECUTED 3001bd60: e1c302bc strh r0, [r3, #44] <== NOT EXECUTED return 0; } 3001bd64: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001bd68: e12fff1e bx lr <== NOT EXECUTED 3001bd6c: 30041ee4 .word 0x30041ee4 3001c320 : return NULL; return &grent; } void setgrent(void) { 3001c320: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 3001c324: ebffffcb bl 3001c258 <== NOT EXECUTED if (group_fp != NULL) 3001c328: e59f3020 ldr r3, [pc, #32] ; 3001c350 <== NOT EXECUTED 3001c32c: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001c330: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(group_fp); 3001c334: 1b003793 blne 3002a188 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 3001c338: e59f0014 ldr r0, [pc, #20] ; 3001c354 <== NOT EXECUTED 3001c33c: e59f1014 ldr r1, [pc, #20] ; 3001c358 <== NOT EXECUTED 3001c340: eb003983 bl 3002a954 <== NOT EXECUTED 3001c344: e59f3004 ldr r3, [pc, #4] ; 3001c350 <== NOT EXECUTED 3001c348: e5830000 str r0, [r3] <== NOT EXECUTED } 3001c34c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001c350: 30055cb8 .word 0x30055cb8 3001c354: 3003f323 .word 0x3003f323 3001c358: 3003dabc .word 0x3003dabc 3001c518 : return NULL; return &pwent; } void setpwent(void) { 3001c518: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 3001c51c: ebffff4d bl 3001c258 <== NOT EXECUTED if (passwd_fp != NULL) 3001c520: e59f3020 ldr r3, [pc, #32] ; 3001c548 <== NOT EXECUTED 3001c524: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001c528: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(passwd_fp); 3001c52c: 1b003715 blne 3002a188 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 3001c530: e59f0014 ldr r0, [pc, #20] ; 3001c54c <== NOT EXECUTED 3001c534: e59f1014 ldr r1, [pc, #20] ; 3001c550 <== NOT EXECUTED 3001c538: eb003905 bl 3002a954 <== NOT EXECUTED 3001c53c: e59f3004 ldr r3, [pc, #4] ; 3001c548 <== NOT EXECUTED 3001c540: e5830000 str r0, [r3] <== NOT EXECUTED } 3001c544: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001c548: 30055bd0 .word 0x30055bd0 3001c54c: 3003f2b0 .word 0x3003f2b0 3001c550: 3003dabc .word 0x3003dabc 30003e5c : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 30003e5c: e59f300c ldr r3, [pc, #12] ; 30003e70 <== NOT EXECUTED 30003e60: e5933000 ldr r3, [r3] <== NOT EXECUTED 30003e64: e1c302ba strh r0, [r3, #42] <== NOT EXECUTED return 0; } 30003e68: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30003e6c: e12fff1e bx lr <== NOT EXECUTED 30003e70: 30041ee4 .word 0x30041ee4 300064b4 : int sigwait( const sigset_t *set, int *sig ) { 300064b4: e92d4010 push {r4, lr} 300064b8: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 300064bc: e3a01000 mov r1, #0 ; 0x0 300064c0: e1a02001 mov r2, r1 300064c4: ebffff8d bl 30006300 if ( status != -1 ) { 300064c8: e3700001 cmn r0, #1 ; 0x1 300064cc: 0a000004 beq 300064e4 if ( sig ) 300064d0: e3540000 cmp r4, #0 ; 0x0 *sig = status; 300064d4: 15840000 strne r0, [r4] int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 300064d8: 01a00004 moveq r0, r4 *sig = status; 300064dc: 13a00000 movne r0, #0 ; 0x0 300064e0: e8bd8010 pop {r4, pc} return 0; } return errno; 300064e4: eb001ed8 bl 3000e04c <__errno> <== NOT EXECUTED 300064e8: e5900000 ldr r0, [r0] <== NOT EXECUTED } 300064ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30002a94 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30002a94: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 30002a98: e59f2050 ldr r2, [pc, #80] ; 30002af0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30002a9c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30002aa0: e0032002 and r2, r3, r2 <== NOT EXECUTED 30002aa4: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30002aa8: e1a05001 mov r5, r1 <== NOT EXECUTED 30002aac: e20040ff and r4, 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)) { 30002ab0: 0a00000b beq 30002ae4 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002ab4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30002ab8: e1a02001 mov r2, r1 <== NOT EXECUTED 30002abc: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30002ac0: eb0005fa bl 300042b0 <== NOT EXECUTED i = iproc (c, tty); 30002ac4: e1a01005 mov r1, r5 <== NOT EXECUTED 30002ac8: e1a00004 mov r0, r4 <== NOT EXECUTED 30002acc: ebffff8b bl 30002900 <== NOT EXECUTED 30002ad0: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 30002ad4: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30002ad8: eb00063a bl 300043c8 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 30002adc: e1a00004 mov r0, r4 <== NOT EXECUTED 30002ae0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 30002ae4: e1a00004 mov r0, r4 <== NOT EXECUTED } return i; } 30002ae8: 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); 30002aec: eaffff83 b 30002900 <== NOT EXECUTED 30002af0: 00000e78 .word 0x00000e78 300051b4 : int _STAT_NAME( const char *path, struct stat *buf ) { 300051b4: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 300051b8: e2514000 subs r4, r1, #0 ; 0x0 int _STAT_NAME( const char *path, struct stat *buf ) { 300051bc: e24dd010 sub sp, sp, #16 ; 0x10 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 300051c0: 1a000002 bne 300051d0 rtems_set_errno_and_return_minus_one( EFAULT ); 300051c4: eb00939e bl 3002a044 <__errno> 300051c8: e3a0300e mov r3, #14 ; 0xe 300051cc: ea000014 b 30005224 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 300051d0: e3a01000 mov r1, #0 ; 0x0 300051d4: e1a0200d mov r2, sp 300051d8: e3a03001 mov r3, #1 ; 0x1 300051dc: ebfffa86 bl 30003bfc if ( status != 0 ) 300051e0: e3500000 cmp r0, #0 ; 0x0 */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 300051e4: e1a0500d mov r5, sp if ( status != 0 ) 300051e8: 1a00000e bne 30005228 return -1; if ( !loc.handlers->fstat_h ){ 300051ec: e59d3004 ldr r3, [sp, #4] 300051f0: e5933018 ldr r3, [r3, #24] 300051f4: e3530000 cmp r3, #0 ; 0x0 300051f8: 1a00000c bne 30005230 rtems_filesystem_freenode( &loc ); 300051fc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30005200: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30005204: 0a000004 beq 3000521c <== NOT EXECUTED 30005208: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000520c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30005210: 11a0000d movne r0, sp <== NOT EXECUTED 30005214: 11a0e00f movne lr, pc <== NOT EXECUTED 30005218: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000521c: eb009388 bl 3002a044 <__errno> <== NOT EXECUTED 30005220: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30005224: e5803000 str r3, [r0] 30005228: e3e04000 mvn r4, #0 ; 0x0 3000522c: ea000011 b 30005278 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 30005230: e1a01000 mov r1, r0 30005234: e3a0204c mov r2, #76 ; 0x4c 30005238: e1a00004 mov r0, r4 3000523c: eb009d88 bl 3002c864 status = (*loc.handlers->fstat_h)( &loc, buf ); 30005240: e1a01004 mov r1, r4 30005244: e59d3004 ldr r3, [sp, #4] 30005248: e1a0000d mov r0, sp 3000524c: e1a0e00f mov lr, pc 30005250: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 30005254: e59d3008 ldr r3, [sp, #8] * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 30005258: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3000525c: e3530000 cmp r3, #0 ; 0x0 30005260: 0a000004 beq 30005278 30005264: e593301c ldr r3, [r3, #28] 30005268: e3530000 cmp r3, #0 ; 0x0 3000526c: 11a0000d movne r0, sp 30005270: 11a0e00f movne lr, pc 30005274: 112fff13 bxne r3 return status; } 30005278: e1a00004 mov r0, r4 3000527c: e28dd010 add sp, sp, #16 ; 0x10 30005280: e8bd8030 pop {r4, r5, pc} 3001d428 : int symlink( const char *actualpath, const char *sympath ) { 3001d428: e92d4070 push {r4, r5, r6, lr} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 3001d42c: e5d13000 ldrb r3, [r1] int symlink( const char *actualpath, const char *sympath ) { 3001d430: e24dd014 sub sp, sp, #20 ; 0x14 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 3001d434: e353005c cmp r3, #92 ; 0x5c 3001d438: 1353002f cmpne r3, #47 ; 0x2f int symlink( const char *actualpath, const char *sympath ) { 3001d43c: e1a04001 mov r4, r1 3001d440: e1a06000 mov r6, r0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 3001d444: 13a02000 movne r2, #0 ; 0x0 3001d448: 03a02001 moveq r2, #1 ; 0x1 3001d44c: 0a000001 beq 3001d458 3001d450: e3530000 cmp r3, #0 ; 0x0 3001d454: 1a000005 bne 3001d470 3001d458: e59f30cc ldr r3, [pc, #204] ; 3001d52c 3001d45c: e1a0c00d mov ip, sp 3001d460: e5933000 ldr r3, [r3] 3001d464: e3a0e001 mov lr, #1 ; 0x1 3001d468: e2833014 add r3, r3, #20 ; 0x14 3001d46c: ea000004 b 3001d484 3001d470: e59f30b4 ldr r3, [pc, #180] ; 3001d52c 3001d474: e1a0c00d mov ip, sp 3001d478: e5933000 ldr r3, [r3] 3001d47c: e1a0e002 mov lr, r2 3001d480: e2833004 add r3, r3, #4 ; 0x4 3001d484: e893000f ldm r3, {r0, r1, r2, r3} 3001d488: e88c000f stm ip, {r0, r1, r2, r3} result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 3001d48c: e084000e add r0, r4, lr 3001d490: e1a0100d mov r1, sp 3001d494: e28d2010 add r2, sp, #16 ; 0x10 3001d498: e59d3008 ldr r3, [sp, #8] 3001d49c: e1a0e00f mov lr, pc 3001d4a0: e593f004 ldr pc, [r3, #4] if ( result != 0 ) 3001d4a4: e3500000 cmp r0, #0 ; 0x0 int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 3001d4a8: e1a0500d mov r5, sp if ( result != 0 ) 3001d4ac: 1a00000b bne 3001d4e0 return -1; if ( !loc.ops->symlink_h ) { 3001d4b0: e59d3008 ldr r3, [sp, #8] 3001d4b4: e593c038 ldr ip, [r3, #56] 3001d4b8: e35c0000 cmp ip, #0 ; 0x0 3001d4bc: 1a000009 bne 3001d4e8 rtems_filesystem_freenode( &loc ); 3001d4c0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001d4c4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d4c8: 11a0000d movne r0, sp <== NOT EXECUTED 3001d4cc: 11a0e00f movne lr, pc <== NOT EXECUTED 3001d4d0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001d4d4: eb0032da bl 3002a044 <__errno> <== NOT EXECUTED 3001d4d8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001d4dc: e5803000 str r3, [r0] <== NOT EXECUTED 3001d4e0: e3e04000 mvn r4, #0 ; 0x0 3001d4e4: ea00000d b 3001d520 } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 3001d4e8: e1a01006 mov r1, r6 3001d4ec: e1a0000d mov r0, sp 3001d4f0: e59d2010 ldr r2, [sp, #16] 3001d4f4: e1a0e00f mov lr, pc 3001d4f8: e12fff1c bx ip rtems_filesystem_freenode( &loc ); 3001d4fc: e59d3008 ldr r3, [sp, #8] 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); 3001d500: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001d504: e3530000 cmp r3, #0 ; 0x0 3001d508: 0a000004 beq 3001d520 3001d50c: e593301c ldr r3, [r3, #28] 3001d510: e3530000 cmp r3, #0 ; 0x0 3001d514: 11a0000d movne r0, sp 3001d518: 11a0e00f movne lr, pc 3001d51c: 112fff13 bxne r3 return result; } 3001d520: e1a00004 mov r0, r4 3001d524: e28dd014 add sp, sp, #20 ; 0x14 3001d528: e8bd8070 pop {r4, r5, r6, pc} 3001d52c: 30041ee4 .word 0x30041ee4 3000f040 : int tcgetattr( int fd, struct termios *tp ) { 3000f040: e1a02001 mov r2, r1 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 3000f044: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000f048: ea000e78 b 30012a30 <== NOT EXECUTED 3000f04c : int fd, int opt, struct termios *tp ) { switch (opt) { 3000f04c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED int tcsetattr( int fd, int opt, struct termios *tp ) { 3000f050: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3000f054: e1a05002 mov r5, r2 <== NOT EXECUTED 3000f058: e1a04000 mov r4, r0 <== NOT EXECUTED switch (opt) { 3000f05c: 0a00000a beq 3000f08c <== NOT EXECUTED 3000f060: e3510001 cmp r1, #1 ; 0x1 <== NOT EXECUTED 3000f064: 0a000003 beq 3000f078 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000f068: eb001165 bl 30013604 <__errno> <== NOT EXECUTED 3000f06c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000f070: e5803000 str r3, [r0] <== NOT EXECUTED 3000f074: ea000009 b 3000f0a0 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 3000f078: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 3000f07c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3000f080: eb000e6a bl 30012a30 <== NOT EXECUTED 3000f084: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3000f088: ba000004 blt 3000f0a0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 3000f08c: e1a00004 mov r0, r4 <== NOT EXECUTED 3000f090: e1a02005 mov r2, r5 <== NOT EXECUTED 3000f094: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED } } 3000f098: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 3000f09c: ea000e63 b 30012a30 <== NOT EXECUTED } } 3000f0a0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3000f0a4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30004494 : DIR *dirp ) { rtems_libio_t *iop; if ( !dirp ) 30004494: e3500000 cmp r0, #0 ; 0x0 #include long telldir( DIR *dirp ) { 30004498: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; if ( !dirp ) 3000449c: 1a000004 bne 300044b4 rtems_set_errno_and_return_minus_one( EBADF ); 300044a0: eb002827 bl 3000e544 <__errno> <== NOT EXECUTED 300044a4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 300044a8: e5803000 str r3, [r0] <== NOT EXECUTED 300044ac: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300044b0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 300044b4: e59f3040 ldr r3, [pc, #64] ; 300044fc 300044b8: e5901000 ldr r1, [r0] 300044bc: e5933000 ldr r3, [r3] 300044c0: e1510003 cmp r1, r3 300044c4: 2a000005 bcs 300044e0 300044c8: e59f3030 ldr r3, [pc, #48] ; 30004500 300044cc: e5932000 ldr r2, [r3] 300044d0: e3a03034 mov r3, #52 ; 0x34 300044d4: e0202193 mla r0, r3, r1, r2 if (iop == NULL) 300044d8: e3500000 cmp r0, #0 ; 0x0 300044dc: 1a000004 bne 300044f4 assert(0); 300044e0: e59f001c ldr r0, [pc, #28] ; 30004504 <== NOT EXECUTED 300044e4: e3a0102c mov r1, #44 ; 0x2c <== NOT EXECUTED 300044e8: e59f2018 ldr r2, [pc, #24] ; 30004508 <== NOT EXECUTED 300044ec: e59f3018 ldr r3, [pc, #24] ; 3000450c <== NOT EXECUTED 300044f0: ebfff836 bl 300025d0 <__assert_func> <== NOT EXECUTED return (long)( iop->offset ); 300044f4: e5900008 ldr r0, [r0, #8] } 300044f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300044fc: 30015aa4 .word 0x30015aa4 30004500: 300168a0 .word 0x300168a0 30004504: 30015561 .word 0x30015561 30004508: 30014154 .word 0x30014154 3000450c: 30014b86 .word 0x30014b86 300054b8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 300054b8: e92d40f0 push {r4, r5, r6, r7, lr} Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 300054bc: e2525000 subs r5, r2, #0 ; 0x0 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 300054c0: e24dd018 sub sp, sp, #24 ; 0x18 300054c4: e1a07000 mov r7, r0 300054c8: e1a06003 mov r6, r3 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 300054cc: 0a000054 beq 30005624 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 300054d0: e59f2164 ldr r2, [pc, #356] ; 3000563c 300054d4: e595300c ldr r3, [r5, #12] 300054d8: e1530002 cmp r3, r2 300054dc: 8a000050 bhi 30005624 300054e0: e5953004 ldr r3, [r5, #4] 300054e4: e1530002 cmp r3, r2 300054e8: 8a00004d bhi 30005624 300054ec: e3530000 cmp r3, #0 ; 0x0 300054f0: ba00004b blt 30005624 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 300054f4: e3510004 cmp r1, #4 ; 0x4 300054f8: 13510000 cmpne r1, #0 ; 0x0 300054fc: 1a000048 bne 30005624 } normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 30005500: e3510004 cmp r1, #4 ; 0x4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 30005504: e28dc004 add ip, sp, #4 ; 0x4 30005508: e895000f ldm r5, {r0, r1, r2, r3} 3000550c: e88c000f stm ip, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 30005510: 1a000009 bne 3000553c /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 30005514: e28c4008 add r4, ip, #8 ; 0x8 30005518: e59f0120 ldr r0, [pc, #288] ; 30005640 3000551c: e1a01004 mov r1, r4 30005520: eb000da0 bl 30008ba8 <_Timespec_Greater_than> 30005524: e3500000 cmp r0, #0 ; 0x0 30005528: 1a00003d bne 30005624 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 3000552c: e1a01004 mov r1, r4 30005530: e59f0108 ldr r0, [pc, #264] ; 30005640 30005534: e1a02004 mov r2, r4 30005538: eb000da7 bl 30008bdc <_Timespec_Subtract> 3000553c: e1a01007 mov r1, r7 30005540: e59f00fc ldr r0, [pc, #252] ; 30005644 30005544: e28d2014 add r2, sp, #20 ; 0x14 30005548: eb0007f5 bl 30007524 <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 3000554c: e59d3014 ldr r3, [sp, #20] 30005550: e1a04000 mov r4, r0 30005554: e3530000 cmp r3, #0 ; 0x0 30005558: 1a000031 bne 30005624 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 3000555c: e59d300c ldr r3, [sp, #12] 30005560: e3530000 cmp r3, #0 ; 0x0 30005564: 1a00000f bne 300055a8 30005568: e59d3010 ldr r3, [sp, #16] 3000556c: e3530000 cmp r3, #0 ; 0x0 30005570: 1a00000c bne 300055a8 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 30005574: e2800010 add r0, r0, #16 ; 0x10 30005578: eb000ecc bl 300090b0 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 3000557c: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 30005580: 12843054 addne r3, r4, #84 ; 0x54 30005584: 1893000f ldmne r3, {r0, r1, r2, r3} 30005588: 1886000f stmne r6, {r0, r1, r2, r3} /* The new data are set */ ptimer->timer_data = normalize; 3000558c: e284c054 add ip, r4, #84 ; 0x54 30005590: e28d3004 add r3, sp, #4 ; 0x4 30005594: e893000f ldm r3, {r0, r1, r2, r3} 30005598: e88c000f stm ip, {r0, r1, r2, r3} /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 3000559c: e3a03004 mov r3, #4 ; 0x4 300055a0: e5c4303c strb r3, [r4, #60] 300055a4: ea00001b b 30005618 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 300055a8: e1a00005 mov r0, r5 300055ac: eb000d9b bl 30008c20 <_Timespec_To_ticks> 300055b0: e5840064 str r0, [r4, #100] initial_period = _Timespec_To_ticks( &normalize.it_value ); 300055b4: e28d000c add r0, sp, #12 ; 0xc 300055b8: eb000d98 bl 30008c20 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 300055bc: e58d4000 str r4, [sp] return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); initial_period = _Timespec_To_ticks( &normalize.it_value ); 300055c0: e1a01000 mov r1, r0 activated = _POSIX_Timer_Insert_helper( 300055c4: e5942008 ldr r2, [r4, #8] 300055c8: e2840010 add r0, r4, #16 ; 0x10 300055cc: e59f3074 ldr r3, [pc, #116] ; 30005648 300055d0: eb0017d5 bl 3000b52c <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 300055d4: e2505000 subs r5, r0, #0 ; 0x0 300055d8: 1a000002 bne 300055e8 _Thread_Enable_dispatch(); 300055dc: eb0009d4 bl 30007d34 <_Thread_Enable_dispatch> <== NOT EXECUTED 300055e0: e1a00005 mov r0, r5 <== NOT EXECUTED 300055e4: ea000012 b 30005634 <== NOT EXECUTED /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 300055e8: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 300055ec: 12843054 addne r3, r4, #84 ; 0x54 300055f0: 1893000f ldmne r3, {r0, r1, r2, r3} 300055f4: 1886000f stmne r6, {r0, r1, r2, r3} ptimer->timer_data = normalize; 300055f8: e284c054 add ip, r4, #84 ; 0x54 300055fc: e28d3004 add r3, sp, #4 ; 0x4 30005600: e893000f ldm r3, {r0, r1, r2, r3} 30005604: e88c000f stm ip, {r0, r1, r2, r3} /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 30005608: e3a03003 mov r3, #3 ; 0x3 3000560c: e5c4303c strb r3, [r4, #60] _TOD_Get( &ptimer->time ); 30005610: e284006c add r0, r4, #108 ; 0x6c 30005614: eb0005ab bl 30006cc8 <_TOD_Get> _Thread_Enable_dispatch(); 30005618: eb0009c5 bl 30007d34 <_Thread_Enable_dispatch> 3000561c: e3a00000 mov r0, #0 ; 0x0 30005620: ea000003 b 30005634 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 30005624: eb001ee8 bl 3000d1cc <__errno> 30005628: e3a03016 mov r3, #22 ; 0x16 3000562c: e5803000 str r3, [r0] 30005630: e3e00000 mvn r0, #0 ; 0x0 } 30005634: e28dd018 add sp, sp, #24 ; 0x18 30005638: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000563c: 3b9ac9ff .word 0x3b9ac9ff 30005640: 3001aa54 .word 0x3001aa54 30005644: 3001aca0 .word 0x3001aca0 30005648: 3000564c .word 0x3000564c 3001d69c : */ char *ttyname( int fd ) { 3001d69c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 3001d6a0: e59f1018 ldr r1, [pc, #24] ; 3001d6c0 <== NOT EXECUTED 3001d6a4: e59f2018 ldr r2, [pc, #24] ; 3001d6c4 <== NOT EXECUTED 3001d6a8: ebffffbd bl 3001d5a4 <== NOT EXECUTED 3001d6ac: e59f300c ldr r3, [pc, #12] ; 3001d6c0 <== NOT EXECUTED return ttyname_buf; return NULL; } 3001d6b0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001d6b4: 01a00003 moveq r0, r3 <== NOT EXECUTED 3001d6b8: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 3001d6bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001d6c0: 30041ee8 .word 0x30041ee8 3001d6c4: 00000406 .word 0x00000406 3001d5a4 : int ttyname_r( int fd, char *name, size_t namesize ) { 3001d5a4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3001d5a8: e24dd0bc sub sp, sp, #188 ; 0xbc <== NOT EXECUTED 3001d5ac: e1a06001 mov r6, r1 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 3001d5b0: e28d1098 add r1, sp, #152 ; 0x98 <== NOT EXECUTED int ttyname_r( int fd, char *name, size_t namesize ) { 3001d5b4: e1a04000 mov r4, r0 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 3001d5b8: ebffffdf bl 3001d53c <== NOT EXECUTED 3001d5bc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001d5c0: ba00000e blt 3001d600 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 3001d5c4: e1a00004 mov r0, r4 <== NOT EXECUTED 3001d5c8: e28d104c add r1, sp, #76 ; 0x4c <== NOT EXECUTED 3001d5cc: ebfff843 bl 3001b6e0 <== NOT EXECUTED 3001d5d0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001d5d4: 1a000009 bne 3001d600 <== NOT EXECUTED 3001d5d8: e59d3058 ldr r3, [sp, #88] <== NOT EXECUTED 3001d5dc: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 3001d5e0: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED 3001d5e4: 1a000005 bne 3001d600 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 3001d5e8: e59f00a8 ldr r0, [pc, #168] ; 3001d698 <== NOT EXECUTED 3001d5ec: ebfffdd9 bl 3001cd58 <== NOT EXECUTED 3001d5f0: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 3001d5f4: 12865005 addne r5, r6, #5 ; 0x5 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 3001d5f8: 11a0700d movne r7, sp <== NOT EXECUTED /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 3001d5fc: 1a00001c bne 3001d674 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); 3001d600: eb00328f bl 3002a044 <__errno> <== NOT EXECUTED 3001d604: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001d608: e5803000 str r3, [r0] <== NOT EXECUTED 3001d60c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001d610: ea00001e b 3001d690 <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) 3001d614: e5902000 ldr r2, [r0] <== NOT EXECUTED 3001d618: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 3001d61c: e1520003 cmp r2, r3 <== NOT EXECUTED 3001d620: 1a000013 bne 3001d674 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 3001d624: e280100c add r1, r0, #12 ; 0xc <== NOT EXECUTED 3001d628: e1a00005 mov r0, r5 <== NOT EXECUTED 3001d62c: eb00472d bl 3002f2e8 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 3001d630: e1a00006 mov r0, r6 <== NOT EXECUTED 3001d634: e1a0100d mov r1, sp <== NOT EXECUTED 3001d638: ebff9edd bl 300051b4 <== NOT EXECUTED 3001d63c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001d640: 1a00000b bne 3001d674 <== NOT EXECUTED 3001d644: e59d2000 ldr r2, [sp] <== NOT EXECUTED 3001d648: e59d304c ldr r3, [sp, #76] <== NOT EXECUTED 3001d64c: e1530002 cmp r3, r2 <== NOT EXECUTED 3001d650: 1a000007 bne 3001d674 <== NOT EXECUTED 3001d654: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 3001d658: e59d3050 ldr r3, [sp, #80] <== NOT EXECUTED 3001d65c: e1530002 cmp r3, r2 <== NOT EXECUTED 3001d660: 1a000003 bne 3001d674 <== NOT EXECUTED 3001d664: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 3001d668: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 3001d66c: e1530002 cmp r3, r2 <== NOT EXECUTED 3001d670: 0a000003 beq 3001d684 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 3001d674: e1a00004 mov r0, r4 <== NOT EXECUTED 3001d678: ebfffe6b bl 3001d02c <== NOT EXECUTED 3001d67c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001d680: 1affffe3 bne 3001d614 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 3001d684: e1a00004 mov r0, r4 <== NOT EXECUTED 3001d688: eb00285d bl 30027804 <== NOT EXECUTED 3001d68c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return 0; } 3001d690: e28dd0bc add sp, sp, #188 ; 0xbc <== NOT EXECUTED 3001d694: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 3001d698: 3003f3fe .word 0x3003f3fe 3001d6e4 : #include int unlink( const char *path ) { 3001d6e4: e92d4030 push {r4, r5, lr} /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 3001d6e8: e3a01000 mov r1, #0 ; 0x0 #include int unlink( const char *path ) { 3001d6ec: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 3001d6f0: e1a0200d mov r2, sp 3001d6f4: e1a03001 mov r3, r1 3001d6f8: ebff993f bl 30003bfc if ( result != 0 ) 3001d6fc: e3500000 cmp r0, #0 ; 0x0 3001d700: 1a000041 bne 3001d80c return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 3001d704: e2800002 add r0, r0, #2 ; 0x2 3001d708: e1a0100d mov r1, sp 3001d70c: ebff9913 bl 30003b60 if (result != 0 && errno != ENOTSUP) { 3001d710: e3500000 cmp r0, #0 ; 0x0 3001d714: 0a00000d beq 3001d750 3001d718: eb003249 bl 3002a044 <__errno> <== NOT EXECUTED 3001d71c: e5903000 ldr r3, [r0] <== NOT EXECUTED 3001d720: e3530086 cmp r3, #134 ; 0x86 <== NOT EXECUTED 3001d724: 0a000009 beq 3001d750 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3001d728: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001d72c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d730: 0a000035 beq 3001d80c <== NOT EXECUTED 3001d734: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001d738: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d73c: 0a000032 beq 3001d80c <== NOT EXECUTED 3001d740: e1a0000d mov r0, sp <== NOT EXECUTED 3001d744: e1a0e00f mov lr, pc <== NOT EXECUTED 3001d748: e12fff13 bx r3 <== NOT EXECUTED 3001d74c: ea00002e b 3001d80c <== NOT EXECUTED return -1; } if ( !loc.ops->node_type_h ) { 3001d750: e59d3008 ldr r3, [sp, #8] 3001d754: e5932010 ldr r2, [r3, #16] 3001d758: e3520000 cmp r2, #0 ; 0x0 3001d75c: 0a000013 beq 3001d7b0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 3001d760: e1a0000d mov r0, sp 3001d764: e1a0e00f mov lr, pc 3001d768: e12fff12 bx r2 3001d76c: e3500001 cmp r0, #1 ; 0x1 3001d770: e1a0500d mov r5, sp 3001d774: e59d3008 ldr r3, [sp, #8] 3001d778: 1a000009 bne 3001d7a4 rtems_filesystem_freenode( &loc ); 3001d77c: e3530000 cmp r3, #0 ; 0x0 3001d780: 0a000004 beq 3001d798 3001d784: e593301c ldr r3, [r3, #28] 3001d788: e3530000 cmp r3, #0 ; 0x0 3001d78c: 11a0000d movne r0, sp 3001d790: 11a0e00f movne lr, pc 3001d794: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EISDIR ); 3001d798: eb003229 bl 3002a044 <__errno> 3001d79c: e3a03015 mov r3, #21 ; 0x15 3001d7a0: ea000009 b 3001d7cc } if ( !loc.ops->unlink_h ) { 3001d7a4: e593200c ldr r2, [r3, #12] 3001d7a8: e3520000 cmp r2, #0 ; 0x0 3001d7ac: 1a000008 bne 3001d7d4 rtems_filesystem_freenode( &loc ); 3001d7b0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001d7b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001d7b8: 11a0000d movne r0, sp <== NOT EXECUTED 3001d7bc: 11a0e00f movne lr, pc <== NOT EXECUTED 3001d7c0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001d7c4: eb00321e bl 3002a044 <__errno> <== NOT EXECUTED 3001d7c8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001d7cc: e5803000 str r3, [r0] 3001d7d0: ea00000d b 3001d80c } result = (*loc.ops->unlink_h)( &loc ); 3001d7d4: e1a0000d mov r0, sp 3001d7d8: e1a0e00f mov lr, pc 3001d7dc: e12fff12 bx r2 rtems_filesystem_freenode( &loc ); 3001d7e0: e59d3008 ldr r3, [sp, #8] if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 3001d7e4: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001d7e8: e3530000 cmp r3, #0 ; 0x0 3001d7ec: 0a000007 beq 3001d810 3001d7f0: e593301c ldr r3, [r3, #28] 3001d7f4: e3530000 cmp r3, #0 ; 0x0 3001d7f8: 0a000004 beq 3001d810 3001d7fc: e1a0000d mov r0, sp 3001d800: e1a0e00f mov lr, pc 3001d804: e12fff13 bx r3 3001d808: ea000000 b 3001d810 3001d80c: e3e04000 mvn r4, #0 ; 0x0 return result; } 3001d810: e1a00004 mov r0, r4 3001d814: e28dd010 add sp, sp, #16 ; 0x10 3001d818: e8bd8030 pop {r4, r5, pc} 3001d878 : */ int unmount( const char *path ) { 3001d878: e92d4030 push {r4, r5, lr} 3001d87c: e24dd010 sub sp, sp, #16 ; 0x10 * 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, 0x0, &loc, true ) ) 3001d880: e3a01000 mov r1, #0 ; 0x0 3001d884: e1a0200d mov r2, sp 3001d888: e3a03001 mov r3, #1 ; 0x1 3001d88c: ebff98da bl 30003bfc 3001d890: e3500000 cmp r0, #0 ; 0x0 3001d894: e1a0500d mov r5, sp 3001d898: 1a000057 bne 3001d9fc return -1; mt_entry = loc.mt_entry; 3001d89c: e59d400c ldr r4, [sp, #12] /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 3001d8a0: e59d3000 ldr r3, [sp] 3001d8a4: e5942018 ldr r2, [r4, #24] 3001d8a8: e59d1008 ldr r1, [sp, #8] 3001d8ac: e1520003 cmp r2, r3 3001d8b0: 0a000009 beq 3001d8dc rtems_filesystem_freenode( &loc ); 3001d8b4: e3510000 cmp r1, #0 ; 0x0 3001d8b8: 0a000004 beq 3001d8d0 3001d8bc: e591301c ldr r3, [r1, #28] 3001d8c0: e3530000 cmp r3, #0 ; 0x0 3001d8c4: 11a0000d movne r0, sp 3001d8c8: 11a0e00f movne lr, pc 3001d8cc: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 3001d8d0: eb0031db bl 3002a044 <__errno> 3001d8d4: e3a0300d mov r3, #13 ; 0xd 3001d8d8: ea000023 b 3001d96c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 3001d8dc: e3510000 cmp r1, #0 ; 0x0 3001d8e0: 0a000004 beq 3001d8f8 3001d8e4: e591301c ldr r3, [r1, #28] 3001d8e8: e3530000 cmp r3, #0 ; 0x0 3001d8ec: 11a0000d movne r0, sp 3001d8f0: 11a0e00f movne lr, pc 3001d8f4: 112fff13 bxne r3 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 3001d8f8: e5943010 ldr r3, [r4, #16] 3001d8fc: e5933028 ldr r3, [r3, #40] 3001d900: e3530000 cmp r3, #0 ; 0x0 3001d904: 0a000003 beq 3001d918 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 3001d908: e5943020 ldr r3, [r4, #32] 3001d90c: e593302c ldr r3, [r3, #44] 3001d910: e3530000 cmp r3, #0 ; 0x0 3001d914: 1a000002 bne 3001d924 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001d918: eb0031c9 bl 3002a044 <__errno> <== NOT EXECUTED 3001d91c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001d920: ea000011 b 3001d96c <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 3001d924: e59f30f0 ldr r3, [pc, #240] ; 3001da1c 3001d928: e5933000 ldr r3, [r3] 3001d92c: e5933010 ldr r3, [r3, #16] 3001d930: e1530004 cmp r3, r4 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 3001d934: 159f00e4 ldrne r0, [pc, #228] ; 3001da20 3001d938: 14901004 ldrne r1, [r0], #4 * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 3001d93c: 1a000005 bne 3001d958 3001d940: ea000007 b 3001d964 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 ) { 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 ) { 3001d944: e5912014 ldr r2, [r1, #20] 3001d948: e5943024 ldr r3, [r4, #36] 3001d94c: e1520003 cmp r2, r3 3001d950: 0a000003 beq 3001d964 * 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 ) { 3001d954: e5911000 ldr r1, [r1] * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 3001d958: e1510000 cmp r1, r0 3001d95c: 1afffff8 bne 3001d944 3001d960: ea000028 b 3001da08 * 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 ); 3001d964: eb0031b6 bl 3002a044 <__errno> 3001d968: e3a03010 mov r3, #16 ; 0x10 3001d96c: e5803000 str r3, [r0] 3001d970: ea000021 b 3001d9fc * 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 ) 3001d974: e5943010 ldr r3, [r4, #16] 3001d978: e1a00004 mov r0, r4 3001d97c: e1a0e00f mov lr, pc 3001d980: e593f028 ldr pc, [r3, #40] 3001d984: e2505000 subs r5, r0, #0 ; 0x0 3001d988: 1a00001b bne 3001d9fc * 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){ 3001d98c: e5943020 ldr r3, [r4, #32] 3001d990: e1a00004 mov r0, r4 3001d994: e1a0e00f mov lr, pc 3001d998: e593f02c ldr pc, [r3, #44] 3001d99c: e3500000 cmp r0, #0 ; 0x0 3001d9a0: 0a000007 beq 3001d9c4 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 3001d9a4: e1a00004 mov r0, r4 <== NOT EXECUTED 3001d9a8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 3001d9ac: e1a0e00f mov lr, pc <== NOT EXECUTED 3001d9b0: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 3001d9b4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001d9b8: 0a00000f beq 3001d9fc <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 3001d9bc: e1a00005 mov r0, r5 <== NOT EXECUTED 3001d9c0: ebffa906 bl 30007de0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 3001d9c4: e1a00004 mov r0, r4 3001d9c8: eb00057c bl 3001efc0 <_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 ); 3001d9cc: e5943010 ldr r3, [r4, #16] 3001d9d0: e3530000 cmp r3, #0 ; 0x0 3001d9d4: 0a000004 beq 3001d9ec 3001d9d8: e593301c ldr r3, [r3, #28] 3001d9dc: e3530000 cmp r3, #0 ; 0x0 3001d9e0: 12840008 addne r0, r4, #8 ; 0x8 3001d9e4: 11a0e00f movne lr, pc 3001d9e8: 112fff13 bxne r3 free( mt_entry ); 3001d9ec: e1a00004 mov r0, r4 3001d9f0: ebff98d0 bl 30003d38 3001d9f4: e3a00000 mov r0, #0 ; 0x0 3001d9f8: ea000000 b 3001da00 return 0; 3001d9fc: e3e00000 mvn r0, #0 ; 0x0 } 3001da00: e28dd010 add sp, sp, #16 ; 0x10 3001da04: e8bd8030 pop {r4, r5, pc} * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 3001da08: e1a00004 mov r0, r4 3001da0c: ebff9977 bl 30003ff0 3001da10: e3500001 cmp r0, #1 ; 0x1 3001da14: 1affffd6 bne 3001d974 3001da18: eaffffd1 b 3001d964 3001da1c: 30041ee4 .word 0x30041ee4 3001da20: 30056554 .word 0x30056554 3001da24 : int utime( const char *path, const struct utimbuf *times ) { 3001da24: e92d4030 push {r4, r5, lr} 3001da28: e24dd010 sub sp, sp, #16 ; 0x10 3001da2c: e1a04001 mov r4, r1 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) 3001da30: e1a0200d mov r2, sp 3001da34: e3a01000 mov r1, #0 ; 0x0 3001da38: e3a03001 mov r3, #1 ; 0x1 3001da3c: ebff986e bl 30003bfc 3001da40: e3500000 cmp r0, #0 ; 0x0 3001da44: e1a0500d mov r5, sp 3001da48: 1a00000b bne 3001da7c return -1; if ( !temp_loc.ops->utime_h ){ 3001da4c: e59d3008 ldr r3, [sp, #8] 3001da50: e593c030 ldr ip, [r3, #48] 3001da54: e35c0000 cmp ip, #0 ; 0x0 3001da58: 1a000009 bne 3001da84 rtems_filesystem_freenode( &temp_loc ); 3001da5c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001da60: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001da64: 11a0000d movne r0, sp <== NOT EXECUTED 3001da68: 11a0e00f movne lr, pc <== NOT EXECUTED 3001da6c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001da70: eb003173 bl 3002a044 <__errno> <== NOT EXECUTED 3001da74: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001da78: e5803000 str r3, [r0] <== NOT EXECUTED 3001da7c: e3e04000 mvn r4, #0 ; 0x0 3001da80: ea00000c b 3001dab8 } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 3001da84: e8940006 ldm r4, {r1, r2} 3001da88: e1a0000d mov r0, sp 3001da8c: e1a0e00f mov lr, pc 3001da90: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 3001da94: e59d3008 ldr r3, [sp, #8] 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 ); 3001da98: e1a04000 mov r4, r0 rtems_filesystem_freenode( &temp_loc ); 3001da9c: e3530000 cmp r3, #0 ; 0x0 3001daa0: 0a000004 beq 3001dab8 3001daa4: e593301c ldr r3, [r3, #28] 3001daa8: e3530000 cmp r3, #0 ; 0x0 3001daac: 11a0000d movne r0, sp 3001dab0: 11a0e00f movne lr, pc 3001dab4: 112fff13 bxne r3 return result; } 3001dab8: e1a00004 mov r0, r4 3001dabc: e28dd010 add sp, sp, #16 ; 0x10 3001dac0: e8bd8030 pop {r4, r5, pc} 30001bb4 : */ void vprintk( const char *fmt, va_list ap ) { 30001bb4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30001bb8: e1a08000 mov r8, r0 30001bbc: e24dd018 sub sp, sp, #24 ; 0x18 30001bc0: e1a09001 mov r9, r1 if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 30001bc4: e59fb2bc ldr fp, [pc, #700] ; 30001e88 30001bc8: ea0000a9 b 30001e74 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 30001bcc: e3500025 cmp r0, #37 ; 0x25 30001bd0: 1a0000a4 bne 30001e68 fmt++; if (*fmt == '0' ) { 30001bd4: e5f83001 ldrb r3, [r8, #1]! lead = '0'; fmt++; } if (*fmt == '-' ) { minus = 1; fmt++; 30001bd8: e3a0a000 mov sl, #0 ; 0x0 width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { 30001bdc: e3530030 cmp r3, #48 ; 0x30 30001be0: 13a02020 movne r2, #32 ; 0x20 lead = '0'; fmt++; 30001be4: 02888001 addeq r8, r8, #1 ; 0x1 width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { 30001be8: 158d2000 strne r2, [sp] lead = '0'; fmt++; 30001bec: 058d3000 streq r3, [sp] } if (*fmt == '-' ) { 30001bf0: e5d83000 ldrb r3, [r8] 30001bf4: e353002d cmp r3, #45 ; 0x2d 30001bf8: 13a06000 movne r6, #0 ; 0x0 minus = 1; fmt++; 30001bfc: 02888001 addeq r8, r8, #1 ; 0x1 30001c00: 03a06001 moveq r6, #1 ; 0x1 30001c04: ea000002 b 30001c14 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); 30001c08: e3a0300a mov r3, #10 ; 0xa 30001c0c: e02a2a93 mla sl, r3, sl, r2 fmt++; 30001c10: e2888001 add r8, r8, #1 ; 0x1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 30001c14: e5d80000 ldrb r0, [r8] 30001c18: e2402030 sub r2, r0, #48 ; 0x30 30001c1c: e20230ff and r3, r2, #255 ; 0xff 30001c20: e3530009 cmp r3, #9 ; 0x9 30001c24: 9afffff7 bls 30001c08 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 30001c28: e350006c cmp r0, #108 ; 0x6c lflag = 1; c = *++fmt; 30001c2c: 05f80001 ldrbeq r0, [r8, #1]! } switch (c) { 30001c30: e3500064 cmp r0, #100 ; 0x64 30001c34: 0a00001e beq 30001cb4 30001c38: 8a00000e bhi 30001c78 30001c3c: e350004f cmp r0, #79 ; 0x4f 30001c40: 0a00004f beq 30001d84 30001c44: 8a000004 bhi 30001c5c 30001c48: e3500044 cmp r0, #68 ; 0x44 30001c4c: 0a000018 beq 30001cb4 30001c50: e3500049 cmp r0, #73 ; 0x49 30001c54: 1a000083 bne 30001e68 30001c58: ea000015 b 30001cb4 <== NOT EXECUTED 30001c5c: e3500058 cmp r0, #88 ; 0x58 <== NOT EXECUTED 30001c60: 0a00004a beq 30001d90 <== NOT EXECUTED 30001c64: e3500063 cmp r0, #99 ; 0x63 <== NOT EXECUTED 30001c68: 0a00003f beq 30001d6c <== NOT EXECUTED 30001c6c: e3500055 cmp r0, #85 ; 0x55 <== NOT EXECUTED 30001c70: 1a00007c bne 30001e68 <== NOT EXECUTED 30001c74: ea000010 b 30001cbc <== NOT EXECUTED 30001c78: e3500070 cmp r0, #112 ; 0x70 30001c7c: 0a000043 beq 30001d90 30001c80: 8a000004 bhi 30001c98 30001c84: e3500069 cmp r0, #105 ; 0x69 <== NOT EXECUTED 30001c88: 0a000009 beq 30001cb4 <== NOT EXECUTED 30001c8c: e350006f cmp r0, #111 ; 0x6f <== NOT EXECUTED 30001c90: 1a000074 bne 30001e68 <== NOT EXECUTED 30001c94: ea00003a b 30001d84 <== NOT EXECUTED 30001c98: e3500075 cmp r0, #117 ; 0x75 30001c9c: 0a000006 beq 30001cbc 30001ca0: e3500078 cmp r0, #120 ; 0x78 30001ca4: 0a000039 beq 30001d90 30001ca8: e3500073 cmp r0, #115 ; 0x73 30001cac: 1a00006d bne 30001e68 30001cb0: ea000004 b 30001cc8 30001cb4: e3a03001 mov r3, #1 ; 0x1 30001cb8: ea000000 b 30001cc0 30001cbc: e3a03000 mov r3, #0 ; 0x0 30001cc0: e3a0700a mov r7, #10 ; 0xa 30001cc4: ea000033 b 30001d98 case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 30001cc8: e5997000 ldr r7, [r9] 30001ccc: e3a05000 mov r5, #0 ; 0x0 30001cd0: e2899004 add r9, r9, #4 ; 0x4 30001cd4: ea000000 b 30001cdc /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 30001cd8: e2855001 add r5, r5, #1 ; 0x1 30001cdc: e7d73005 ldrb r3, [r7, r5] 30001ce0: e3530000 cmp r3, #0 ; 0x0 30001ce4: 1afffffb bne 30001cd8 ; /* leading spaces */ if ( !minus ) 30001ce8: e3560000 cmp r6, #0 ; 0x0 30001cec: 01a04005 moveq r4, r5 30001cf0: 0a000002 beq 30001d00 30001cf4: ea000005 b 30001d10 for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 30001d10: e35a0000 cmp sl, #0 ; 0x0 30001d14: 01a0a005 moveq sl, r5 width = len; } /* output the string */ for ( i=0 ; i 30001d24: ea000001 b 30001d30 BSP_output_char(*str); 30001d28: e1a0e00f mov lr, pc 30001d2c: e59bf000 ldr pc, [fp] if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 30001d40: e3560000 cmp r6, #0 ; 0x0 30001d44: 11a04005 movne r4, r5 30001d48: 1a000002 bne 30001d58 30001d4c: ea000047 b 30001e70 for ( i=len ; i 30001d68: ea000040 b 30001e70 BSP_output_char(' '); } break; case 'c': BSP_output_char(va_arg(ap, int)); 30001d6c: e5d90000 ldrb r0, [r9] <== NOT EXECUTED 30001d70: e2894004 add r4, r9, #4 ; 0x4 <== NOT EXECUTED 30001d74: e1a0e00f mov lr, pc <== NOT EXECUTED 30001d78: e59bf000 ldr pc, [fp] <== NOT EXECUTED 30001d7c: e1a09004 mov r9, r4 <== NOT EXECUTED 30001d80: ea00003a b 30001e70 <== NOT EXECUTED break; default: BSP_output_char(c); 30001d84: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30001d88: e3a07008 mov r7, #8 ; 0x8 <== NOT EXECUTED 30001d8c: ea000001 b 30001d98 <== NOT EXECUTED 30001d90: e3a03000 mov r3, #0 ; 0x0 30001d94: e3a07010 mov r7, #16 ; 0x10 break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 30001d98: e5994000 ldr r4, [r9] 30001d9c: e2892004 add r2, r9, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 30001da0: e0133fa4 ands r3, r3, r4, lsr #31 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 30001da4: e1a09002 mov r9, r2 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 30001da8: 0a000005 beq 30001dc4 BSP_output_char('-'); 30001dac: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED 30001db0: e1a0e00f mov lr, pc <== NOT EXECUTED 30001db4: e59bf000 ldr pc, [fp] <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 30001db8: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 30001dbc: e2644000 rsb r4, r4, #0 ; 0x0 <== NOT EXECUTED if (maxwidth) maxwidth--; 30001dc0: 124aa001 subne sl, sl, #1 ; 0x1 <== NOT EXECUTED 30001dc4: e3a05000 mov r5, #0 ; 0x0 30001dc8: ea000005 b 30001de4 } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 30001dcc: e0030097 mul r3, r7, r0 30001dd0: e28d2004 add r2, sp, #4 ; 0x4 30001dd4: e0633004 rsb r3, r3, r4 30001dd8: e7c23005 strb r3, [r2, r5] 30001ddc: e1a04000 mov r4, r0 30001de0: e1a05006 mov r5, r6 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 30001de4: e1a00004 mov r0, r4 30001de8: e1a01007 mov r1, r7 30001dec: eb004080 bl 30011ff4 <__aeabi_uidiv> 30001df0: e3500000 cmp r0, #0 ; 0x0 30001df4: e2856001 add r6, r5, #1 ; 0x1 30001df8: 1afffff3 bne 30001dcc toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 30001dfc: e28d2018 add r2, sp, #24 ; 0x18 30001e00: e0823005 add r3, r2, r5 30001e04: e5434014 strb r4, [r3, #-20] for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 30001e08: e59d3000 ldr r3, [sp] toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 30001e0c: e1a0400a mov r4, sl BSP_output_char(lead); 30001e10: e20350ff and r5, r3, #255 ; 0xff 30001e14: ea000001 b 30001e20 30001e18: e1a0e00f mov lr, pc 30001e1c: e59bf000 ldr pc, [fp] toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 30001e20: e1540006 cmp r4, r6 BSP_output_char(lead); 30001e24: e1a00005 mov r0, r5 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 30001e28: e2444001 sub r4, r4, #1 ; 0x1 30001e2c: 8afffff9 bhi 30001e18 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 30001e30: e28d2018 add r2, sp, #24 ; 0x18 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 30001e34: e3a04000 mov r4, #0 ; 0x0 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 30001e38: e0825006 add r5, r2, r6 30001e3c: ea000004 b 30001e54 30001e40: e5533015 ldrb r3, [r3, #-21] 30001e44: e59f2040 ldr r2, [pc, #64] ; 30001e8c 30001e48: e7d20003 ldrb r0, [r2, r3] 30001e4c: e1a0e00f mov lr, pc 30001e50: e59bf000 ldr pc, [fp] toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 30001e54: e1540006 cmp r4, r6 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 30001e58: e0643005 rsb r3, r4, r5 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 30001e5c: e2844001 add r4, r4, #1 ; 0x1 30001e60: 3afffff6 bcc 30001e40 30001e64: ea000001 b 30001e70 if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 30001e68: e1a0e00f mov lr, pc 30001e6c: e59bf000 ldr pc, [fp] ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 30001e70: e2888001 add r8, r8, #1 ; 0x1 30001e74: e5d80000 ldrb r0, [r8] 30001e78: e3500000 cmp r0, #0 ; 0x0 30001e7c: 1affff52 bne 30001bcc base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 30001e80: e28dd018 add sp, sp, #24 ; 0x18 30001e84: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30001e88: 30015544 .word 0x30015544 30001e8c: 30014e9c .word 0x30014e9c 30013c8c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013c8c: e59f30ac ldr r3, [pc, #172] ; 30013d40 ssize_t write( int fd, const void *buffer, size_t count ) { 30013c90: e92d4070 push {r4, r5, r6, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013c94: e5933000 ldr r3, [r3] ssize_t write( int fd, const void *buffer, size_t count ) { 30013c98: e1a0c000 mov ip, r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013c9c: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 30013ca0: e1a06001 mov r6, r1 30013ca4: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30013ca8: 2a000006 bcs 30013cc8 iop = rtems_libio_iop( fd ); 30013cac: e59f3090 ldr r3, [pc, #144] ; 30013d44 30013cb0: e5930000 ldr r0, [r3] 30013cb4: e3a03034 mov r3, #52 ; 0x34 30013cb8: e0240c93 mla r4, r3, ip, r0 rtems_libio_check_is_open( iop ); 30013cbc: e594300c ldr r3, [r4, #12] 30013cc0: e3130c01 tst r3, #256 ; 0x100 30013cc4: 1a000002 bne 30013cd4 30013cc8: ebffdd9e bl 3000b348 <__errno> <== NOT EXECUTED 30013ccc: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30013cd0: ea00000f b 30013d14 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 30013cd4: e3510000 cmp r1, #0 ; 0x0 30013cd8: 0a000004 beq 30013cf0 rtems_libio_check_count( count ); 30013cdc: e3520000 cmp r2, #0 ; 0x0 30013ce0: 01a00002 moveq r0, r2 30013ce4: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30013ce8: e3130004 tst r3, #4 ; 0x4 30013cec: 1a000002 bne 30013cfc 30013cf0: ebffdd94 bl 3000b348 <__errno> <== NOT EXECUTED 30013cf4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30013cf8: ea000005 b 30013d14 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 30013cfc: e5943030 ldr r3, [r4, #48] 30013d00: e593300c ldr r3, [r3, #12] 30013d04: e3530000 cmp r3, #0 ; 0x0 30013d08: 1a000004 bne 30013d20 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30013d0c: ebffdd8d bl 3000b348 <__errno> <== NOT EXECUTED 30013d10: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30013d14: e5803000 str r3, [r0] <== NOT EXECUTED 30013d18: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30013d1c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 30013d20: e1a00004 mov r0, r4 30013d24: e1a0e00f mov lr, pc 30013d28: e12fff13 bx r3 if ( rc > 0 ) 30013d2c: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 30013d30: c5943008 ldrgt r3, [r4, #8] 30013d34: c0833000 addgt r3, r3, r0 30013d38: c5843008 strgt r3, [r4, #8] return rc; } 30013d3c: e8bd8070 pop {r4, r5, r6, pc} 30013d40: 30015378 .word 0x30015378 30013d44: 300160ec .word 0x300160ec